Data Structures | |
struct | zb_zcl_device_callback_param_s |
Data for Device user application callback. This structure has receive to User application callback (see zb_callback_t). More... | |
struct | zcl_cluster_handlers_s |
Macros | |
#define | ZB_ZCL_VERSION 0x01 |
ZCL version. | |
#define | ZB_ZCL_SET_MODIFY_ATTR_VALUE_CB(func_ptr) |
Set modify attribute value callback. The macro sets a callback being called on external attribute change. The callback will be provided with all data necessary for correct value change handling. More... | |
#define | ZB_ZCL_SET_REPORT_ATTR_CB(func_ptr) |
Set report attribute callback. The macro sets a callback being called on receive attribute report. The callback will be provided with all data necessary for correct attribute handling. More... | |
#define | ZB_ZCL_SET_NO_REPORTING_CB(func_ptr) |
Set no reporting callback. The macro sets a callback being called on remote attribute reporting timeout. The callback will be provided with all data necessary for correct attribute report timeout handling. More... | |
#define | ZB_ZCL_SET_DEFAULT_VALUE_CB(func_ptr) |
Set "Set default value all attribute" callback. The macro sets a callback being called for need to set attribute to default value. More... | |
#define | ZB_GET_TIME_IN_UNITS() ZB_BEACON_INTERVAL_TO_TIME_UNITS(ZB_TIMER_GET()) |
Get current time in units. Uint = 1/10 sec. | |
#define | ZB_BEACON_INTERVAL_TO_TIME_UNITS(beacons) ZB_TIME_BEACON_INTERVAL_TO_MSEC(beacons) / 100 |
Convert beacon interval to units Uint = 1/10 sec. | |
#define | ZB_TIME_UNITS_TO_BEACON_INTERVAL(uints) ZB_MILLISECONDS_TO_BEACON_INTERVAL((uints)*100) |
Convert units to beacon interval. Uint = 1/10 sec. | |
#define | ZB_ZCL_DEVICE_CMD_PARAM_IN_GET(_param, _ptype) ((const _ptype *) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.in)) |
#define | ZB_ZCL_DEVICE_CMD_PARAM_OUT_GET(_param, _ptype) ((_ptype *) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.out)) |
#define | ZB_ZCL_DEVICE_CMD_PARAM_CMD_INFO(_param) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.in_cmd_info) |
#define | ZB_ZCL_DEVICE_CMD_PARAM_CB_ID(_param) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->device_cb_id) |
#define | ZB_ZCL_DEVICE_CMD_PARAM_STATUS(_param) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->status) |
#define | ZB_ZCL_CLUSTER_HANDLERS_TABLE_SIZE 20 |
#define | ZCL_CTX() (*zb_zcl_get_ctx()) |
Typedefs | |
typedef enum zb_zcl_device_callback_id_e | zb_zcl_device_callback_id_t |
typedef struct zb_zcl_device_callback_param_s | zb_zcl_device_callback_param_t |
Data for Device user application callback. This structure has receive to User application callback (see zb_callback_t). | |
typedef struct zcl_cluster_handlers_s | zcl_cluster_handlers_t |
Functions | |
zb_zcl_globals_t * | zb_zcl_get_ctx () |
Most of initialization is being handled automatically during device start. However, application may set additional callbacks for event handling. Particularly:
Sample use ZB_ZCL_SET_REPORT_ATTR_CB
Sample use ZB_ZCL_SET_NO_REPORTING_CB
#define ZB_ZCL_DEVICE_CMD_PARAM_CB_ID | ( | _param | ) | ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->device_cb_id) |
Get access to device_cb_id of device callback parameters.
_param | - Reference to buffer. |
#define ZB_ZCL_DEVICE_CMD_PARAM_CMD_INFO | ( | _param | ) | ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.in_cmd_info) |
Get access to zb_zcl_parsed_hdr_t data from device callback parameter.
_param | - Reference to buffer. |
#define ZB_ZCL_DEVICE_CMD_PARAM_IN_GET | ( | _param, | |
_ptype | |||
) | ((const _ptype *) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.in)) |
Get INPUT device callback parameter from buffer reference.
_param | - Reference to buffer. |
_ptype | - Target data type. |
#define ZB_ZCL_DEVICE_CMD_PARAM_OUT_GET | ( | _param, | |
_ptype | |||
) | ((_ptype *) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.out)) |
Get OUTPUT device callback parameter from buffer reference.
_param | - Reference to buffer. |
_type | - Target data type |
#define ZB_ZCL_DEVICE_CMD_PARAM_STATUS | ( | _param | ) | ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->status) |
Get access to status of device callback parameters.
_param | - Reference to buffer. |
#define ZB_ZCL_SET_DEFAULT_VALUE_CB | ( | func_ptr | ) |
Set "Set default value all attribute" callback. The macro sets a callback being called for need to set attribute to default value.
func_ptr | - callback to set (of type zb_zcl_set_default_value_attr_cb_t). |
#define ZB_ZCL_SET_MODIFY_ATTR_VALUE_CB | ( | func_ptr | ) |
Set modify attribute value callback. The macro sets a callback being called on external attribute change. The callback will be provided with all data necessary for correct value change handling.
func_ptr | - a callback to set (of type zb_zcl_modify_attr_value_cb_t). |
#define ZB_ZCL_SET_NO_REPORTING_CB | ( | func_ptr | ) |
Set no reporting callback. The macro sets a callback being called on remote attribute reporting timeout. The callback will be provided with all data necessary for correct attribute report timeout handling.
func_ptr | - callback to set (of type zb_zcl_no_reporting_cb_t). |
#define ZB_ZCL_SET_REPORT_ATTR_CB | ( | func_ptr | ) |
Set report attribute callback. The macro sets a callback being called on receive attribute report. The callback will be provided with all data necessary for correct attribute handling.
func_ptr | - callback to set (of type zb_zcl_report_attr_cb_t). |
#define ZCL_CTX | ( | ) | (*zb_zcl_get_ctx()) |
Returns pointer to ZCL context
typedef enum zb_zcl_device_callback_id_e zb_zcl_device_callback_id_t |
Types of device user application callbacks
Types of device user application callbacks
Enumerator | |||||||
---|---|---|---|---|---|---|---|
ZB_ZCL_SET_ATTR_VALUE_CB_ID |
Inform user about attribute value modification | ||||||
ZB_ZCL_REPORT_ATTR_CB_ID |
Inform user about received attribute report | ||||||
ZB_ZCL_NO_REPORTING_CB_ID |
Inform user that report was not received during defined time interval | ||||||
ZB_ZCL_ON_OFF_WITH_EFFECT_VALUE_CB_ID |
Inform user about change On/Off effect
| ||||||
ZB_ZCL_IDENTIFY_EFFECT_CB_ID |
Inform user about call identify effect command
| ||||||
ZB_ZCL_LEVEL_CONTROL_SET_VALUE_CB_ID |
Inform user about ZCL Level Contol cluster attributes value modification | ||||||
ZB_ZCL_IAS_WD_START_WARNING_VALUE_CB_ID |
Inform user about call Start warning command
| ||||||
ZB_ZCL_IAS_WD_SQUAWK_VALUE_CB_ID |
Inform user about call Squawk command
| ||||||
ZB_ZCL_IAS_WD_START_WARNING_HA_VALUE_CB_ID |
Inform user about call Start warning HA command
| ||||||
ZB_ZCL_IAS_ACE_ARM_VALUE_CB_ID |
Inform user about call Arm ZCL command
| ||||||
ZB_ZCL_IAS_ACE_VALUE_CB_ID |
Inform user about call non description IAS ACE commands | ||||||
ZB_ZCL_OTA_UPGRADE_VALUE_CB_ID |
Inform user about OTA Upgrade commands | ||||||
ZB_ZCL_BASIC_RESET_CB_ID |
Inform user about Basic Reset to Factory Defaults commands | ||||||
ZB_ZCL_THERMOSTAT_VALUE_CB_ID |
Inform user about call Thermostat command
| ||||||
ZB_ZCL_POLL_CONTROL_CHECK_IN_CLI_CB_ID |
Inform user about Check-In command from polled device | ||||||
ZB_ZCL_EN50523_ALERT_CB_ID |
Inform user about EN50523 Alert notification command
| ||||||
ZB_ZCL_OTA_UPGRADE_SRV_QUERY_IMAGE_CB_ID |
Inform user about Query next image request | ||||||
ZB_ZCL_OTA_UPGRADE_SRV_UPGRADE_END_CB_ID |
Inform user about finished OTA upgrade | ||||||
ZB_ZCL_PRICE_GET_CURRENT_PRICE_CB_ID |
Ask user about payload for PublishPrice request. | ||||||
ZB_ZCL_PRICE_GET_SCHEDULED_PRICES_CB_ID |
Server. Notify user about GetScheduledPrices request. User's application callback is initialized by RET_NOT_FOUND status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_PRICE_GET_TIER_LABELS_CB_ID |
Server. Notify user about GetTierLabels request. User's application callback is initialized by RET_NOT_FOUND status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_PRICE_PUBLISH_PRICE_CB_ID |
Client. Inform user about PublishPrice request. User's application callback is initialized by RET_OK status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_PRICE_PUBLISH_TIER_LABELS_CB_ID |
Client. Inform user about PublishTierLabels request. User's application callback is initialized by RET_ERROR status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_PRICE_PRICE_ACK_CB_ID |
Server. Inform user about PriceAck command. User's application callback is initialized by RET_ERROR status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_DRLC_REPORT_EVENT_STATUS_CB_ID |
Inform user about change of state for an active Load Control event | ||||||
ZB_ZCL_DRLC_GET_SCHEDULED_EVENTS_CB_ID |
Ask user about currently active or scheduled Load Control Events | ||||||
ZB_ZCL_DRLC_LOAD_CONTROL_EVENT_CB_ID |
Inform user about received Load Control Event | ||||||
ZB_ZCL_DRLC_CANCEL_LOAD_CONTROL_EVENT_CB_ID |
Inform user about Load Control Event cancellation | ||||||
ZB_ZCL_DRLC_CANCEL_ALL_LOAD_CONTROL_EVENTS_CB_ID |
Inform user about all Load Control Events cancellation | ||||||
ZB_ZCL_MESSAGING_MSG_CONFIRMATION_CB_ID |
Inform user about received Message Confirmation request | ||||||
ZB_ZCL_MESSAGING_GET_LAST_MSG_CB_ID |
Ask user about payload for Display Message request | ||||||
ZB_ZCL_MESSAGING_CANCEL_MSG_CB_ID |
Inform user about received Cancel Message request | ||||||
ZB_ZCL_MESSAGING_DISPLAY_MSG_CB_ID |
Inform user about received Display Message request | ||||||
ZB_ZCL_TUNNELING_REQUEST_TUNNEL_CB_ID |
Inform user about request to setup a tunnel association with the server | ||||||
ZB_ZCL_TUNNELING_REQUEST_TUNNEL_RESPONSE_CB_ID |
Inform user about response to a RequestTunnel command | ||||||
ZB_ZCL_TUNNELING_TRANSFER_DATA_CLI_CB_ID |
Infrom user about received TransferData request | ||||||
ZB_ZCL_TUNNELING_TRANSFER_DATA_SRV_CB_ID |
Infrom user about received TransferData request | ||||||
ZB_ZCL_TUNNELING_TRANSFER_DATA_ERROR_CLI_CB_ID |
Infrom user about received TransferDataError request | ||||||
ZB_ZCL_TUNNELING_TRANSFER_DATA_ERROR_SRV_CB_ID |
Infrom user about received TransferDataError request | ||||||
ZB_ZCL_TUNNELING_CLOSE_TUNNEL_CB_ID |
Inform user about closing the tunnel with the server | ||||||
ZB_ZCL_CALENDAR_GET_CALENDAR_CB_ID |
Ask user about payload for PublishCalendar request | ||||||
ZB_ZCL_CALENDAR_GET_DAY_PROFILES_CB_ID |
Ask user about payload for PublishDayProfiles request | ||||||
ZB_ZCL_CALENDAR_GET_WEEK_PROFILES_CB_ID |
Ask user about payload for PublishWeekProfiles request | ||||||
ZB_ZCL_CALENDAR_GET_SEASONS_CB_ID |
Ask user about payload for PublishSeasons request | ||||||
ZB_ZCL_CALENDAR_GET_SPECIAL_DAYS_CB_ID |
Ask user about payload for PublishSpecialDays request | ||||||
ZB_ZCL_CALENDAR_GET_CALENDAR_CANCELLATION_CB_ID |
Ask user about payload for CancelCalendar request | ||||||
ZB_ZCL_CALENDAR_PUBLISH_CALENDAR_CB_ID |
Inform user about PublishCalendar request | ||||||
ZB_ZCL_CALENDAR_PUBLISH_DAY_PROFILE_CB_ID |
Inform user about PublishDayProfile request | ||||||
ZB_ZCL_CALENDAR_PUBLISH_WEEK_PROFILE_CB_ID |
Inform user about PublishWeekProfile request | ||||||
ZB_ZCL_CALENDAR_PUBLISH_SEASONS_CB_ID |
Inform user about PublishSeasons request | ||||||
ZB_ZCL_CALENDAR_PUBLISH_SPECIAL_DAYS_CB_ID |
Inform user about PublishSpecialDays request | ||||||
ZB_ZCL_CALENDAR_CANCEL_CALENDAR_CB_ID |
Inform user about CancelCalendar request | ||||||
ZB_ZCL_ENERGY_MANAGEMENT_REPORT_EVENT_STATUS_CB_ID |
Inform user about ReportEventStatus request | ||||||
ZB_ZCL_ENERGY_MANAGEMENT_MANAGE_EVENT_CB_ID |
Inform user about ManageEvent request | ||||||
ZB_ZCL_MDU_PAIRING_REQUEST_CB_ID |
Inform user about MDU Paring Request. You may provide MDU list as reply | ||||||
ZB_ZCL_MDU_PAIRING_RESPONSE_CB_ID |
Inform user about MDU Pairing Response. List of MDU Paired devices passed | ||||||
ZB_ZCL_METERING_GET_PROFILE_CB_ID |
Server. Inform user about GetProfile request. User's application callback is initialized by RET_ERROR status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_METERING_REQUEST_FAST_POLL_MODE_CB_ID |
Server. Inform user about RequestFastPollMode request. User's application callback is initialized by RET_ERROR status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_METERING_GET_SNAPSHOT_CB_ID |
Server. Inform user about GetSnapshot request. User's application callback is initialized by RET_NOT_FOUND status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_METERING_GET_SAMPLED_DATA_CB_ID |
Server. Inform user about GetSampledData request. User's application callback is initialized by RET_NOT_FOUND status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_METERING_GET_PROFILE_RESPONSE_CB_ID |
Client. Inform user about response to GetProfileResponse command. User's application callback is initialized by RET_ERROR status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_METERING_REQUEST_FAST_POLL_MODE_RESPONSE_CB_ID |
Client. Inform user about response to RequestFastPollMode command. User's application callback is initialized by RET_ERROR status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_METERING_PUBLISH_SNAPSHOT_CB_ID |
Client. Inform user about response to GetSnapshot command. User's application callback is initialized by RET_ERROR status of device callback parameters.
One of the following statuses must be returned:
| ||||||
ZB_ZCL_METERING_GET_SAMPLED_DATA_RESPONSE_CB_ID |
Client. Inform user about response to GetSampledData command. User's application callback is initialized by RET_ERROR status of device callback parameters.
One of the following statuses must be returned:
|
zb_zcl_globals_t* zb_zcl_get_ctx | ( | ) |
Returns ZCL context.