13 #include "CallbackStore.h"
14 #include "mockdata/AnalogTriggerData.h"
22 std::unique_ptr<CallbackStore> RegisterInitializedCallback(
23 NotifyCallback callback,
bool initialNotify) {
24 auto store = std::make_unique<CallbackStore>(
25 m_index, -1, callback, &HALSIM_CancelAnalogTriggerInitializedCallback);
26 store->SetUid(HALSIM_RegisterAnalogTriggerInitializedCallback(
27 m_index, &CallbackStoreThunk, store.get(), initialNotify));
31 bool GetInitialized()
const {
32 return HALSIM_GetAnalogTriggerInitialized(m_index);
35 void SetInitialized(
bool initialized) {
36 HALSIM_SetAnalogTriggerInitialized(m_index, initialized);
39 std::unique_ptr<CallbackStore> RegisterTriggerLowerBoundCallback(
40 NotifyCallback callback,
bool initialNotify) {
41 auto store = std::make_unique<CallbackStore>(
42 m_index, -1, callback,
43 &HALSIM_CancelAnalogTriggerTriggerLowerBoundCallback);
44 store->SetUid(HALSIM_RegisterAnalogTriggerTriggerLowerBoundCallback(
45 m_index, &CallbackStoreThunk, store.get(), initialNotify));
49 double GetTriggerLowerBound()
const {
50 return HALSIM_GetAnalogTriggerTriggerLowerBound(m_index);
53 void SetTriggerLowerBound(
double triggerLowerBound) {
54 HALSIM_SetAnalogTriggerTriggerLowerBound(m_index, triggerLowerBound);
57 std::unique_ptr<CallbackStore> RegisterTriggerUpperBoundCallback(
58 NotifyCallback callback,
bool initialNotify) {
59 auto store = std::make_unique<CallbackStore>(
60 m_index, -1, callback,
61 &HALSIM_CancelAnalogTriggerTriggerUpperBoundCallback);
62 store->SetUid(HALSIM_RegisterAnalogTriggerTriggerUpperBoundCallback(
63 m_index, &CallbackStoreThunk, store.get(), initialNotify));
67 double GetTriggerUpperBound()
const {
68 return HALSIM_GetAnalogTriggerTriggerUpperBound(m_index);
71 void SetTriggerUpperBound(
double triggerUpperBound) {
72 HALSIM_SetAnalogTriggerTriggerUpperBound(m_index, triggerUpperBound);
75 void ResetData() { HALSIM_ResetAnalogTriggerData(m_index); }