10 #ifndef __FRC_ROBORIO__
15 #include "CallbackStore.h"
16 #include "mockdata/DriverStationData.h"
22 std::unique_ptr<CallbackStore> RegisterEnabledCallback(
23 NotifyCallback callback,
bool initialNotify) {
24 auto store = std::make_unique<CallbackStore>(
25 -1, callback, &HALSIM_CancelDriverStationEnabledCallback);
26 store->SetUid(HALSIM_RegisterDriverStationEnabledCallback(
27 &CallbackStoreThunk, store.get(), initialNotify));
30 bool GetEnabled() {
return HALSIM_GetDriverStationEnabled(); }
31 void SetEnabled(
bool enabled) { HALSIM_SetDriverStationEnabled(enabled); }
33 std::unique_ptr<CallbackStore> RegisterAutonomousCallback(
34 NotifyCallback callback,
bool initialNotify) {
35 auto store = std::make_unique<CallbackStore>(
36 -1, callback, &HALSIM_CancelDriverStationAutonomousCallback);
37 store->SetUid(HALSIM_RegisterDriverStationAutonomousCallback(
38 &CallbackStoreThunk, store.get(), initialNotify));
41 bool GetAutonomous() {
return HALSIM_GetDriverStationAutonomous(); }
42 void SetAutonomous(
bool autonomous) {
43 HALSIM_SetDriverStationAutonomous(autonomous);
46 std::unique_ptr<CallbackStore> RegisterTestCallback(NotifyCallback callback,
48 auto store = std::make_unique<CallbackStore>(
49 -1, callback, &HALSIM_CancelDriverStationTestCallback);
50 store->SetUid(HALSIM_RegisterDriverStationTestCallback(
51 &CallbackStoreThunk, store.get(), initialNotify));
54 bool GetTest() {
return HALSIM_GetDriverStationTest(); }
55 void SetTest(
bool test) { HALSIM_SetDriverStationTest(test); }
57 std::unique_ptr<CallbackStore> RegisterEStopCallback(NotifyCallback callback,
59 auto store = std::make_unique<CallbackStore>(
60 -1, callback, &HALSIM_CancelDriverStationEStopCallback);
61 store->SetUid(HALSIM_RegisterDriverStationEStopCallback(
62 &CallbackStoreThunk, store.get(), initialNotify));
65 bool GetEStop() {
return HALSIM_GetDriverStationEStop(); }
66 void SetEStop(
bool eStop) { HALSIM_SetDriverStationEStop(eStop); }
68 std::unique_ptr<CallbackStore> RegisterFmsAttachedCallback(
69 NotifyCallback callback,
bool initialNotify) {
70 auto store = std::make_unique<CallbackStore>(
71 -1, callback, &HALSIM_CancelDriverStationFmsAttachedCallback);
72 store->SetUid(HALSIM_RegisterDriverStationFmsAttachedCallback(
73 &CallbackStoreThunk, store.get(), initialNotify));
76 bool GetFmsAttached() {
return HALSIM_GetDriverStationFmsAttached(); }
77 void SetFmsAttached(
bool fmsAttached) {
78 HALSIM_SetDriverStationFmsAttached(fmsAttached);
81 std::unique_ptr<CallbackStore> RegisterDsAttachedCallback(
82 NotifyCallback callback,
bool initialNotify) {
83 auto store = std::make_unique<CallbackStore>(
84 -1, callback, &HALSIM_CancelDriverStationDsAttachedCallback);
85 store->SetUid(HALSIM_RegisterDriverStationDsAttachedCallback(
86 &CallbackStoreThunk, store.get(), initialNotify));
89 bool GetDsAttached() {
return HALSIM_GetDriverStationDsAttached(); }
90 void SetDsAttached(
bool dsAttached) {
91 HALSIM_SetDriverStationDsAttached(dsAttached);
94 void ResetData() { HALSIM_ResetDriverStationData(); }
98 #endif // __FRC_ROBORIO__
Definition: DriverStationSim.h:20
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18