nRF5 SDK for Thread and Zigbee v4.1.0
ZCL Binary Input cluster

Binary Input cluster attributes

enum  zb_zcl_binary_input_attr_e {
  ZB_ZCL_ATTR_BINARY_INPUT_ACTIVE_TEXT_ID = 0x0004, ZB_ZCL_ATTR_BINARY_INPUT_DESCRIPTION_ID = 0x001C, ZB_ZCL_ATTR_BINARY_INPUT_INACTIVE_TEXT_ID = 0x002E, ZB_ZCL_ATTR_BINARY_INPUT_OUT_OF_SERVICE_ID = 0x0051,
  ZB_ZCL_ATTR_BINARY_INPUT_POLARITY_ID = 0x0054, ZB_ZCL_ATTR_BINARY_INPUT_PRESENT_VALUE_ID = 0x0055, ZB_ZCL_ATTR_GP_ATTR_BINARY_INPUT_BATTERY_VALUE_ID = 0x0056, ZB_ZCL_ATTR_GP_ATTR_BINARY_INPUT_TEMPERATURE_VALUE_ID = 0x0057,
  ZB_ZCL_ATTR_GP_ATTR_BINARY_INPUT_TAMPER_VALUE_ID = 0x0058, ZB_ZCL_ATTR_BINARY_INPUT_RELIABILITY_ID = 0x0067, ZB_ZCL_ATTR_BINARY_INPUT_STATUS_FLAG_ID = 0x006F, ZB_ZCL_ATTR_BINARY_INPUT_APPLICATION_TYPE_ID = 0x0100
}
 Binary Input cluster attribute identifiers. More...
 
enum  zb_zcl_binary_input_status_flag_value_e {
  ZB_ZCL_BINARY_INPUT_STATUS_FLAG_NORMAL = 0x00, ZB_ZCL_BINARY_INPUT_STATUS_FLAG_IN_ALARM = 0x01, ZB_ZCL_BINARY_INPUT_STATUS_FLAG_FAULT = 0x02, ZB_ZCL_BINARY_INPUT_STATUS_FLAG_OVERRIDEN = 0x04,
  ZB_ZCL_BINARY_INPUT_STATUS_FLAG_OUT_OF_SERVICE = 0x08
}
 StatusFlag attribute values. More...
 
#define ZB_ZCL_BINARY_INPUT_ACTIVE_TEXT_DEFAULT_VALUE   {0}
 Default value for ActiveText attribute.
 
#define ZB_ZCL_BINARY_INPUT_DESCRIPTION_DEFAULT_VALUE   {0}
 Default value for Description attribute.
 
#define ZB_ZCL_BINARY_INPUT_INACTIVE_TEXT_DEFAULT_VALUE   {0}
 Default value for InactiveText attribute.
 
#define ZB_ZCL_BINARY_INPUT_OUT_OF_SERVICE_DEFAULT_VALUE   ZB_FALSE
 OutOfService attribute default value.
 
#define ZB_ZCL_BINARY_INPUT_POLARITY_DEFAULT_VALUE   ((zb_uint8_t)0)
 Default value for Polarity attribute.
 
#define ZB_ZCL_BINARY_INPUT_RELIABILITY_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for Reliability attribute.
 
#define ZB_ZCL_BINARY_INPUT_STATUS_FLAG_DEFAULT_VALUE   ZB_ZCL_BINARY_INPUT_STATUS_FLAG_NORMAL
 StatusFlag attribute default value.
 
#define ZB_ZCL_BINARY_INPUT_STATUS_FLAG_MIN_VALUE   0
 StatusFlag attribute minimum value.
 
#define ZB_ZCL_BINARY_INPUT_STATUS_FLAG_MAX_VALUE   0x0F
 StatusFlag attribute maximum value.
 
#define ZB_ZCL_DECLARE_BINARY_INPUT_ATTRIB_LIST(attr_list, out_of_service, present_value, status_flag)
 Declare attribute list for Binary Input cluster. More...
 

Binary input attribute value manipulation API

#define ZB_ZCL_BINARY_INPUT_SET_NORMAL_MODE(ep)
 Set normal operating mode. More...
 
#define ZB_ZCL_BINARY_INPUT_SET_OUT_OF_SERVICE(ep)
 Set Out of service operating mode. More...
 
#define ZB_ZCL_BINARY_INPUT_SET_OVERRIDEN_MODE(ep)
 Set overriden operating mode. More...
 

Detailed Description

According to ZCL spec, subclause 3.14.4, Binary Input (Basic) cluster has no cluster-specific commands. Cluster attributes could be queried with general ZCL commands.

Example
#define DUT_ENDPOINT 5

For more information see 544_binary_input sample

Macro Definition Documentation

#define ZB_ZCL_BINARY_INPUT_SET_NORMAL_MODE (   ep)
Value:
{ \
\
val = ZB_FALSE; \
&val, ZB_FALSE); \
\
&val, ZB_FALSE); \
}
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:219
StatusFlag attribute.
Definition: zb_zcl_binary_input.h:110
Definition: zb_zcl_common.h:188
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:759
Definition: zb_zcl_binary_input.h:122
Definition: zb_types.h:112
OutOfService attribute.
Definition: zb_zcl_binary_input.h:88

Set normal operating mode.

