VitroIO SDK
Software development kit for Vitro Shard.
|
#include <shard_edge.h>
Public Member Functions | |
ShardEdge (bool i2c3Enabled, bool uartUserEnabled, bool spi1Enabled, bool rs232Enabled, uint8_t adc1_range, uint8_t adc2_range, uint8_t adc3_range, uint8_t adc4_range) | |
Function creates instance of ShardEdge class and set private variables to given input values. More... | |
int | configureShardEdge (void) |
Function configures Shard Edge according to variables set during instance creation. More... | |
double | readVoltage (int adc_port) |
Function reads voltage from given ADC port. More... | |
double | readCurrentLoop (int cl_port) |
Function reads current loop value from given CL. More... | |
int | manageShardEdge24V (bool state) |
Function manage Shard Edge 24V output. More... | |
vitroio::sdk::ShardEdge::ShardEdge | ( | bool | i2c3Enabled, |
bool | uartUserEnabled, | ||
bool | spi1Enabled, | ||
bool | rs232Enabled, | ||
uint8_t | adc1_range, | ||
uint8_t | adc2_range, | ||
uint8_t | adc3_range, | ||
uint8_t | adc4_range | ||
) |
Function creates instance of ShardEdge class and set private variables to given input values.
i2c3Enabled | Pass true to enable I2C3. False to disable. |
uartUserEnabled | Pass true to enable UART. False to disable. |
spi1Enabled | Pass true to enable SPI1. False to disable. |
rs232Enabled | Pass true to enable RS232. False to disable. |
adc1_range | ADC1 range in Volts. Variable can only take values 2, 4, 8, 16, 30 V. Default value is 30V. |
adc2_range | ADC2 range in Volts. Variable can only take values 2, 4, 8, 16, 30 V. Default value is 30V. |
adc3_range | ADC3 range in Volts. Variable can only take values 2, 4, 8, 16, 30 V. Default value is 30V. |
adc4_range | ADC4 range in Volts. Variable can only take values 2, 4, 8, 16, 30 V. Default value is 30V. |
int vitroio::sdk::ShardEdge::configureShardEdge | ( | void | ) |
Function configures Shard Edge according to variables set during instance creation.
int vitroio::sdk::ShardEdge::manageShardEdge24V | ( | bool | state | ) |
Function manage Shard Edge 24V output.
state | definition for the 24V output. Variable can only take values 0 for "OFF", 1 for "ON". Default value is 0. |
double vitroio::sdk::ShardEdge::readCurrentLoop | ( | int | cl_port | ) |
Function reads current loop value from given CL.
cl_port | CL which is read by this function. |
double vitroio::sdk::ShardEdge::readVoltage | ( | int | adc_port | ) |
Function reads voltage from given ADC port.
adc_port | ADC which is read by this function. |