|
Veethree D7 SDK
|
The i420 class.
Class used for reading 4-20 mA inputs.
For hardware connections, see hardware interfaces and 4-20 mA pins.
Sample code:
#include <i420.h>
Public Member Functions | |
| i420 () | |
| The class default constructor, which uses i420_context as its provider. | |
| i420 (std::shared_ptr< i420_context_interface > ctx) | |
| The class constructor. | |
| analog_result | read_from (i420_input input) const |
| Read the selected input. | |
| Public Member Functions inherited from vsdk::io::event_notification | |
| virtual event_notification_id | add_notification (const event_notification_descriptor &desc) |
| Add a definition when an event must be notified. | |
| virtual bool | remove_notification (event_notification_id id) |
| Remove a notification identified by 'id'. | |
| virtual void | remove_all_notifications () |
| Remove all notifications. | |
| virtual void | start_notifications () |
| Start the event notifications. | |
| virtual void | stop_notifications () |
| Stop the event notifications. | |
| event_notification () | |
| Class constructors. | |
| event_notification (const event_notification &other)=delete | |
| Class constructors. | |
| event_notification (event_notification &&other) noexcept | |
| Class constructors. | |
| event_notification & | operator= (const event_notification &other)=delete |
| Assignment operators. | |
| event_notification & | operator= (event_notification &&other) noexcept |
| Assignment operators. | |
Protected Member Functions | |
| bool | process_notification (const event_notification_descriptor &desc) const noexcept override |
| Notification processing interface. | |
The i420 class.
Class used for reading 4-20 mA inputs.
For hardware connections, see hardware interfaces and 4-20 mA pins.
Sample code:
|
explicit |
The class constructor.
The i420 context object is the data provider for this class.
| ctx | The i420 context object that implements i420_context_interface. |
|
overrideprotectedvirtualnoexcept |
Notification processing interface.
When a notification is a vsdk::io::event_notification_frequency::single_shot, once that notification is generated it is automatically removed, so attempting to use its vsdk::io::event_notification_id in the remove_notification function will result in a false return value.
| desc | A notification description, see vsdk::io::event_notification_descriptor. |
Implements vsdk::io::event_notification.
| analog_result vsdk::io::i420::read_from | ( | i420_input | input | ) | const |
Read the selected input.
See the i420_input description in order to know the result unit (mA or mV). If an input is not connected, read values will be 0 mA (some cases 0.01 mA or less).
| input | The input to be read_from. See vsdk::io::i420_input for input names and returned unit. |
| libio_error |