nRF5 SDK for Thread and Zigbee v1.0.0
Data Structures | Macros | Typedefs | Enumerations | Functions
ZCL initialization data and API

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
 

Enumerations

enum  zb_zcl_device_callback_id_e {
  ZB_ZCL_SET_ATTR_VALUE_CB_ID = 0, ZB_ZCL_REPORT_ATTR_CB_ID, ZB_ZCL_NO_REPORTING_CB_ID, ZB_ZCL_ON_OFF_WITH_EFFECT_VALUE_CB_ID,
  ZB_ZCL_SHADE_SET_VALUE_CB_ID, ZB_ZCL_SHADE_GET_VALUE_CB_ID, ZB_ZCL_IDENTIFY_EFFECT_CB_ID, ZB_ZCL_LEVEL_CONTROL_SET_VALUE_CB_ID,
  ZB_ZCL_IAS_WD_START_WARNING_VALUE_CB_ID, ZB_ZCL_IAS_WD_SQUAWK_VALUE_CB_ID, ZB_ZCL_IAS_WD_START_WARNING_HA_VALUE_CB_ID, ZB_ZCL_IAS_ACE_ARM_VALUE_CB_ID,
  ZB_ZCL_IAS_ACE_VALUE_CB_ID, ZB_ZCL_OTA_UPGRADE_VALUE_CB_ID, ZB_ZCL_BASIC_RESET_CB_ID, ZB_ZCL_THERMOSTAT_VALUE_CB_ID,
  ZB_ZCL_POLL_CONTROL_CHECK_IN_CLI_CB_ID, ZB_ZCL_EN50523_ALERT_CB_ID, ZB_ZCL_OTA_UPGRADE_SRV_QUERY_IMAGE_CB_ID, ZB_ZCL_OTA_UPGRADE_SRV_UPGRADE_END_CB_ID,
  ZB_ZCL_PRICE_GET_CURRENT_PRICE_CB_ID, ZB_ZCL_PRICE_GET_SCHEDULED_PRICES_CB_ID, ZB_ZCL_PRICE_GET_TIER_LABELS_CB_ID, ZB_ZCL_PRICE_PUBLISH_PRICE_CB_ID,
  ZB_ZCL_PRICE_PUBLISH_TIER_LABELS_CB_ID, ZB_ZCL_PRICE_PRICE_ACK_CB_ID, ZB_ZCL_DRLC_REPORT_EVENT_STATUS_CB_ID, ZB_ZCL_DRLC_GET_SCHEDULED_EVENTS_CB_ID,
  ZB_ZCL_DRLC_LOAD_CONTROL_EVENT_CB_ID, ZB_ZCL_DRLC_CANCEL_LOAD_CONTROL_EVENT_CB_ID, ZB_ZCL_DRLC_CANCEL_ALL_LOAD_CONTROL_EVENTS_CB_ID, ZB_ZCL_MESSAGING_MSG_CONFIRMATION_CB_ID,
  ZB_ZCL_MESSAGING_GET_LAST_MSG_CB_ID, ZB_ZCL_MESSAGING_CANCEL_MSG_CB_ID, ZB_ZCL_MESSAGING_DISPLAY_MSG_CB_ID, ZB_ZCL_TUNNELING_REQUEST_TUNNEL_CB_ID,
  ZB_ZCL_TUNNELING_REQUEST_TUNNEL_RESPONSE_CB_ID, ZB_ZCL_TUNNELING_TRANSFER_DATA_CLI_CB_ID, ZB_ZCL_TUNNELING_TRANSFER_DATA_SRV_CB_ID, ZB_ZCL_TUNNELING_TRANSFER_DATA_ERROR_CLI_CB_ID,
  ZB_ZCL_TUNNELING_TRANSFER_DATA_ERROR_SRV_CB_ID, ZB_ZCL_TUNNELING_CLOSE_TUNNEL_CB_ID, ZB_ZCL_CALENDAR_GET_CALENDAR_CB_ID, ZB_ZCL_CALENDAR_GET_DAY_PROFILES_CB_ID,
  ZB_ZCL_CALENDAR_GET_WEEK_PROFILES_CB_ID, ZB_ZCL_CALENDAR_GET_SEASONS_CB_ID, ZB_ZCL_CALENDAR_GET_SPECIAL_DAYS_CB_ID, ZB_ZCL_CALENDAR_GET_CALENDAR_CANCELLATION_CB_ID,
  ZB_ZCL_CALENDAR_PUBLISH_CALENDAR_CB_ID, ZB_ZCL_CALENDAR_PUBLISH_DAY_PROFILE_CB_ID, ZB_ZCL_CALENDAR_PUBLISH_WEEK_PROFILE_CB_ID, ZB_ZCL_CALENDAR_PUBLISH_SEASONS_CB_ID,
  ZB_ZCL_CALENDAR_PUBLISH_SPECIAL_DAYS_CB_ID, ZB_ZCL_CALENDAR_CANCEL_CALENDAR_CB_ID, ZB_ZCL_ENERGY_MANAGEMENT_REPORT_EVENT_STATUS_CB_ID, ZB_ZCL_ENERGY_MANAGEMENT_MANAGE_EVENT_CB_ID,
  ZB_ZCL_MDU_PAIRING_REQUEST_CB_ID, ZB_ZCL_MDU_PAIRING_RESPONSE_CB_ID, ZB_ZCL_METERING_GET_PROFILE_CB_ID, ZB_ZCL_METERING_REQUEST_FAST_POLL_MODE_CB_ID,
  ZB_ZCL_METERING_GET_SNAPSHOT_CB_ID, ZB_ZCL_METERING_GET_SAMPLED_DATA_CB_ID, ZB_ZCL_METERING_GET_PROFILE_RESPONSE_CB_ID, ZB_ZCL_METERING_REQUEST_FAST_POLL_MODE_RESPONSE_CB_ID,
  ZB_ZCL_METERING_PUBLISH_SNAPSHOT_CB_ID, ZB_ZCL_METERING_GET_SAMPLED_DATA_RESPONSE_CB_ID
}
 

