Z-Wave Protocol Controller Reference
Multi Channel Transport

CRC 16 encapsulation and decapsulation module. More...

Functions

static void on_crc16_send_complete (uint8_t status, const zwapi_tx_report_t *tx_info, void *user)
 Callback function registered to Z-Wave TX zwave_tx_send_data. More...
 
static sl_status_t zwave_command_class_crc16_send_data (const zwave_controller_connection_info_t *connection, uint16_t data_length, const uint8_t *data, const zwave_tx_options_t *tx_options, const on_zwave_tx_send_data_complete_t on_send_data_complete, void *user, zwave_tx_session_id_t parent_session_id)
 Encapsulates with CRC16. More...
 
static sl_status_t zwave_command_class_crc16_decapsulate (const zwave_controller_connection_info_t *connection_info, const zwave_rx_receive_options_t *rx_options, const uint8_t *frame_data, uint16_t frame_length)
 Decapsulate Multi Channel encapsulation and inject the frame back to the Z-Wave Controller. More...
 
static sl_status_t zwave_command_class_crc16_abort_send_data (zwave_tx_session_id_t session_id)
 
sl_status_t zwave_crc16_transport_init ()
 Initialize the CRC16 Transport *. More...
 

Variables

on_zwave_tx_send_data_complete_t send_data_state::on_send_data_complete
 
void * send_data_state::user
 
bool send_data_state::transmission_ongoing
 
zwave_tx_session_id_t send_data_state::parent_session_id
 

Detailed Description

CRC 16 encapsulation and decapsulation module.

This module allows to send and receive Multi Channel encapsulated frames.

Function Documentation

◆ on_crc16_send_complete()

static void on_crc16_send_complete ( uint8_t  status,
const zwapi_tx_report_t tx_info,
void *  user 
)
static

Callback function registered to Z-Wave TX zwave_tx_send_data.

It helps tracking when a frame was fully transmitted and will invoke the callback of the component that called the zwave_command_class_crc16_send_data function

Parameters
statusIndicates how the transmission operation was completed. Refer for Z-Wave API send_data return codes for details.
tx_infozwapi_tx_report_t reported by the Z-Wave API. It contains transmission details, refer to zwapi_tx_report_t.
userUser pointer provided in zwave_command_class_crc16_send_data()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_crc16_abort_send_data()

static sl_status_t zwave_command_class_crc16_abort_send_data ( zwave_tx_session_id_t  session_id)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_crc16_decapsulate()

static sl_status_t zwave_command_class_crc16_decapsulate ( const zwave_controller_connection_info_t connection_info,
const zwave_rx_receive_options_t rx_options,
const uint8_t *  frame_data,
uint16_t  frame_length 
)
static

Decapsulate Multi Channel encapsulation and inject the frame back to the Z-Wave Controller.

The provided payload will be Multi Channel decapsulated and the endpoint data will be copied in connection->remote.endpoint_id and connection->local.endpoint_id and passed to the zwave_controller_on_frame_received() function.

Bit addressing can be used by setting the endpoint value directly (1 bit bit addressing and 7 bits endpoint identifier)

Parameters
connection_infoConnection object describing the source and destination.
rx_optionsConnection object describing the source and destination.
frame_dataLength of the frame to send
frame_lengthPoints to the payload to send
Returns
  • SL_STATUS_NOT_SUPPORTED if the frame data is not CRC16 encapsulated properly to generate a decapsulated frame
  • SL_STATUS_NOT_FOUND if the frame is not encapsulated but should not be discarded.
  • SL_STATUS_WOULD_OVERFLOW If the decapsulated frame is too large to fit in our local buffer
  • SL_STATUS_OK If the frame was decapsulated and should be discarded because its decapsulated version has been passed to the Z-Wave Controller.
  • SL_STATUS_FAIl if the frame should be discarded
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_crc16_send_data()

static sl_status_t zwave_command_class_crc16_send_data ( const zwave_controller_connection_info_t connection,
uint16_t  data_length,
const uint8_t *  data,
const zwave_tx_options_t tx_options,
const on_zwave_tx_send_data_complete_t  on_send_data_complete,
void *  user,
zwave_tx_session_id_t  parent_session_id 
)
static

Encapsulates with CRC16.

Parameters
connectionConnection object describing the source and destination.
data_lengthLength of the frame to send
dataPoints to the payload to send
tx_optionsTransmit options to use.
on_send_data_completeCallback function that will be called when the send operation has completed
userUser pointer passed in argument of the on_send_complete callback function
parent_session_idValue of the frame in the TX Queue that is the parent of this frame. Frames MUST have a valid parent
Returns
  • SL_STATUS_OK The transmission request has been accepted and callback will be triggered when the operation is completed.
  • SL_STATUS_NOT_SUPPORTED If no endpoint encapsulation is to be applied
  • SL_STATUS_FAIL If the transmission cannot be done at the moment.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_crc16_transport_init()

sl_status_t zwave_crc16_transport_init ( void  )

Initialize the CRC16 Transport *.

Returns
SL_STATUS_OK if successful
SL_STATUS_FAIL if an error occurred
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ on_send_data_complete

on_zwave_tx_send_data_complete_t send_data_state::on_send_data_complete

◆ parent_session_id

zwave_tx_session_id_t send_data_state::parent_session_id

◆ transmission_ongoing

bool send_data_state::transmission_ongoing

◆ user

void * send_data_state::user