|
Veethree D7 SDK
|
Event-based notification system for asynchronous I/O operations.
The Events module provides a notification system that enables asynchronous monitoring of I/O state changes without requiring continuous polling. It allows applications to:
Key classes:
Usage pattern:
The event system is integrated throughout the I/O library components, with both digital, 4-20mA and analog channels supporting event-based operations.
See Events Examples for usage examples of the events system with an analog pin.
Classes | |
| class | vsdk::io::event |
| The event class interface. More... | |
| struct | vsdk::io::range_value |
| A range value start-end pair. More... | |
| class | vsdk::io::event_data |
| The event_data class. More... | |
| struct | vsdk::io::event_notification_schedule |
| The event_notification_schedule class. More... | |
| struct | vsdk::io::event_notification_descriptor |
| The event_notification_descriptor class. More... | |
| class | vsdk::io::event_notification |
| The event_notification class. More... | |
| class | vsdk::io::event_queue |
| The event_queue class. More... | |
| class | vsdk::io::event_source |
| Describes the source of an event. More... | |
| class | vsdk::io::range_event |
| The range_event class. More... | |
| class | vsdk::io::range_event_data |
| The range_event_data class. More... | |
| class | vsdk::io::state_event |
| The state_event class. More... | |
| class | vsdk::io::state_event_data |
| The state_event_data class. More... | |
| class | vsdk::io::threshold_event |
| The threshold_event class. More... | |
| class | vsdk::io::threshold_event_data |
| The threshold_event_data class. More... | |
Typedefs | |
| using | vsdk::io::event_notification_id = uint32_t |
| Identifies a specific notification entry. | |
| using | vsdk::io::event_handler = std::function<void(std::shared_ptr<event>)> |
| Event handler function definition. | |
| using | vsdk::io::event_handler_id = uint32_t |
| Event handler Id. | |
Enumerations | |
| enum class | vsdk::io::event_type : uint8_t { vsdk::io::event_type::none , vsdk::io::event_type::threshold_above , vsdk::io::event_type::threshold_below , vsdk::io::event_type::out_of_range , vsdk::io::event_type::in_range , vsdk::io::event_type::state_change , vsdk::io::event_type::target_state } |
| Describes the event type. More... | |
| enum class | vsdk::io::event_notification_frequency : uint8_t { vsdk::io::event_notification_frequency::continuous , vsdk::io::event_notification_frequency::single_shot } |
| Specifies the type of notifications. More... | |
Event-based notification system for asynchronous I/O operations.
The Events module provides a notification system that enables asynchronous monitoring of I/O state changes without requiring continuous polling. It allows applications to:
Key classes:
Usage pattern:
The event system is integrated throughout the I/O library components, with both digital, 4-20mA and analog channels supporting event-based operations.
See Events Examples for usage examples of the events system with an analog pin.
| using vsdk::io::event_handler = std::function<void(std::shared_ptr<event>)> |
Event handler function definition.
The base type is std::function, so all the flexibility that std::function offers can be used as the handler implementation.
| using vsdk::io::event_handler_id = uint32_t |
Event handler Id.
Used to identify a specific event handler, used to remove the handler if required.
|
strong |
|
strong |
Describes the event type.
Threshold events examples:
threshold_above, threshold 10.0 - value > threshold will trigger the event.
threshold_below, threshold 10.0 - value < threshold will trigger the event.
threshold_below, threshold 10.0 - value = threshold will NOT trigger the event.
Range events examples: out_of_range, start 5.0, end 10.0 - value < start or value > end will trigger the event. out_of_range, start 5.0, end 10.0 - value = start or value = end will NOT trigger the event. in_range, start 5.0, end 10.0 - value = start will trigger the event. in_range, start 5.0, end 10.0 - value = end will NOT trigger the event. in_range, start 5.0, end 10.0 - value >= start and value < end will trigger the event. in_range, start 5.0, end 10.0 - value < start or value >= end will NOT trigger the event.
You can use in_range to form bands of values as the end of the range is excluded. Example: in_range start 5.0 end 10.0, in_range start 10.0 end 15.0, etc.
State events examples: An input changed from inactive to active high.
| Enumerator | |
|---|---|
| none | indicates event_type default value. |
| threshold_above | any value greater than the threshold specified. |
| threshold_below | any value less than the threshold specified. |
| out_of_range | any value outside of (start, end) - excluding start and end. |
| in_range | any value inside of [start, end) - including start, excluding end. |
| state_change | indicates a digital input value has changed state. |
| target_state | indicates a digital input value has changed to a specific state. |