Macros | |
#define | ZB_ZCL_CLUSTER_ID_MESSAGING_SERVER_ROLE_GENERATED_CMD_LIST |
#define | ZB_ZCL_CLUSTER_ID_MESSAGING_CLIENT_ROLE_RECEIVED_CMD_LIST ZB_ZCL_CLUSTER_ID_MESSAGING_SERVER_ROLE_GENERATED_CMD_LIST |
#define | ZB_ZCL_CLUSTER_ID_MESSAGING_CLIENT_ROLE_GENERATED_CMD_LIST |
#define | ZB_ZCL_CLUSTER_ID_MESSAGING_SERVER_ROLE_RECEIVED_CMD_LIST ZB_ZCL_CLUSTER_ID_MESSAGING_CLIENT_ROLE_GENERATED_CMD_LIST |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_SET_TRANSMISSION_MECHANISM(x, val) ((x) &= (0xFC | ((val) & 0x03))) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_GET_TRANSMISSION_MECHANISM(x) ((x) & 0x03) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_CLR_TRANSMISSION_MECHANISM(x) ((x) &= 0xFC) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_SET_IMPORTANCE_LEVEL(x, val) ((x) &= (0xF3 | ((val) & 0x03) << 2) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_GET_IMPORTANCE_LEVEL(x) (((x) >> 2) & 0x03) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_CLR_IMPORTANCE_LEVEL(x) ((x) &= 0xF3) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_SET_ENHANCED_CONFIRMATION(x, val) ((x) &= (0xDF | ((val) & 0x01) << 5) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_GET_ENHANCED_CONFIRMATION(x) (((x) >> 5) & 0x01) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_CLR_ENHANCED_CONFIRMATION(x) ((x) &= 0xDF ) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_SET_MESSAGE_CONFIRMATION(x, val) ((x) &= (0x7F | ((val) & 0x01) << 7) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_GET_MESSAGE_CONFIRMATION(x) (((x) >> 7) & 0x01) |
#define | ZB_ZCL_MESSAGING_MESSAGE_CONTROL_CLR_MESSAGE_CONFIRMATION(x) ((x) &= 0x7F) |
#define | ZB_ZCL_MESSAGING_DISPLAY_MSG_PAYLOAD_SIZE_IS_VALID(size) |
#define | ZB_ZCL_MESSAGING_DISPLAY_MSG_PAYLOAD_INIT |
#define | ZB_ZCL_MESSAGING_CANCEL_MSG_PAYLOAD_INIT (zb_zcl_messaging_cancel_message_payload_t) {0} |
#define | ZB_ZCL_MESSAGING_MSG_CONFIRM_PAYLOAD_SIZE_IS_VALID(size) |
#define | ZB_ZCL_MESSAGING_GET_LAST_MESSAGE_RESPONSE_INIT |
#define | ZB_ZCL_MESSAGING_MSG_CONFIRM_PAYLOAD_INIT |
#define | ZB_ZCL_MESSAGING_SEND_GET_LAST_MSG(_param, _dst_addr, _addr_mode, _dst_ep, _src_ep) |
#define | ZB_ZCL_MESSAGING_SEND_DISPLAY_MSG(_param, _dst_addr, _addr_mode, _dst_ep, _src_ep, _payload) |
#define | ZB_ZCL_MESSAGING_SEND_MSG_CONFIRMATION(_param, _dst_addr, _addr_mode, _dst_ep, _src_ep, _payload) |
#define | ZB_ZCL_MESSAGING_SEND_CANCEL_MSG(_param, _dst_addr, _addr_mode, _dst_ep, _src_ep, _payload) |
Functions | |
zb_void_t | zb_zcl_messaging_send_get_last_msg (zb_uint8_t param, const zb_addr_u *dst_addr, enum zb_aps_addr_mode_e dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t src_ep, zb_callback_t cb) |
zb_void_t | zb_zcl_messaging_send_display_msg (zb_uint8_t param, const zb_addr_u *dst_addr, enum zb_aps_addr_mode_e dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t src_ep, const zb_zcl_messaging_display_message_payload_t *payload, zb_callback_t cb) |
zb_void_t | zb_zcl_messaging_send_msg_confirmation (zb_uint8_t param, const zb_addr_u *dst_addr, enum zb_aps_addr_mode_e dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t src_ep, const zb_zcl_messaging_message_confirm_payload_t *payload, zb_callback_t cb) |
zb_void_t | zb_zcl_messaging_send_cancel_msg (zb_uint8_t param, const zb_addr_u *dst_addr, enum zb_aps_addr_mode_e dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t src_ep, const zb_zcl_messaging_cancel_message_payload_t *payload, zb_callback_t cb) |
#define ZB_ZCL_CLUSTER_ID_MESSAGING_CLIENT_ROLE_GENERATED_CMD_LIST |
#define ZB_ZCL_CLUSTER_ID_MESSAGING_SERVER_ROLE_GENERATED_CMD_LIST |
#define ZB_ZCL_MESSAGING_CANCEL_MSG_PAYLOAD_INIT (zb_zcl_messaging_cancel_message_payload_t) {0} |
zb_zcl_messaging_cancel_message_payload_t initializer
#define ZB_ZCL_MESSAGING_DISPLAY_MSG_PAYLOAD_INIT |
zb_zcl_messaging_display_message_payload_t initializer
#define ZB_ZCL_MESSAGING_DISPLAY_MSG_PAYLOAD_SIZE_IS_VALID | ( | size | ) |
Check if some size in range of variable size of specified payload.
#define ZB_ZCL_MESSAGING_GET_LAST_MESSAGE_RESPONSE_INIT |
zb_zcl_messaging_get_last_message_response_t initializer
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_CLR_ENHANCED_CONFIRMATION | ( | x | ) | ((x) &= 0xDF ) |
Clear MessageControl's enhanced confirmation value
x | - variable that stores enhanced confirmation value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_CLR_IMPORTANCE_LEVEL | ( | x | ) | ((x) &= 0xF3) |
Clear MessageControl's control importance value
x | - variable that stores control importance value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_CLR_MESSAGE_CONFIRMATION | ( | x | ) | ((x) &= 0x7F) |
Clear MessageControl's message confirmation value
x | - variable that stores message confirmation value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_CLR_TRANSMISSION_MECHANISM | ( | x | ) | ((x) &= 0xFC) |
Clear MessageControl's transmission mechanism value
x | - variable that stores transmission mechanism value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_GET_ENHANCED_CONFIRMATION | ( | x | ) | (((x) >> 5) & 0x01) |
Get MessageControl's enhanced confirmation value
x | - variable that stores enhanced confirmation value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_GET_IMPORTANCE_LEVEL | ( | x | ) | (((x) >> 2) & 0x03) |
Get MessageControl's control importance value
x | - variable that stores control importance value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_GET_MESSAGE_CONFIRMATION | ( | x | ) | (((x) >> 7) & 0x01) |
Get MessageControl's message confirmation value
x | - variable that stores message confirmation value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_GET_TRANSMISSION_MECHANISM | ( | x | ) | ((x) & 0x03) |
Get MessageControl's transmission mechanism value
x | - variable that stores transmission mechanism value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_SET_ENHANCED_CONFIRMATION | ( | x, | |
val | |||
) | ((x) &= (0xDF | ((val) & 0x01) << 5) |
Set MessageControl's enhanced confirmation value
x | - variable to store enhanced confirmation value |
val | - zb_zcl_messaging_message_control_enhanced_confirmation_t value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_SET_IMPORTANCE_LEVEL | ( | x, | |
val | |||
) | ((x) &= (0xF3 | ((val) & 0x03) << 2) |
Set MessageControl's control importance value
x | - variable to store control importance value |
val | - zb_zcl_messaging_message_control_importance_level_t value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_SET_MESSAGE_CONFIRMATION | ( | x, | |
val | |||
) | ((x) &= (0x7F | ((val) & 0x01) << 7) |
Set MessageControl's message confirmation value
x | - variable to store message confirmation value |
val | - zb_zcl_messaging_message_control_message_confirmation_t value |
#define ZB_ZCL_MESSAGING_MESSAGE_CONTROL_SET_TRANSMISSION_MECHANISM | ( | x, | |
val | |||
) | ((x) &= (0xFC | ((val) & 0x03))) |
Set MessageControl's transmission mechanism value
x | - variable to store transmission mechanism value |
val | - zb_zcl_messaging_control_field_transmission_mechanism_t value |
#define ZB_ZCL_MESSAGING_MSG_CONFIRM_PAYLOAD_INIT |
zb_zcl_messaging_message_confirm_payload_t initializer
#define ZB_ZCL_MESSAGING_MSG_CONFIRM_PAYLOAD_SIZE_IS_VALID | ( | size | ) |
Check if some size in range of variable size of specified payload.
#define ZB_ZCL_MESSAGING_SEND_CANCEL_MSG | ( | _param, | |
_dst_addr, | |||
_addr_mode, | |||
_dst_ep, | |||
_src_ep, | |||
_payload | |||
) |
Macro for call zb_zcl_messaging_send_cancel_msg function
#define ZB_ZCL_MESSAGING_SEND_DISPLAY_MSG | ( | _param, | |
_dst_addr, | |||
_addr_mode, | |||
_dst_ep, | |||
_src_ep, | |||
_payload | |||
) |
Macro for call zb_zcl_messaging_send_display_msg function
#define ZB_ZCL_MESSAGING_SEND_GET_LAST_MSG | ( | _param, | |
_dst_addr, | |||
_addr_mode, | |||
_dst_ep, | |||
_src_ep | |||
) |
Macro for call zb_zcl_messaging_send_get_last_msg function
#define ZB_ZCL_MESSAGING_SEND_MSG_CONFIRMATION | ( | _param, | |
_dst_addr, | |||
_addr_mode, | |||
_dst_ep, | |||
_src_ep, | |||
_payload | |||
) |
Macro for call zb_zcl_messaging_send_msg_confirmation function
typedef struct zb_zcl_messaging_cancel_all_message_payload_s zb_zcl_messaging_cancel_all_message_payload_t |
CancelAllMessages command payload
CancelMessage command payload
typedef enum zb_zcl_messaging_cli_cmd_e zb_zcl_messaging_cli_cmd_t |
Commands generated by Messaging Client
typedef enum zb_zcl_messaging_message_control_transmission_mechanism_e zb_zcl_messaging_control_field_transmission_mechanism_t |
MessageControl field's transmission mechanism values
typedef struct zb_zcl_messaging_display_message_payload_s zb_zcl_messaging_display_message_payload_t |
DisplayMessage command payload
typedef enum zb_zcl_messaging_extended_message_control_e zb_zcl_messaging_extended_message_control_field_t |
Extended Message Control Field values
typedef struct zb_zcl_messaging_get_last_message_response_s zb_zcl_messaging_get_last_message_response_t |
According to SE spec, server could send following responses to GetLastMessage command:
typedef struct zb_zcl_messaging_get_message_cancellation_payload_s zb_zcl_messaging_get_message_cancellation_payload_t |
GetMessageCancellation command payload
typedef struct zb_zcl_messaging_message_confirm_payload_s zb_zcl_messaging_message_confirm_payload_t |
MessageConfirmation command payload
typedef enum zb_zcl_messaging_message_confirmation_control_e zb_zcl_messaging_message_confirmation_control_t |
Message Confirmation Control
typedef enum zb_zcl_messaging_message_control_enhanced_confirmation_e zb_zcl_messaging_message_control_enhanced_confirmation_t |
MessageControl field's enhanced confirmation values
typedef enum zb_zcl_messaging_message_control_importance_level_e zb_zcl_messaging_message_control_importance_level_t |
MessageControl field's control importance values
typedef enum zb_zcl_messaging_message_control_message_confirmation_e zb_zcl_messaging_message_control_message_confirmation_t |
MessageControl field's message confirmation values
typedef enum zb_zcl_messaging_srv_cmd_e zb_zcl_messaging_srv_cmd_t |
Commands generated by Messaging Server
Commands generated by Messaging Client
Enumerator | |
---|---|
ZB_ZCL_MESSAGING_CLI_CMD_GET_LAST_MESSAGE |
On receipt of this command, the device shall send a DisplayMessage or DisplayProtectedMessage command as appropriate. A ZCL Default Response with status NOT_FOUND shall be returned if no message is available.
|
ZB_ZCL_MESSAGING_CLI_CMD_MESSAGE_CONFIRMATION |
TheMessageConfirmation command provides an indication that a Utility Customer has acknowledged and/or accepted the contents of a message previously received from the Messaging cluster server. Enhanced Message Confirmation commands shall contain an answer of ‘NO’, ‘YES’ and/or a message confirmation string. If the optional Message Confirmation Response is required, the Message Confirmation Control field shall also be present.
|
ZB_ZCL_MESSAGING_CLI_CMD_GET_MESSAGE_CANCELLATION |
This command initiates the return of the first (and maybe only) CancelAllMessages command held on the associated server, and which has an implementation time equal to or later than the value indicated in the payload.
|
Extended Message Control Field values
Enumerator | |
---|---|
ZB_ZCL_MESSAGING_MESSAGE_HAS_NOT_BEEN_CONFIRMED |
Message has not been confirmed |
ZB_ZCL_MESSAGING_MESSAGE_HAS_BEEN_CONFIRMED |
Message has been confirmed |
Message Confirmation Control
Enumerator | |
---|---|
ZB_ZCL_MESSAGING_NO_RETURNED |
The answer is ‘NO’ |
ZB_ZCL_MESSAGING_YES_RETURNED |
The answer is ‘YES’ |
MessageControl field's enhanced confirmation values
Enumerator | |
---|---|
ZB_ZCL_MESSAGING_ENHANCED_CONFIRMATION_NOT_REQUIRED |
Enhanced Confirmation not required |
ZB_ZCL_MESSAGING_ENHANCED_CONFIRMATION_REQUIRED |
Enhanced Confirmation required |
MessageControl field's control importance values
MessageControl field's message confirmation values
Enumerator | |
---|---|
ZB_ZCL_MESSAGING_MESSAGE_CONFIRMATION_NOT_REQUIRED |
Message Confirmation not required. |
ZB_ZCL_MESSAGING_MESSAGE_CONFIRMATION_REQUIRED |
Message Confirmation required. |
MessageControl field's transmission mechanism values
Commands generated by Messaging Server
Enumerator | |
---|---|
ZB_ZCL_MESSAGING_SRV_CMD_DISPLAY_MESSAGE |
|
ZB_ZCL_MESSAGING_SRV_CMD_CANCEL_MESSAGE |
TheCancelMessage command provides the ability to cancel the sending or acceptance of previously sent messages. When this message is received the recipient device has the option of clearing any display or user interfaces it supports, or has the option of logging the message for future reference.
|
ZB_ZCL_MESSAGING_SRV_CMD_DISPLAY_PROTECTED_MESSAGE |
The Display Protected Message command is for use with messages that are protected by a password or PIN. |
ZB_ZCL_MESSAGING_SRV_CMD_CANCEL_ALL_MESSAGES |
TheCancelAllMessages command indicates to a client device that it should cancel all display messages currently held by it.
|
zb_void_t zb_zcl_messaging_send_cancel_msg | ( | zb_uint8_t | param, |
const zb_addr_u * | dst_addr, | ||
enum zb_aps_addr_mode_e | dst_addr_mode, | ||
zb_uint8_t | dst_ep, | ||
zb_uint8_t | src_ep, | ||
const zb_zcl_messaging_cancel_message_payload_t * | payload, | ||
zb_callback_t | cb | ||
) |
Function for send CancelMessage command On receiver's side callback ZCL device callback ZB_ZCL_REGISTER_DEVICE_CB will be called with ZB_ZCL_MESSAGING_CANCEL_MSG_CB_ID callback id.
param | - Reference to buffer. |
dst_addr | - Address of the device to send command to. |
dst_addr_mode | - Address mode for dst_addr. |
dst_ep | - Destination endpoint. |
src_ep | - Current endpoint. |
payload | - Packet payload (zb_zcl_messaging_cancel_message_payload_t). |
cb | - Callback which should be called when the ZCL stack receives APS ack. |
zb_void_t zb_zcl_messaging_send_display_msg | ( | zb_uint8_t | param, |
const zb_addr_u * | dst_addr, | ||
enum zb_aps_addr_mode_e | dst_addr_mode, | ||
zb_uint8_t | dst_ep, | ||
zb_uint8_t | src_ep, | ||
const zb_zcl_messaging_display_message_payload_t * | payload, | ||
zb_callback_t | cb | ||
) |
Function for send DisplayMessage command. On sender's side callback ZCL device callback ZB_ZCL_REGISTER_DEVICE_CB will be called with ZB_ZCL_MESSAGING_GET_LAST_MSG_CB_ID callback id on reception of GetLastMessage command.
On receiver's side callback ZCL device callback ZB_ZCL_REGISTER_DEVICE_CB will be called with ZB_ZCL_MESSAGING_DISPLAY_MSG_CB_ID callback id.
param | - Reference to buffer. |
dst_addr | - Address of the device to send command to. |
dst_addr_mode | - Address mode for dst_addr. |
dst_ep | - Destination endpoint. |
src_ep | - Current endpoint. |
payload | - Packet payload (zb_zcl_messaging_display_message_payload_t). |
cb | - Callback which should be called when the ZCL stack receives APS ack. |
zb_void_t zb_zcl_messaging_send_get_last_msg | ( | zb_uint8_t | param, |
const zb_addr_u * | dst_addr, | ||
enum zb_aps_addr_mode_e | dst_addr_mode, | ||
zb_uint8_t | dst_ep, | ||
zb_uint8_t | src_ep, | ||
zb_callback_t | cb | ||
) |
Function for send GetLastMessage command
On receiver's side callback ZCL device callback ZB_ZCL_REGISTER_DEVICE_CB will be called with ZB_ZCL_MESSAGING_GET_LAST_MSG_CB_ID callback id.
param | - Reference to buffer. |
dst_addr | - Address of the device to send command to. |
dst_addr_mode | - Address mode for dst_addr. |
dst_ep | - Destination endpoint. |
src_ep | - Current endpoint. |
cb | - Callback which should be called when the ZCL stack receives APS ack. |
zb_void_t zb_zcl_messaging_send_msg_confirmation | ( | zb_uint8_t | param, |
const zb_addr_u * | dst_addr, | ||
enum zb_aps_addr_mode_e | dst_addr_mode, | ||
zb_uint8_t | dst_ep, | ||
zb_uint8_t | src_ep, | ||
const zb_zcl_messaging_message_confirm_payload_t * | payload, | ||
zb_callback_t | cb | ||
) |
Function for send MessageConfirmation command On receiver's side callback ZCL device callback ZB_ZCL_REGISTER_DEVICE_CB will be called with ZB_ZCL_MESSAGING_MSG_CONFIRMATION_CB_ID callback id.
param | - Reference to buffer. |
dst_addr | - Address of the device to send command to. |
dst_addr_mode | - Address mode for dst_addr. |
dst_ep | - Destination endpoint. |
src_ep | - Current endpoint. |
payload | - Packet payload (zb_zcl_messaging_message_confirm_payload_t). |
cb | - Callback which should be called when the ZCL stack receives APS ack. |