10 #ifndef __FRC_ROBORIO__
15 #include "CallbackStore.h"
16 #include "mockdata/AnalogTriggerData.h"
24 std::unique_ptr<CallbackStore> RegisterInitializedCallback(
25 NotifyCallback callback,
bool initialNotify) {
26 auto store = std::make_unique<CallbackStore>(
27 m_index, -1, callback, &HALSIM_CancelAnalogTriggerInitializedCallback);
28 store->SetUid(HALSIM_RegisterAnalogTriggerInitializedCallback(
29 m_index, &CallbackStoreThunk, store.get(), initialNotify));
33 bool GetInitialized()
const {
34 return HALSIM_GetAnalogTriggerInitialized(m_index);
37 void SetInitialized(
bool initialized) {
38 HALSIM_SetAnalogTriggerInitialized(m_index, initialized);
41 std::unique_ptr<CallbackStore> RegisterTriggerLowerBoundCallback(
42 NotifyCallback callback,
bool initialNotify) {
43 auto store = std::make_unique<CallbackStore>(
44 m_index, -1, callback,
45 &HALSIM_CancelAnalogTriggerTriggerLowerBoundCallback);
46 store->SetUid(HALSIM_RegisterAnalogTriggerTriggerLowerBoundCallback(
47 m_index, &CallbackStoreThunk, store.get(), initialNotify));
51 double GetTriggerLowerBound()
const {
52 return HALSIM_GetAnalogTriggerTriggerLowerBound(m_index);
55 void SetTriggerLowerBound(
double triggerLowerBound) {
56 HALSIM_SetAnalogTriggerTriggerLowerBound(m_index, triggerLowerBound);
59 std::unique_ptr<CallbackStore> RegisterTriggerUpperBoundCallback(
60 NotifyCallback callback,
bool initialNotify) {
61 auto store = std::make_unique<CallbackStore>(
62 m_index, -1, callback,
63 &HALSIM_CancelAnalogTriggerTriggerUpperBoundCallback);
64 store->SetUid(HALSIM_RegisterAnalogTriggerTriggerUpperBoundCallback(
65 m_index, &CallbackStoreThunk, store.get(), initialNotify));
69 double GetTriggerUpperBound()
const {
70 return HALSIM_GetAnalogTriggerTriggerUpperBound(m_index);
73 void SetTriggerUpperBound(
double triggerUpperBound) {
74 HALSIM_SetAnalogTriggerTriggerUpperBound(m_index, triggerUpperBound);
77 void ResetData() { HALSIM_ResetAnalogTriggerData(m_index); }
84 #endif // __FRC_ROBORIO__
Definition: AnalogTriggerSim.h:20
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18