diff --git a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml new file mode 100644 index 00000000000000..d54cdef16e1f5c --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + General + User Label + 0x0041 + USER_LABEL_CLUSTER + The User Label Cluster provides a feature to tag an endpoint with zero or more labels. + label list + + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index ca8ada6228555b..5a7b1dd3954107 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -52,6 +52,7 @@ "thread-network-diagnostics-cluster.xml", "time-synchronization-cluster.xml", "tv-channel-cluster.xml", + "user-label-cluster.xml", "wake-on-lan-cluster.xml", "wifi-network-diagnostics-cluster.xml", "window-covering.xml", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index cd59709a80ff08..099f941303bf94 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -10721,6 +10721,76 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = None +@dataclass +class UserLabel(Cluster): + id: typing.ClassVar[int] = 0x0041 + + class Structs: + @dataclass + class LabelStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="label", Tag=1, Type=str), + ClusterObjectFieldDescriptor( + Label="value", Tag=2, Type=str), + ]) + + label: 'str' = None + value: 'str' = None + + class Attributes: + @dataclass + class LabelList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0041 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[UserLabel.Structs.LabelStruct]) + + value: 'typing.List[UserLabel.Structs.LabelStruct]' = None + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0041 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0041 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = None + + @dataclass class BooleanState(Cluster): id: typing.ClassVar[int] = 0x0045 diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 72fa02c1f9f079..b806fb35b098b6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -494,6 +494,12 @@ newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h index b7209a820d4919..14bab1b5a81c82 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h @@ -200,6 +200,12 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end +@interface CHIPUserLabelClusterLabelStruct : NSObject +@property (strong, nonatomic) NSString * _Nonnull label; +@property (strong, nonatomic) NSString * _Nonnull value; +- (instancetype)init; +@end + @interface CHIPModeSelectClusterModeOptionStruct : NSObject @property (strong, nonatomic) NSString * _Nonnull label; @property (strong, nonatomic) NSNumber * _Nonnull mode; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm index d3c825410595d8..1f8a534ebd9474 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm @@ -393,6 +393,19 @@ - (instancetype)init } @end +@implementation CHIPUserLabelClusterLabelStruct +- (instancetype)init +{ + if (self = [super init]) { + + _label = @""; + + _value = @""; + } + return self; +} +@end + @implementation CHIPModeSelectClusterModeOptionStruct - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index da87c179a2bed5..97c376a5773d44 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -3045,6 +3045,8 @@ new CHIPDefaultSuccessCallbackBridge( } auto element_0 = (CHIPFixedLabelClusterLabelStruct *) value[i_0]; listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } cppValue = ListType_0(listHolder_0->mList, value.count); diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index ada09b7c9f98d8..b575b04d4dad0f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -569,6 +569,13 @@ // Server attributes #define ZCL_LABEL_LIST_ATTRIBUTE_ID (0x0000) +// Attribute ids for cluster: User Label + +// Client attributes + +// Server attributes +#define ZCL_LABEL_LIST_ATTRIBUTE_ID (0x0000) + // Attribute ids for cluster: Boolean State // Client attributes diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 5394e3abc39361..5224549dfb43a7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -8842,6 +8842,12 @@ namespace Attributes { } // namespace Attributes } // namespace FixedLabel +namespace UserLabel { +namespace Attributes { + +} // namespace Attributes +} // namespace UserLabel + namespace BooleanState { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 786c8ce8c99d28..eb7e8a63df0989 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -1674,6 +1674,12 @@ namespace Attributes { } // namespace Attributes } // namespace FixedLabel +namespace UserLabel { +namespace Attributes { + +} // namespace Attributes +} // namespace UserLabel + namespace BooleanState { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 7585910fe1e395..18d784fbf686cc 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -350,6 +350,14 @@ void emberAfOperationalCredentialsClusterInitCallback(chip::EndpointId endpoint) */ void emberAfFixedLabelClusterInitCallback(chip::EndpointId endpoint); +/** @brief User Label Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfUserLabelClusterInitCallback(chip::EndpointId endpoint); + /** @brief Boolean State Cluster Init * * Cluster Init @@ -4900,6 +4908,110 @@ void emberAfFixedLabelClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfFixedLabelClusterClientTickCallback(chip::EndpointId endpoint); +// +// User Label Cluster +// + +/** @brief User Label Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfUserLabelClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief User Label Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfUserLabelClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief User Label Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterUserLabelClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief User Label Cluster Client Attribute Changed + * + * Client Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterUserLabelClusterClientAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief User Label Cluster Server Message Sent + * + * Server Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfUserLabelClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); + +/** @brief User Label Cluster Client Message Sent + * + * Client Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfUserLabelClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); + +/** @brief User Label Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterUserLabelClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief User Label Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterUserLabelClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief User Label Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfUserLabelClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief User Label Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfUserLabelClusterClientTickCallback(chip::EndpointId endpoint); + // // Boolean State Cluster // diff --git a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h index bbcd4fb348cae6..dbbd3f2d6c2af5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h +++ b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h @@ -95,6 +95,8 @@ void __attribute__((weak)) MatterOperationalCredentialsPluginClientInitCallback( void MatterOperationalCredentialsPluginServerInitCallback(); void __attribute__((weak)) MatterFixedLabelPluginClientInitCallback() {} void MatterFixedLabelPluginServerInitCallback(); +void __attribute__((weak)) MatterUserLabelPluginClientInitCallback() {} +void MatterUserLabelPluginServerInitCallback(); void __attribute__((weak)) MatterBooleanStatePluginClientInitCallback() {} void MatterBooleanStatePluginServerInitCallback(); void __attribute__((weak)) MatterModeSelectPluginClientInitCallback() {} diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h index 015366d5dcbab0..75bfff980f33c4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h @@ -136,6 +136,9 @@ static constexpr chip::ClusterId ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID = 0x003E // Definitions for cluster: Fixed Label static constexpr chip::ClusterId ZCL_FIXED_LABEL_CLUSTER_ID = 0x0040; +// Definitions for cluster: User Label +static constexpr chip::ClusterId ZCL_USER_LABEL_CLUSTER_ID = 0x0041; + // Definitions for cluster: Boolean State static constexpr chip::ClusterId ZCL_BOOLEAN_STATE_CLUSTER_ID = 0x0045; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 459f7a29a9971f..caa6c462b90537 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -8313,6 +8313,57 @@ namespace Events { } // namespace Events } // namespace FixedLabel +namespace UserLabel { +namespace Structs { +namespace LabelStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kLabel): + ReturnErrorOnFailure(DataModel::Decode(reader, label)); + break; + case to_underlying(Fields::kValue): + ReturnErrorOnFailure(DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace LabelStruct +} // namespace Structs + +namespace Commands { +} // namespace Commands + +namespace Events { +} // namespace Events + +} // namespace UserLabel namespace BooleanState { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index fe16c18778d81f..96239ffacaab33 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -13339,6 +13339,67 @@ struct TypeInfo } // namespace ClusterRevision } // namespace Attributes } // namespace FixedLabel +namespace UserLabel { + +namespace Structs { +namespace LabelStruct { +enum class Fields +{ + kLabel = 1, + kValue = 2, +}; + +struct Type +{ +public: + chip::CharSpan label; + chip::CharSpan value; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; + +using DecodableType = Type; + +} // namespace LabelStruct +} // namespace Structs + +namespace Attributes { +namespace LabelList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } +}; +} // namespace LabelList +namespace FeatureMap { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FeatureMap::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ClusterRevision::Id; } +}; +} // namespace ClusterRevision +} // namespace Attributes +} // namespace UserLabel namespace BooleanState { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 5032f33aca2dd2..d49050bf61d9e8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -1831,6 +1831,24 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace FixedLabel +namespace UserLabel { +namespace Attributes { + +namespace LabelList { +static constexpr AttributeId Id = 0x00000000; +} // namespace LabelList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace UserLabel + namespace BooleanState { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index dc102cc4a17b12..1b77ffe8e173b1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -139,6 +139,9 @@ static constexpr ClusterId Id = 0x0000003E; namespace FixedLabel { static constexpr ClusterId Id = 0x00000040; } // namespace FixedLabel +namespace UserLabel { +static constexpr ClusterId Id = 0x00000041; +} // namespace UserLabel namespace BooleanState { static constexpr ClusterId Id = 0x00000045; } // namespace BooleanState diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 744b72c6cf8e65..a2195d2a294b05 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -259,6 +259,12 @@ #define CHIP_PRINTCLUSTER_FIXED_LABEL_CLUSTER #endif +#if defined(ZCL_USING_USER_LABEL_CLUSTER_SERVER) || defined(ZCL_USING_USER_LABEL_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_USER_LABEL_CLUSTER { ZCL_USER_LABEL_CLUSTER_ID, 65, "User Label" }, +#else +#define CHIP_PRINTCLUSTER_USER_LABEL_CLUSTER +#endif + #if defined(ZCL_USING_BOOLEAN_STATE_CLUSTER_SERVER) || defined(ZCL_USING_BOOLEAN_STATE_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER { ZCL_BOOLEAN_STATE_CLUSTER_ID, 69, "Boolean State" }, #else @@ -803,6 +809,7 @@ CHIP_PRINTCLUSTER_ADMINISTRATOR_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ CHIP_PRINTCLUSTER_FIXED_LABEL_CLUSTER \ + CHIP_PRINTCLUSTER_USER_LABEL_CLUSTER \ CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER \ CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_SHADE_CONFIG_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 22adb7261ab9a8..506aeb761ac233 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -80,6 +80,8 @@ CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalCredentials::Structs::NOCStruct::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::FixedLabel::Structs::LabelStruct::DecodableType & value); +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::UserLabel::Structs::LabelStruct::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, @@ -1179,6 +1181,29 @@ CHIP_ERROR LogValue(const char * label, size_t indent, ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); return CHIP_NO_ERROR; } +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::UserLabel::Structs::LabelStruct::DecodableType & value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); + { + CHIP_ERROR err = LogValue("Label", indent + 1, value.label); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Label'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Value'", IndentStr(indent + 1).c_str()); + return err; + } + } + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value) {