Functions

zb_zcl_globals_t * zb_zcl_get_ctx ()
 

Detailed Description

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

void report_attribute_cb(
#ifdef ZB_ZGP_SINK
#else
#endif
zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint16_t attr_id, zb_uint8_t attr_type, zb_uint8_t *value)
{
zb_uint8_t buf_ptr = ZB_REF_FROM_BUF(buf);
zb_test_reporting_info_t *test_rep_info = ZB_GET_BUF_PARAM(buf, zb_test_reporting_info_t);
ZVUNUSED(addr);
ZVUNUSED(attr_type);
TRACE_MSG(TRACE_ZCL1, ">> report_attribute_cb ep %hd, cluster %d, attr %d",
(FMT__H_D_D, ep, cluster_id, attr_id));
if (ep != DST_ENDPOINT || cluster_id != ZB_ZCL_CLUSTER_ID_ON_OFF || attr_id != TEST_REPORTING_ATTR)
{
g_error_cnt++;
TRACE_MSG(TRACE_ERROR, "Error, incorrect report is received", (FMT__0));
}
TRACE_MSG(TRACE_ZCL2, "reporting interval %d, value %hd",
(FMT__D_H, g_reporting_interval, *value));
test_rep_info->ep = ep;
test_rep_info->cluster_id = cluster_id;
test_rep_info->attr_id = attr_id;
test_rep_info->value = *value;
test_rep_info->rep_interval = g_reporting_interval;
g_reporting_interval = 0;
next_step(buf_ptr);
TRACE_MSG(TRACE_ZCL1, "<< report_attribute_cb", (FMT__0));
}
ZB_ZCL_SET_REPORT_ATTR_CB(&report_attribute_cb);

Sample use ZB_ZCL_SET_NO_REPORTING_CB

zb_void_t no_reporting_cb(zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint16_t attr_id)
{
test_timeout_info_t *timeout_info = ZB_GET_BUF_PARAM(buf, test_timeout_info_t);
TRACE_MSG(TRACE_ZCL1, ">> no_reporting_cb ep %hd, cluster_id %d, attr_id %d",
(FMT__H_D_D, ep, cluster_id, attr_id));
timeout_info->ep = ep;
timeout_info->cluster = cluster_id;
timeout_info->attr = attr_id;
timeout_info->timeout = g_reporting_interval;
g_reporting_interval = 0;
next_step(buf);
TRACE_MSG(TRACE_ZCL1, "<< no_reporting_cb", (FMT__0));
}
ZB_ZCL_SET_NO_REPORTING_CB(no_reporting_cb);

Macro Definition Documentation

#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.

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.

Parameters
_param- Reference to buffer.
Returns
- Pointer to zb_zcl_parsed_hdr_t structure.
#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.

Parameters
_param- Reference to buffer.
_ptype- Target data type.
Returns
- Pointer to _ptype data.
See Also
zb_zcl_device_callback_param_t.
#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.

Parameters
_param- Reference to buffer.
_type- Target data type
Returns
- Pointer to _ptype data.
#define ZB_ZCL_DEVICE_CMD_PARAM_STATUS (   _param)    ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->status)

Get access to status of device callback parameters.

