WPILibC++  2018.4.1-20180924024742-1199-gb1965f7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
DriverStationData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-2018 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 #ifndef __FRC_ROBORIO__
11 
12 #include "NotifyListener.h"
13 #include "hal/DriverStation.h"
14 #include "hal/HAL.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 void HALSIM_ResetDriverStationData(void);
21 int32_t HALSIM_RegisterDriverStationEnabledCallback(HAL_NotifyCallback callback,
22  void* param,
23  HAL_Bool initialNotify);
24 void HALSIM_CancelDriverStationEnabledCallback(int32_t uid);
25 HAL_Bool HALSIM_GetDriverStationEnabled(void);
26 void HALSIM_SetDriverStationEnabled(HAL_Bool enabled);
27 
28 int32_t HALSIM_RegisterDriverStationAutonomousCallback(
29  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
30 void HALSIM_CancelDriverStationAutonomousCallback(int32_t uid);
31 HAL_Bool HALSIM_GetDriverStationAutonomous(void);
32 void HALSIM_SetDriverStationAutonomous(HAL_Bool autonomous);
33 
34 int32_t HALSIM_RegisterDriverStationTestCallback(HAL_NotifyCallback callback,
35  void* param,
36  HAL_Bool initialNotify);
37 void HALSIM_CancelDriverStationTestCallback(int32_t uid);
38 HAL_Bool HALSIM_GetDriverStationTest(void);
39 void HALSIM_SetDriverStationTest(HAL_Bool test);
40 
41 int32_t HALSIM_RegisterDriverStationEStopCallback(HAL_NotifyCallback callback,
42  void* param,
43  HAL_Bool initialNotify);
44 void HALSIM_CancelDriverStationEStopCallback(int32_t uid);
45 HAL_Bool HALSIM_GetDriverStationEStop(void);
46 void HALSIM_SetDriverStationEStop(HAL_Bool eStop);
47 
48 int32_t HALSIM_RegisterDriverStationFmsAttachedCallback(
49  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
50 void HALSIM_CancelDriverStationFmsAttachedCallback(int32_t uid);
51 HAL_Bool HALSIM_GetDriverStationFmsAttached(void);
52 void HALSIM_SetDriverStationFmsAttached(HAL_Bool fmsAttached);
53 
54 int32_t HALSIM_RegisterDriverStationDsAttachedCallback(
55  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
56 void HALSIM_CancelDriverStationDsAttachedCallback(int32_t uid);
57 HAL_Bool HALSIM_GetDriverStationDsAttached(void);
58 void HALSIM_SetDriverStationDsAttached(HAL_Bool dsAttached);
59 
60 int32_t HALSIM_RegisterDriverStationAllianceStationIdCallback(
61  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
62 void HALSIM_CancelDriverStationAllianceStationIdCallback(int32_t uid);
63 HAL_AllianceStationID HALSIM_GetDriverStationAllianceStationId(void);
64 void HALSIM_SetDriverStationAllianceStationId(
65  HAL_AllianceStationID allianceStationId);
66 
67 int32_t HALSIM_RegisterDriverStationMatchTimeCallback(
68  HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify);
69 void HALSIM_CancelDriverStationMatchTimeCallback(int32_t uid);
70 double HALSIM_GetDriverStationMatchTime(void);
71 void HALSIM_SetDriverStationMatchTime(double matchTime);
72 
73 void HALSIM_SetJoystickAxes(int32_t joystickNum, const HAL_JoystickAxes* axes);
74 void HALSIM_SetJoystickPOVs(int32_t joystickNum, const HAL_JoystickPOVs* povs);
75 void HALSIM_SetJoystickButtons(int32_t joystickNum,
76  const HAL_JoystickButtons* buttons);
77 void HALSIM_SetJoystickDescriptor(int32_t joystickNum,
78  const HAL_JoystickDescriptor* descriptor);
79 
80 void HALSIM_GetJoystickOutputs(int32_t joystickNum, int64_t* outputs,
81  int32_t* leftRumble, int32_t* rightRumble);
82 
83 void HALSIM_SetMatchInfo(const HAL_MatchInfo* info);
84 
85 void HALSIM_RegisterDriverStationAllCallbacks(HAL_NotifyCallback callback,
86  void* param,
87  HAL_Bool initialNotify);
88 
89 void HALSIM_NotifyDriverStationNewData(void);
90 
91 #ifdef __cplusplus
92 } // extern "C"
93 #endif
94 
95 #endif
Definition: DriverStation.h:90
Definition: DriverStation.h:101
Definition: DriverStation.h:78
Definition: DriverStation.h:84
Definition: DriverStation.h:72