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));
32 bool GetInitialized() {
return HALSIM_GetAnalogTriggerInitialized(m_index); }
33 void SetInitialized(
bool initialized) {
34 HALSIM_SetAnalogTriggerInitialized(m_index, initialized);
37 std::unique_ptr<CallbackStore> RegisterTriggerLowerBoundCallback(
38 NotifyCallback callback,
bool initialNotify) {
39 auto store = std::make_unique<CallbackStore>(
40 m_index, -1, callback,
41 &HALSIM_CancelAnalogTriggerTriggerLowerBoundCallback);
42 store->SetUid(HALSIM_RegisterAnalogTriggerTriggerLowerBoundCallback(
43 m_index, &CallbackStoreThunk, store.get(), initialNotify));
46 double GetTriggerLowerBound() {
47 return HALSIM_GetAnalogTriggerTriggerLowerBound(m_index);
49 void SetTriggerLowerBound(
double triggerLowerBound) {
50 HALSIM_SetAnalogTriggerTriggerLowerBound(m_index, triggerLowerBound);
53 std::unique_ptr<CallbackStore> RegisterTriggerUpperBoundCallback(
54 NotifyCallback callback,
bool initialNotify) {
55 auto store = std::make_unique<CallbackStore>(
56 m_index, -1, callback,
57 &HALSIM_CancelAnalogTriggerTriggerUpperBoundCallback);
58 store->SetUid(HALSIM_RegisterAnalogTriggerTriggerUpperBoundCallback(
59 m_index, &CallbackStoreThunk, store.get(), initialNotify));
62 double GetTriggerUpperBound() {
63 return HALSIM_GetAnalogTriggerTriggerUpperBound(m_index);
65 void SetTriggerUpperBound(
double triggerUpperBound) {
66 HALSIM_SetAnalogTriggerTriggerUpperBound(m_index, triggerUpperBound);
69 void ResetData() { HALSIM_ResetAnalogTriggerData(m_index); }
76 #endif // __FRC_ROBORIO__
Definition: AnalogTriggerSim.h:20
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18