mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
esp_matter_attribute: Adding wrappers for all attribute_create() APIs
esp_matter_cluster: Removing configs for attributes which are handled internally. esp_matter_attribute_utils: Renamed the old esp_matter_attribute files.
This commit is contained in:
@@ -20,6 +20,7 @@ application.
|
||||
*/
|
||||
|
||||
#include <esp_matter_attribute.h>
|
||||
#include <esp_matter_attribute_utils.h>
|
||||
#include <esp_matter_cluster.h>
|
||||
#include <esp_matter_command.h>
|
||||
#include <esp_matter_client.h>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,155 +14,185 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <esp_err.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <esp_matter.h>
|
||||
#include <esp_matter_core.h>
|
||||
|
||||
#define REMAP_TO_RANGE(value, from, to) ((value * to) / from)
|
||||
/** cluster: global */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_cluster_revision(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_feature_map(esp_matter_cluster_t *cluster, uint32_t value);
|
||||
|
||||
/** ESP Matter Attribute Value type */
|
||||
typedef enum {
|
||||
/** Invalid */
|
||||
ESP_MATTER_VAL_TYPE_INVALID = 0,
|
||||
/** Boolean */
|
||||
ESP_MATTER_VAL_TYPE_BOOLEAN,
|
||||
/** Integer. Mapped to a 32 bit signed integer */
|
||||
ESP_MATTER_VAL_TYPE_INTEGER,
|
||||
/** Floating point number */
|
||||
ESP_MATTER_VAL_TYPE_FLOAT,
|
||||
/** Array Eg. [1,2,3] */
|
||||
ESP_MATTER_VAL_TYPE_ARRAY,
|
||||
/** Byte String Eg. "123" */
|
||||
ESP_MATTER_VAL_TYPE_CHAR_STRING,
|
||||
/** Byte String Eg. [0x01, 0x20] */
|
||||
ESP_MATTER_VAL_TYPE_BYTE_STRING,
|
||||
/** Octet String Eg. [0x01, 0x20] */
|
||||
ESP_MATTER_VAL_TYPE_OCTET_STRING,
|
||||
/** 8 bit signed integer */
|
||||
ESP_MATTER_VAL_TYPE_INT8,
|
||||
/** 8 bit unsigned integer */
|
||||
ESP_MATTER_VAL_TYPE_UINT8,
|
||||
/** 16 bit signed integer */
|
||||
ESP_MATTER_VAL_TYPE_INT16,
|
||||
/** 16 bit unsigned integer */
|
||||
ESP_MATTER_VAL_TYPE_UINT16,
|
||||
/** 32 bit unsigned integer */
|
||||
ESP_MATTER_VAL_TYPE_UINT32,
|
||||
/** 64 bit unsigned integer */
|
||||
ESP_MATTER_VAL_TYPE_UINT64,
|
||||
/** 8 bit enum */
|
||||
ESP_MATTER_VAL_TYPE_ENUM8,
|
||||
/** 8 bit bitmap */
|
||||
ESP_MATTER_VAL_TYPE_BITMAP8,
|
||||
/** 16 bit bitmap */
|
||||
ESP_MATTER_VAL_TYPE_BITMAP16,
|
||||
/** 32 bit bitmap */
|
||||
ESP_MATTER_VAL_TYPE_BITMAP32,
|
||||
} esp_matter_val_type_t;
|
||||
/** cluster: descriptor */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_device_list(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_server_list(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_client_list(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_parts_list(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
|
||||
/* ESP Matter Value */
|
||||
typedef union {
|
||||
/** Boolean */
|
||||
bool b;
|
||||
/** Integer */
|
||||
int i;
|
||||
/** Float */
|
||||
float f;
|
||||
/** 8 bit signed integer */
|
||||
int8_t i8;
|
||||
/** 8 bit unsigned integer */
|
||||
uint8_t u8;
|
||||
/** 16 bit signed integer */
|
||||
int16_t i16;
|
||||
/** 16 bit unsigned integer */
|
||||
uint16_t u16;
|
||||
/** 32 bit unsigned integer */
|
||||
uint32_t u32;
|
||||
/** 64 bit unsigned integer */
|
||||
uint64_t u64;
|
||||
/** Array */
|
||||
struct {
|
||||
/** Buffer */
|
||||
uint8_t *b;
|
||||
/** Data size */
|
||||
uint16_t s;
|
||||
/** Data count */
|
||||
uint16_t n;
|
||||
/** Total size */
|
||||
uint16_t t;
|
||||
} a;
|
||||
/** Pointer */
|
||||
void *p;
|
||||
} esp_matter_val_t;
|
||||
/** cluster: access control */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_acl(esp_matter_cluster_t *cluster, uint8_t *value, uint16_t length,
|
||||
uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_extension(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
|
||||
/* ESP Matter Attribute Value */
|
||||
typedef struct {
|
||||
/** Type of Value */
|
||||
esp_matter_val_type_t type;
|
||||
/** Actual value. Depends on the type */
|
||||
esp_matter_val_t val;
|
||||
} esp_matter_attr_val_t;
|
||||
/** cluster: basic */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_data_model_revision(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_vendor_name(esp_matter_cluster_t *cluster, char *value,
|
||||
uint16_t length);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_vendor_id(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_product_name(esp_matter_cluster_t *cluster, char *value,
|
||||
uint16_t length);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_product_id(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_node_label(esp_matter_cluster_t *cluster, char *value,
|
||||
uint16_t length);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_location(esp_matter_cluster_t *cluster, char *value,
|
||||
uint16_t length);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_hardware_version(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_hardware_version_string(esp_matter_cluster_t *cluster, char *value,
|
||||
uint16_t length);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_software_version(esp_matter_cluster_t *cluster, uint32_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_software_version_string(esp_matter_cluster_t *cluster, char *value,
|
||||
uint16_t length);
|
||||
|
||||
/*** Attribute val APIs ***/
|
||||
/** Invalid */
|
||||
esp_matter_attr_val_t esp_matter_invalid(void *val);
|
||||
/** cluster: binding */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_binding(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
|
||||
/** Boolean */
|
||||
esp_matter_attr_val_t esp_matter_bool(bool val);
|
||||
/** cluster: ota requestor */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_default_ota_providers(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_update_possible(esp_matter_cluster_t *cluster, bool value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_update_state(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_update_state_progress(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** Integer */
|
||||
esp_matter_attr_val_t esp_matter_int(int val);
|
||||
/** cluster: general commissioning */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_breadcrumb(esp_matter_cluster_t *cluster, uint64_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_basic_commissioning_info(esp_matter_cluster_t *cluster,
|
||||
uint8_t *value, uint16_t length,
|
||||
uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_regulatory_config(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_location_capability(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** Float */
|
||||
esp_matter_attr_val_t esp_matter_float(float val);
|
||||
/** cluster: network commissioning */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_max_networks(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_networks(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_scan_max_time_seconds(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_connect_max_time_seconds(esp_matter_cluster_t *cluster,
|
||||
uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_interface_enabled(esp_matter_cluster_t *cluster, bool value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_last_networking_status(esp_matter_cluster_t *cluster,
|
||||
uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_last_network_id(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_last_connect_error_value(esp_matter_cluster_t *cluster,
|
||||
uint32_t value);
|
||||
|
||||
/** 8 bit integer */
|
||||
esp_matter_attr_val_t esp_matter_int8(int8_t val);
|
||||
/** cluster: general diagnostics */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_network_interfaces(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_reboot_count(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
|
||||
/** 8 bit unsigned integer */
|
||||
esp_matter_attr_val_t esp_matter_uint8(uint8_t val);
|
||||
/** cluster: administrator commissioning */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_window_status(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_admin_fabric_index(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_admin_vendor_id(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
|
||||
/** 16 bit signed integer */
|
||||
esp_matter_attr_val_t esp_matter_int16(int16_t val);
|
||||
/** cluster: operational credentials */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_nocs(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_fabrics(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_supported_fabrics(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_commissioned_fabrics(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_trusted_root_certificates(esp_matter_cluster_t *cluster,
|
||||
uint8_t *value, uint16_t length,
|
||||
uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_current_fabric_index(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** 16 bit unsigned integer */
|
||||
esp_matter_attr_val_t esp_matter_uint16(uint16_t val);
|
||||
/** cluster: group key management */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_group_key_map(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_group_table(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_max_groups_per_fabric(esp_matter_cluster_t *cluster,
|
||||
uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_max_group_keys_per_fabric(esp_matter_cluster_t *cluster,
|
||||
uint16_t value);
|
||||
|
||||
/** 32 bit unsigned integer */
|
||||
esp_matter_attr_val_t esp_matter_uint32(uint32_t val);
|
||||
/** cluster: identify */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_identify_time(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_identify_type(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** 64 bit unsigned integer */
|
||||
esp_matter_attr_val_t esp_matter_uint64(uint64_t val);
|
||||
/** cluster: groups */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_group_name_support(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** 8 bit enum */
|
||||
esp_matter_attr_val_t esp_matter_enum8(uint8_t val);
|
||||
/** cluster: scenes */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_scene_count(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_current_scene(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_current_group(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_scene_valid(esp_matter_cluster_t *cluster, bool value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_scene_name_support(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** 8 bit bitmap */
|
||||
esp_matter_attr_val_t esp_matter_bitmap8(uint8_t val);
|
||||
/** cluster: on off */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_on_off(esp_matter_cluster_t *cluster, bool value);
|
||||
|
||||
/** 16 bit bitmap */
|
||||
esp_matter_attr_val_t esp_matter_bitmap16(uint16_t val);
|
||||
/** cluster: level control */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_current_level(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_on_level(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_options(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** 32 bit bitmap */
|
||||
esp_matter_attr_val_t esp_matter_bitmap32(uint32_t val);
|
||||
/** cluster: color control */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_current_hue(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_current_saturation(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_color_mode(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_color_control_options(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_enhanced_color_mode(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_color_capabilities(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
|
||||
/** Character string */
|
||||
esp_matter_attr_val_t esp_matter_char_str(char *val, uint16_t data_size);
|
||||
/** cluster: fan control */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_fan_mode(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_fan_mode_sequence(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** Octet string */
|
||||
esp_matter_attr_val_t esp_matter_octet_str(uint8_t *val, uint16_t data_size);
|
||||
/** cluster: thermostat */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_local_temperature(esp_matter_cluster_t *cluster, uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_occupied_cooling_setpoint(esp_matter_cluster_t *cluster,
|
||||
uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_occupied_heating_setpoint(esp_matter_cluster_t *cluster,
|
||||
uint16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_control_sequence_of_operation(esp_matter_cluster_t *cluster,
|
||||
uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_system_mode(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** Array */
|
||||
esp_matter_attr_val_t esp_matter_array(uint8_t *val, uint16_t data_size, uint16_t count);
|
||||
/** cluster: door lock */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_lock_state(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_lock_type(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_actuator_enabled(esp_matter_cluster_t *cluster, bool value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_auto_relock_time(esp_matter_cluster_t *cluster, uint32_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_operating_mode(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_supported_operating_modes(esp_matter_cluster_t *cluster,
|
||||
uint16_t value);
|
||||
|
||||
/** Attribute update
|
||||
*
|
||||
* This API updates the attribute value
|
||||
*/
|
||||
esp_err_t esp_matter_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val);
|
||||
/** cluster: bridged device basic */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_bridged_device_basic_node_label(esp_matter_cluster_t *cluster,
|
||||
char *value, uint16_t length);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_reachable(esp_matter_cluster_t *cluster, bool value);
|
||||
|
||||
/** Attribute value print
|
||||
*
|
||||
* This API prints the attribute value according to the type
|
||||
*/
|
||||
void esp_matter_attribute_val_print(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val);
|
||||
/** cluster: fixed label */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_label_list(esp_matter_cluster_t *cluster, uint8_t *value,
|
||||
uint16_t length, uint16_t count);
|
||||
|
||||
/** cluster: switch */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_number_of_positions(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_current_position(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_multi_press_max(esp_matter_cluster_t *cluster, uint8_t value);
|
||||
|
||||
/** cluster: temperature measurement */
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_temperature_measured_value(esp_matter_cluster_t *cluster,
|
||||
int16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_temperature_min_measured_value(esp_matter_cluster_t *cluster,
|
||||
int16_t value);
|
||||
esp_matter_attribute_t *esp_matter_attribute_create_temperature_max_measured_value(esp_matter_cluster_t *cluster,
|
||||
int16_t value);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,166 @@
|
||||
// Copyright 2021 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <esp_err.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define REMAP_TO_RANGE(value, from, to) ((value * to) / from)
|
||||
|
||||
/** ESP Matter Attribute Value type */
|
||||
typedef enum {
|
||||
/** Invalid */
|
||||
ESP_MATTER_VAL_TYPE_INVALID = 0,
|
||||
/** Boolean */
|
||||
ESP_MATTER_VAL_TYPE_BOOLEAN,
|
||||
/** Integer. Mapped to a 32 bit signed integer */
|
||||
ESP_MATTER_VAL_TYPE_INTEGER,
|
||||
/** Floating point number */
|
||||
ESP_MATTER_VAL_TYPE_FLOAT,
|
||||
/** Array Eg. [1,2,3] */
|
||||
ESP_MATTER_VAL_TYPE_ARRAY,
|
||||
/** Char String Eg. "123" */
|
||||
ESP_MATTER_VAL_TYPE_CHAR_STRING,
|
||||
/** Octet String Eg. [0x01, 0x20] */
|
||||
ESP_MATTER_VAL_TYPE_OCTET_STRING,
|
||||
/** 8 bit signed integer */
|
||||
ESP_MATTER_VAL_TYPE_INT8,
|
||||
/** 8 bit unsigned integer */
|
||||
ESP_MATTER_VAL_TYPE_UINT8,
|
||||
/** 16 bit signed integer */
|
||||
ESP_MATTER_VAL_TYPE_INT16,
|
||||
/** 16 bit unsigned integer */
|
||||
ESP_MATTER_VAL_TYPE_UINT16,
|
||||
/** 32 bit unsigned integer */
|
||||
ESP_MATTER_VAL_TYPE_UINT32,
|
||||
/** 64 bit unsigned integer */
|
||||
ESP_MATTER_VAL_TYPE_UINT64,
|
||||
/** 8 bit enum */
|
||||
ESP_MATTER_VAL_TYPE_ENUM8,
|
||||
/** 8 bit bitmap */
|
||||
ESP_MATTER_VAL_TYPE_BITMAP8,
|
||||
/** 16 bit bitmap */
|
||||
ESP_MATTER_VAL_TYPE_BITMAP16,
|
||||
/** 32 bit bitmap */
|
||||
ESP_MATTER_VAL_TYPE_BITMAP32,
|
||||
} esp_matter_val_type_t;
|
||||
|
||||
/* ESP Matter Value */
|
||||
typedef union {
|
||||
/** Boolean */
|
||||
bool b;
|
||||
/** Integer */
|
||||
int i;
|
||||
/** Float */
|
||||
float f;
|
||||
/** 8 bit signed integer */
|
||||
int8_t i8;
|
||||
/** 8 bit unsigned integer */
|
||||
uint8_t u8;
|
||||
/** 16 bit signed integer */
|
||||
int16_t i16;
|
||||
/** 16 bit unsigned integer */
|
||||
uint16_t u16;
|
||||
/** 32 bit unsigned integer */
|
||||
uint32_t u32;
|
||||
/** 64 bit unsigned integer */
|
||||
uint64_t u64;
|
||||
/** Array */
|
||||
struct {
|
||||
/** Buffer */
|
||||
uint8_t *b;
|
||||
/** Data size */
|
||||
uint16_t s;
|
||||
/** Data count */
|
||||
uint16_t n;
|
||||
/** Total size */
|
||||
uint16_t t;
|
||||
} a;
|
||||
/** Pointer */
|
||||
void *p;
|
||||
} esp_matter_val_t;
|
||||
|
||||
/* ESP Matter Attribute Value */
|
||||
typedef struct {
|
||||
/** Type of Value */
|
||||
esp_matter_val_type_t type;
|
||||
/** Actual value. Depends on the type */
|
||||
esp_matter_val_t val;
|
||||
} esp_matter_attr_val_t;
|
||||
|
||||
/*** Attribute val APIs ***/
|
||||
/** Invalid */
|
||||
esp_matter_attr_val_t esp_matter_invalid(void *val);
|
||||
|
||||
/** Boolean */
|
||||
esp_matter_attr_val_t esp_matter_bool(bool val);
|
||||
|
||||
/** Integer */
|
||||
esp_matter_attr_val_t esp_matter_int(int val);
|
||||
|
||||
/** Float */
|
||||
esp_matter_attr_val_t esp_matter_float(float val);
|
||||
|
||||
/** 8 bit integer */
|
||||
esp_matter_attr_val_t esp_matter_int8(int8_t val);
|
||||
|
||||
/** 8 bit unsigned integer */
|
||||
esp_matter_attr_val_t esp_matter_uint8(uint8_t val);
|
||||
|
||||
/** 16 bit signed integer */
|
||||
esp_matter_attr_val_t esp_matter_int16(int16_t val);
|
||||
|
||||
/** 16 bit unsigned integer */
|
||||
esp_matter_attr_val_t esp_matter_uint16(uint16_t val);
|
||||
|
||||
/** 32 bit unsigned integer */
|
||||
esp_matter_attr_val_t esp_matter_uint32(uint32_t val);
|
||||
|
||||
/** 64 bit unsigned integer */
|
||||
esp_matter_attr_val_t esp_matter_uint64(uint64_t val);
|
||||
|
||||
/** 8 bit enum */
|
||||
esp_matter_attr_val_t esp_matter_enum8(uint8_t val);
|
||||
|
||||
/** 8 bit bitmap */
|
||||
esp_matter_attr_val_t esp_matter_bitmap8(uint8_t val);
|
||||
|
||||
/** 16 bit bitmap */
|
||||
esp_matter_attr_val_t esp_matter_bitmap16(uint16_t val);
|
||||
|
||||
/** 32 bit bitmap */
|
||||
esp_matter_attr_val_t esp_matter_bitmap32(uint32_t val);
|
||||
|
||||
/** Character string */
|
||||
esp_matter_attr_val_t esp_matter_char_str(char *val, uint16_t data_size);
|
||||
|
||||
/** Octet string */
|
||||
esp_matter_attr_val_t esp_matter_octet_str(uint8_t *val, uint16_t data_size);
|
||||
|
||||
/** Array */
|
||||
esp_matter_attr_val_t esp_matter_array(uint8_t *val, uint16_t data_size, uint16_t count);
|
||||
|
||||
/** Attribute update
|
||||
*
|
||||
* This API updates the attribute value
|
||||
*/
|
||||
esp_err_t esp_matter_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val);
|
||||
|
||||
/** Attribute value print
|
||||
*
|
||||
* This API prints the attribute value according to the type
|
||||
*/
|
||||
void esp_matter_attribute_val_print(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val);
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <esp_log.h>
|
||||
#include <esp_matter.h>
|
||||
#include <esp_matter_attribute.h>
|
||||
#include <esp_matter_cluster.h>
|
||||
#include <esp_matter_core.h>
|
||||
|
||||
@@ -152,9 +153,7 @@ void esp_matter_cluster_plugin_init_callback_common()
|
||||
}
|
||||
}
|
||||
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_descriptor(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_descriptor_config_t *config,
|
||||
uint8_t flags)
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_descriptor(esp_matter_endpoint_t *endpoint, uint8_t flags)
|
||||
{
|
||||
esp_matter_cluster_t *cluster = esp_matter_cluster_create(endpoint, ZCL_DESCRIPTOR_CLUSTER_ID, flags);
|
||||
if (!cluster) {
|
||||
@@ -171,23 +170,17 @@ esp_matter_cluster_t *esp_matter_cluster_create_descriptor(esp_matter_endpoint_t
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterDescriptorPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_DEVICE_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->device_type_list, sizeof(config->device_type_list), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_SERVER_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->server_list, sizeof(config->server_list), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_CLIENT_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->client_list, sizeof(config->client_list), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_PARTS_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->parts_list, sizeof(config->parts_list), 0));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, 0);
|
||||
esp_matter_attribute_create_device_list(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_server_list(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_client_list(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_parts_list(cluster, NULL, 0, 0);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_access_control(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_access_control_config_t *config,
|
||||
uint8_t flags)
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_access_control(esp_matter_endpoint_t *endpoint, uint8_t flags)
|
||||
{
|
||||
esp_matter_cluster_t *cluster = esp_matter_cluster_create(endpoint, ZCL_ACCESS_CONTROL_CLUSTER_ID,
|
||||
ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
@@ -204,13 +197,10 @@ esp_matter_cluster_t *esp_matter_cluster_create_access_control(esp_matter_endpoi
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterAccessControlPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_ACL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->acl, sizeof(config->acl), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_EXTENSION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->extension, sizeof(config->extension), 0));
|
||||
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, 0);
|
||||
esp_matter_attribute_create_acl(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_extension(cluster, NULL, 0, 0);
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@@ -232,34 +222,21 @@ esp_matter_cluster_t *esp_matter_cluster_create_basic(esp_matter_endpoint_t *end
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterBasicPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_DATA_MODEL_REVISION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->data_model_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_VENDOR_NAME_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_char_str(config->vendor_name, sizeof(config->vendor_name)));
|
||||
esp_matter_attribute_create(cluster, ZCL_VENDOR_ID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->vendor_id));
|
||||
esp_matter_attribute_create(cluster, ZCL_PRODUCT_NAME_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_char_str(config->product_name, sizeof(config->product_name)));
|
||||
esp_matter_attribute_create(cluster, ZCL_PRODUCT_ID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->product_id));
|
||||
esp_matter_attribute_create(cluster, ZCL_NODE_LABEL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_char_str(config->node_label, sizeof(config->node_label)));
|
||||
esp_matter_attribute_create(cluster, ZCL_LOCATION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_char_str(config->location, sizeof(config->location)));
|
||||
esp_matter_attribute_create(cluster, ZCL_HARDWARE_VERSION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->hardware_version));
|
||||
esp_matter_attribute_create(cluster, ZCL_HARDWARE_VERSION_STRING_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_char_str(config->hardware_version_string,
|
||||
sizeof(config->hardware_version_string)));
|
||||
esp_matter_attribute_create(cluster, ZCL_SOFTWARE_VERSION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint32(config->software_version));
|
||||
esp_matter_attribute_create(cluster, ZCL_SOFTWARE_VERSION_STRING_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_char_str(config->software_version_string,
|
||||
sizeof(config->software_version_string)));
|
||||
esp_matter_attribute_create(cluster, ZCL_SERIAL_NUMBER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_char_str(config->serial_number, sizeof(config->serial_number)));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_data_model_revision(cluster, 0);
|
||||
esp_matter_attribute_create_location(cluster, NULL, 0);
|
||||
esp_matter_attribute_create_vendor_name(cluster, NULL, 0);
|
||||
esp_matter_attribute_create_vendor_id(cluster, 0);
|
||||
esp_matter_attribute_create_product_name(cluster, NULL, 0);
|
||||
esp_matter_attribute_create_product_id(cluster, 0);
|
||||
esp_matter_attribute_create_hardware_version(cluster, 0);
|
||||
esp_matter_attribute_create_hardware_version_string(cluster, NULL, 0);
|
||||
esp_matter_attribute_create_software_version(cluster, 0);
|
||||
esp_matter_attribute_create_software_version_string(cluster, NULL, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_node_label(cluster, config->node_label, sizeof(config->node_label));
|
||||
|
||||
return cluster;
|
||||
}
|
||||
@@ -282,13 +259,15 @@ esp_matter_cluster_t *esp_matter_cluster_create_binding(esp_matter_endpoint_t *e
|
||||
if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) {
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterBindingPluginClientInitCallback);
|
||||
}
|
||||
|
||||
/* Extra initialization */
|
||||
esp_matter_binding_init();
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_BINDING_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_WRITABLE,
|
||||
esp_matter_array(config->binding_list, sizeof(config->binding_list), 0));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_binding(cluster, NULL, 0, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
@@ -314,9 +293,10 @@ esp_matter_cluster_t *esp_matter_cluster_create_ota_provider(esp_matter_endpoint
|
||||
MatterOtaSoftwareUpdateProviderPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_query_image(cluster);
|
||||
esp_matter_command_create_query_image_response(cluster);
|
||||
esp_matter_command_create_apply_update_request(cluster);
|
||||
@@ -347,18 +327,16 @@ esp_matter_cluster_t *esp_matter_cluster_create_ota_requestor(esp_matter_endpoin
|
||||
MatterOtaSoftwareUpdateRequestorPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_DEFAULT_OTA_PROVIDERS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_octet_str(config->default_ota_providers,
|
||||
sizeof(config->default_ota_providers)));
|
||||
esp_matter_attribute_create(cluster, ZCL_UPDATE_POSSIBLE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bool(config->update_possible));
|
||||
esp_matter_attribute_create(cluster, ZCL_UPDATE_STATE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->update_state));
|
||||
esp_matter_attribute_create(cluster, ZCL_UPDATE_STATE_PROGRESS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->update_state_progress));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_default_ota_providers(cluster, NULL, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_update_possible(cluster, config->update_possible);
|
||||
esp_matter_attribute_create_update_state(cluster, config->update_state);
|
||||
esp_matter_attribute_create_update_state_progress(cluster, config->update_state_progress);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_announce_ota_provider(cluster);
|
||||
|
||||
return cluster;
|
||||
@@ -383,18 +361,16 @@ esp_matter_cluster_t *esp_matter_cluster_create_general_commissioning(esp_matter
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterGeneralCommissioningPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_BREADCRUMB_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint64(config->breadcrumb));
|
||||
esp_matter_attribute_create(cluster, ZCL_BASICCOMMISSIONINGINFO_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->basic_commissioning_info,
|
||||
sizeof(config->basic_commissioning_info), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_REGULATORYCONFIG_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->regulatory_config));
|
||||
esp_matter_attribute_create(cluster, ZCL_LOCATIONCAPABILITY_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->location_capability));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_regulatory_config(cluster, 0);
|
||||
esp_matter_attribute_create_location_capability(cluster, 0);
|
||||
esp_matter_attribute_create_basic_commissioning_info(cluster, NULL, 0, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_breadcrumb(cluster, config->breadcrumb);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_arm_fail_safe(cluster);
|
||||
esp_matter_command_create_arm_fail_safe_response(cluster);
|
||||
esp_matter_command_create_set_regulatory_config(cluster);
|
||||
@@ -424,27 +400,21 @@ esp_matter_cluster_t *esp_matter_cluster_create_network_commissioning(esp_matter
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterNetworkCommissioningPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap32(config->feature_map));
|
||||
esp_matter_attribute_create(cluster, ZCL_MAX_NETWORKS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->max_networks));
|
||||
esp_matter_attribute_create(cluster, ZCL_NETWORKS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->networks, sizeof(config->networks), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->scan_max_time_seconds));
|
||||
esp_matter_attribute_create(cluster, ZCL_CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->connect_max_time_seconds));
|
||||
esp_matter_attribute_create(cluster, ZCL_INTERFACE_ENABLED_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bool(config->interface_enabled));
|
||||
esp_matter_attribute_create(cluster, ZCL_LAST_NETWORKING_STATUS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->last_networking_status));
|
||||
esp_matter_attribute_create(cluster, ZCL_LAST_NETWORK_ID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_octet_str(config->last_network_id, sizeof(config->last_network_id)));
|
||||
esp_matter_attribute_create(cluster, ZCL_LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint32(config->last_connect_error_value));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_max_networks(cluster, 0);
|
||||
esp_matter_attribute_create_networks(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_scan_max_time_seconds(cluster, 0);
|
||||
esp_matter_attribute_create_connect_max_time_seconds(cluster, 0);
|
||||
esp_matter_attribute_create_interface_enabled(cluster, 0);
|
||||
esp_matter_attribute_create_last_networking_status(cluster, 0);
|
||||
esp_matter_attribute_create_last_network_id(cluster, NULL, 0);
|
||||
esp_matter_attribute_create_last_connect_error_value(cluster, 0);
|
||||
esp_matter_attribute_create_feature_map(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_scan_networks(cluster);
|
||||
esp_matter_command_create_scan_networks_response(cluster);
|
||||
esp_matter_command_create_add_or_update_wifi_network(cluster);
|
||||
@@ -477,12 +447,12 @@ esp_matter_cluster_t *esp_matter_cluster_create_general_diagnostics(esp_matter_e
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterGeneralDiagnosticsPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->network_interfaces, sizeof(config->network_interfaces), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_REBOOT_COUNT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->reboot_count));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_network_interfaces(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_reboot_count(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
@@ -509,15 +479,15 @@ esp_matter_cluster_t *esp_matter_cluster_create_administrator_commissioning(esp_
|
||||
MatterAdministratorCommissioningPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_WINDOW_STATUS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->window_status));
|
||||
esp_matter_attribute_create(cluster, ZCL_ADMIN_FABRIC_INDEX_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->admin_fabric_index));
|
||||
esp_matter_attribute_create(cluster, ZCL_ADMIN_VENDOR_ID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->admin_vendor_id));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_window_status(cluster, 0);
|
||||
esp_matter_attribute_create_admin_fabric_index(cluster, 0);
|
||||
esp_matter_attribute_create_admin_vendor_id(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_open_commissioning_window(cluster);
|
||||
esp_matter_command_create_open_basic_commissioning_window(cluster);
|
||||
esp_matter_command_create_revoke_commissioning(cluster);
|
||||
@@ -546,22 +516,18 @@ esp_matter_cluster_t *esp_matter_cluster_create_operational_credentials(esp_matt
|
||||
MatterOperationalCredentialsPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_NOCS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->nocs, sizeof(config->nocs), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_FABRICS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->fabrics, sizeof(config->fabrics), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_SUPPORTED_FABRICS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->supported_fabrics));
|
||||
esp_matter_attribute_create(cluster, ZCL_COMMISSIONED_FABRICS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->commissioned_fabrics));
|
||||
esp_matter_attribute_create(cluster, ZCL_TRUSTED_ROOTS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->trusted_root_certificates,
|
||||
sizeof(config->trusted_root_certificates), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_CURRENT_FABRIC_INDEX_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->current_fabric_index));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_nocs(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_supported_fabrics(cluster, 0);
|
||||
esp_matter_attribute_create_commissioned_fabrics(cluster, 0);
|
||||
esp_matter_attribute_create_fabrics(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_trusted_root_certificates(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_current_fabric_index(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_attestation_request(cluster);
|
||||
esp_matter_command_create_attestation_response(cluster);
|
||||
esp_matter_command_create_certificate_chain_request(cluster);
|
||||
@@ -579,9 +545,7 @@ esp_matter_cluster_t *esp_matter_cluster_create_operational_credentials(esp_matt
|
||||
return cluster;
|
||||
}
|
||||
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_group_key_management(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_group_key_management_config_t *config,
|
||||
uint8_t flags)
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_group_key_management(esp_matter_endpoint_t *endpoint, uint8_t flags)
|
||||
{
|
||||
esp_matter_cluster_t *cluster = esp_matter_cluster_create(endpoint, ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID, flags);
|
||||
if (!cluster) {
|
||||
@@ -598,17 +562,14 @@ esp_matter_cluster_t *esp_matter_cluster_create_group_key_management(esp_matter_
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterGroupKeyManagementPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_GROUP_KEY_MAP_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->group_key_map, sizeof(config->group_key_map), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_GROUP_TABLE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->group_table, sizeof(config->group_table), 0));
|
||||
esp_matter_attribute_create(cluster, ZCL_MAX_GROUPS_PER_FABRIC_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->max_groups_per_fabric));
|
||||
esp_matter_attribute_create(cluster, ZCL_MAX_GROUP_KEYS_PER_FABRIC_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->max_group_keys_per_fabric));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, 0);
|
||||
esp_matter_attribute_create_group_key_map(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_group_table(cluster, NULL, 0, 0);
|
||||
esp_matter_attribute_create_max_groups_per_fabric(cluster, 0);
|
||||
esp_matter_attribute_create_max_group_keys_per_fabric(cluster, 0);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_key_set_write(cluster);
|
||||
esp_matter_command_create_key_set_read(cluster);
|
||||
esp_matter_command_create_key_set_read_response(cluster);
|
||||
@@ -637,13 +598,12 @@ esp_matter_cluster_t *esp_matter_cluster_create_identify(esp_matter_endpoint_t *
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterIdentifyPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->identify_time));
|
||||
esp_matter_attribute_create(cluster, ZCL_IDENTIFY_TYPE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->identify_type));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_identify_time(cluster, config->identify_time);
|
||||
esp_matter_attribute_create_identify_type(cluster, config->identify_type);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_identify(cluster);
|
||||
esp_matter_command_create_identify_query(cluster);
|
||||
esp_matter_command_create_identify_query_response(cluster);
|
||||
@@ -669,11 +629,11 @@ esp_matter_cluster_t *esp_matter_cluster_create_groups(esp_matter_endpoint_t *en
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterGroupsPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_GROUP_NAME_SUPPORT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap8(config->name_support));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_group_name_support(cluster, config->group_name_support);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_add_group(cluster);
|
||||
esp_matter_command_create_view_group(cluster);
|
||||
esp_matter_command_create_get_group_membership(cluster);
|
||||
@@ -706,19 +666,15 @@ esp_matter_cluster_t *esp_matter_cluster_create_scenes(esp_matter_endpoint_t *en
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterScenesPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_SCENE_COUNT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->scene_count));
|
||||
esp_matter_attribute_create(cluster, ZCL_CURRENT_SCENE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->current_scene));
|
||||
esp_matter_attribute_create(cluster, ZCL_CURRENT_GROUP_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->current_group));
|
||||
esp_matter_attribute_create(cluster, ZCL_SCENE_VALID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bool(config->scene_valid));
|
||||
esp_matter_attribute_create(cluster, ZCL_SCENE_NAME_SUPPORT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap8(config->name_support));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_scene_count(cluster, config->scene_count);
|
||||
esp_matter_attribute_create_current_scene(cluster, config->current_scene);
|
||||
esp_matter_attribute_create_current_group(cluster, config->current_group);
|
||||
esp_matter_attribute_create_scene_valid(cluster, config->scene_valid);
|
||||
esp_matter_attribute_create_scene_name_support(cluster, config->scene_name_support);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_add_scene(cluster);
|
||||
esp_matter_command_create_view_scene(cluster);
|
||||
esp_matter_command_create_remove_scene(cluster);
|
||||
@@ -754,11 +710,11 @@ esp_matter_cluster_t *esp_matter_cluster_create_on_off(esp_matter_endpoint_t *en
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterOnOffPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_ON_OFF_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bool(config->on_off));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_on_off(cluster, config->on_off);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_off(cluster);
|
||||
esp_matter_command_create_on(cluster);
|
||||
esp_matter_command_create_toggle(cluster);
|
||||
@@ -785,15 +741,13 @@ esp_matter_cluster_t *esp_matter_cluster_create_level_control(esp_matter_endpoin
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterLevelControlPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->current_level));
|
||||
esp_matter_attribute_create(cluster, ZCL_ON_LEVEL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->on_level));
|
||||
esp_matter_attribute_create(cluster, ZCL_OPTIONS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap8(config->options));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_current_level(cluster, config->current_level);
|
||||
esp_matter_attribute_create_on_level(cluster, config->on_level);
|
||||
esp_matter_attribute_create_options(cluster, config->options);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_move_to_level(cluster);
|
||||
esp_matter_command_create_move(cluster);
|
||||
esp_matter_command_create_step(cluster);
|
||||
@@ -825,23 +779,17 @@ esp_matter_cluster_t *esp_matter_cluster_create_color_control(esp_matter_endpoin
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterColorControlPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap32(config->feature_map));
|
||||
esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->current_hue));
|
||||
esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID,
|
||||
ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->current_saturation));
|
||||
esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_COLOR_MODE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->color_mode));
|
||||
esp_matter_attribute_create(cluster, ZCL_OPTIONS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap8(config->options));
|
||||
esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_ENHANCED_COLOR_MODE_ATTRIBUTE_ID,
|
||||
ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->enhanced_color_mode));
|
||||
esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_COLOR_CAPABILITIES_ATTRIBUTE_ID,
|
||||
ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bitmap16(config->color_capabilities));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_feature_map(cluster, config->feature_map);
|
||||
esp_matter_attribute_create_current_hue(cluster, config->current_hue);
|
||||
esp_matter_attribute_create_current_saturation(cluster, config->current_saturation);
|
||||
esp_matter_attribute_create_color_mode(cluster, config->color_mode);
|
||||
esp_matter_attribute_create_color_control_options(cluster, config->color_control_options);
|
||||
esp_matter_attribute_create_enhanced_color_mode(cluster, config->enhanced_color_mode);
|
||||
esp_matter_attribute_create_color_capabilities(cluster, config->color_capabilities);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_move_to_hue(cluster);
|
||||
esp_matter_command_create_move_hue(cluster);
|
||||
esp_matter_command_create_step_hue(cluster);
|
||||
@@ -874,31 +822,13 @@ esp_matter_cluster_t *esp_matter_cluster_create_fan_control(esp_matter_endpoint_
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, NULL);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_FAN_MODE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->fan_mode));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_FAN_MODE_SEQUENCE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->fan_mode_sequence));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_fan_mode(cluster, config->fan_mode);
|
||||
esp_matter_attribute_create_fan_mode_sequence(cluster, config->fan_mode_sequence);
|
||||
/* Not implemented
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_PERCENT_SETTING_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->percent_setting));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_PERCENT_CURRENT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->percent_current));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_SPEED_MAX_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->speed_max));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_SPEED_SETTING_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->speed_max));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_SPEED_CURRENT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->speed_setting));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_ROCK_SUPPORT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap8(config->rock_support));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_ROCK_SETTING_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap8(config->rock_setting));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_WIND_SUPPORT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap8(config->wind_support));
|
||||
esp_matter_attribute_create(cluster, ZCL_FAN_CONTROL_WIND_SETTING_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap8(config->wind_setting));
|
||||
esp_matter_attribute_create_percent_setting(cluster, config->percent_setting);
|
||||
esp_matter_attribute_create_percent_current(cluster, config->percent_current);
|
||||
*/
|
||||
|
||||
return cluster;
|
||||
@@ -923,19 +853,15 @@ esp_matter_cluster_t *esp_matter_cluster_create_thermostat(esp_matter_endpoint_t
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterThermostatPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_LOCAL_TEMPERATURE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_int16(config->local_temperature));
|
||||
esp_matter_attribute_create(cluster, ZCL_OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_int16(config->occupied_cooling_setpoint));
|
||||
esp_matter_attribute_create(cluster, ZCL_OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_int16(config->occupied_heating_setpoint));
|
||||
esp_matter_attribute_create(cluster, ZCL_CONTROL_SEQUENCE_OF_OPERATION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->control_sequence_of_operation));
|
||||
esp_matter_attribute_create(cluster, ZCL_SYSTEM_MODE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->system_mode));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_local_temperature(cluster, config->local_temperature);
|
||||
esp_matter_attribute_create_occupied_cooling_setpoint(cluster, config->occupied_cooling_setpoint);
|
||||
esp_matter_attribute_create_occupied_heating_setpoint(cluster, config->occupied_heating_setpoint);
|
||||
esp_matter_attribute_create_control_sequence_of_operation(cluster, config->control_sequence_of_operation);
|
||||
esp_matter_attribute_create_system_mode(cluster, config->system_mode);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_setpoint_raise_lower(cluster);
|
||||
|
||||
return cluster;
|
||||
@@ -960,21 +886,16 @@ esp_matter_cluster_t *esp_matter_cluster_create_door_lock(esp_matter_endpoint_t
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterDoorLockPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_LOCK_STATE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->lock_state));
|
||||
esp_matter_attribute_create(cluster, ZCL_LOCK_TYPE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->lock_type));
|
||||
esp_matter_attribute_create(cluster, ZCL_ACTUATOR_ENABLED_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bool(config->actuator_enabled));
|
||||
esp_matter_attribute_create(cluster, ZCL_AUTO_RELOCK_TIME_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint32(config->auto_relock_time));
|
||||
esp_matter_attribute_create(cluster, ZCL_OPERATING_MODE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_enum8(config->operating_mode));
|
||||
esp_matter_attribute_create(cluster, ZCL_SUPPORTED_OPERATING_MODES_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bitmap16(config->supported_operating_modes));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_lock_state(cluster, config->lock_state);
|
||||
esp_matter_attribute_create_lock_type(cluster, config->lock_type);
|
||||
esp_matter_attribute_create_actuator_enabled(cluster, config->actuator_enabled);
|
||||
esp_matter_attribute_create_auto_relock_time(cluster, config->auto_relock_time);
|
||||
esp_matter_attribute_create_operating_mode(cluster, config->operating_mode);
|
||||
esp_matter_attribute_create_supported_operating_modes(cluster, config->supported_operating_modes);
|
||||
|
||||
/* Commands */
|
||||
esp_matter_command_create_lock_door(cluster);
|
||||
esp_matter_command_create_unlock_door(cluster);
|
||||
|
||||
@@ -1000,8 +921,9 @@ esp_matter_cluster_t *esp_matter_cluster_create_time_synchronization(esp_matter_
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterTimeSynchronizationPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@@ -1021,12 +943,12 @@ esp_matter_cluster_t *esp_matter_cluster_create_bridged_device_basic(esp_matter_
|
||||
esp_matter_cluster_bridged_device_basic_function_flags);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_NODE_LABEL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_char_str(config->node_label, sizeof(config->node_label)));
|
||||
esp_matter_attribute_create(cluster, ZCL_REACHABLE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bool(config->reachable));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_bridged_device_basic_node_label(cluster, config->node_label,
|
||||
sizeof(config->node_label));
|
||||
esp_matter_attribute_create_reachable(cluster, config->reachable);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@@ -1048,10 +970,12 @@ esp_matter_cluster_t *esp_matter_cluster_create_fixed_label(esp_matter_endpoint_
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterFixedLabelPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_LABEL_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(config->label_list, sizeof(config->label_list), 0));
|
||||
/* Attributes managed internally */
|
||||
esp_matter_attribute_create_label_list(cluster, NULL, 0, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@@ -1073,14 +997,11 @@ esp_matter_cluster_t *esp_matter_cluster_create_switch(esp_matter_endpoint_t *en
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterSwitchPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_NUMBER_OF_POSITIONS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->number_of_positions));
|
||||
esp_matter_attribute_create(cluster, ZCL_CURRENT_POSITION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->current_position));
|
||||
esp_matter_attribute_create(cluster, ZCL_MULTI_PRESS_MAX_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint8(config->multi_press_max));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_number_of_positions(cluster, config->number_of_positions);
|
||||
esp_matter_attribute_create_current_position(cluster, config->current_position);
|
||||
esp_matter_attribute_create_multi_press_max(cluster, config->multi_press_max);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
@@ -1104,14 +1025,11 @@ esp_matter_cluster_t *esp_matter_cluster_create_temperature_measurement(esp_matt
|
||||
esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterTemperatureMeasurementPluginClientInitCallback);
|
||||
}
|
||||
|
||||
esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(config->cluster_revision));
|
||||
esp_matter_attribute_create(cluster, ZCL_TEMP_MEASURED_VALUE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_int16(config->measured_value));
|
||||
esp_matter_attribute_create(cluster, ZCL_TEMP_MIN_MEASURED_VALUE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_int16(config->min_measured_value));
|
||||
esp_matter_attribute_create(cluster, ZCL_TEMP_MAX_MEASURED_VALUE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_int16(config->max_measured_value));
|
||||
/* Attributes not managed internally */
|
||||
esp_matter_attribute_create_cluster_revision(cluster, config->cluster_revision);
|
||||
esp_matter_attribute_create_temperature_measured_value(cluster, config->measured_value);
|
||||
esp_matter_attribute_create_temperature_min_measured_value(cluster, config->min_measured_value);
|
||||
esp_matter_attribute_create_temperature_max_measured_value(cluster, config->max_measured_value);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@@ -17,43 +17,15 @@
|
||||
#include <esp_matter_core.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define CLUSTER_CONFIG_DESCRIPTOR_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.device_type_list = {0}, \
|
||||
.server_list = {0}, \
|
||||
.client_list = {0}, \
|
||||
.parts_list = {0}, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_ACCESS_CONTROL_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.acl = {0}, \
|
||||
.extension = {0}, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_BASIC_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 3, \
|
||||
.data_model_revision = 1, \
|
||||
.vendor_name = {0}, \
|
||||
.vendor_id = 0, \
|
||||
.product_name = {0}, \
|
||||
.product_id = 0, \
|
||||
.node_label = {0}, \
|
||||
.location = {0}, \
|
||||
.hardware_version = 0, \
|
||||
.hardware_version_string = {0}, \
|
||||
.software_version = 0, \
|
||||
.software_version_string = {0}, \
|
||||
.serial_number = {0}, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_BINDING_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.binding_list = {0}, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_OTA_PROVIDER_DEFAULT() \
|
||||
@@ -64,7 +36,6 @@
|
||||
#define CLUSTER_CONFIG_OTA_REQUESTOR_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.default_ota_providers = {0}, \
|
||||
.update_possible = 0, \
|
||||
.update_state = 0, \
|
||||
.update_state_progress = 0, \
|
||||
@@ -74,58 +45,26 @@
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.breadcrumb = 0, \
|
||||
.basic_commissioning_info = {0}, \
|
||||
.regulatory_config = 0, \
|
||||
.location_capability = 0, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_NETWORK_COMMISSIONING_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.feature_map = 1, \
|
||||
.max_networks = 1, \
|
||||
.networks = {0}, \
|
||||
.scan_max_time_seconds = 0, \
|
||||
.connect_max_time_seconds = 0, \
|
||||
.interface_enabled = 0, \
|
||||
.last_networking_status = 0, \
|
||||
.last_network_id = {0}, \
|
||||
.last_connect_error_value = 0, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_GENERAL_DIAGNOSTICS_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.network_interfaces = {0}, \
|
||||
.reboot_count = 0, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_ADMINISTRATOR_COMMISSIONING_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.window_status = 0, \
|
||||
.admin_fabric_index = 0, \
|
||||
.admin_vendor_id = 0, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_OPERATIONAL_CREDENTIALS_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.nocs = {0}, \
|
||||
.fabrics = {0}, \
|
||||
.supported_fabrics = 5, \
|
||||
.commissioned_fabrics = 0, \
|
||||
.trusted_root_certificates = {0}, \
|
||||
.current_fabric_index = 0, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_GROUP_KEY_MANAGEMENT_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.group_key_map = {0}, \
|
||||
.group_table = {0}, \
|
||||
.max_groups_per_fabric = 0, \
|
||||
.max_group_keys_per_fabric = 1, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_IDENTIFY_DEFAULT() \
|
||||
@@ -138,7 +77,7 @@
|
||||
#define CLUSTER_CONFIG_GROUPS_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 3, \
|
||||
.name_support = 0, \
|
||||
.group_name_support = 0, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_SCENES_DEFAULT() \
|
||||
@@ -148,7 +87,7 @@
|
||||
.current_scene = 0, \
|
||||
.current_group = 0, \
|
||||
.scene_valid = false, \
|
||||
.name_support = 0, \
|
||||
.scene_name_support = 0, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_ON_OFF_DEFAULT() \
|
||||
@@ -172,7 +111,7 @@
|
||||
.current_hue = 0, \
|
||||
.current_saturation = 0, \
|
||||
.color_mode = 1, \
|
||||
.options = 0, \
|
||||
.color_control_options = 0, \
|
||||
.enhanced_color_mode = 1, \
|
||||
.color_capabilities = 0, \
|
||||
}
|
||||
@@ -201,7 +140,7 @@
|
||||
.lock_type = 0, \
|
||||
.actuator_enabled = 0, \
|
||||
.auto_relock_time = 0, \
|
||||
.operating_mode = 0, \
|
||||
.operating_mode = 0, \
|
||||
.supported_operating_modes = 0, \
|
||||
}
|
||||
|
||||
@@ -220,7 +159,6 @@
|
||||
#define CLUSTER_CONFIG_FIXED_LABEL_DEFAULT() \
|
||||
{ \
|
||||
.cluster_revision = 1, \
|
||||
.label_list = {0}, \
|
||||
}
|
||||
|
||||
#define CLUSTER_CONFIG_SWITCH_DEFAULT() \
|
||||
@@ -239,39 +177,13 @@
|
||||
.max_measured_value = -32768, \
|
||||
}
|
||||
|
||||
typedef struct esp_matter_cluster_descriptor_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t device_type_list[254];
|
||||
uint8_t server_list[254];
|
||||
uint8_t client_list[254];
|
||||
uint8_t parts_list[254];
|
||||
} esp_matter_cluster_descriptor_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_access_control_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t acl[254];
|
||||
uint8_t extension[254];
|
||||
} esp_matter_cluster_access_control_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_basic_config {
|
||||
uint16_t cluster_revision;
|
||||
uint16_t data_model_revision;
|
||||
char vendor_name[32];
|
||||
uint16_t vendor_id;
|
||||
char product_name[32];
|
||||
uint16_t product_id;
|
||||
char node_label[32];
|
||||
char location[2];
|
||||
uint16_t hardware_version;
|
||||
char hardware_version_string[64];
|
||||
uint32_t software_version;
|
||||
char software_version_string[64];
|
||||
char serial_number[32];
|
||||
} esp_matter_cluster_basic_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_binding_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t binding_list[254];
|
||||
} esp_matter_cluster_binding_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_ota_provider_config {
|
||||
@@ -280,7 +192,6 @@ typedef struct esp_matter_cluster_ota_provider_config {
|
||||
|
||||
typedef struct esp_matter_cluster_ota_requestor_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t default_ota_providers[17];
|
||||
bool update_possible;
|
||||
uint8_t update_state;
|
||||
uint8_t update_state_progress;
|
||||
@@ -289,55 +200,24 @@ typedef struct esp_matter_cluster_ota_requestor_config {
|
||||
typedef struct esp_matter_cluster_general_commissioning_config {
|
||||
uint16_t cluster_revision;
|
||||
uint64_t breadcrumb;
|
||||
uint8_t basic_commissioning_info[254];
|
||||
uint8_t regulatory_config;
|
||||
uint8_t location_capability;
|
||||
} esp_matter_cluster_general_commissioning_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_network_commissioning_config {
|
||||
uint16_t cluster_revision;
|
||||
uint32_t feature_map;
|
||||
uint8_t max_networks;
|
||||
uint8_t networks[12];
|
||||
uint8_t scan_max_time_seconds;
|
||||
uint8_t connect_max_time_seconds;
|
||||
bool interface_enabled;
|
||||
uint8_t last_networking_status;
|
||||
uint8_t last_network_id[32];
|
||||
uint32_t last_connect_error_value;
|
||||
} esp_matter_cluster_network_commissioning_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_general_diagnostics_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t network_interfaces[254];
|
||||
uint16_t reboot_count;
|
||||
} esp_matter_cluster_general_diagnostics_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_administrator_commissioning_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t window_status;
|
||||
uint16_t admin_fabric_index;
|
||||
uint16_t admin_vendor_id;
|
||||
} esp_matter_cluster_administrator_commissioning_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_operational_credentials_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t nocs[254];
|
||||
uint8_t fabrics[320];
|
||||
uint8_t supported_fabrics;
|
||||
uint8_t commissioned_fabrics;
|
||||
uint8_t trusted_root_certificates[400];
|
||||
uint8_t current_fabric_index;
|
||||
} esp_matter_cluster_operational_credentials_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_group_key_management_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t group_key_map[254];
|
||||
uint8_t group_table[254];
|
||||
uint16_t max_groups_per_fabric;
|
||||
uint16_t max_group_keys_per_fabric;
|
||||
} esp_matter_cluster_group_key_management_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_identify_config {
|
||||
uint16_t cluster_revision;
|
||||
uint16_t identify_time;
|
||||
@@ -346,7 +226,7 @@ typedef struct esp_matter_cluster_identify_config {
|
||||
|
||||
typedef struct esp_matter_cluster_groups_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t name_support;
|
||||
uint8_t group_name_support;
|
||||
} esp_matter_cluster_groups_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_scenes_config {
|
||||
@@ -355,7 +235,7 @@ typedef struct esp_matter_cluster_scenes_config {
|
||||
uint8_t current_scene;
|
||||
uint16_t current_group;
|
||||
bool scene_valid;
|
||||
uint8_t name_support;
|
||||
uint8_t scene_name_support;
|
||||
} esp_matter_cluster_scenes_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_on_off_config {
|
||||
@@ -376,7 +256,7 @@ typedef struct esp_matter_cluster_color_control_config {
|
||||
uint8_t current_hue;
|
||||
uint8_t current_saturation;
|
||||
uint8_t color_mode;
|
||||
uint8_t options;
|
||||
uint8_t color_control_options;
|
||||
uint8_t enhanced_color_mode;
|
||||
uint16_t color_capabilities;
|
||||
} esp_matter_cluster_color_control_config_t;
|
||||
@@ -388,13 +268,6 @@ typedef struct esp_matter_cluster_fan_control_config {
|
||||
/* Not implemented
|
||||
uint8_t percent_setting;
|
||||
uint8_t percent_current;
|
||||
uint8_t speed_max;
|
||||
uint8_t speed_setting;
|
||||
uint8_t speed_current;
|
||||
uint8_t rock_support;
|
||||
uint8_t rock_setting;
|
||||
uint8_t wind_support;
|
||||
uint8_t wind_setting;
|
||||
*/
|
||||
} esp_matter_cluster_fan_control_config_t;
|
||||
|
||||
@@ -429,7 +302,6 @@ typedef struct esp_matter_cluster_bridged_device_basic_config {
|
||||
|
||||
typedef struct esp_matter_cluster_fixed_label_config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t label_list[254];
|
||||
} esp_matter_cluster_fixed_label_config_t;
|
||||
|
||||
typedef struct esp_matter_cluster_switch_config {
|
||||
@@ -448,12 +320,8 @@ typedef struct esp_matter_cluster_temperature_measurement_config {
|
||||
|
||||
void esp_matter_cluster_plugin_init_callback_common();
|
||||
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_descriptor(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_descriptor_config_t *config,
|
||||
uint8_t flags);
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_access_control(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_access_control_config_t *config,
|
||||
uint8_t flags);
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_descriptor(esp_matter_endpoint_t *endpoint, uint8_t flags);
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_access_control(esp_matter_endpoint_t *endpoint, uint8_t flags);
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_basic(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_basic_config_t *config, uint8_t flags);
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_binding(esp_matter_endpoint_t *endpoint,
|
||||
@@ -479,9 +347,7 @@ esp_matter_cluster_t *esp_matter_cluster_create_administrator_commissioning(esp_
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_operational_credentials(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_operational_credentials_config_t *config,
|
||||
uint8_t flags);
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_group_key_management(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_group_key_management_config_t *config,
|
||||
uint8_t flags);
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_group_key_management(esp_matter_endpoint_t *endpoint, uint8_t flags);
|
||||
|
||||
esp_matter_cluster_t *esp_matter_cluster_create_identify(esp_matter_endpoint_t *endpoint,
|
||||
esp_matter_cluster_identify_config_t *config, uint8_t flags);
|
||||
|
||||
@@ -820,7 +820,7 @@ esp_err_t esp_matter_attribute_set_val(esp_matter_attribute_t *attribute, esp_ma
|
||||
memcpy(new_buf, val->val.a.b, val->val.a.s);
|
||||
val->val.a.b = new_buf;
|
||||
} else {
|
||||
ESP_LOGI(TAG, "Set val called with string with size 0");
|
||||
ESP_LOGD(TAG, "Set val called with string with size 0");
|
||||
val->val.a.b = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <esp_err.h>
|
||||
#include <esp_matter_attribute.h>
|
||||
#include <esp_matter_attribute_utils.h>
|
||||
#include <app/InteractionModelEngine.h>
|
||||
#include <app/DeviceProxy.h>
|
||||
#include <app/util/af-types.h>
|
||||
|
||||
@@ -29,8 +29,8 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_root_node(esp_matter_node_t *n
|
||||
}
|
||||
esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_ROOT_NODE_DEVICE_TYPE_ID);
|
||||
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_access_control(endpoint, &(config->access_control), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_access_control(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_ota_provider(endpoint, &(config->ota_provider), ESP_MATTER_CLUSTER_FLAG_CLIENT);
|
||||
esp_matter_cluster_create_ota_requestor(endpoint, &(config->ota_requestor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
@@ -44,8 +44,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_root_node(esp_matter_node_t *n
|
||||
ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_operational_credentials(endpoint, &(config->operational_credentials),
|
||||
ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_group_key_management(endpoint, &(config->group_key_management),
|
||||
ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_group_key_management(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
|
||||
return endpoint;
|
||||
}
|
||||
@@ -66,7 +65,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_on_off_light(esp_matter_node_t
|
||||
esp_matter_cluster_create_scenes(endpoint, &(config->scenes), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_on_off(endpoint, &(config->on_off), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
|
||||
return endpoint;
|
||||
}
|
||||
@@ -88,7 +87,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_dimmable_light(esp_matter_node
|
||||
esp_matter_cluster_create_on_off(endpoint, &(config->on_off), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_level_control(endpoint, &(config->level_control), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
|
||||
return endpoint;
|
||||
}
|
||||
@@ -110,7 +109,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_color_dimmable_light(esp_matte
|
||||
esp_matter_cluster_create_on_off(endpoint, &(config->on_off), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_level_control(endpoint, &(config->level_control), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_color_control(endpoint, &(config->color_control), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
|
||||
return endpoint;
|
||||
@@ -132,7 +131,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_on_off_switch(esp_matter_node_
|
||||
esp_matter_cluster_create_scenes(endpoint, &(config->scenes), ESP_MATTER_CLUSTER_FLAG_CLIENT);
|
||||
esp_matter_cluster_create_on_off(endpoint, &(config->on_off), ESP_MATTER_CLUSTER_FLAG_CLIENT);
|
||||
esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_binding(endpoint, &(config->binding), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
|
||||
return endpoint;
|
||||
@@ -151,7 +150,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_fan(esp_matter_node_t *node,
|
||||
|
||||
esp_matter_cluster_create_identify(endpoint, &(config->identify), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_groups(endpoint, &(config->groups), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_fan_control(endpoint, &(config->fan_control), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
|
||||
return endpoint;
|
||||
@@ -172,7 +171,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_thermostat(esp_matter_node_t *
|
||||
esp_matter_cluster_create_groups(endpoint, &(config->groups), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_scenes(endpoint, &(config->scenes), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_thermostat(endpoint, &(config->thermostat), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
|
||||
return endpoint;
|
||||
@@ -191,7 +190,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_bridged_node(esp_matter_node_t
|
||||
|
||||
esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_BRIDGED_NODE_DEVICE_TYPE_ID);
|
||||
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_bridged_device_basic(endpoint, &(config->bridged_device_basic),
|
||||
ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_fixed_label(endpoint, &(config->fixed_label), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
@@ -212,7 +211,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_door_lock(esp_matter_node_t *n
|
||||
esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_DOOR_LOCK_DEVICE_TYPE_ID);
|
||||
|
||||
esp_matter_cluster_create_identify(endpoint, &(config->identify), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_descriptor(endpoint, ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_door_lock(endpoint, &(config->door_lock), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
esp_matter_cluster_create_time_synchronization(endpoint, &(config->time_synchronization), ESP_MATTER_CLUSTER_FLAG_SERVER);
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#define ENDPOINT_CONFIG_ROOT_NODE_DEFAULT() \
|
||||
{ \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
.access_control = CLUSTER_CONFIG_ACCESS_CONTROL_DEFAULT(), \
|
||||
.basic = CLUSTER_CONFIG_BASIC_DEFAULT(), \
|
||||
.ota_provider = CLUSTER_CONFIG_OTA_PROVIDER_DEFAULT(), \
|
||||
.ota_requestor = CLUSTER_CONFIG_OTA_REQUESTOR_DEFAULT(), \
|
||||
@@ -40,7 +38,6 @@
|
||||
.general_diagnostics = CLUSTER_CONFIG_GENERAL_DIAGNOSTICS_DEFAULT(), \
|
||||
.administrator_commissioning = CLUSTER_CONFIG_ADMINISTRATOR_COMMISSIONING_DEFAULT(), \
|
||||
.operational_credentials = CLUSTER_CONFIG_OPERATIONAL_CREDENTIALS_DEFAULT(), \
|
||||
.group_key_management = CLUSTER_CONFIG_GROUP_KEY_MANAGEMENT_DEFAULT(), \
|
||||
}
|
||||
|
||||
#define ENDPOINT_CONFIG_ON_OFF_LIGHT_DEFAULT() \
|
||||
@@ -50,7 +47,6 @@
|
||||
.scenes = CLUSTER_CONFIG_SCENES_DEFAULT(), \
|
||||
.on_off = CLUSTER_CONFIG_ON_OFF_DEFAULT(), \
|
||||
.basic = CLUSTER_CONFIG_BASIC_DEFAULT(), \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
}
|
||||
|
||||
#define ENDPOINT_CONFIG_DIMMABLE_LIGHT_DEFAULT() \
|
||||
@@ -61,7 +57,6 @@
|
||||
.on_off = CLUSTER_CONFIG_ON_OFF_DEFAULT(), \
|
||||
.level_control = CLUSTER_CONFIG_LEVEL_CONTROL_DEFAULT(), \
|
||||
.basic = CLUSTER_CONFIG_BASIC_DEFAULT(), \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
}
|
||||
|
||||
#define ENDPOINT_CONFIG_COLOR_DIMMABLE_LIGHT_DEFAULT() \
|
||||
@@ -73,7 +68,6 @@
|
||||
.level_control = CLUSTER_CONFIG_LEVEL_CONTROL_DEFAULT(), \
|
||||
.basic = CLUSTER_CONFIG_BASIC_DEFAULT(), \
|
||||
.color_control = CLUSTER_CONFIG_COLOR_CONTROL_DEFAULT(), \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
}
|
||||
|
||||
#define ENDPOINT_CONFIG_ON_OFF_SWITCH_DEFAULT() \
|
||||
@@ -84,14 +78,12 @@
|
||||
.on_off = CLUSTER_CONFIG_ON_OFF_DEFAULT(), \
|
||||
.basic = CLUSTER_CONFIG_BASIC_DEFAULT(), \
|
||||
.binding = CLUSTER_CONFIG_BINDING_DEFAULT(), \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
}
|
||||
|
||||
#define ENDPOINT_CONFIG_FAN_DEFAULT() \
|
||||
{ \
|
||||
.identify = CLUSTER_CONFIG_IDENTIFY_DEFAULT(), \
|
||||
.groups = CLUSTER_CONFIG_GROUPS_DEFAULT(), \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
.fan_control = CLUSTER_CONFIG_FAN_CONTROL_DEFAULT(), \
|
||||
}
|
||||
|
||||
@@ -102,20 +94,17 @@
|
||||
.scenes = CLUSTER_CONFIG_SCENES_DEFAULT(), \
|
||||
.basic = CLUSTER_CONFIG_BASIC_DEFAULT(), \
|
||||
.thermostat = CLUSTER_CONFIG_THERMOSTAT_DEFAULT(), \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
}
|
||||
|
||||
#define ENDPOINT_CONFIG_DOOR_LOCK_DEFAULT() \
|
||||
{ \
|
||||
.identify = CLUSTER_CONFIG_IDENTIFY_DEFAULT(), \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
.door_lock = CLUSTER_CONFIG_DOOR_LOCK_DEFAULT(), \
|
||||
.time_synchronization = CLUSTER_CONFIG_TIME_SYNCHRONIZATION_DEFAULT(), \
|
||||
}
|
||||
|
||||
#define ENDPOINT_CONFIG_BRIDGED_NODE_DEFAULT() \
|
||||
{ \
|
||||
.descriptor = CLUSTER_CONFIG_DESCRIPTOR_DEFAULT(), \
|
||||
.bridged_device_basic = CLUSTER_CONFIG_BRIDGED_DEVICE_BASIC_DEFAULT(), \
|
||||
.fixed_label = CLUSTER_CONFIG_FIXED_LABEL_DEFAULT(), \
|
||||
}
|
||||
@@ -133,8 +122,6 @@
|
||||
}
|
||||
|
||||
typedef struct esp_matter_endpoint_root_node_config {
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
esp_matter_cluster_access_control_config_t access_control;
|
||||
esp_matter_cluster_basic_config_t basic;
|
||||
esp_matter_cluster_ota_provider_config_t ota_provider;
|
||||
esp_matter_cluster_ota_requestor_config_t ota_requestor;
|
||||
@@ -143,7 +130,6 @@ typedef struct esp_matter_endpoint_root_node_config {
|
||||
esp_matter_cluster_general_diagnostics_config_t general_diagnostics;
|
||||
esp_matter_cluster_administrator_commissioning_config_t administrator_commissioning;
|
||||
esp_matter_cluster_operational_credentials_config_t operational_credentials;
|
||||
esp_matter_cluster_group_key_management_config_t group_key_management;
|
||||
} esp_matter_endpoint_root_node_config_t;
|
||||
|
||||
typedef struct esp_matter_endpoint_on_off_light_config {
|
||||
@@ -152,7 +138,6 @@ typedef struct esp_matter_endpoint_on_off_light_config {
|
||||
esp_matter_cluster_scenes_config_t scenes;
|
||||
esp_matter_cluster_on_off_config_t on_off;
|
||||
esp_matter_cluster_basic_config_t basic;
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
} esp_matter_endpoint_on_off_light_config_t;
|
||||
|
||||
typedef struct esp_matter_endpoint_dimmable_light_config {
|
||||
@@ -162,7 +147,6 @@ typedef struct esp_matter_endpoint_dimmable_light_config {
|
||||
esp_matter_cluster_on_off_config_t on_off;
|
||||
esp_matter_cluster_level_control_config_t level_control;
|
||||
esp_matter_cluster_basic_config_t basic;
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
} esp_matter_endpoint_dimmable_light_config_t;
|
||||
|
||||
typedef struct esp_matter_endpoint_color_dimmable_light_config {
|
||||
@@ -173,7 +157,6 @@ typedef struct esp_matter_endpoint_color_dimmable_light_config {
|
||||
esp_matter_cluster_level_control_config_t level_control;
|
||||
esp_matter_cluster_basic_config_t basic;
|
||||
esp_matter_cluster_color_control_config_t color_control;
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
} esp_matter_endpoint_color_dimmable_light_config_t;
|
||||
|
||||
typedef struct esp_matter_endpoint_on_off_switch_config {
|
||||
@@ -183,13 +166,11 @@ typedef struct esp_matter_endpoint_on_off_switch_config {
|
||||
esp_matter_cluster_on_off_config_t on_off;
|
||||
esp_matter_cluster_basic_config_t basic;
|
||||
esp_matter_cluster_binding_config_t binding;
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
} esp_matter_endpoint_on_off_switch_config_t;
|
||||
|
||||
typedef struct esp_matter_endpoint_fan_config {
|
||||
esp_matter_cluster_identify_config_t identify;
|
||||
esp_matter_cluster_groups_config_t groups;
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
esp_matter_cluster_fan_control_config_t fan_control;
|
||||
} esp_matter_endpoint_fan_config_t;
|
||||
|
||||
@@ -199,18 +180,15 @@ typedef struct esp_matter_endpoint_thermostat_config {
|
||||
esp_matter_cluster_scenes_config_t scenes;
|
||||
esp_matter_cluster_basic_config_t basic;
|
||||
esp_matter_cluster_thermostat_config_t thermostat;
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
} esp_matter_endpoint_thermostat_config_t;
|
||||
|
||||
typedef struct esp_matter_endpoint_bridged_node_config {
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
esp_matter_cluster_bridged_device_basic_config_t bridged_device_basic;
|
||||
esp_matter_cluster_fixed_label_config_t fixed_label;
|
||||
} esp_matter_endpoint_bridged_node_config_t;
|
||||
|
||||
typedef struct esp_matter_endpoint_door_lock_config {
|
||||
esp_matter_cluster_identify_config_t identify;
|
||||
esp_matter_cluster_descriptor_config_t descriptor;
|
||||
esp_matter_cluster_door_lock_config_t door_lock;
|
||||
esp_matter_cluster_time_synchronization_config_t time_synchronization;
|
||||
} esp_matter_endpoint_door_lock_config_t;
|
||||
|
||||
@@ -13,7 +13,7 @@ extern "C" {
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <esp_matter_attribute.h>
|
||||
#include <esp_matter_attribute_utils.h>
|
||||
#include <zboss_api.h>
|
||||
#include <zboss_api_zcl.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user