|
Z-Wave Protocol Controller Reference
|
Private definitions for the Z-Wave API. More...
Go to the source code of this file.
Macros | |
| #define | REQUEST_BUFFER_SIZE 180 |
| #define | SERIAL_BUFFER_SIZE 0xFF |
| #define | FRAME_LENGTH_MIN 3 |
| #define | FRAME_LENGTH_MAX SERIAL_BUFFER_SIZE |
| #define | ZW_COMMAND_RETURN_VALUE_FALSE 0 |
| Command was not executed without errors. More... | |
| #define | ZW_COMMAND_RETURN_VALUE_TRUE 1 |
| Command was executed successfully. More... | |
Functions | |
| void | zwave_api_protocol_rx_dispatch (uint8_t *pData, uint16_t len) |
| Execute a callback based on a received frame from the Z-Wave module. More... | |
| void | zwave_api_protocol_init_callbacks (void) |
| Initialize functions pointers for Z-Wave module callbacks. More... | |
| sl_status_t | zwapi_send_command (uint8_t command, const uint8_t *payload_buffer, uint8_t payload_buffer_length) |
| Verifies that the command is supported by the Z-Wave module. More... | |
| sl_status_t | zwapi_send_command_with_response (uint8_t command, const uint8_t *payload_buffer, uint8_t payload_buffer_length, uint8_t *response_buffer, uint8_t *response_length) |
| Send a command to the Z-Wave module and waits for an ACK. More... | |
| sl_status_t | zwapi_send_command_no_ack (uint8_t command, const uint8_t *payload_buffer, uint8_t payload_buffer_length) |
| Send a command to the Z-Wave module without waiting for any ACK. More... | |
Private definitions for the Z-Wave API.
| #define FRAME_LENGTH_MAX SERIAL_BUFFER_SIZE |
| #define FRAME_LENGTH_MIN 3 |
| #define REQUEST_BUFFER_SIZE 180 |
Size of rx and tx buffers used with the serial API
Note: Value is taken from SERIAL_BUFFER_SIZE in zwapi_connection.h The ZGW has a modified version of zwapi_connection.h where SERIAL_BUFFER_SIZE is defined differently.
| #define SERIAL_BUFFER_SIZE 0xFF |
| #define ZW_COMMAND_RETURN_VALUE_FALSE 0 |
Command was not executed without errors.
| #define ZW_COMMAND_RETURN_VALUE_TRUE 1 |
Command was executed successfully.
| sl_status_t zwapi_send_command | ( | uint8_t | command, |
| const uint8_t * | payload_buffer, | ||
| uint8_t | payload_buffer_length | ||
| ) |
Verifies that the command is supported by the Z-Wave module.
| command | Z-Wave Serial API Command (zwapi_func_ids.h) |
| payload_buffer | Byte array with serial API command parameters |
| payload_buffer_length | Length in bytes of parameter array |
Sends the command data frame to the Z-Wave module and waits for ACK.
| sl_status_t zwapi_send_command_no_ack | ( | uint8_t | command, |
| const uint8_t * | payload_buffer, | ||
| uint8_t | payload_buffer_length | ||
| ) |
Send a command to the Z-Wave module without waiting for any ACK.
| command | Z-Wave Serial API Command (zwapi_func_ids.h) |
| payload_buffer | Byte array with serial API command parameters |
| payload_buffer_length | Length in bytes of parameter array |
Verifies that the command is supported by the Z-Wave module, sends the command data frame to the Z-Wave module but does not wait for any ACK
| sl_status_t zwapi_send_command_with_response | ( | uint8_t | command, |
| const uint8_t * | payload_buffer, | ||
| uint8_t | payload_buffer_length, | ||
| uint8_t * | response_buffer, | ||
| uint8_t * | response_length | ||
| ) |
Send a command to the Z-Wave module and waits for an ACK.
| command | Z-Wave Serial API Command (zwapi_func_ids.h) |
| payload_buffer | Byte array with serial API command parameters |
| payload_buffer_length | Length in bytes of parameter array |
| response_buffer | Output Buffer to hold response (buffer MUST be large enough to hold SERIAL_BUFFER_SIZE bytes). |
| response_length | Ouput Length of response copied to response_buf. |
Verifies that the command is supported by the Z-Wave module, sends the command data frame to the Z-Wave module, wait for ACK and a Response frame returning a status of the requested operation/command.
| void zwave_api_protocol_init_callbacks | ( | void | ) |
Initialize functions pointers for Z-Wave module callbacks.
These callbacks are handlers for incoming REQ frames from the Z-Wave module
| void zwave_api_protocol_rx_dispatch | ( | uint8_t * | pData, |
| uint16_t | len | ||
| ) |
Execute a callback based on a received frame from the Z-Wave module.
| pData | Pointer to data frame (without SOF) |
| len | Length of data frame |
FIXME: We should really not treat those functions as a bulk and assume they return the same payload.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Serial API response frame callbacks
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |