This object represents a set of user specified analog sensors that are connected to the NAFE.
Sample code:
void fn()
{
auto tc1 =
analog->get_handle(
"tc1");
auto tc2 =
analog->get_handle(
"tc2");
std::cout <<
"TC1: " <<
analog->read_from(tc1).value <<
'\n';
std::cout <<
"TC2: " <<
analog->read_from(tc2).value <<
'\n';
}
analog(const analog &)=delete
static analog * instance()
Get a pointer to the singleton instance.
std::tuple< std::vector< sensor >, std::vector< function_channel > > analog_profile
Representation of an analog profile.
Definition analog.h:32
Anything related to configuring or reading analog sensors.
#include <analog.h>
|
|
static analog * | instance () |
| | Get a pointer to the singleton instance.
|
|
|
static constexpr uint8_t | max_sensor_count = 6 |
| | The maximum number of sensors that can exist in a profile.
|
This object represents a set of user specified analog sensors that are connected to the NAFE.
Sample code:
void fn()
{
auto tc1 =
analog->get_handle(
"tc1");
auto tc2 =
analog->get_handle(
"tc2");
std::cout <<
"TC1: " <<
analog->read_from(tc1).value <<
'\n';
std::cout <<
"TC2: " <<
analog->read_from(tc2).value <<
'\n';
}
◆ ~analog()
| vsdk::io::analog::analog::~analog |
( |
| ) |
|
|
override |
◆ analog() [1/2]
| vsdk::io::analog::analog::analog |
( |
const analog & | | ) |
|
|
delete |
◆ analog() [2/2]
| vsdk::io::analog::analog::analog |
( |
analog && | | ) |
|
|
delete |
◆ get_handle()
| int8_t vsdk::io::analog::analog::get_handle |
( |
std::string | label | ) |
|
Get the handle to a configured sensor.
- Returns
- A postive integer representing the sensor handle, otherwise -1 if the sensor could not be found
◆ init() [1/2]
Initialize the analog singleton.
- Note
- Use the vsdk::io::profile_builder to configure a profile
- Warning
- This constructor will default to a mock implementation when built for a host machine
◆ init() [2/2]
| void vsdk::io::analog::analog::init |
( |
const analog_profile & | profile, |
|
|
std::unique_ptr< nafe::nafe_interface > | nafe ) |
◆ operator=() [1/2]
◆ operator=() [2/2]
| analog & vsdk::io::analog::analog::operator= |
( |
const analog & | | ) |
|
|
delete |
◆ process_notification()
|
|
overrideprotectedvirtualnoexcept |
◆ read_from()
| analog_result vsdk::io::analog::analog::read_from |
( |
int8_t | handle | ) |
|
Read a sensor value.
- Parameters
-
| handle | handle as provided by the get_handle function |
- Returns
- io_result
The documentation for this class was generated from the following file: