RAIL SDK - RAIL Packet Assistant Component.

License#

Copyright 2022 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.

Enumerations#

enum
CUSTOM_AND_SUN_OQPSK = 0
EMBER_PHY = 1
THREAD = 2
BLE = 3
CONNECT = 4
ZIGBEE = 5
ZWAVE = 6
WISUN = 7
BTC = 8
SIDEWALK = 9
LONGRANGE = 10
MBUS = 11
SIGFOX = 12
UNDEFINED = 13
}

Enumeration of different radio protocols.

Functions#

void

Checks PHY setting to avoid errors at packet sending.

void
update_assistant_pointers(uint8_t new_phy_index)

Updates assistant pointers with a new PHY index.

uint16_t
unpack_packet(uint8_t *rx_destination, const RAIL_RxPacketInfo_t *packet_information, uint8_t **start_of_payload)

Unpacks the received packet, points to the payload and returns the length.

void
prepare_packet(RAIL_Handle_t rail_handle, uint8_t *out_data, uint16_t length)

Prepares the packet for sending and load it in the RAIL TX FIFO.

uint8_t

Get the print packet information.

void
set_print_packet_info(uint8_t new_print_packet_info)

Set the print packet information.

void
printf_rx_packet(const uint8_t *const rx_buffer, uint16_t length)

Prints out the received packet.

uint8_t

Get the Wi-SUN OFDM rate.

uint8_t
set_wisun_ofdm_rate(uint8_t new_rate)

Set the Wi-SUN OFDM rate.

uint8_t

Get the Wi-SUN OFDM scrambler.

uint8_t
set_wisun_ofdm_scrambler(uint8_t new_scrambler)

Set the Wi-SUN OFDM scrambler.

uint8_t

Get the Wi-SUN FSK FCS value.

uint8_t
set_wisun_fsk_fcs(uint8_t new_fcs)

Set the Wi-SUN FSK FCS value.

uint8_t

Get the Wi-SUN FSK Whitening value.

uint8_t
set_wisun_fsk_whitening(uint8_t new_whitening)

Set the Wi-SUN FSK Whitening value.

uint8_t

Get the Sun OQPSK Spreading Mode.

uint8_t
set_sun_oqpsk_spreading_mode(uint8_t new_spreading_mode)

Set the Sun OQPSK Spreading Mode.

uint8_t

Get the Sun OQPSK Rate Mode.

uint8_t
set_sun_oqpsk_rate_mode(uint8_t new_rate_mode)

Set the Sun OQPSK Rate Mode.

uint8_t

Get the Sidewalk FSK FCS value.

uint8_t
set_sidewalk_fcs_type(uint8_t new_fcs)

Set the Sidewalk FSK FCS value.

uint8_t

Get the Sidewalk Whitening value.

uint8_t
set_sidewalk_whitening(uint8_t new_whitening)

Set the Sidewalk Whitening value.

Enumeration Documentation#

RAIL_Protocol_t#

RAIL_Protocol_t

Enumeration of different radio protocols.

This enumeration defines the various radio protocols that can be used.

Enumerator
CUSTOM_AND_SUN_OQPSK

Custom and SUN OQPSK protocol

EMBER_PHY

Ember PHY protocol

THREAD

Thread protocol

BLE

Bluetooth Low Energy protocol

CONNECT

Connect protocol, original, SUN-FSK and OFDM

ZIGBEE

Zigbee protocol

ZWAVE

Z-Wave protocol

WISUN

Wi-SUN protocol, FAN 1.0 and FAN 1.1 with OFDM

BTC

BTC protocol

SIDEWALK

Sidewalk protocol

LONGRANGE

Long-range protocol

MBUS

Wireless M-Bus protocol

SIGFOX

Sigfox protocol

UNDEFINED

Undefined protocol


Definition at line 78 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

Function Documentation#

validation_check#

void validation_check (void )

Checks PHY setting to avoid errors at packet sending.

Parameters
N/A

Definition at line 106 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

update_assistant_pointers#

void update_assistant_pointers (uint8_t new_phy_index)

Updates assistant pointers with a new PHY index.

Parameters
[in]new_phy_index

The new PHY index to update.


Definition at line 112 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

unpack_packet#

uint16_t unpack_packet (uint8_t * rx_destination, const RAIL_RxPacketInfo_t * packet_information, uint8_t ** start_of_payload)

Unpacks the received packet, points to the payload and returns the length.

Parameters
[out]rx_destination

Where should the full packet be unpacked

[out]packet_information

Where should all the information of the packet stored

[out]start_of_payload

Pointer where the payload starts

Returns

  • The length of the received payload


Definition at line 122 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

prepare_packet#

void prepare_packet (RAIL_Handle_t rail_handle, uint8_t * out_data, uint16_t length)

Prepares the packet for sending and load it in the RAIL TX FIFO.

Parameters
[in]rail_handle

Which rail handlers should be used for the TX FIFO writing

[in]out_data

The payload buffer

[in]length

The length of the payload


Definition at line 131 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_print_packet_info#

uint8_t get_print_packet_info (void )

Get the print packet information.

Parameters
N/A

This function retrieves the current print packet information setting. Returns

  • The current print packet information setting.


Definition at line 138 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_print_packet_info#

void set_print_packet_info (uint8_t new_print_packet_info)

Set the print packet information.

Parameters
[in]new_print_packet_info

The new print packet information setting to be applied.

This function sets a new value for the print packet information setting.


Definition at line 145 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

printf_rx_packet#

void printf_rx_packet (const uint8_t *const rx_buffer, uint16_t length)

Prints out the received packet.

Parameters
[in]rx_buffer

The buffer where the packet is stored.

[in]length

The length of the packet.

This function prints the contents of the received packet.


