Logo
Developing with ZBOSS for Zigbee
Energy Management cluster commands

Data Structures

struct  zb_zcl_energy_management_manage_event_payload_s
 
struct  zb_zcl_energy_management_report_event_status_payload_s
 

Macros

#define ZB_ZCL_ENERGY_MANAGEMENT_MANAGE_EVENT_PAYLOAD_SIZE_IS_VALID(size)   ((size) >= sizeof(zb_zcl_energy_management_manage_event_payload_t))
 
#define ZB_ZCL_CLUSTER_ID_ENERGY_MANAGEMENT_SERVER_ROLE_GENERATED_CMD_LIST   ZB_ZCL_ENERGY_MANAGEMENT_SRV_CMD_REPORT_EVENT_STATUS
 
#define ZB_ZCL_CLUSTER_ID_ENERGY_MANAGEMENT_CLIENT_ROLE_RECEIVED_CMD_LIST   ZB_ZCL_CLUSTER_ID_ENERGY_MANAGEMENT_SERVER_ROLE_GENERATED_CMD_LIST
 
#define ZB_ZCL_CLUSTER_ID_ENERGY_MANAGEMENT_CLIENT_ROLE_GENERATED_CMD_LIST   ZB_ZCL_ENERGY_MANAGEMENT_CLI_CMD_MANAGE_EVENT
 
#define ZB_ZCL_CLUSTER_ID_ENERGY_MANAGEMENT_SERVER_ROLE_RECEIVED_CMD_LIST   ZB_ZCL_CLUSTER_ID_ENERGY_MANAGEMENT_CLIENT_ROLE_GENERATED_CMD_LIST
 
#define ZB_ZCL_ENERGY_MANAGEMENT_REPORT_EVENT_STATUS_PAYLOAD_SIZE_IS_VALID(size)   ((size) >= sizeof(zb_zcl_energy_management_report_event_status_payload_t))
 
#define ZB_ZCL_ENERGY_MANAGEMENT_REPORT_EVENT_STATUS_PAYLOAD_INIT
 
#define ZB_ZCL_ENERGY_MANAGEMENT_MANAGE_EVENT_PAYLOAD_INIT   (zb_zcl_energy_management_manage_event_payload_t) {0} \
 
#define ZB_ZCL_ENERGY_MANAGEMENT_SEND_CMD_REPORT_EVENT_STATUS(_param, _dst_addr, _dst_addr_mode, _dst_ep, _src_ep, _payload)
 
#define ZB_ZCL_ENERGY_MANAGEMENT_SEND_CMD_MANAGE_EVENT(_param, _dst_addr, _dst_addr_mode, _dst_ep, _src_ep, _payload)
 

Typedefs

typedef enum zb_zcl_energy_management_cli_cmd_e zb_zcl_energy_management_cli_cmd_t
 
typedef struct zb_zcl_energy_management_manage_event_payload_s zb_zcl_energy_management_manage_event_payload_t
 
typedef enum zb_zcl_energy_management_actions_required_encoding_e zb_zcl_energy_management_actions_required_encoding_t
 
typedef enum zb_zcl_energy_management_srv_cmd_e zb_zcl_energy_management_srv_cmd_t
 
typedef struct zb_zcl_energy_management_report_event_status_payload_s zb_zcl_energy_management_report_event_status_payload_t
 

Enumerations

enum  zb_zcl_energy_management_cli_cmd_e { ZB_ZCL_ENERGY_MANAGEMENT_CLI_CMD_MANAGE_EVENT = 0x00 }
 
enum  zb_zcl_energy_management_actions_required_encoding_e { ZB_ZCL_ENERGY_MANAGEMENT_ACTIONS_EVENT_OPT_OUT = 0, ZB_ZCL_ENERGY_MANAGEMENT_ACTIONS_OPT_INTO_EVENT = 1, ZB_ZCL_ENERGY_MANAGEMENT_ACTIONS_DISABLE_DUTY_CYCLING = 2, ZB_ZCL_ENERGY_MANAGEMENT_ACTIONS_ENABLE_DUTY_CYCLING = 3 }
 
