Compile-time options
This section describes the compile-time options that may be enabled in the zcl_options.h file of an application that uses the Electrical Measurement cluster.
To enable the Electrical Measurement cluster in the code to be built, it is necessary to add the following line to the file:
#define CLD_ELECTRICAL_MEASUREMENT
In addition, to enable the cluster as a client or server, it is also necessary to add one of the following lines to the same file:
#define ELECTRICAL_MEASUREMENT_SERVER
#define ELECTRICAL_MEASUREMENT_CLIENT
Optional Attributes
The optional attributes for the Electrical Measurement cluster (see Section 30.2) are enabled by defining:
CLD_ELECTMEAS_ATTR_AC_FREQUENCY
CLD_ELECTMEAS_ATTR_RMS_VOLTAGE
CLD_ELECTMEAS_ATTR_RMS_CURRENT
CLD_ELECTMEAS_ATTR_ACTIVE_POWER
CLD_ELECTMEAS_ATTR_REACTIVE_POWER
CLD_ELECTMEAS_ATTR_APPARENT_POWER
CLD_ELECTMEAS_ATTR_POWER_FACTOR
CLD_ELECTMEAS_ATTR_AC_VOLTAGE_MULTIPLIER
CLD_ELECTMEAS_ATTR_AC_VOLTAGE_DIVISOR
CLD_ELECTMEAS_ATTR_AC_CURRENT_MULTIPLIER
CLD_ELECTMEAS_ATTR_AC_CURRENT_DIVISOR
CLD_ELECTMEAS_ATTR_AC_POWER_MULTIPLIER
CLD_ELECTMEAS_ATTR_AC_POWER_DIVISOR
CLD_ELECTMEAS_ATTR_MAN_SPEC_APPARENT_POWER
CLD_ELECTMEAS_ATTR_MAN_SPEC_NON_ACTIVE_POWER
CLD_ELECTMEAS_ATTR_MAN_SPEC_FNDMTL_REACTIVE_POWER
CLD_ELECTMEAS_ATTR_MAN_SPEC_FNDMTL_APPARENT_POWER
CLD_ELECTMEAS_ATTR_MAN_SPEC_FNDMTL_POWER_FACTOR
CLD_ELECTMEAS_ATTR_MAN_SPEC_NON_FNDMTL_APPARENT_POWER
CLD_ELECTMEAS_ATTR_MAN_SPEC_TOTAL_HARMONIC_DISTORTION
CLD_ELECTMEAS_ATTR_MAN_SPEC_VBIAS
CLD_ELECTMEAS_ATTR_MAN_SPEC_DIVISOR
Global Attributes
Add this line to define the value (n) of the Cluster Revision attribute:
#define CLD_APPLIANCE_STATISTICS_CLUSTER_REVISION <n>
The default value is 1, which corresponds to the revision of the cluster in the ZCL r6 specification (see Section 2.4).
Parent topic:Electrical Measurement Cluster