Definition at line 153 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_wisun_ofdm_rate#

uint8_t get_wisun_ofdm_rate (void )

Get the Wi-SUN OFDM rate.

Parameters
N/A

Returns the current Wi-SUN OFDM rate. Returns

  • The Wi-SUN OFDM rate.


Definition at line 160 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_wisun_ofdm_rate#

uint8_t set_wisun_ofdm_rate (uint8_t new_rate)

Set the Wi-SUN OFDM rate.

Parameters
[in]new_rate

The new Wi-SUN OFDM rate to set.

Sets the Wi-SUN OFDM rate to the specified value. Returns

  • 1 if the value was set successfully, 0 otherwise.


Definition at line 168 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_wisun_ofdm_scrambler#

uint8_t get_wisun_ofdm_scrambler (void )

Get the Wi-SUN OFDM scrambler.

Parameters
N/A

Returns the current Wi-SUN OFDM scrambler. Returns

  • The Wi-SUN OFDM scrambler.


Definition at line 175 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_wisun_ofdm_scrambler#

uint8_t set_wisun_ofdm_scrambler (uint8_t new_scrambler)

Set the Wi-SUN OFDM scrambler.

Parameters
[in]new_scrambler

The new Wi-SUN OFDM scrambler to set, 2 bits wide (0-3)

Sets the Wi-SUN OFDM scrambler to the specified value. Returns

  • 1 if the value was set successfully, 0 otherwise.


Definition at line 183 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_wisun_fsk_fcs#

uint8_t get_wisun_fsk_fcs (void )

Get the Wi-SUN FSK FCS value.

Parameters
N/A

Returns the current Wi-SUN FSK FCS value. Returns

  • The Wi-SUN FSK FCS value.


Definition at line 190 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_wisun_fsk_fcs#

uint8_t set_wisun_fsk_fcs (uint8_t new_fcs)

Set the Wi-SUN FSK FCS value.

Parameters
[in]new_fcs

The new Wi-SUN FSK FCS value to set.

Sets the Wi-SUN FSK FCS value to the specified new value. Returns

  • 1 if the value was set successfully, 0 otherwise.


Definition at line 198 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_wisun_fsk_whitening#

uint8_t get_wisun_fsk_whitening (void )

Get the Wi-SUN FSK Whitening value.

Parameters
N/A

Returns the current Wi-SUN FSK Whitening value. Returns

  • The Wi-SUN FSK Whitening value.


Definition at line 205 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_wisun_fsk_whitening#

uint8_t set_wisun_fsk_whitening (uint8_t new_whitening)

Set the Wi-SUN FSK Whitening value.

Parameters
[in]new_whitening

The new Wi-SUN FSK Whitening value to set.

Sets the Wi-SUN FSK Whitening value to the specified new value. Returns

  • 1 if the value was set successfully, 0 otherwise.


Definition at line 213 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_sun_oqpsk_spreading_mode#

uint8_t get_sun_oqpsk_spreading_mode (void )

Get the Sun OQPSK Spreading Mode.

Parameters
N/A

Retrieves the current Sun OQPSK Spreading Mode. Returns

  • The current Sun OQPSK Spreading Mode.


Definition at line 220 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_sun_oqpsk_spreading_mode#

uint8_t set_sun_oqpsk_spreading_mode (uint8_t new_spreading_mode)

Set the Sun OQPSK Spreading Mode.

Parameters
[in]new_spreading_mode

The new Sun OQPSK Spreading Mode to set.

Sets the Sun OQPSK Spreading Mode to the specified new mode. Returns

  • 1 if the value was set successfully, 0 otherwise.


Definition at line 228 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_sun_oqpsk_rate_mode#

uint8_t get_sun_oqpsk_rate_mode (void )

Get the Sun OQPSK Rate Mode.

Parameters
N/A

Retrieves the current Sun OQPSK Rate Mode. Returns

  • The current Sun OQPSK Rate Mode.


Definition at line 235 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_sun_oqpsk_rate_mode#

uint8_t set_sun_oqpsk_rate_mode (uint8_t new_rate_mode)

Set the Sun OQPSK Rate Mode.

Parameters
[in]new_rate_mode

The new Sun OQPSK Rate Mode to set, 2 bits wide (0-3)

Sets the Sun OQPSK Rate Mode to the specified new mode. Returns

  • 1 if the value was set successfully, 0 otherwise.


Definition at line 243 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_sidewalk_fcs_type#

uint8_t get_sidewalk_fcs_type (void )

Get the Sidewalk FSK FCS value.

Parameters
N/A

Retrieves the current Sidewalk FSK FCS value. Returns

  • The current Sidewalk FSK FCS value.


Definition at line 250 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_sidewalk_fcs_type#

uint8_t set_sidewalk_fcs_type (uint8_t new_fcs)

Set the Sidewalk FSK FCS value.

Parameters
[in]new_fcs

The new Sidewalk FSK FCS value to set.

Sets the Sidewalk FSK FCS value to the specified new value. Returns

  • 1 if the value was set successfully, 0 otherwise.


Definition at line 258 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

get_sidewalk_whitening#

uint8_t get_sidewalk_whitening (void )

Get the Sidewalk Whitening value.

Parameters
N/A

Retrieves the current Sidewalk Whitening value. Returns

  • The current Sidewalk Whitening value.


Definition at line 265 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h

set_sidewalk_whitening#

uint8_t set_sidewalk_whitening (uint8_t new_whitening)

Set the Sidewalk Whitening value.

Parameters
[in]new_whitening

The new Sidewalk Whitening value to set.

Sets the Sidewalk Whitening value to the specified new value. Returns

  • 1 if the value was set successfully, 0 otherwise.


Definition at line 273 of file /mnt/raid/workspaces/ws.jprnpkXRl/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h