Parameters
_param- Reference to buffer.
Returns
- zb_ret_t value of current status.
#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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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 Documentation

Types of device user application callbacks

See Also
zb_zcl_device_callback_param_t

Enumeration Type Documentation

Types of device user application callbacks

See Also
zb_zcl_device_callback_param_t
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

See Also
ZLL spec 6.6.1.4.4.2
ZB_ZCL_IDENTIFY_EFFECT_CB_ID 

Inform user about call identify effect command

See Also
ZLL spec 6.3.1.2.1
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

See Also
ZCL spec 8.4.2.3.1
ZB_ZCL_IAS_WD_SQUAWK_VALUE_CB_ID 

Inform user about call Squawk command

See Also
ZCL spec 8.4.2.3.2
ZB_ZCL_IAS_WD_START_WARNING_HA_VALUE_CB_ID 

Inform user about call Start warning HA command

See Also
HA spec 10.9.4.3.1
ZB_ZCL_IAS_ACE_ARM_VALUE_CB_ID 

Inform user about call Arm ZCL command

See Also
ZCL spec 8.3.2.4.1.2
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

See Also
HA spec 10.1.3.3
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

See Also
ZCL 6.0 spec 15.4.2.4.2
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.

Parameters
[in]param_outparam_in zb_zcl_price_get_scheduled_prices_payload_t

One of the following statuses must be returned:

Returns
RET_OK - price data is available.
RET_NOT_FOUND - price data isn't available. Default Response will be send if requested.
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.

Parameters
[in]param_outparam_in zb_zcl_price_get_tier_labels_payload_t

One of the following statuses must be returned:

Returns
RET_OK - price data is available. In this case application must send reply using provided buffer or free buffer. Stack doesn't free buffer in this case.
RET_ERROR - command is handled with errors. Default Response will be send if requested.
RET_NOT_FOUND - price data isn't available. Default Response will be send if requested.
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.

Parameters
[in]param_inzb_zcl_price_publish_price_payload_t
[out]param_outzb_zcl_price_ack_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Send PriceAcknowledgement command.
RET_ERROR - command is handled with errors
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.

Parameters
[in]param_inzb_zcl_price_publish_tier_labels_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Default Response will be send if requested.
RET_ERROR - command is handled with errors
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.

Parameters
[in]param_inzb_zcl_price_ack_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Default Response will be send if requested.
RET_ERROR - command is handled with errors.
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.

Parameters
[in]param_inzb_zcl_metering_get_profile_payload_t
[out]param_outzb_zcl_metering_get_profile_response_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Send GetProfileResponse command.
RET_ERROR - command is handled with errors. Default Response will be send if requested.
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.

Parameters
[in]param_inzb_zcl_metering_request_fast_poll_mode_payload_t
[out]param_outzb_zcl_metering_request_fast_poll_mode_response_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Send RequestFastPollModeResponse command.
RET_ERROR - command is handled with errors. Default Response will be send if requested.
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.

Parameters
[in]param_inzb_zcl_metering_get_snapshot_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. In this case application must send reply using provided buffer or free buffer. Stack doesn't free buffer in this case.
RET_NOT_FOUND - price data isn't available. Default Response will be send if requested.
RET_ERROR - command is handled with errors. Default Response will be send if requested.
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.

Parameters
[in]param_inzb_zcl_metering_get_sampled_data_payload_t
[out]param_outzb_zcl_metering_get_sampled_data_response_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Send GetSampledData command.
RET_NOT_FOUND - price data isn't available. Default Response will be send if requested.
RET_ERROR - command is handled with errors. Default Response will be send if requested.
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.

Parameters
[in]param_inzb_zcl_metering_get_profile_response_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Default Response will be send if requested.
RET_ERROR - command is handled with errors. Default Response will be send if requested.
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.

Parameters
[in]param_inzb_zcl_metering_request_fast_poll_mode_response_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Default Response will be send if requested.
RET_ERROR - command is handled with errors. Default Response will be send if requested.
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.

Parameters
[in]param_inzb_zcl_metering_publish_snapshot_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Default Response will be send if requested.
RET_ERROR - command is handled with errors. Default Response will be send if requested.
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.

Parameters
[in]param_inzb_zcl_metering_get_sampled_data_response_payload_t

One of the following statuses must be returned:

Returns
RET_OK - successfully handle command. Default Response will be send if requested.
RET_ERROR - command is handled with errors. Default Response will be send if requested.

Function Documentation

zb_zcl_globals_t* zb_zcl_get_ctx ( )

Returns ZCL context.

Returns
pointer ZCL context

Documentation feedback | Developer Zone | Subscribe | Updated