Z-Wave TX Scheme selector.
More...
Z-Wave TX Scheme selector.
This module selects the right security scheme when sending a Z-Wave frame. This is done by looking up the security scheme from the granted_keys list stored in the attribute system.
◆ ZWAVE_TX_SAFE_LOWEST_MAX_PAYLOAD
| #define ZWAVE_TX_SAFE_LOWEST_MAX_PAYLOAD 22 |
Worst case scenario for the max payload (S0 + Z-Wave R1/R2 + Multi Channel)
◆ zwave_tx_scheme_get_max_application_payload()
Computes how long of a frame can be sent to a given NodeID / Endpoint when queuing a frame at the application level.
- Parameters
-
| node_id | The NodeID of the destination |
| endpoint_id | The Endpoint ID to send to |
- Returns
- The number of bytes that can be sent to the destination before all additional encapsulations such as Security or Multi Channel encapsulation.
◆ zwave_tx_scheme_get_max_payload()
Computes the maximum number of bytes that can be sent to a given NodeID. (lowest layer)
- Parameters
-
| node_id | The NodeID of the destination |
- Returns
- The number of bytes that can be sent to the destination
◆ zwave_tx_scheme_get_node_connection_info()
Return a connection info parameters for sending a Z-Wave frame.
- Parameters
-
| node_id | A remote NodeID where the frame is sent to |
| endpoint_id | An Endpoint ID where the frame is sent to. The function assumes single endpoint addressing |
| [out] | connection_info | for sending a Z-Wave frame |
◆ zwave_tx_scheme_get_node_highest_security_class()
Return the Highest security Class of a NodeID.
- Parameters
-
| [in] | node_id | Z-Wave NodeID of the node |
- Returns
- Highest security class of the NodeID.
◆ zwave_tx_scheme_get_node_tx_options()
| 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.
- Parameters
-
| expected_qos_priority | Priority of transmission frame |
| expected_number_of_response | A number of the expected responses to a frame before transmitting the next frame |
| expected_discard_timeout_ms | A maximum period in ms which a given frame shall stay in a Z-Wave transmission queue before it is dropped. |
| [out] | tx_options | transmission frame configuration options |
◆ zwave_tx_scheme_get_zpc_granted_keys()
Return a list of security keys which the controller can use.
If the controller started was the first S2 controller in the network this will be all supported keys. But if the controller was included by another controller fewer keys may have been granted.
- Parameters
-
| [out] | keys | Key currently granted |