Z-Wave Protocol Controller Reference

Hold information about a transport plugin. More...

#include <zwave_controller_transport.h>

Collaboration diagram for zwave_controller_transport:

Public Attributes

uint32_t priority
 Priority of this plugin, transports with lowest number priority is executed last when encoding. Decoding order is made based on the Command Class identifier (first frame byte). More...
 
zwave_command_class_t command_class
 Which Z-Wave command class this transport is serving. More...
 
zwave_cc_version_t version
 The command class version of the command class that this transport is implementing. More...
 
sl_status_t(* 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_complete, void *user, zwave_tx_session_id_t parent_session)
 Send function to use when encapsulating with this transport. More...
 
sl_status_t(* abort_send_data )(zwave_tx_session_id_t session_id)
 abort function that instructs the transport to abort one or more ongoing transmission(s) More...
 
sl_status_t(* 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)
 Command handler to of the transport. More...
 

Detailed Description

Hold information about a transport plugin.

Member Data Documentation

◆ abort_send_data

sl_status_t(* zwave_controller_transport::abort_send_data) (zwave_tx_session_id_t session_id)

abort function that instructs the transport to abort one or more ongoing transmission(s)

Functions registered for abort send data must use the following return statuses

  • SL_STATUS_OK indicates that ongoing session are aborted
  • SL_STATUS_NOT_FOUND indicates that no transmission was ongoing

◆ command_class

zwave_command_class_t zwave_controller_transport::command_class

Which Z-Wave command class this transport is serving.

◆ on_frame_received

sl_status_t(* zwave_controller_transport::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)

Command handler to of the transport.

Functions registered as on_frame_received transport MUST return status codes according to the following:

  • SL_STATUS_NOT_FOUND Indicates that the frame has no more encapsulation and must be passed manually to the upper layers by the Z-Wave Controller.
  • Any other code (SL_STATUS_OK, SL_STATUS_FAIL, etc.) indicating that the frame was "consumed" by the on_frame_received handler and that the handler has passed the frame to the Z-Wave Controller again if decapsulation was applied (i.e. called zwave_controller_on_frame_received())

◆ priority

uint32_t zwave_controller_transport::priority

Priority of this plugin, transports with lowest number priority is executed last when encoding. Decoding order is made based on the Command Class identifier (first frame byte).

Recommended priorities:

  • 0 Z-Wave API, lowest layer
  • 1 Transport Service
  • 2 Security 2
  • 3 Security 0
  • 4 CRC 16
  • 5 Multi Channel
  • 6 Multicast follow ups sessions

◆ send_data

sl_status_t(* zwave_controller_transport::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_complete, void *user, zwave_tx_session_id_t parent_session)

Send function to use when encapsulating with this transport.

Note
: It is important for sender function not to pass the parent_session to the zwave_tx send_data function.

Functions registered as send_data handlers MUST return status codes according to the following:

  • SL_STATUS_OK indicates that the frame was accepted and encapsulated
  • SL_STATUS_NOT_SUPPORTED indicates that transport has nothing to encapsulate for this frame.
  • SL_STATUS_WOULD_OVERFLOW indicates that the frame is supported but cannot be handled, so it should not be attempted again
  • Any other error code (SL_STATUS_BUSY, SL_STATUS_FAIL, etc.) indicating that the frame should be encapsulated, but could not due to an error.

◆ version

zwave_cc_version_t zwave_controller_transport::version

The command class version of the command class that this transport is implementing.


The documentation for this struct was generated from the following file: