BaosModuleConfig SDK
1.0.0
|
Data Structures | |
struct | mc_t |
Structure holding the baos module configuration. More... | |
Typedefs | |
typedef struct mc_t | mc_t |
Structure holding the baos module configuration. More... | |
Functions | |
moduleConfig_API error_t | mc_set_sp (int32_t sp) |
Sets the service port for the ModuleConfiguration. More... | |
moduleConfig_API error_t | mc_remove_sp () |
Remove the used service port from the ModuleConfiguration. More... | |
moduleConfig_API error_t | mc_set_ind_addr (uint16_t ind_addr) |
Sets the individual address of the baos module to configure. More... | |
moduleConfig_API error_t | mc_get_ind_addr (uint16_t *ind_addr) |
Gets the individual address of the baos module to configure. More... | |
moduleConfig_API error_t | mc_set_auth_key (const uint32_t authorize_key) |
Sets the used authorize key of the baos module to configure. More... | |
moduleConfig_API error_t | mc_clear_auth_key () |
Clears the authorize key to be used when writing properties to the baos module to configure. More... | |
moduleConfig_API error_t | mc_write_auth_key (const uint32_t authorize_key) |
Writes a new authorize key to the baos module to configure. More... | |
moduleConfig_API error_t | mc_read_manufacturer_id (uint8_t manufacturer_id[2]) |
Reads the manufacturer id from a baos module. More... | |
moduleConfig_API error_t | mc_write_manufacturer_id (uint8_t manufacturer_id[2]) |
Writes the manufacturer id to the baos module to configure. More... | |
moduleConfig_API error_t | mc_read_manufacturer_data (uint8_t manufacturer_data[4]) |
Reads the manufacturer data from a baos module. More... | |
moduleConfig_API error_t | mc_write_manufacturer_data (uint8_t manufacturer_data[4]) |
Writes the manufacturer data to the baos module to configure. More... | |
moduleConfig_API error_t | mc_read_order_info (uint8_t order_info[10]) |
Reads the order info from a baos module. More... | |
moduleConfig_API error_t | mc_write_order_info (uint8_t order_info[10]) |
Writes the order info to the baos module to configure. More... | |
moduleConfig_API error_t | mc_read_hardware_type (uint8_t hardware_type[6]) |
Reads the hardware type from a baos module. More... | |
moduleConfig_API error_t | mc_write_hardware_type (uint8_t hardware_type[6]) |
Writes the hardware type to the baos module to configure. More... | |
moduleConfig_API error_t | mc_read_serial_number (uint8_t serial_number[6]) |
Reads the serial number from a baos module. More... | |
moduleConfig_API error_t | mc_write_serial_number (uint8_t serial_number[6]) |
Writes the serial number to the baos module to configure. More... | |
moduleConfig_API error_t | mc_read_config (mc_t *module_config) |
Reads the whole configuration (manufacturer id, manufacturer data, order info, hardware type, serial number) from a baos module. More... | |
moduleConfig_API error_t | mc_write_config (mc_t module_config, uint32_t *authorize_key) |
Writes the whole configuration (manufacturer id, manufacturer data, order info, hardware type, serial number) and the new authorize key to the baos module to configure. More... | |
Structure holding the baos module configuration.
The manufacturer id must be a 2 bytes array The manufacturer data must be a 4 bytes array The order_info must be a 10 bytes array The hardware_type must be a 6 bytes array The serial_number must be a 6 bytes array
moduleConfig_API error_t mc_clear_auth_key | ( | ) |
Clears the authorize key to be used when writing properties to the baos module to configure.
moduleConfig_API error_t mc_get_ind_addr | ( | uint16_t * | ind_addr | ) |
Gets the individual address of the baos module to configure.
[out] | ind_addr | the individual address of the module |
moduleConfig_API error_t mc_read_config | ( | mc_t * | module_config | ) |
Reads the whole configuration (manufacturer id, manufacturer data, order info, hardware type, serial number) from a baos module.
Use a module config struct with a buffer for every part. When exist, the value buffers size should be equal to or greater than the property value of the part. If not exist, the value read will be skipped.
[in] | module_config | the module configuration struct read from baos module |
moduleConfig_API error_t mc_read_hardware_type | ( | uint8_t | hardware_type[6] | ) |
Reads the hardware type from a baos module.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the property value (6 bytes) to be read.
[out] | hardware_type[6] | the hardware type read from baos module |
moduleConfig_API error_t mc_read_manufacturer_data | ( | uint8_t | manufacturer_data[4] | ) |
Reads the manufacturer data from a baos module.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the property value (4 bytes) to be read.
[out] | manufacturer_data[4] | the manufacturer data read from baos module |
moduleConfig_API error_t mc_read_manufacturer_id | ( | uint8_t | manufacturer_id[2] | ) |
Reads the manufacturer id from a baos module.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the property value (2 bytes) to be read. The max size of the buffer must be passed in as value length. value_length will be updated to correspond to the length of the value read.
[out] | manufacturer_id[2] | the manufacturer id read from baos module |
moduleConfig_API error_t mc_read_order_info | ( | uint8_t | order_info[10] | ) |
Reads the order info from a baos module.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the property value (10 bytes) to be read.
[out] | order_info[10] | the order info read from baos module |
moduleConfig_API error_t mc_read_serial_number | ( | uint8_t | serial_number[6] | ) |
Reads the serial number from a baos module.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the property value (6 bytes) to be read.
[out] | serial_number[6] | the serial number read from baos module |
moduleConfig_API error_t mc_remove_sp | ( | ) |
Remove the used service port from the ModuleConfiguration.
This should be the last function called when working with the module configuration library.
moduleConfig_API error_t mc_set_auth_key | ( | const uint32_t | authorize_key | ) |
Sets the used authorize key of the baos module to configure.
[in] | key | the authorize key to use |
moduleConfig_API error_t mc_set_ind_addr | ( | uint16_t | ind_addr | ) |
Sets the individual address of the baos module to configure.
[in] | ind_addr | the individual address of the module |
moduleConfig_API error_t mc_set_sp | ( | int32_t | sp | ) |
Sets the service port for the ModuleConfiguration.
This should be the first function called when working with the module configuration library. When finished, call mc_remove_sp.
[in] | sp | the service port descriptor |
moduleConfig_API error_t mc_write_auth_key | ( | const uint32_t | authorize_key | ) |
Writes a new authorize key to the baos module to configure.
[in] | key | the authorize key to write |
moduleConfig_API error_t mc_write_config | ( | mc_t | module_config, |
uint32_t * | authorize_key | ||
) |
Writes the whole configuration (manufacturer id, manufacturer data, order info, hardware type, serial number) and the new authorize key to the baos module to configure.
Use a module config struct with a buffer for every item. When exist, the value buffers size should be equal to the property value of the part. If item pointer equals NULL, the value write will be skipped.
[in] | module_config | the module configuration struct write to the baos module |
[in] | authorize_key | the new authorize key write to the baos module |
moduleConfig_API error_t mc_write_hardware_type | ( | uint8_t | hardware_type[6] | ) |
Writes the hardware type to the baos module to configure.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the3 property value (6 bytes) to be written.
[in] | hardware_type[6] | the hardware type array to write |
moduleConfig_API error_t mc_write_manufacturer_data | ( | uint8_t | manufacturer_data[4] | ) |
Writes the manufacturer data to the baos module to configure.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the property value (4 bytes) to be written.
[in] | manufacturer_data[4] | the manufacturer data array to write |
moduleConfig_API error_t mc_write_manufacturer_id | ( | uint8_t | manufacturer_id[2] | ) |
Writes the manufacturer id to the baos module to configure.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the property value (2 bytes) to be written.
[in] | manufacturer_id[2] | the manufacturer id array to write |
moduleConfig_API error_t mc_write_order_info | ( | uint8_t | order_info[10] | ) |
Writes the order info to the baos module to configure.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the property value (10 bytes) to be written.
[in] | order_info[10] | the order info array to write |
moduleConfig_API error_t mc_write_serial_number | ( | uint8_t | serial_number[6] | ) |
Writes the serial number to the baos module to configure.
The value buffer must exist (should be pre-allocated by the user) and it's size should be equal to or greater than the3 property value (6 bytes) to be written.
[in] | serial_number[6] | the serial number array to write |