|
BS120x Ethernet Library 1.0.0
BS120x Ethernet Library
|
C-style interface for the library. More...
Include dependency graph for CInterface.h:Classes | |
| struct | Bs120xOpModeConfig |
| BS1201 operational mode configuration structure. More... | |
| struct | Bs120xStatus |
| BS1201 status structure. More... | |
| struct | Bs120xUnitConfig |
| BS1201 unit configuration structure. Strings are null-terminated. More... | |
Typedefs | |
| typedef void * | Bs120xEnetHandle |
| Ethernet client handle. | |
Functions | |
| unsigned int | Bs120xEnet_Version () |
| Get the library version as an unsigned base 10 integer. | |
| const char * | Bs120xEnet_ErrorMessage (int error) |
| Get an error message to describe an error code returned by the driver. | |
| int | Bs120xEnet_Init (Bs120xEnetHandle *handle_out) |
| Initialize an Ethernet client. | |
| void | Bs120xEnet_Destroy (Bs120xEnetHandle *handle) |
| Destroy an Ethernet client. | |
| int | Bs120xEnet_Connect (Bs120xEnetHandle handle, const char *interface_ip, const char *device_ip, uint16_t udp_port, uint32_t udp_timeout, uint16_t tcp_port) |
| Connect to a unit. | |
| int | Bs120xEnet_Disconnect (Bs120xEnetHandle handle) |
| Disconnect from the unit. | |
| 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_SetOpModeConfig (Bs120xEnetHandle handle, struct Bs120xOpModeConfig config) |
| Configures the operating mode of the unit. | |
| int | Bs120xEnet_SetAllCellCurrents (Bs120xEnetHandle handle, float isrc, float isnk) |
| Sets the sinking and sourcing current limits for all cells. | |
| int | Bs120xEnet_SetCellSinkCurrent (Bs120xEnetHandle handle, unsigned int cell, float isnk) |
| Sets the sinking current limit for a single cell. | |
| int | Bs120xEnet_SetCellSourceCurrent (Bs120xEnetHandle handle, unsigned int cell, float isrc) |
| Sets teh sourcing current limit for a single cell. | |
| int | Bs120xEnet_SetAllCellVoltage (Bs120xEnetHandle handle, float voltage) |
| Sets the voltage for all cells. | |
| int | Bs120xEnet_SetCellVoltage (Bs120xEnetHandle handle, unsigned int cell, float voltage) |
| Sets the voltage for a single cell. | |
| int | Bs120xEnet_EnableAllCells (Bs120xEnetHandle handle, bool enable) |
| Enables or disables all cells. | |
| int | Bs120xEnet_EnableCell (Bs120xEnetHandle handle, unsigned int cell, bool enable) |
| Enables or disables a single cell. | |
| int | Bs120xEnet_GetCellVoltage (Bs120xEnetHandle handle, unsigned int cell, float *voltage_out) |
| Gets the voltage of a cell. | |
| int | Bs120xEnet_GetAllCellVoltage (Bs120xEnetHandle handle, float voltage_out[], size_t voltage_out_len) |
| Gets the voltages of all cells. | |
| int | Bs120xEnet_GetCellCurrent (Bs120xEnetHandle handle, unsigned int cell, float *current_out) |
| Gets the current of a cell in Amps. | |
| int | Bs120xEnet_GetAllCellCurrent (Bs120xEnetHandle handle, float current_out[], size_t current_out_len) |
| Get the currents of all cells in Amps. | |
| 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. | |
| int | Bs120xEnet_GetStatus (Bs120xEnetHandle handle, struct Bs120xStatus *status_out) |
| Gets the status of the unit. | |
| int | Bs120xEnet_GetUnitConfig (Bs120xEnetHandle handle, struct Bs120xUnitConfig *unit_config_out) |
| Gets the configuration values of a unit after a QueryConfig call. | |
| int | Bs120xEnet_Reset (Bs120xEnetHandle handle) |
| Commands the unit to reset. | |
| int | Bs120xEnet_SetIPAddress (Bs120xEnetHandle handle, const char *ip) |
| Sets the unit IP address. | |
| int | Bs120xEnet_QueryConfig (Bs120xEnetHandle handle) |
| Sends a request to the unit for its configuration information. | |
| int | Bs120xEnet_SetConfigOptionInt (Bs120xEnetHandle handle, const char *opt, int value) |
| Sets an integer configuration option. | |
| int | Bs120xEnet_SetConfigOptionBool (Bs120xEnetHandle handle, const char *opt, bool value) |
| Sets a boolean configuration option. | |
| int | Bs120xEnet_SetConfigOptionString (Bs120xEnetHandle handle, const char *opt, const char *value) |
| Sets a string configuration option. | |
| int | Bs120xEnet_SetConfigOptionFloat (Bs120xEnetHandle handle, const char *opt, double value) |
| Sets a floating-point configuration option. | |
| int | Bs120xEnet_EnableUDPData (Bs120xEnetHandle handle, bool enable) |
| Enables the UDP data broadcast for the unit. | |
| int | Bs120xEnet_SetUDPDataPort (Bs120xEnetHandle handle, uint16_t port) |
| Sets the port for the unit's UDP data broadcast. | |
| int | Bs120xEnet_SetUDPDataPeriod (Bs120xEnetHandle handle, uint32_t period) |
| Sets the period for the unit's UDP data broadcast. | |
| int | Bs120xEnet_SetBoxId (Bs120xEnetHandle handle, uint8_t id) |
| Sets the unit's box ID. | |
| int | Bs120xEnet_SetCANPeriod (Bs120xEnetHandle handle, uint32_t period) |
| Sets the period for the unit's CAN broadcast. | |
| int | Bs120xEnet_EnableCellInhibit (Bs120xEnetHandle handle, bool enable) |
| Enables or disables the cell inhibit lines. | |
| int | Bs120xEnet_GetConfigValueBool (Bs120xEnetHandle handle, const char *opt, bool *value_out) |
| Get a boolean configuration value. | |
| int | Bs120xEnet_GetConfigValueInt (Bs120xEnetHandle handle, const char *opt, int *value_out) |
| Get an integer configuration value. | |
| int | Bs120xEnet_GetConfigValueFloat (Bs120xEnetHandle handle, const char *opt, float *value_out) |
| Get a floating-point configuration value. | |
| int | Bs120xEnet_GetConfigValueString (Bs120xEnetHandle handle, const char *opt, char buf[], size_t len) |
| Get a string configuration value. | |
C-style interface for the library.