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#
Functions#
Checks PHY setting to avoid errors at packet sending.
Updates assistant pointers with a new PHY index.
Unpacks the received packet, points to the payload and returns the length.
Prepares the packet for sending and load it in the RAIL TX FIFO.
Get the print packet information.
Set the print packet information.
Prints out the received packet.
Get the Wi-SUN OFDM rate.
Set the Wi-SUN OFDM rate.
Get the Wi-SUN OFDM scrambler.
Set the Wi-SUN OFDM scrambler.
Get the Wi-SUN FSK FCS value.
Set the Wi-SUN FSK FCS value.
Get the Wi-SUN FSK Whitening value.
Set the Wi-SUN FSK Whitening value.
Get the Sun OQPSK Spreading Mode.
Set the Sun OQPSK Spreading Mode.
Get the Sun OQPSK Rate Mode.
Set the Sun OQPSK Rate Mode.
Get the Sidewalk FSK FCS value.
Set the Sidewalk FSK FCS value.
Get the Sidewalk Whitening value.
Set the Sidewalk Whitening value.
Function Documentation#
validation_check#
void validation_check (void )
Checks PHY setting to avoid errors at packet sending.
N/A |
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.
[in] | new_phy_index | The new PHY index to update. |
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.
[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
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.
[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 |
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.
N/A |
This function retrieves the current print packet information setting. Returns
The current print packet information setting.
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.
[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.
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.
[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.
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.
N/A |
Returns the current Wi-SUN OFDM rate. Returns
The Wi-SUN OFDM rate.
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.
[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.
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.
N/A |
Returns the current Wi-SUN OFDM scrambler. Returns
The Wi-SUN OFDM scrambler.
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.
[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.
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.
N/A |
Returns the current Wi-SUN FSK FCS value. Returns
The Wi-SUN FSK FCS value.
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.
[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.
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.
N/A |
Returns the current Wi-SUN FSK Whitening value. Returns
The Wi-SUN FSK Whitening value.
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.
[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.
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.
N/A |
Retrieves the current Sun OQPSK Spreading Mode. Returns
The current Sun OQPSK Spreading Mode.
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.
[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.
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.
N/A |
Retrieves the current Sun OQPSK Rate Mode. Returns
The current Sun OQPSK Rate Mode.
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.
[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.
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.
N/A |
Retrieves the current Sidewalk FSK FCS value. Returns
The current Sidewalk FSK FCS value.
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.
[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.
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.
N/A |
Retrieves the current Sidewalk Whitening value. Returns
The current Sidewalk Whitening value.
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.
[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.
273
of file /mnt/raid/workspaces/ws.bVpTDXqvc/overlay/gsdk/app/rail/component/sl_rail_sdk_packet_assistant/sl_rail_sdk_packet_assistant.h