Functions for controlling and reading auxiliary IO.
More...
|
| int | Bs120xEnet_SetDIOStates (Bs120xEnetHandle handle, const bool output[], size_t output_len, const bool direction[], size_t direction_len) |
| | Set the output states and directions for all DIO.
|
| |
| int | Bs120xEnet_SetAnalogOutputs (Bs120xEnetHandle handle, const float voltages[], size_t voltages_len) |
| | Set the voltages for all analog outputs.
|
| |
| int | Bs120xEnet_GetAnalogInput (Bs120xEnetHandle handle, unsigned int analog_input, float *voltage_out) |
| | Gets the voltage of an analog input.
|
| |
| int | Bs120xEnet_GetAllAnalogInput (Bs120xEnetHandle handle, float voltage_out[], size_t voltage_out_len) |
| | Gets the voltages of all analog inputs.
|
| |
| int | Bs120xEnet_GetDIOState (Bs120xEnetHandle handle, unsigned int dio, bool *state_out) |
| | Gets the output state of a DIO.
|
| |
| int | Bs120xEnet_GetAllDIOState (Bs120xEnetHandle handle, bool state_out[], size_t state_out_len) |
| | Gets the output states of all DIO.
|
| |
Functions for controlling and reading auxiliary IO.
◆ Bs120xEnet_GetAllAnalogInput()
| int Bs120xEnet_GetAllAnalogInput |
( |
Bs120xEnetHandle |
handle, |
|
|
float |
voltage_out[], |
|
|
size_t |
voltage_out_len |
|
) |
| |
Gets the voltages of all analog inputs.
- Note
- The BS120x unit must have UDP data broadcast enabled for this method to return valid data.
- Parameters
-
| [in] | handle | Ethernet client handle. |
| [out] | voltage_out | Array to store the returned voltages. |
| [in] | voltage_out_len | Length of the voltages_out array. Must be equal to the number of analog inputs. |
- Returns
- 0 on success or a negative error code.
◆ Bs120xEnet_GetAllDIOState()
| int Bs120xEnet_GetAllDIOState |
( |
Bs120xEnetHandle |
handle, |
|
|
bool |
state_out[], |
|
|
size_t |
state_out_len |
|
) |
| |
Gets the output states of all DIO.
- Note
- The BS120x unit must have UDP data broadcast enabled for this method to return valid data.
- Parameters
-
| [in] | handle | Ethernet client handle. |
| [out] | state_out | Array to store the returned states. |
| [in] | state_out_len | Length of the state_out array. Must be equal to the number of DIO. |
- Returns
- 0 on success or a negative error code.
◆ Bs120xEnet_GetAnalogInput()
| int Bs120xEnet_GetAnalogInput |
( |
Bs120xEnetHandle |
handle, |
|
|
unsigned int |
analog_input, |
|
|
float * |
voltage_out |
|
) |
| |
Gets the voltage of an analog input.
- Note
- The BS120x unit must have UDP data broadcast enabled for this method to return valid data.
- Parameters
-
| [in] | handle | Ethernet client handle. |
| [in] | analog_input | The analog input to target. Analog inputs are 0-indexed. |
| [out] | voltage_out | Pointer to the returned voltage. |
- Returns
- 0 on success or a negative error code.
◆ Bs120xEnet_GetDIOState()
| int Bs120xEnet_GetDIOState |
( |
Bs120xEnetHandle |
handle, |
|
|
unsigned int |
dio, |
|
|
bool * |
state_out |
|
) |
| |
Gets the output state of a DIO.
- Note
- The BS120x unit must have UDP data broadcast enabled for this method to return valid data.
- Parameters
-
| [in] | handle | Ethernet client handle. |
| [in] | dio | The DIO to target. DIO are 0-indexed. |
| [out] | state_out | Pointer to the returned state. |
- Returns
- 0 or a negative error code.
◆ Bs120xEnet_SetAnalogOutputs()
| int Bs120xEnet_SetAnalogOutputs |
( |
Bs120xEnetHandle |
handle, |
|
|
const float |
voltages[], |
|
|
size_t |
voltages_len |
|
) |
| |
Set the voltages for all analog outputs.
- Parameters
-
| [in] | handle | Ethernet client handle. |
| [in] | voltages | Array of analog output voltages. |
| [in] | voltages_len | Length of the voltages array. Must be equal to the number of analog outputs. |
- Returns
- 0 on success or a negative error code.
◆ Bs120xEnet_SetDIOStates()
| int Bs120xEnet_SetDIOStates |
( |
Bs120xEnetHandle |
handle, |
|
|
const bool |
output[], |
|
|
size_t |
output_len, |
|
|
const bool |
direction[], |
|
|
size_t |
direction_len |
|
) |
| |
Set the output states and directions for all DIO.
- Parameters
-
| [in] | handle | Ethernet client handle. |
| [in] | output | Array of output states. A TRUE value corresponds to a HIGH output. |
| [in] | output_len | Length of the output array. Must be equal to the number of DIO. |
| [in] | direction | Array of DIO directions. A TRUE value corresponds to an output. |
| [in] | direction_len | Length of the direction array. Must be equal to the number of DIO. |
- Returns
- 0 on success or a negative error code.