enum  zb_zcl_energy_management_srv_cmd_e { ZB_ZCL_ENERGY_MANAGEMENT_SRV_CMD_REPORT_EVENT_STATUS = 0x00 }
 

Functions

void zb_zcl_energy_management_server_send_report_event_status (zb_uint8_t param, zb_addr_u *dst_addr, zb_aps_addr_mode_t dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t src_ep, zb_zcl_energy_management_report_event_status_payload_t *payload, zb_callback_t cb)
 
void zb_zcl_energy_management_client_send_manage_event (zb_uint8_t param, zb_addr_u *dst_addr, zb_aps_addr_mode_t dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t src_ep, zb_zcl_energy_management_manage_event_payload_t *payload, zb_callback_t cb)
 

Detailed Description

Macro Definition Documentation

§ ZB_ZCL_ENERGY_MANAGEMENT_MANAGE_EVENT_PAYLOAD_INIT

#define ZB_ZCL_ENERGY_MANAGEMENT_MANAGE_EVENT_PAYLOAD_INIT   (zb_zcl_energy_management_manage_event_payload_t) {0} \

Macro for initialization ManageEvent command payload

See also
zb_zcl_energy_management_manage_event_payload_t

§ ZB_ZCL_ENERGY_MANAGEMENT_REPORT_EVENT_STATUS_PAYLOAD_INIT

#define ZB_ZCL_ENERGY_MANAGEMENT_REPORT_EVENT_STATUS_PAYLOAD_INIT
Value:
{ \
.cooling_temperature_set_point_applied = (zb_uint16_t) 0x8000, \
.heating_temperature_set_point_applied = (zb_uint16_t) 0x8000, \
.average_load_adjustment_percentage_applied = (zb_int8_t) 0x80, \
.duty_cycle_applied = (zb_uint8_t) 0xFF, \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:151
struct zb_zcl_energy_management_report_event_status_payload_s zb_zcl_energy_management_report_event_status_payload_t
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:147
signed char zb_int8_t
Project-local 1-byte signed int type.
Definition: zb_types.h:149

Macro for initialization ReportEventStatus command payload

See also
zb_zcl_energy_management_report_event_status_payload_t

§ ZB_ZCL_ENERGY_MANAGEMENT_SEND_CMD_MANAGE_EVENT

#define ZB_ZCL_ENERGY_MANAGEMENT_SEND_CMD_MANAGE_EVENT (   _param,
  _dst_addr,
  _dst_addr_mode,
  _dst_ep,
  _src_ep,
  _payload 
)
Value:
zb_zcl_energy_management_client_send_manage_event(_param, _dst_addr, _dst_addr_mode, \
_dst_ep, _src_ep, _payload, NULL)
void zb_zcl_energy_management_client_send_manage_event(zb_uint8_t param, zb_addr_u *dst_addr, zb_aps_addr_mode_t dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t src_ep, zb_zcl_energy_management_manage_event_payload_t *payload, zb_callback_t cb)

Macro for call zb_zcl_energy_management_client_send_manage_event command

§ ZB_ZCL_ENERGY_MANAGEMENT_SEND_CMD_REPORT_EVENT_STATUS

#define ZB_ZCL_ENERGY_MANAGEMENT_SEND_CMD_REPORT_EVENT_STATUS (   _param,
  _dst_addr,
  _dst_addr_mode,
  _dst_ep,
  _src_ep,
  _payload 
)
Value:
_dst_ep, _src_ep, _payload, NULL)
void zb_zcl_energy_management_server_send_report_event_status(zb_uint8_t param, zb_addr_u *dst_addr, zb_aps_addr_mode_t dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t src_ep, zb_zcl_energy_management_report_event_status_payload_t *payload, zb_callback_t cb)

Macro for call zb_zcl_energy_management_server_send_report_event_status command

Typedef Documentation

§ zb_zcl_energy_management_actions_required_encoding_t

Action(s) Required BitMap/Encoding

See also
SE spec, Table D-196

§ zb_zcl_energy_management_cli_cmd_t

Commands are generated by Energy Management Client

See also
SE spec, subclause 12.2.4

§ zb_zcl_energy_management_manage_event_payload_t

