Trident IoT Zigbee SDK
Loading...
Searching...
No Matches
tr_time_client.h File Reference

ZCL Time cluster client implementation. More...

#include "tr_af.h"
Include dependency graph for tr_time_client.h:

Go to the source code of this file.

Data Structures

struct  tr_new_zigbee_time_t
 struct passed back to app when the zigbee time has been updated More...

Macros

#define tr_time_client_printf(...)
#define tr_time_client_println(...)

Functions

void tr_time_client_init_cb (zb_uint8_t endpoint)
 Callback fires when the Time client cluster plugin is initialized.
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_second_tick (void)
 app should call this once per second to help the time client know when to sync time or rediscover a time master server
zb_bool_t tr_time_client_is_time_synced (void)
 has the time been synced to a Time Master Server
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_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_sync_time_now (void)
 cause a time re-synchronization to happen immediately
zb_bool_t tr_time_client_discover_server_now (void)
 cause a server discovery to happen immediately
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_uint16_t tr_time_client_get_server_addr (void)
 the current Time Master Server address can be read
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)

Detailed Description

ZCL Time cluster client implementation.


SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2025 Trident IoT, LLC https://www.tridentiot.com


Macro Definition Documentation

◆ tr_time_client_printf

#define tr_time_client_printf ( ...)

debug prints


◆ tr_time_client_println

#define tr_time_client_println ( ...)

Function Documentation

◆ tr_time_client_init()

void tr_time_client_init ( void )

function prototypes consumed by framework


◆ tr_time_client_rx_read_attr_resp()

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 )