Class to write to digital outputs.
Definition: DigitalOutput.h:25
Class to control a simulated digital input or output.
Definition: DIOSim.h:21
DIOSim(const DigitalOutput &output)
Constructs from a DigitalOutput object.
void SetInitialized(bool initialized)
Define whether this DIO has been initialized.
void SetPulseLength(double pulseLength)
Change the pulse length of this DIO port.
double GetPulseLength() const
Read the pulse length.
std::unique_ptr< CallbackStore > RegisterValueCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the DIO value changes.
DIOSim(int channel)
Constructs from an digital I/O channel number.
std::unique_ptr< CallbackStore > RegisterInitializedCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when this DIO is initialized.
void ResetData()
Reset all simulation data of this object.
std::unique_ptr< CallbackStore > RegisterPulseLengthCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the pulse length changes.
bool GetValue() const
Read the value of the DIO port.
void SetValue(bool value)
Change the DIO value.
bool GetIsInput() const
Check whether this DIO port is currently an Input.
void SetIsInput(bool isInput)
Define whether this DIO port is an Input.
void SetFilterIndex(int filterIndex)
Change the filter index of this DIO port.
std::unique_ptr< CallbackStore > RegisterIsInputCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever this DIO changes to be an input.
DIOSim(const DigitalInput &input)
Constructs from a DigitalInput object.
bool GetInitialized() const
Check whether this DIO has been initialized.
int GetFilterIndex() const
Read the filter index.
std::unique_ptr< CallbackStore > RegisterFilterIndexCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the filter index changes.
std::function< void(std::string_view, const HAL_Value *)> NotifyCallback
Definition: CallbackStore.h:14
Definition: AprilTagFieldLayout.h:22