|
BS120x Ethernet Library 1.0.0
BS120x Ethernet Library
|
Functions for setting and reading unit configuration information. More...
Collaboration diagram for Configuration:Classes | |
| struct | Bs120xUnitConfig |
| BS1201 unit configuration structure. Strings are null-terminated. More... | |
Functions | |
| int | Bs120xEnet_GetUnitConfig (Bs120xEnetHandle handle, struct Bs120xUnitConfig *unit_config_out) |
| Gets the configuration values of a unit after a QueryConfig call. | |
| 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. | |
Functions for setting and reading unit configuration information.
| int Bs120xEnet_EnableCellInhibit | ( | Bs120xEnetHandle | handle, |
| bool | enable | ||
| ) |
Enables or disables the cell inhibit lines.
| [in] | handle | Ethernet client handle. |
| [in] | enable | The enable state for the cell inhibit lines. |
| int Bs120xEnet_EnableUDPData | ( | Bs120xEnetHandle | handle, |
| bool | enable | ||
| ) |
Enables the UDP data broadcast for the unit.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | enable | A value of TRUE will enable the UDP data broadcast. |
| int Bs120xEnet_GetConfigValueBool | ( | Bs120xEnetHandle | handle, |
| const char * | opt, | ||
| bool * | value_out | ||
| ) |
Get a boolean configuration value.
| [in] | handle | Ethernet client handle. |
| [in] | opt | The configuration option to look up. |
| [out] | value_out | Pointer to the returned configuration value. |
| int Bs120xEnet_GetConfigValueFloat | ( | Bs120xEnetHandle | handle, |
| const char * | opt, | ||
| float * | value_out | ||
| ) |
Get a floating-point configuration value.
| [in] | handle | Ethernet client handle. |
| [in] | opt | The configuration option to look up. |
| [out] | value_out | Pointer to the returned configuration value. |
| int Bs120xEnet_GetConfigValueInt | ( | Bs120xEnetHandle | handle, |
| const char * | opt, | ||
| int * | value_out | ||
| ) |
Get an integer configuration value.
| [in] | handle | Ethernet client handle. |
| [in] | opt | The configuration option to look up. |
| [out] | value_out | Pointer to the returned configuration value. |
| int Bs120xEnet_GetConfigValueString | ( | Bs120xEnetHandle | handle, |
| const char * | opt, | ||
| char | buf[], | ||
| size_t | len | ||
| ) |
Get a string configuration value.
| [in] | handle | Ethernet client handle. |
| [in] | opt | The configuration option to look up. |
| [out] | buf | Buffer to hold the returned configuration value. |
| [in] | len | Length of the buffer. |
| int Bs120xEnet_GetUnitConfig | ( | Bs120xEnetHandle | handle, |
| struct Bs120xUnitConfig * | unit_config_out | ||
| ) |
Gets the configuration values of a unit after a QueryConfig call.
| [in] | handle | Ethernet client handle. |
| [out] | unit_config_out | Pointer to the returned configuration. |
| int Bs120xEnet_QueryConfig | ( | Bs120xEnetHandle | handle | ) |
Sends a request to the unit for its configuration information.
| [in] | handle | Ethernet client handle. |
| int Bs120xEnet_SetBoxId | ( | Bs120xEnetHandle | handle, |
| uint8_t | id | ||
| ) |
Sets the unit's box ID.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | id | The new box ID. Valid values are 0-15. |
| int Bs120xEnet_SetCANPeriod | ( | Bs120xEnetHandle | handle, |
| uint32_t | period | ||
| ) |
Sets the period for the unit's CAN broadcast.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | period | The new period in milliseconds. |
| int Bs120xEnet_SetConfigOptionBool | ( | Bs120xEnetHandle | handle, |
| const char * | opt, | ||
| bool | value | ||
| ) |
Sets a boolean configuration option.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | opt | The configuration option to set. |
| [in] | value | The value to set the configuration option to. |
| int Bs120xEnet_SetConfigOptionFloat | ( | Bs120xEnetHandle | handle, |
| const char * | opt, | ||
| double | value | ||
| ) |
Sets a floating-point configuration option.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | opt | The configuration option to set. |
| [in] | value | The value to set the configuration option to. |
| int Bs120xEnet_SetConfigOptionInt | ( | Bs120xEnetHandle | handle, |
| const char * | opt, | ||
| int | value | ||
| ) |
Sets an integer configuration option.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | opt | The configuration option to set. |
| [in] | value | The value to set the configuration option to. |
| int Bs120xEnet_SetConfigOptionString | ( | Bs120xEnetHandle | handle, |
| const char * | opt, | ||
| const char * | value | ||
| ) |
Sets a string configuration option.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | opt | The configuration option to set. |
| [in] | value | The value to set the configuration option to. |
| int Bs120xEnet_SetIPAddress | ( | Bs120xEnetHandle | handle, |
| const char * | ip | ||
| ) |
Sets the unit IP address.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | ip | New IP address for the unit. Last octet may not have a value of 1 or 255. |
| int Bs120xEnet_SetUDPDataPeriod | ( | Bs120xEnetHandle | handle, |
| uint32_t | period | ||
| ) |
Sets the period for the unit's UDP data broadcast.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | period | The new period in milliseconds. |
| int Bs120xEnet_SetUDPDataPort | ( | Bs120xEnetHandle | handle, |
| uint16_t | port | ||
| ) |
Sets the port for the unit's UDP data broadcast.
Unit must be reset for changes to take effect.
| [in] | handle | Ethernet client handle. |
| [in] | port | The new UDP port. |