Developing with ZBOSS for Zigbee
|
Modules | |
Time cluster attributes | |
Time cluster commands | |
Data Structures | |
struct | zb_zcl_time_attrs_s |
Time cluster attributes. More... | |
Macros | |
#define | ZB_ZCL_TIME_SET_REAL_TIME_CLOCK_CB(func_ptr) (zb_zcl_set_real_time_clock_callback((func_ptr))) |
Set user's callback that will be initialize real time clock on device by specified value. "If the Master bit of the @ref ZB_ZCL_ATTR_TIME_TIME_STATUS_ID "TimeStatus" attribute has a value of 0,
writing to @ref ZB_ZCL_ATTR_TIME_TIME_ID "Time" attribute SHALL set the real time clock to the written value,
otherwise it cannot be written.". More... | |
#define | ZB_TIME_COMPARE_AUTH_LEVEL(new_level, new_short_addr, old_level, old_short_addr) |
#define | ZB_ZCL_DECLARE_TIME_ATTR_LIST(attr_list, attrs) |
Declare attribute list for Time cluster. More... | |
Typedefs | |
typedef zb_bool_t(* | zb_zcl_time_set_real_time_clock_t) (zb_uint32_t time) |
Set real time clock callback. More... | |
typedef void(* | zb_zcl_time_sync_time_server_found_cb_t) (zb_ret_t status, zb_uint32_t auth_level, zb_uint16_t short_addr, zb_uint8_t ep, zb_uint32_t nw_time) |
Callback to call when new time server found during synchronization. | |
typedef struct zb_zcl_time_attrs_s | zb_zcl_time_attrs_t |
Functions | |
void | zb_zcl_time_server_synchronize (zb_uint8_t endpoint, zb_zcl_time_sync_time_server_found_cb_t cb) |
Start time synchronization. More... | |
zb_bool_t | zb_zcl_time_server_read_attr_handle (zb_uint8_t param) |
Handle read attribute response for time cluster. More... | |
#define ZB_TIME_COMPARE_AUTH_LEVEL | ( | new_level, | |
new_short_addr, | |||
old_level, | |||
old_short_addr | |||
) |
#define ZB_ZCL_DECLARE_TIME_ATTR_LIST | ( | attr_list, | |
attrs | |||
) |
Declare attribute list for Time cluster.
[in] | attr_list | - attribute list variable name |
[in] | attrs | - variable of zb_zcl_time_attrs_s type (containing Time cluster attributes) |
#define ZB_ZCL_TIME_SET_REAL_TIME_CLOCK_CB | ( | func_ptr | ) | (zb_zcl_set_real_time_clock_callback((func_ptr))) |
Set user's callback that will be initialize real time clock on device by specified value. "If the Master bit of the @ref ZB_ZCL_ATTR_TIME_TIME_STATUS_ID "TimeStatus" attribute has a value of 0, writing to @ref ZB_ZCL_ATTR_TIME_TIME_ID "Time" attribute SHALL set the real time clock to the written value, otherwise it cannot be written.".
typedef zb_bool_t(* zb_zcl_time_set_real_time_clock_t) (zb_uint32_t time) |
Set real time clock callback.
[in] | time | - UTC time at which real time clock will be set |
zb_bool_t zb_zcl_time_server_read_attr_handle | ( | zb_uint8_t | param | ) |
Handle read attribute response for time cluster.
Handles read attribute response while time synchronization process running. If time synchronization process is not started or finished there will be no processing.
void zb_zcl_time_server_synchronize | ( | zb_uint8_t | endpoint, |
zb_zcl_time_sync_time_server_found_cb_t | cb | ||
) |
Start time synchronization.
endpoint | endpoint for each time server synchronization shall be started. |
cb | callback that will be called on each successfull time server discovery. |
Start time synchronization process. If device doesn't have master bit set in Time Status attribute of Time Cluster then starts to search available time server in Zigbee network and tries to read status and time attributes. After time server successfully found and gathered attributes their values will be passed to application to take further actions.