ManageEvent command Payload

See also
SE spec, subclause 12.2.4.1

§ zb_zcl_energy_management_report_event_status_payload_t

§ zb_zcl_energy_management_srv_cmd_t

Commands are generated by Energy Management Server

See also
SE spec, subclause 12.2.5

Enumeration Type Documentation

§ zb_zcl_energy_management_actions_required_encoding_e

Action(s) Required BitMap/Encoding

See also
SE spec, Table D-196
Enumerator
ZB_ZCL_ENERGY_MANAGEMENT_ACTIONS_EVENT_OPT_OUT 

Opt Out of Event

ZB_ZCL_ENERGY_MANAGEMENT_ACTIONS_OPT_INTO_EVENT 

Opt Into Event

ZB_ZCL_ENERGY_MANAGEMENT_ACTIONS_DISABLE_DUTY_CYCLING 

Disable Duty Cycling

ZB_ZCL_ENERGY_MANAGEMENT_ACTIONS_ENABLE_DUTY_CYCLING 

Enable Duty Cycling

§ zb_zcl_energy_management_cli_cmd_e

Commands are generated by Energy Management Client

See also
SE spec, subclause 12.2.4
Enumerator
ZB_ZCL_ENERGY_MANAGEMENT_CLI_CMD_MANAGE_EVENT 

The Manage Event command allows a remote device (such as an IHD or web portal) to change the behavior of a DRLC cluster client when responding to a DRLC Load Control Event.

See also
zb_zcl_energy_management_manage_event_payload_s

§ zb_zcl_energy_management_srv_cmd_e

Commands are generated by Energy Management Server

See also
SE spec, subclause 12.2.5
Enumerator
ZB_ZCL_ENERGY_MANAGEMENT_SRV_CMD_REPORT_EVENT_STATUS 

This command is reused from the DRLC cluster. This command is generated in response to the Manage Event command.

See also
zb_zcl_energy_management_report_event_status_payload_s

Function Documentation

§ zb_zcl_energy_management_client_send_manage_event()

void zb_zcl_energy_management_client_send_manage_event ( zb_uint8_t  param,
zb_addr_u dst_addr,
zb_aps_addr_mode_t  dst_addr_mode,
zb_uint8_t  dst_ep,
zb_uint8_t  src_ep,
zb_zcl_energy_management_manage_event_payload_t payload,
zb_callback_t  cb 
)

Function for send ManageEvent command. On receiver's side callback ZCL device callback ZB_ZCL_REGISTER_DEVICE_CB will be called with ZB_ZCL_ENERGY_MANAGEMENT_MANAGE_EVENT_CB_ID callback id.

Parameters
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_energy_management_manage_event_payload_t).
cb- Callback which should be called when the ZCL stack receives APS ack.
cb- Callback which should be called when the ZCL stack receives APS ack.
cb- Callback which should be called when the ZCL stack receives APS ack.
Usage

Example of sending ManageEvent command

§ zb_zcl_energy_management_server_send_report_event_status()

void zb_zcl_energy_management_server_send_report_event_status ( zb_uint8_t  param,
zb_addr_u dst_addr,
zb_aps_addr_mode_t  dst_addr_mode,
zb_uint8_t  dst_ep,
zb_uint8_t  src_ep,
zb_zcl_energy_management_report_event_status_payload_t payload,
zb_callback_t  cb 
)

Function for send ReportEventStatus command. On sender's side callback ZCL device callback ZB_ZCL_REGISTER_DEVICE_CB will be called with ZB_ZCL_ENERGY_MANAGEMENT_MANAGE_EVENT_CB_ID callback id on reception of ManageEvent command.
On receiver's side callback ZCL device callback ZB_ZCL_REGISTER_DEVICE_CB will be called with ZB_ZCL_ENERGY_MANAGEMENT_REPORT_EVENT_STATUS_CB_ID callback id.

Parameters
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 (ref to zb_zcl_drlc_report_event_status_payload_t and zb_zcl_energy_management_report_event_status_payload_t).
cb- Callback which should be called when the ZCL stack receives APS ack.
Usage

Handle ManageEvent command