Wireless M-Bus packet assembler.

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:

  1. 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.

  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

  3. This notice may not be removed or altered from any source distribution.

Modules#

sl_rail_sdk_wmbus_sensor_data_t

Functions#

uint16_t
sl_rail_sdk_wmbus_setup_frame(uint8_t *buffer, uint8_t access_number, sl_rail_sdk_wmbus_accessibility_t accessibility, sl_rail_sdk_wmbus_device_type_t new_device_type, sl_rail_sdk_wmbus_sensor_data_t *sensors_data, bool periodic, bool encrypt)

Sets up a Wireless M-Bus frame.

Function Documentation#

sl_rail_sdk_wmbus_setup_frame#

uint16_t sl_rail_sdk_wmbus_setup_frame (uint8_t * buffer, uint8_t access_number, sl_rail_sdk_wmbus_accessibility_t accessibility, sl_rail_sdk_wmbus_device_type_t new_device_type, sl_rail_sdk_wmbus_sensor_data_t * sensors_data, bool periodic, bool encrypt)

Sets up a Wireless M-Bus frame.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]buffer

The buffer to store the Wireless M-Bus frame.

uint8_t[in]access_number

The access number of the frame.

sl_rail_sdk_wmbus_accessibility_t[in]accessibility

The accessibility of the frame.

sl_rail_sdk_wmbus_device_type_t[in]new_device_type

The device type of the frame.

sl_rail_sdk_wmbus_sensor_data_t *[in]sensors_data

An array of data to be included in the frame.

bool[in]periodic

Indicates whether the frame is periodic or not.

bool[in]encrypt

Indicates whether the frame should be encrypted or not.

Sets up a Wireless M-Bus frame by populating the provided buffer with the necessary information.

Returns

  • The length of the assembled frame.