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));
31 bool GetEnabled()
const {
return HALSIM_GetDriverStationEnabled(); }
33 void SetEnabled(
bool enabled) { HALSIM_SetDriverStationEnabled(enabled); }
35 std::unique_ptr<CallbackStore> RegisterAutonomousCallback(
36 NotifyCallback callback,
bool initialNotify) {
37 auto store = std::make_unique<CallbackStore>(
38 -1, callback, &HALSIM_CancelDriverStationAutonomousCallback);
39 store->SetUid(HALSIM_RegisterDriverStationAutonomousCallback(
40 &CallbackStoreThunk, store.get(), initialNotify));
44 bool GetAutonomous()
const {
return HALSIM_GetDriverStationAutonomous(); }
46 void SetAutonomous(
bool autonomous) {
47 HALSIM_SetDriverStationAutonomous(autonomous);
50 std::unique_ptr<CallbackStore> RegisterTestCallback(NotifyCallback callback,
52 auto store = std::make_unique<CallbackStore>(
53 -1, callback, &HALSIM_CancelDriverStationTestCallback);
54 store->SetUid(HALSIM_RegisterDriverStationTestCallback(
55 &CallbackStoreThunk, store.get(), initialNotify));
59 bool GetTest()
const {
return HALSIM_GetDriverStationTest(); }
61 void SetTest(
bool test) { HALSIM_SetDriverStationTest(test); }
63 std::unique_ptr<CallbackStore> RegisterEStopCallback(NotifyCallback callback,
65 auto store = std::make_unique<CallbackStore>(
66 -1, callback, &HALSIM_CancelDriverStationEStopCallback);
67 store->SetUid(HALSIM_RegisterDriverStationEStopCallback(
68 &CallbackStoreThunk, store.get(), initialNotify));
72 bool GetEStop()
const {
return HALSIM_GetDriverStationEStop(); }
74 void SetEStop(
bool eStop) { HALSIM_SetDriverStationEStop(eStop); }
76 std::unique_ptr<CallbackStore> RegisterFmsAttachedCallback(
77 NotifyCallback callback,
bool initialNotify) {
78 auto store = std::make_unique<CallbackStore>(
79 -1, callback, &HALSIM_CancelDriverStationFmsAttachedCallback);
80 store->SetUid(HALSIM_RegisterDriverStationFmsAttachedCallback(
81 &CallbackStoreThunk, store.get(), initialNotify));
85 bool GetFmsAttached()
const {
return HALSIM_GetDriverStationFmsAttached(); }
87 void SetFmsAttached(
bool fmsAttached) {
88 HALSIM_SetDriverStationFmsAttached(fmsAttached);
91 std::unique_ptr<CallbackStore> RegisterDsAttachedCallback(
92 NotifyCallback callback,
bool initialNotify) {
93 auto store = std::make_unique<CallbackStore>(
94 -1, callback, &HALSIM_CancelDriverStationDsAttachedCallback);
95 store->SetUid(HALSIM_RegisterDriverStationDsAttachedCallback(
96 &CallbackStoreThunk, store.get(), initialNotify));
100 bool GetDsAttached()
const {
return HALSIM_GetDriverStationDsAttached(); }
102 void SetDsAttached(
bool dsAttached) {
103 HALSIM_SetDriverStationDsAttached(dsAttached);
106 void NotifyNewData() { HALSIM_NotifyDriverStationNewData(); }
108 void ResetData() { HALSIM_ResetDriverStationData(); }
112 #endif // __FRC_ROBORIO__
Definition: DriverStationSim.h:20
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18