Parameters
ep- endpoint number
#define ZB_ZCL_BINARY_INPUT_SET_OUT_OF_SERVICE (   ep)
Value:
{ \
zb_zcl_attr_t *attr_desc; \
\
val = ZB_TRUE; \
&val, ZB_FALSE); \
\
if (attr_desc) \
{ \
&val, ZB_FALSE); \
} \
}
struct zb_zcl_attr_s zb_zcl_attr_t
ZCL attribute definiton structure.
Definition: zb_zcl_binary_input.h:126
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
zb_zcl_attr_t * zb_zcl_get_attr_desc_a(zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id)
Definition: zb_zcl_common.h:219
StatusFlag attribute.
Definition: zb_zcl_binary_input.h:110
Definition: zb_zcl_common.h:188
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:759
Definition: zb_types.h:113
Definition: zb_types.h:112
OutOfService attribute.
Definition: zb_zcl_binary_input.h:88

Set Out of service operating mode.

Parameters
ep- endpoint number
#define ZB_ZCL_BINARY_INPUT_SET_OVERRIDEN_MODE (   ep)
Value:
{ \
zb_zcl_attr_t *attr_desc; \
\
if (attr_desc) \
{ \
val = *(zb_uint8_t*)attr_desc->data_p | ZB_ZCL_BINARY_INPUT_STATUS_FLAG_OVERRIDEN; \
&val, ZB_FALSE); \
} \
}
struct zb_zcl_attr_s zb_zcl_attr_t
ZCL attribute definiton structure.
Definition: zb_zcl_binary_input.h:125
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
zb_zcl_attr_t * zb_zcl_get_attr_desc_a(zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id)
Definition: zb_zcl_common.h:219
StatusFlag attribute.
Definition: zb_zcl_binary_input.h:110
Definition: zb_zcl_common.h:188
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:759
Definition: zb_types.h:112

Set overriden operating mode.

Parameters
ep- endpoint number
#define ZB_ZCL_DECLARE_BINARY_INPUT_ATTRIB_LIST (   attr_list,
  out_of_service,
  present_value,
  status_flag 
)
Value:
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BINARY_INPUT_OUT_OF_SERVICE_ID, (out_of_service)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BINARY_INPUT_PRESENT_VALUE_ID, (present_value)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BINARY_INPUT_STATUS_FLAG_ID, (status_flag)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST
PresentValue attribute.
Definition: zb_zcl_binary_input.h:96
StatusFlag attribute.
Definition: zb_zcl_binary_input.h:110
OutOfService attribute.
Definition: zb_zcl_binary_input.h:88

Declare attribute list for Binary Input cluster.

Parameters
attr_list- attribute list name
out_of_service- pointer to variable to store OutOfService attribute value
present_value- pointer to variable to store PresentValue attribute value
status_flag- pointer to variable to store StatusFlag attribute value

Enumeration Type Documentation

Binary Input cluster attribute identifiers.

Enumerator
ZB_ZCL_ATTR_BINARY_INPUT_ACTIVE_TEXT_ID 

This attribute, of type Character string, MAY be used to hold a human readable description of the ACTIVE state of a binary PresentValue.

ZB_ZCL_ATTR_BINARY_INPUT_DESCRIPTION_ID 

The Description attribute, of type Character string, MAY be used to hold a description of the usage of the input, output or value, as appropriate to the cluster.

ZB_ZCL_ATTR_BINARY_INPUT_INACTIVE_TEXT_ID 

This attribute, of type Character string, MAY be used to hold a human readable description of the INACTIVE state of a binary PresentValue.

ZB_ZCL_ATTR_BINARY_INPUT_OUT_OF_SERVICE_ID 

OutOfService attribute.

ZB_ZCL_ATTR_BINARY_INPUT_POLARITY_ID 

This attribute, of type enumeration, indicates the relationship between the physical state of the input (or output as appropriate for the cluster) and the logical state represented by a binary PresentValue attribute, when OutOfService is FALSE.

ZB_ZCL_ATTR_BINARY_INPUT_PRESENT_VALUE_ID 

PresentValue attribute.

ZB_ZCL_ATTR_BINARY_INPUT_RELIABILITY_ID 

The Reliability attribute, of type 8-bit enumeration, provides an indication of whether the PresentValue or the operation of the physical input, output or value in question (as appropriate for the cluster) is reliable as far as can be determined and, if not, why not.

ZB_ZCL_ATTR_BINARY_INPUT_STATUS_FLAG_ID 

StatusFlag attribute.

ZB_ZCL_ATTR_BINARY_INPUT_APPLICATION_TYPE_ID 

The ApplicationType attribute is an unsigned 32-bit integer that indicates the specific application usage for this cluster.

StatusFlag attribute values.

See also
ZCL spec 3.14.10.3.
Enumerator
ZB_ZCL_BINARY_INPUT_STATUS_FLAG_NORMAL 

Normal (default) state.

ZB_ZCL_BINARY_INPUT_STATUS_FLAG_IN_ALARM 

In alarm bit.

ZB_ZCL_BINARY_INPUT_STATUS_FLAG_FAULT 

Fault bit.

ZB_ZCL_BINARY_INPUT_STATUS_FLAG_OVERRIDEN 

Overriden bit.

ZB_ZCL_BINARY_INPUT_STATUS_FLAG_OUT_OF_SERVICE 

Out of service bit.


Documentation feedback | Developer Zone | Subscribe | Updated