Z-Wave Protocol Controller Reference

Internal functions for the S2 component. More...

Collaboration diagram for Z-Wave S2 internals:

Macros

#define COMMAND_CLASS_SECURITY_2   0x9F
 
#define COMMAND_CLASS_SECURITY_2_VERSION   1
 

Functions

sl_status_t zwave_s2_send_data (const zwave_controller_connection_info_t *connection, uint16_t data_length, const uint8_t *cmd_data, const zwave_tx_options_t *tx_options, const on_zwave_tx_send_data_complete_t on_send_complete, void *user, zwave_tx_session_id_t parent_session_id)
 Sending an S2 encapsulated frame. More...
 
sl_status_t zwave_s2_on_frame_received (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)
 Entry point of S2 frames received from the PHY/radio stack. More...
 
void zwave_s2_on_on_multicast_group_deleted (zwave_multicast_group_id_t group_id)
 Asks LibS2 to erase an MPAN entry. More...
 
sl_status_t zwave_s2_abort_send_data (zwave_tx_session_id_t session_id)
 Z-Wave controller transport callback function which will be triggered when S2 frame tranmission is aborted. More...
 

Variables

struct S2 * s2_ctx
 

Detailed Description

Internal functions for the S2 component.

Macro Definition Documentation

◆ COMMAND_CLASS_SECURITY_2

#define COMMAND_CLASS_SECURITY_2   0x9F

◆ COMMAND_CLASS_SECURITY_2_VERSION

#define COMMAND_CLASS_SECURITY_2_VERSION   1

Function Documentation

◆ zwave_s2_abort_send_data()

sl_status_t zwave_s2_abort_send_data ( zwave_tx_session_id_t  session_id)

Z-Wave controller transport callback function which will be triggered when S2 frame tranmission is aborted.

Parameters
session_idThe session id of the frame which has been aborted.
Returns
SL_STATUS_OK to indicate that ongoing session are aborted.
SL_STATUS_NOT_FOUND to indicate that no transmission was ongoing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s2_on_frame_received()

sl_status_t zwave_s2_on_frame_received ( 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 
)

Entry point of S2 frames received from the PHY/radio stack.

This function is used to feed S2 frames into the S2 engine. See S2_application_command_handler

Parameters
connection_infoInformation about sender.
rx_optionsReceive options
frame_dataS2 control frame data
frame_lengthS2 control frame length
Returns
true If frame is accepted
false If frame is not an S2 frame.
Here is the caller graph for this function:

◆ zwave_s2_on_on_multicast_group_deleted()

void zwave_s2_on_on_multicast_group_deleted ( zwave_multicast_group_id_t  group_id)

Asks LibS2 to erase an MPAN entry.

Parameters
group_idThe Z-Wave Group ID that is to be re-shuffled
Here is the caller graph for this function:

◆ zwave_s2_send_data()

sl_status_t zwave_s2_send_data ( const zwave_controller_connection_info_t connection,
uint16_t  data_length,
const uint8_t *  cmd_data,
const zwave_tx_options_t tx_options,
const on_zwave_tx_send_data_complete_t  on_send_complete,
void *  user,
zwave_tx_session_id_t  parent_session_id 
)

Sending an S2 encapsulated frame.

This function will encrypt a data payload and encapsupate it into an Security 2 message. This function wraps S2_send_data. This function can only handle one transmit session at a time.

Parameters
connectionContains information about target node.
data_lengthLength of un-encrypted data.
cmd_dataun-encrypted data to send
tx_optionsTransmit options. The number_of_responses field determines if S2 verify delivery is going to be used
on_send_completeCallback for the transmission complete event.
userUser pointer
parent_session_idParent Session handle that gets used to duplicate tx_options.
Returns
sl_status_t
  • SL_STATUS_OK on success
  • SL_STATUS_NOT_SUPPORTED if unknown encapuslation scheme is applied.
  • SL_STATUS_BUSY if a tranmission is ongoing.
  • SL_STATUS_WOULD_OVERFLOW if we cannot handle the frame and it should just be dropped.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ s2_ctx

struct S2* s2_ctx
extern