nRF5 SDK for Thread and Zigbee v1.0.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ZCL Binary Input cluster

Binary Input cluster attributes

enum  zb_zcl_binary_input_attr_e {
  ZB_ZCL_ATTR_BINARY_INPUT_OUT_OF_SERVICE_ID = 0x0051, 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_STATUS_FLAG_ID = 0x006F
}
 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_OUT_OF_SERVICE_DEFAULT_VALUE   ZB_FALSE
 OutOfService attribute default value.
 
#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.
 

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:115
Definition: zb_zcl_common.h:155
StatusFlag attribute.
Definition: zb_zcl_binary_input.h:91
Definition: zb_zcl_common.h:124
#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:656
Definition: zb_zcl_binary_input.h:100
Definition: zb_types.h:99
OutOfService attribute.
Definition: zb_zcl_binary_input.h:80

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:104
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
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:155
StatusFlag attribute.
Definition: zb_zcl_binary_input.h:91
Definition: zb_zcl_common.h:124
#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:656
Definition: zb_types.h:100
Definition: zb_types.h:99
OutOfService attribute.
Definition: zb_zcl_binary_input.h:80

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:103
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
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:155
StatusFlag attribute.
Definition: zb_zcl_binary_input.h:91
Definition: zb_zcl_common.h:124
#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:656
Definition: zb_types.h:99

Set overriden operating mode.

Parameters
ep- endpoint number

Enumeration Type Documentation

Binary Input cluster attribute identifiers.

Enumerator
ZB_ZCL_ATTR_BINARY_INPUT_OUT_OF_SERVICE_ID 

OutOfService attribute.

ZB_ZCL_ATTR_BINARY_INPUT_PRESENT_VALUE_ID 

PresentValue attribute.

ZB_ZCL_ATTR_BINARY_INPUT_STATUS_FLAG_ID 

StatusFlag attribute.

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.