Wireless M-Bus Sensor Core (Wireless M-Bus Meter Only)
License#
Copyright 2024 Silicon Laboratories Inc. www.silabs.com
SPDX-License-Identifier: Zlib
The licensor of this software is Silicon Laboratories Inc.
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.
Modules#
Typedefs#
Typedef for a function pointer to initialize the Wireless M-Bus sensor.
Typedef for a function pointer used to deinitialize the Wireless M-Bus sensor.
Typedef for a function pointer that performs a sensor measurement.
Function pointer type for getting Wireless M-Bus sensor data.
Typedef for a function pointer used to print sensor information.
Typedef for a function pointer that handles button press events.
Functions#
Get the active sensor.
Set the active sensor.
Get the list of available sensors.
Get the number of available sensors.
Initialize the Wireless M-Bus sensor core.
Initialize the Wireless M-Bus sensor core LCD.
Process the Wireless M-Bus sensor core.
Typedef Documentation#
sl_rail_sdk_wmbus_sensor_init_t#
sl_rail_sdk_wmbus_sensor_init_t )(void)
Typedef for a function pointer to initialize the Wireless M-Bus sensor.
Defines a function pointer type for a function that initializes the Wireless M-Bus sensor. Returns a status of type sl_status_t.
Returns
sl_status_t Status code indicating the result of the initialization.
sl_rail_sdk_wmbus_sensor_deinit_t#
sl_rail_sdk_wmbus_sensor_deinit_t )(void)
Typedef for a function pointer used to deinitialize the Wireless M-Bus sensor.
Defines a function pointer type for a function that deinitialize the Wireless M-Bus sensor. Returns a status of type sl_status_t.
Returns
sl_status_t Status code indicating the result of the deinitialization.
sl_rail_sdk_wmbus_sensor_measure_t#
sl_rail_sdk_wmbus_sensor_measure_t )(void)
Typedef for a function pointer that performs a sensor measurement.
Defines a function pointer type for a function that performs a sensor measurement and returns a status code of type sl_status_t.
Returns
sl_status_t Status code indicating the result of the measurement.
sl_rail_sdk_wmbus_sensor_get_data_t#
sl_rail_sdk_wmbus_sensor_get_data_t )(void)
Function pointer type for getting Wireless M-Bus sensor data.
Defines a function pointer type for a function that returns a pointer to a sl_rail_sdk_wmbus_sensor_data_t structure.
Returns
Pointer to a sl_rail_sdk_wmbus_sensor_data_t structure.
sl_rail_sdk_wmbus_sensor_print_t#
sl_rail_sdk_wmbus_sensor_print_t )(void)
Typedef for a function pointer used to print sensor information.
Defines a function pointer type for functions that print sensor information in the Wireless M-Bus sensor core SDK.
Returns
A status code of type sl_status_t indicating the result of the print operation.
sl_rail_sdk_wmbus_sensor_button_pressed_t
sl_rail_sdk_wmbus_sensor_button_pressed_t )(void)
Typedef for a function pointer that handles button press events.
Defines a function pointer type for a function that is called when a button is pressed in the Wireless M-Bus sensor application.
Returns
A status code of type sl_status_t indicating the result of the button press handling.
Function Documentation#
sl_rail_sdk_wmbus_sensor_core_get_active_sensor#
sl_rail_sdk_wmbus_sensor_t * sl_rail_sdk_wmbus_sensor_core_get_active_sensor (void )
Get the active sensor.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
sl_rail_sdk_wmbus_sensor_t* Pointer to the active sensor.
sl_rail_sdk_wmbus_sensor_core_set_active_sensor#
sl_status_t sl_rail_sdk_wmbus_sensor_core_set_active_sensor (uint8_t id)
Set the active sensor.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | id | Sensor ID |
Returns
sl_status_t: SL_STATUS_OK if successful, SL_STATUS_INVALID_PARAMETER if the sensor ID is invalid
sl_rail_sdk_wmbus_sensor_core_list_available_sensors#
sl_rail_sdk_wmbus_sensor_t * sl_rail_sdk_wmbus_sensor_core_list_available_sensors (void )
Get the list of available sensors.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
sl_rail_sdk_wmbus_sensor_t*: Pointer to the list of available sensors
sl_rail_sdk_wmbus_sensor_core_get_sensor_count#
size_t sl_rail_sdk_wmbus_sensor_core_get_sensor_count (void )
Get the number of available sensors.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
size_t: Number of available sensors
sl_rail_sdk_wmbus_sensor_core_init#
sl_status_t sl_rail_sdk_wmbus_sensor_core_init (void )
Initialize the Wireless M-Bus sensor core.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Calls the initialization function of the active sensor.
Returns
sl_status_t: SL_STATUS_OK if successful, SL_STATUS_FAILED if error
sl_rail_sdk_wmbus_sensor_core_lcd_init#
void sl_rail_sdk_wmbus_sensor_core_lcd_init (void )
Initialize the Wireless M-Bus sensor core LCD.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
sl_rail_sdk_wmbus_sensor_core_process#
uint16_t sl_rail_sdk_wmbus_sensor_core_process (uint8_t * tx_buffer, uint8_t * access_number)
Process the Wireless M-Bus sensor core.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t * | [in] | tx_buffer | The buffer to store the transmitted data. |
uint8_t * | [out] | access_number | The access number for the Wireless M-Bus packet. |
Calls the packet assembler functions of the active sensor. It also passes the tx_buffer, access_number, and Wireless M-Bus accessibility to the packet assembler function.
Returns
The result of the packet assembler function.