Packet Assistant#

The RAIL Packet Assistant component provides functions to prepare and unpack packets for various protocols such as Wi-SUN FSK, Wi-SUN OFDM, SUN OQPSK, and Sidewalk. This component ensures that the application can generate the appropriate packet headers for any selected PHY, allowing RAIL to send out the proper packet with the user payload. The component provides functions to prepare and unpack packets, ensuring that the application can handle different packet formats as needed.

Key functions include:

  • prepare_packet(): Prepares the packet for sending and loads it into the RAIL TX FIFO.

  • unpack_packet(): Unpacks the received packet, points to the payload, and returns the length.

Modules#

Configurations

Type definitions

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.

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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/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.bVpTDXqvc/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h