10#ifndef TR_TIME_CLIENT_H
11#define TR_TIME_CLIENT_H
20#if defined(TR_TIME_CLIENT_PLUGIN_PRINT_ENABLE) && (TR_TIME_CLIENT_PLUGIN_PRINT_ENABLE == 1)
21#define tr_time_client_printf(...) tr_zcl_printf(__VA_ARGS__)
22#define tr_time_client_println(...) tr_zcl_println(__VA_ARGS__)
24#define tr_time_client_printf(...)
25#define tr_time_client_println(...)
61 zb_uint8_t *new_value,
74 zb_uint16_t server_address);
123 zb_uint16_t from_addr,
124 zb_uint8_t payload_len,
zb_bool_t tr_time_client_sync_time_now(void)
cause a time re-synchronization to happen immediately
zb_bool_t tr_time_client_set_server_rediscovery_time(zb_uint16_t rediscovery_time_in_minutes)
set the rate of Time Master Server re-discovery time, in minutes
zb_bool_t tr_time_client_set_server_addr(zb_uint16_t new_address, zb_uint8_t endpoint)
as an alternative to discovery, the Time Master Server address can be set
zb_bool_t tr_time_client_set_resync_time(zb_uint16_t resync_time_in_minutes)
set the rate of re-synchronization with the Time Master Server, in minutes
zb_bool_t tr_time_client_discover_server_now(void)
cause a server discovery to happen immediately
zb_bool_t tr_time_client_is_time_synced(void)
has the time been synced to a Time Master Server
zb_uint16_t tr_time_client_get_server_addr(void)
the current Time Master Server address can be read
void tr_time_client_second_tick(void)
app should call this once per second to help the time client know when to sync time or rediscover a t...
zb_bool_t tr_time_client_command_received_cb(zb_zcl_parsed_hdr_t *cmd_info)
Callback that user can declare to handle any Time client commands.
void tr_time_client_write_attr_cb(zb_uint8_t endpoint, zb_uint16_t attr_id, zb_uint8_t *new_value, zb_uint16_t manuf_code)
Callback fires when a Time client attribute is about to be written.
void tr_time_client_received_time_update_cb(zb_uint8_t endpoint, tr_new_zigbee_time_t *new_time)
Callback fires when a Time client receives an update to the time.
void tr_time_client_server_discovery_complete_cb(zb_bool_t server_found, zb_uint16_t server_address)
Callback fires when a Time Server Discovery finishes.
void tr_time_client_init_cb(zb_uint8_t endpoint)
Callback fires when the Time client cluster plugin is initialized.
struct passed back to app when the zigbee time has been updated
Definition tr_time_client.h:30
zb_uint32_t dst_end
Definition tr_time_client.h:35
zb_uint32_t new_zigbee_local_time
Definition tr_time_client.h:32
zb_uint32_t dst_shift
Definition tr_time_client.h:36
zb_uint32_t new_zigbee_utc_time
Definition tr_time_client.h:31
zb_int32_t time_zone_offset
Definition tr_time_client.h:33
zb_uint32_t dst_start
Definition tr_time_client.h:34
Trident application framework include.
zb_uint8_t endpoint
Definition tr_nvram_attr.h:176
zb_uint16_t manuf_code
Definition tr_nvram_attr.h:180
zb_uint16_t attr_id
Definition tr_nvram_attr.h:178
zb_uint8_t payload[TR_THERMOSTAT_SERVER_MAX_SET_CMD_PAYLOAD]
Definition tr_thermostat_server.h:48
void tr_time_client_init(void)
void tr_time_client_rx_read_attr_resp(zb_uint8_t endpoint, zb_uint16_t from_addr, zb_uint8_t payload_len, zb_uint8_t *payload)