Z-Wave Protocol Controller Reference
zwave_tx_scheme_selector.c File Reference
#include "zwave_tx_scheme_selector.h"
#include <stdlib.h>
#include <assert.h>
#include "zwave_network_management.h"
#include "zwave_controller_keyset.h"
#include "zwave_tx_groups.h"
#include "zwapi_protocol_basis.h"
#include "zwave_controller_storage.h"
#include "sl_log.h"
Include dependency graph for zwave_tx_scheme_selector.c:

Macros

#define LOG_TAG   "zwave_tx_scheme_selector"
 
#define MAX_MSDU_SIZE_R1_R2   54
 Maximum MSDU size for R1/R2 (aMacMaxMSDUSizeR1 / aMacMaxMSDUSizeR2) More...
 
#define MAX_MSDU_SIZE_R3   158
 Maximum MSDU size for R3 (aMacMaxMSDUSizeR3) More...
 
#define MAX_MSDU_SIZE_LONG_RANGE   192 - 12 - 2 - 1 - 7
 
#define MAX_ROUTING_HEADER_SIZE_R1_R2   8
 
#define MAX_ROUTING_HEADER_SIZE_R3   8
 
#define MAX_ROUTING_HEADER_SIZE_LONG_RANGE   0
 Maximum Routing header size for Z-Wave Long Range channels... No routing here. More...
 
#define CRC16_ENCAPSULATION_OVERHEAD   4
 Number of bytes used by an CRC-16 encapsulation message. More...
 
#define S0_ENCAPSULATION_OVERHEAD   20
 Number of bytes used by an S0 encapsulation message. More...
 
#define S2_ENCAPSULATION_OVERHEAD   12
 Number of bytes used by an S2 encapsulation message (without SPAN extension) More...
 
#define MULTI_CHANNEL_ENCAPSULATION_OVERHEAD   4
 Number of bytes used by a Multi channel encapsulation. More...
 

Functions

void zwave_tx_scheme_get_zpc_granted_keys (zwave_keyset_t *keys)
 Return a list of security keys which the controller can use. More...
 
void zwave_tx_scheme_get_node_connection_info (zwave_node_id_t node_id, uint8_t endpoint_id, zwave_controller_connection_info_t *connection_info)
 Return a connection info parameters for sending a Z-Wave frame. More...
 
void zwave_tx_scheme_get_node_tx_options (uint32_t expected_qos_priority, uint8_t expected_number_of_response, uint32_t expected_discard_timeout_ms, zwave_tx_options_t *tx_options)
 Define a Z-Wave frame transmission options. More...
 
zwave_controller_encapsulation_scheme_t zwave_tx_scheme_get_node_highest_security_class (zwave_node_id_t node_id)
 Return the Highest security Class of a NodeID. More...
 
uint16_t zwave_tx_scheme_get_max_payload (zwave_node_id_t node_id)
 Computes the maximum number of bytes that can be sent to a given NodeID. (lowest layer) More...
 
uint16_t zwave_tx_scheme_get_max_application_payload (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id)
 Computes how long of a frame can be sent to a given NodeID / Endpoint when queuing a frame at the application level. More...
 

Macro Definition Documentation

◆ CRC16_ENCAPSULATION_OVERHEAD

#define CRC16_ENCAPSULATION_OVERHEAD   4

Number of bytes used by an CRC-16 encapsulation message.

◆ LOG_TAG

#define LOG_TAG   "zwave_tx_scheme_selector"

◆ MAX_MSDU_SIZE_LONG_RANGE

#define MAX_MSDU_SIZE_LONG_RANGE   192 - 12 - 2 - 1 - 7

Maximum MSDU size for Z-Wave Long Range channels Here we need to take (aPhyMaxFrameSizeLR1 - MAC header size(12) - FCS(2) - Extension control (1) - maximum extension (7))

◆ MAX_MSDU_SIZE_R1_R2

#define MAX_MSDU_SIZE_R1_R2   54

Maximum MSDU size for R1/R2 (aMacMaxMSDUSizeR1 / aMacMaxMSDUSizeR2)

◆ MAX_MSDU_SIZE_R3

#define MAX_MSDU_SIZE_R3   158

Maximum MSDU size for R3 (aMacMaxMSDUSizeR3)

◆ MAX_ROUTING_HEADER_SIZE_LONG_RANGE

#define MAX_ROUTING_HEADER_SIZE_LONG_RANGE   0

Maximum Routing header size for Z-Wave Long Range channels... No routing here.

◆ MAX_ROUTING_HEADER_SIZE_R1_R2

#define MAX_ROUTING_HEADER_SIZE_R1_R2   8

Maximum Routing header size for R1/R2 (Routing header + Wake Up extension). Normal Explore Frame is also 8

◆ MAX_ROUTING_HEADER_SIZE_R3

#define MAX_ROUTING_HEADER_SIZE_R3   8

Maximum Routing header size for R3 (Routing header + Wake Up extension). Normal Explore Frame is also 8

◆ MULTI_CHANNEL_ENCAPSULATION_OVERHEAD

#define MULTI_CHANNEL_ENCAPSULATION_OVERHEAD   4

Number of bytes used by a Multi channel encapsulation.

◆ S0_ENCAPSULATION_OVERHEAD

#define S0_ENCAPSULATION_OVERHEAD   20

Number of bytes used by an S0 encapsulation message.

◆ S2_ENCAPSULATION_OVERHEAD

#define S2_ENCAPSULATION_OVERHEAD   12

Number of bytes used by an S2 encapsulation message (without SPAN extension)