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

ZCL Thermostat cluster server implementation. More...

#include "tr_af.h"
Include dependency graph for tr_thermostat_server.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define tr_thermostat_server_printf(...)
#define tr_thermostat_server_println(...)
#define TR_THERMOSTAT_SERVER_MAX_SET_CMD_PAYLOAD   1

Typedefs

struct { 
   zb_uint8_t   number_of_transitions_for_sequence 
   zb_uint8_t   day_of_week_for_sequence 
   zb_uint8_t   mode_for_sequence 
   zb_uint8_t   payload [TR_THERMOSTAT_SERVER_MAX_SET_CMD_PAYLOAD
tr_thermostat_current_weekly_schedule_command_t

Functions

void tr_thermostat_server_init_cb (zb_uint8_t endpoint)
 Callback fires when the Thermostat server cluster plugin is initialized.
zb_bool_t tr_thermostat_server_command_received_cb (zb_zcl_parsed_hdr_t *cmd_info)
 Callback that user can declare to handle any Thermostat server commands.
void tr_thermostat_server_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 an Thermostat server attribute is about to be written.
zb_bool_t tr_thermostat_server_setpoint_raise_lower_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t mode, zb_int8_t amount)
 Callback that user can declare to handle thermostat cluster setpoint raise lower command.
zb_bool_t tr_thermostat_server_set_weekly_schedule_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t number_of_transitions_for_sequence, zb_uint8_t day_of_week_for_sequence, zb_uint8_t mode_for_sequence, zb_uint8_t *payload)
 Callback that user can declare to handle thermostat cluster set weekly schedule command.
zb_bool_t tr_thermostat_server_get_weekly_schedule_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t days_to_return, zb_uint8_t mode_to_return)
 Callback that user can declare to handle thermostat cluster get weekly schedule command.
zb_bool_t tr_thermostat_server_clear_weekly_schedule_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
 Callback that user can declare to handle thermostat cluster clear weekly schedule command.
zb_bool_t tr_thermostat_server_get_relay_status_log_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
 Callback that user can declare to handle thermostat cluster get relay status log command.
zb_bool_t tr_thermostat_server_get_time_day_cb (zb_uint16_t *curr_time_in_mins, zb_uint8_t *curr_day_of_the_week, zb_uint8_t *curr_day, zb_uint8_t *curr_month)
 Callback that happens when the thermostat server needs to check the current time (in minutes) and day (as day bitmap).
zb_bool_t tr_thermostat_server_next_schedule_cb (zb_uint16_t mins_until_schedule)
 Callback that happens when the thermostat server is about to schedule a ZBOSS alarm to run the next pending schedule.
void tr_thermostat_server_schedule_run (void)
 if the app is handling the scheduling, call this to tell the plugin to run the next schedule
void tr_thermostat_server_init (void)
zb_zcl_status_t tr_thermostat_server_change_setpoint_to_value (zb_uint8_t mode, zb_int16_t new_value, zb_uint8_t endpoint)

Detailed Description

ZCL Thermostat cluster server implementation.


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


Macro Definition Documentation

◆ TR_THERMOSTAT_SERVER_MAX_SET_CMD_PAYLOAD

#define TR_THERMOSTAT_SERVER_MAX_SET_CMD_PAYLOAD   1

◆ tr_thermostat_server_printf

#define tr_thermostat_server_printf ( ...)

debug prints


◆ tr_thermostat_server_println

#define tr_thermostat_server_println ( ...)

Typedef Documentation

◆ [struct]

typedef ZB_PACKED_PRE struct { ... } tr_thermostat_current_weekly_schedule_command_t

Function Documentation

◆ tr_thermostat_server_change_setpoint_to_value()

zb_zcl_status_t tr_thermostat_server_change_setpoint_to_value ( zb_uint8_t mode,
zb_int16_t new_value,
zb_uint8_t endpoint )

◆ tr_thermostat_server_init()

void tr_thermostat_server_init ( void )

function prototypes consumed by framework


Variable Documentation

◆ day_of_week_for_sequence

zb_uint8_t day_of_week_for_sequence

◆ mode_for_sequence

zb_uint8_t mode_for_sequence

◆ number_of_transitions_for_sequence

zb_uint8_t number_of_transitions_for_sequence

◆ payload