Z-Wave Protocol Controller Reference
zwave_api_transport.c File Reference
#include "zwave_api_transport.h"
#include <stdbool.h>
#include <string.h>
#include "zwave_helper_macros.h"
#include "zwave_command_class_indices.h"
#include "zwave_controller_connection_info.h"
#include "zwave_controller_transport.h"
#include "zwave_controller_internal.h"
#include "zwave_rx_callbacks.h"
#include "zwave_tx.h"
#include "zwave_tx_groups.h"
#include "zwapi_protocol_transport.h"
#include "zwapi_protocol_controller.h"
#include "process.h"
#include "sl_log.h"
Include dependency graph for zwave_api_transport.c:

Macros

#define LOG_TAG   "zwave_api_transport"
 

Functions

void zwave_api_send_data_callback (uint8_t status, zwapi_tx_report_t *tx_status)
 
void zwave_api_transport_on_node_info_req_failed (zwave_node_id_t node_id)
 
 PROCESS_NAME (zwave_api_transport_process)
 Name the of contiki process for the Z-Wave API transport. More...
 
static void zwave_api_reset_state ()
 
static void zwave_api_transport_start_transmission (on_zwave_tx_send_data_complete_t callback, void *user, zwave_tx_session_id_t parent_session_id)
 
static void zwave_api_transport_emergency_timeout_step ()
 
static sl_status_t zwave_api_transport_intercept_payload (const zwave_controller_connection_info_t *info, uint16_t data_length, const uint8_t *data)
 
void zwave_api_send_test_frame_callback (uint8_t status)
 
void zwave_api_send_data_multi_callback (uint8_t status)
 
void zwave_api_transport_on_node_information (zwave_node_id_t node_id, const zwave_node_info_t *node_info)
 
static void on_zwave_api_started ()
 
static sl_status_t zwave_api_send_data (const zwave_controller_connection_info_t *info, 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 Multi Channel and send a frame to the Z-Wave TX queue. More...
 
static sl_status_t zwave_api_abort_send_data (const zwave_tx_session_id_t session_id)
 
sl_status_t zwave_api_transport_init ()
 Initialize the Z-Wave API Transport *. More...
 
void zwave_api_transport_reset ()
 Resets the state of the Z-Wave API transport. More...
 
 PROCESS (zwave_api_transport_process, "zwave_api_transport_process")
 
 PROCESS_THREAD (zwave_api_transport_process, ev, data)
 

Variables

static send_data_state_t state
 
static const zwave_controller_callbacks_t zwave_api_transport_callbacks
 

Macro Definition Documentation

◆ LOG_TAG

#define LOG_TAG   "zwave_api_transport"

Function Documentation

◆ on_zwave_api_started()

static void on_zwave_api_started ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PROCESS()

PROCESS ( zwave_api_transport_process  ,
"zwave_api_transport_process"   
)

◆ PROCESS_NAME()

PROCESS_NAME ( zwave_api_transport_process  )

Name the of contiki process for the Z-Wave API transport.

◆ PROCESS_THREAD()

PROCESS_THREAD ( zwave_api_transport_process  ,
ev  ,
data   
)
Here is the call graph for this function:

◆ zwave_api_abort_send_data()

static sl_status_t zwave_api_abort_send_data ( const 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_api_reset_state()

static void zwave_api_reset_state ( )
static
Here is the caller graph for this function:

◆ zwave_api_send_data()

static sl_status_t zwave_api_send_data ( const zwave_controller_connection_info_t info,
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 Multi Channel and send a frame to the Z-Wave TX queue.

The provided payload will be Multi Channel encapsulated using the endpoint data provided in connection->remote.endpoint_id and connection->local.endpoint_id.

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

Parameters
infoPointer to connection object describing the source and destination. If either the source or destination endpoints ID are not 0, the frame will be Multi Channel encapsulated.
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_BUSY 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_api_send_data_callback()

void zwave_api_send_data_callback ( uint8_t  status,
zwapi_tx_report_t tx_status 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_api_send_data_multi_callback()

void zwave_api_send_data_multi_callback ( uint8_t  status)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_api_send_test_frame_callback()

void zwave_api_send_test_frame_callback ( uint8_t  status)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_api_transport_emergency_timeout_step()

static void zwave_api_transport_emergency_timeout_step ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_api_transport_intercept_payload()

static sl_status_t zwave_api_transport_intercept_payload ( const zwave_controller_connection_info_t info,
uint16_t  data_length,
const uint8_t *  data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_api_transport_on_node_info_req_failed()

void zwave_api_transport_on_node_info_req_failed ( zwave_node_id_t  node_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_api_transport_on_node_information()

void zwave_api_transport_on_node_information ( zwave_node_id_t  node_id,
const zwave_node_info_t node_info 
)
Here is the call graph for this function:

◆ zwave_api_transport_start_transmission()

static void zwave_api_transport_start_transmission ( on_zwave_tx_send_data_complete_t  callback,
void *  user,
zwave_tx_session_id_t  parent_session_id 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ state

send_data_state_t state
static

◆ zwave_api_transport_callbacks

const zwave_controller_callbacks_t zwave_api_transport_callbacks
static
Initial value:
= {.on_node_information = &zwave_api_transport_on_node_information,
.on_node_info_req_failed = &zwave_api_transport_on_node_info_req_failed}
void zwave_api_transport_on_node_info_req_failed(zwave_node_id_t node_id)
Definition: zwave_api_transport.c:200
void zwave_api_transport_on_node_information(zwave_node_id_t node_id, const zwave_node_info_t *node_info)
Definition: zwave_api_transport.c:208