5#ifndef IO_EVENT_COMMON_H
6#define IO_EVENT_COMMON_H
99#ifndef DOXYGEN_SKIP_THIS
105struct fmt::formatter<
vsdk::io::event_source> : fmt::formatter<uint32_t> {
114 return formatter<uint32_t>::format(src.hash(), ctx);
122struct fmt::formatter<
vsdk::io::event_type> : fmt::formatter<uint32_t> {
131 return formatter<uint32_t>::format(
static_cast<uint32_t
>(type), ctx);
139struct fmt::formatter<
vsdk::io::range_value> : fmt::formatter<std::string> {
146 auto format(vsdk::io::range_value range, format_context& ctx)
const -> format_context::iterator
148 return formatter<std::string>::format(fmt::format(
"s:{},e:{}", range.start, range.end), ctx);
Describes the source of an event.
Definition io_event_source.h:25
Include this file to your file so you have access to fmtlib header-only implementation.
event_type
Describes the event type.
Definition io_event_common.h:41
@ in_range
any value inside of [start, end) - including start, excluding end.
Definition io_event_common.h:46
@ target_state
indicates a digital input value has changed to a specific state.
Definition io_event_common.h:48
@ state_change
indicates a digital input value has changed state.
Definition io_event_common.h:47
@ threshold_below
any value less than the threshold specified.
Definition io_event_common.h:44
@ threshold_above
any value greater than the threshold specified.
Definition io_event_common.h:43
IO event source interface.
Any entities that belong to the IO library.
@ out_of_range
Value is out of valid range.
Definition io_common.h:25
@ none
No unit.
Definition io_common.h:41
Any entities that belong to the Veethree SDK libraries.
Definition can_adapter.h:11
bool is_out_of_range(const double value) const
Return a boolean indicating if a value is out of range.
Definition io_event_common.h:91
bool is_in_range(const double value) const
Return a boolean indicating if a value is in range.
Definition io_event_common.h:85
double start
Start of range.
Definition io_event_common.h:74
range_value()
Default constructor.
Definition io_event_common.h:67
range_value(double s, double e)
Constructor that takes the 'start' and 'end' values for a range.
Definition io_event_common.h:60
double end
End of range.
Definition io_event_common.h:78