WPILibC++  2020.3.2
DriverStationData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include "NotifyListener.h"
11 #include "hal/DriverStationTypes.h"
12 #include "hal/Types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 void HALSIM_ResetDriverStationData(void);
19 int32_t HALSIM_RegisterDriverStationEnabledCallback(HAL_NotifyCallback callback,
20  void* param,
21  HAL_Bool initialNotify);
22 void HALSIM_CancelDriverStationEnabledCallback(int32_t uid);
23 HAL_Bool HALSIM_GetDriverStationEnabled(void);
24 void HALSIM_SetDriverStationEnabled(HAL_Bool enabled);
25 
26 int32_t HALSIM_RegisterDriverStationAutonomousCallback(
27  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
28 void HALSIM_CancelDriverStationAutonomousCallback(int32_t uid);
29 HAL_Bool HALSIM_GetDriverStationAutonomous(void);
30 void HALSIM_SetDriverStationAutonomous(HAL_Bool autonomous);
31 
32 int32_t HALSIM_RegisterDriverStationTestCallback(HAL_NotifyCallback callback,
33  void* param,
34  HAL_Bool initialNotify);
35 void HALSIM_CancelDriverStationTestCallback(int32_t uid);
36 HAL_Bool HALSIM_GetDriverStationTest(void);
37 void HALSIM_SetDriverStationTest(HAL_Bool test);
38 
39 int32_t HALSIM_RegisterDriverStationEStopCallback(HAL_NotifyCallback callback,
40  void* param,
41  HAL_Bool initialNotify);
42 void HALSIM_CancelDriverStationEStopCallback(int32_t uid);
43 HAL_Bool HALSIM_GetDriverStationEStop(void);
44 void HALSIM_SetDriverStationEStop(HAL_Bool eStop);
45 
46 int32_t HALSIM_RegisterDriverStationFmsAttachedCallback(
47  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
48 void HALSIM_CancelDriverStationFmsAttachedCallback(int32_t uid);
49 HAL_Bool HALSIM_GetDriverStationFmsAttached(void);
50 void HALSIM_SetDriverStationFmsAttached(HAL_Bool fmsAttached);
51 
52 int32_t HALSIM_RegisterDriverStationDsAttachedCallback(
53  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
54 void HALSIM_CancelDriverStationDsAttachedCallback(int32_t uid);
55 HAL_Bool HALSIM_GetDriverStationDsAttached(void);
56 void HALSIM_SetDriverStationDsAttached(HAL_Bool dsAttached);
57 
58 int32_t HALSIM_RegisterDriverStationAllianceStationIdCallback(
59  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
60 void HALSIM_CancelDriverStationAllianceStationIdCallback(int32_t uid);
61 HAL_AllianceStationID HALSIM_GetDriverStationAllianceStationId(void);
62 void HALSIM_SetDriverStationAllianceStationId(
63  HAL_AllianceStationID allianceStationId);
64 
65 int32_t HALSIM_RegisterDriverStationMatchTimeCallback(
66  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
67 void HALSIM_CancelDriverStationMatchTimeCallback(int32_t uid);
68 double HALSIM_GetDriverStationMatchTime(void);
69 void HALSIM_SetDriverStationMatchTime(double matchTime);
70 
71 void HALSIM_SetJoystickAxes(int32_t joystickNum, const HAL_JoystickAxes* axes);
72 void HALSIM_SetJoystickPOVs(int32_t joystickNum, const HAL_JoystickPOVs* povs);
73 void HALSIM_SetJoystickButtons(int32_t joystickNum,
74  const HAL_JoystickButtons* buttons);
75 void HALSIM_SetJoystickDescriptor(int32_t joystickNum,
76  const HAL_JoystickDescriptor* descriptor);
77 
78 void HALSIM_GetJoystickOutputs(int32_t joystickNum, int64_t* outputs,
79  int32_t* leftRumble, int32_t* rightRumble);
80 
81 void HALSIM_SetMatchInfo(const HAL_MatchInfo* info);
82 
83 void HALSIM_RegisterDriverStationAllCallbacks(HAL_NotifyCallback callback,
84  void* param,
85  HAL_Bool initialNotify);
86 
87 void HALSIM_NotifyDriverStationNewData(void);
88 
89 #ifdef __cplusplus
90 } // extern "C"
91 #endif
HAL_JoystickAxes
Definition: DriverStationTypes.h:72
HAL_JoystickPOVs
Definition: DriverStationTypes.h:78
HAL_MatchInfo
Definition: DriverStationTypes.h:101
HAL_JoystickButtons
Definition: DriverStationTypes.h:84
HAL_JoystickDescriptor
Definition: DriverStationTypes.h:90