This is used to provide a valid profile for the analog class.
- Note
- This class will throw exceptions in the case of an invalid configuration
Sample code:
void fn()
{
profile_builder builder{};
builder.
add_thermocouple(
"tc1", analog::thermocouple_t::type_r, analog::pin_t::vrsns3, analog::pin_t::vrsns4);
}
bool add_one_wire_resistive_sensor(std::string label, analog::pin_t positive_a)
Add a one wire resistive sensor.
bool add_thermocouple(std::string label, analog::thermocouple_t type, analog::pin_t positive_pin, analog::pin_t negative_pin)
Add a thermocouple.
analog::analog_profile to_profile()
Export the profile.
std::tuple< std::vector< sensor >, std::vector< function_channel > > analog_profile
Representation of an analog profile.
Definition analog.h:32
Any entities that belong to the IO library.
The profile builder interface.
#include <profile_builder.h>
|
| analog::analog_profile | to_profile () |
| | Export the profile.
|
| bool | add_one_wire_resistive_sensor (std::string label, analog::pin_t positive_a) |
| | Add a one wire resistive sensor.
|
| bool | add_two_wire_resistive_sensor (std::string label, analog::pin_t positive_a) |
| | Add a two wire resistive sensor which uses RREF for a more accurate reading. The trade-off is that only half of the pins are available for this sensor.
|
| bool | add_voltage_sensor (std::string label, analog::pin_t positive_pin) |
| | Add a voltage sensor.
|
| bool | add_thermocouple (std::string label, analog::thermocouple_t type, analog::pin_t positive_pin, analog::pin_t negative_pin) |
| | Add a thermocouple.
|
| bool | add_two_wire_rtd (std::string label, analog::pin_t positive_a) |
| | Add a 2 wire Pt100 resistive thermal detector.
|
| bool | add_three_wire_rtd (std::string label, analog::pin_t positive_a, analog::pin_t negative_b) |
| | Add a 3 wire Pt100 resistive thermal detector.
|
| bool | add_four_wire_rtd (std::string label, analog::pin_t positive_a, analog::pin_t negative_b, analog::pin_t positive_b) |
| | Add a 4 wire Pt100 resistive thermal detector.
|
|
| ~profile_builder () |
| | Destructor.
|
|
| profile_builder (const profile_builder &)=delete |
| | Deleted constructors.
|
|
| profile_builder (profile_builder &&)=delete |
| | Deleted constructors.
|
|
profile_builder & | operator= (const profile_builder &)=delete |
| | Deleted constructors.
|
|
profile_builder & | operator= (profile_builder &&)=delete |
| | Deleted constructors.
|
This is used to provide a valid profile for the analog class.
- Note
- This class will throw exceptions in the case of an invalid configuration
Sample code:
void fn()
{
profile_builder builder{};
builder.
add_thermocouple(
"tc1", analog::thermocouple_t::type_r, analog::pin_t::vrsns3, analog::pin_t::vrsns4);
}
◆ add_four_wire_rtd()
Add a 4 wire Pt100 resistive thermal detector.
- Note
- The first white wire should be tied to the RREF pin
- Parameters
-
| label | User chosen label - used to get a handle on the sensor |
| positive_a | The first positive wire (vrsns0, vrsns1, vrsns2, vrsns3, vrsns4, vrsns5) |
| negative_b | The second negative wire (vrsns0, vrsns2, vrsns4) |
| positive_b | The second positive wire (vrsns1, vrsns3, vrsns5)
|
◆ add_one_wire_resistive_sensor()
| bool vsdk::io::profile_builder::add_one_wire_resistive_sensor |
( |
std::string | label, |
|
|
analog::pin_t | positive_a ) |
Add a one wire resistive sensor.
- Note
- The negative connection should be tied to the AGND pin
- Parameters
-
| label | User chosen label - used to get a handle on the sensor |
| positive_a | Which pin should be used as the positive input (vrsns0, vrsns1, vrsns2, vrsns3, vrsns4, vrsns5)
|
◆ add_thermocouple()
Add a thermocouple.
- Parameters
-
| label | User chosen label - used to get a handle on the sensor |
| type | The type of thermocouple |
| positive_pin | The positive pin connection (vrsns1, vrsns3, vrsns5) |
| negative_pin | The negative pin connection (vrsns0, vrsns2, vrsns4)
|
◆ add_three_wire_rtd()
Add a 3 wire Pt100 resistive thermal detector.
- Note
- The first white wire should be tied to the RREF pin
- Parameters
-
| label | User chosen label - used to get a handle on the sensor |
| positive_a | The first positive wire (vrsns1, vrsns3, vrsns5) |
| negative_b | The second negative wire (vrsns0, vrsns2, vrsns4)
|
◆ add_two_wire_resistive_sensor()
| bool vsdk::io::profile_builder::add_two_wire_resistive_sensor |
( |
std::string | label, |
|
|
analog::pin_t | positive_a ) |
Add a two wire resistive sensor which uses RREF for a more accurate reading. The trade-off is that only half of the pins are available for this sensor.
- Note
- The negative connection should be tied to the RREF pin.
- Parameters
-
| label | User chosen label - used to get a handle on the sensor |
| positive_a | Which pin should be used as the positive input (vrsns1, vrsns3, vrsns5)
|
◆ add_two_wire_rtd()
| bool vsdk::io::profile_builder::add_two_wire_rtd |
( |
std::string | label, |
|
|
analog::pin_t | positive_a ) |
Add a 2 wire Pt100 resistive thermal detector.
- Note
- The first white wire should be tied to the RREF pin
- Parameters
-
| label | User chosen label - used to get a handle on the sensor |
| positive_a | The first positive wire (vrsns1, vrsns3, vrsns5)
|
◆ add_voltage_sensor()
| bool vsdk::io::profile_builder::add_voltage_sensor |
( |
std::string | label, |
|
|
analog::pin_t | positive_pin ) |
Add a voltage sensor.
- Note
- The negative connection should be tied to the AGND pin
- Parameters
-
| label | User chosen label - used to get a handle on the sensor |
| positive_pin | Which pin should be used as the input (vrsns0, vrsns1, vrsns2, vrsns3, vrsns4, vrsns5)
|
◆ to_profile()
Export the profile.
- Note
- The profile is moved out leaving the configuration empty
The documentation for this class was generated from the following file: