Add command codegen for cluster object (#10171)
* Add codegen for cluster object regarding commands
* run codegen
diff --git a/src/app/tests/TestDataModelSerialization.cpp b/src/app/tests/TestDataModelSerialization.cpp
index cce156f..e890968 100644
--- a/src/app/tests/TestDataModelSerialization.cpp
+++ b/src/app/tests/TestDataModelSerialization.cpp
@@ -515,10 +515,10 @@
// Encode every field manually except a.
{
err = EncodeStruct(_this->mWriter, TLV::AnonymousTag,
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kBFieldId), t.b),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kCFieldId), t.c),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kDFieldId), t.d),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kEFieldId), t.e));
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kB)), t.b),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kC)), t.c),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kD)), t.d),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kE)), t.e));
NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
}
@@ -585,12 +585,12 @@
// Encode every field + an extra field.
{
err = EncodeStruct(_this->mWriter, TLV::AnonymousTag,
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kAFieldId), t.a),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kBFieldId), t.b),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kCFieldId), t.c),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kDFieldId), t.d),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kEFieldId), t.e),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kEFieldId + 1), t.a));
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kA)), t.a),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kB)), t.b),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kC)), t.c),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kD)), t.d),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kE)), t.e),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kE) + 1), t.a));
NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
}
@@ -657,11 +657,11 @@
// Encode every field manually except a.
{
err = EncodeStruct(_this->mWriter, TLV::AnonymousTag,
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kAFieldId), t.b),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kBFieldId), t.b),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kCFieldId), t.c),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kDFieldId), t.d),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kEFieldId), t.e));
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kA)), t.b),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kB)), t.b),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kC)), t.c),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kD)), t.d),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kE)), t.e));
NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
}
@@ -708,11 +708,11 @@
// Encode every field manually except a.
{
err = EncodeStruct(_this->mWriter, TLV::AnonymousTag,
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kAFieldId), t.a),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kBFieldId), t.b),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kCFieldId), t.c),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kDFieldId), t.e),
- MakeTagValuePair(TLV::ContextTag(TestCluster::SimpleStruct::kEFieldId), t.e));
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kA)), t.a),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kB)), t.b),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kC)), t.c),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kD)), t.e),
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::SimpleStruct::Fields::kE)), t.e));
NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
}
@@ -756,7 +756,7 @@
// Encode a list of integers for field d instead of a list of structs.
{
err = EncodeStruct(_this->mWriter, TLV::AnonymousTag,
- MakeTagValuePair(TLV::ContextTag(TestCluster::NestedStructList::kDFieldId), t.e));
+ MakeTagValuePair(TLV::ContextTag(to_underlying(TestCluster::NestedStructList::Fields::kD)), t.e));
NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR);
}
diff --git a/src/app/zap-templates/templates/app/cluster-objects-src.zapt b/src/app/zap-templates/templates/app/cluster-objects-src.zapt
index 86723c8..2480c2e 100644
--- a/src/app/zap-templates/templates/app/cluster-objects-src.zapt
+++ b/src/app/zap-templates/templates/app/cluster-objects-src.zapt
@@ -15,22 +15,24 @@
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
{{#zcl_struct_items}}
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(k{{asUpperCamelCase label}}FieldId), {{asLowerCamelCase label}}));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::k{{asUpperCamelCase label}})), {{asLowerCamelCase label}}));
{{/zcl_struct_items}}
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader &reader) {
- CHIP_ERROR err;
+ 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) {
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
{{#zcl_struct_items}}
- case k{{asUpperCamelCase label}}FieldId:
+ case to_underlying(Fields::k{{asUpperCamelCase label}}):
ReturnErrorOnFailure(DataModel::Decode(reader, {{asLowerCamelCase label}}));
break;
{{/zcl_struct_items}}
@@ -38,6 +40,7 @@
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -45,8 +48,48 @@
} // namespace {{asType label}}
{{/zcl_structs}}
-} // namespace {{asUpperCamelCase name}}
+namespace Commands {
+{{#zcl_commands}}
+namespace {{asUpperCamelCase name}} {
+CHIP_ERROR Type::Encode(TLV::TLVWriter &writer, uint64_t tag) const{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ {{#zcl_command_arguments}}
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::k{{asUpperCamelCase label}})), {{asLowerCamelCase label}}));
+ {{/zcl_command_arguments}}
+ 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()))
+ {
+ {{#zcl_command_arguments}}
+ case to_underlying(Fields::k{{asUpperCamelCase label}}):
+ ReturnErrorOnFailure(DataModel::Decode(reader, {{asLowerCamelCase label}}));
+ break;
+ {{/zcl_command_arguments}}
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace {{asUpperCamelCase name}}.
+{{/zcl_commands}}
+} // namespace Commands
+} // namespace {{asUpperCamelCase name}}
{{/zcl_clusters}}
} // namespace Clusters
diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt
index e71bd35..4a75082 100644
--- a/src/app/zap-templates/templates/app/cluster-objects.zapt
+++ b/src/app/zap-templates/templates/app/cluster-objects.zapt
@@ -7,6 +7,9 @@
#include <app/data-model/Encode.h>
#include <app/data-model/List.h>
#include <app/util/basic-types.h>
+#include <protocols/interaction_model/Constants.h>
+#include <app-common/zap-generated/ids/Commands.h>
+#include <app-common/zap-generated/ids/Clusters.h>
namespace chip {
namespace app {
@@ -25,9 +28,9 @@
{{#zcl_structs}}
namespace {{name}} {
- enum FieldId {
+ enum class Fields {
{{#zcl_struct_items}}
- k{{asUpperCamelCase label}}FieldId = {{index}},
+ k{{asUpperCamelCase label}} = {{index}},
{{/zcl_struct_items}}
};
@@ -50,7 +53,7 @@
{{#if struct_contains_array}}
struct DecodableType {
public:
- {{#zcl_struct_items checkForDoubleNestedArray="true"}}
+ {{#zcl_struct_items}}
{{#if isArray}}
DataModel::DecodableList<{{#if_is_enum type}}{{type}}{{else}}{{zapTypeToDecodableClusterObjectType type}}{{/if_is_enum}}> {{asLowerCamelCase label}};
{{else}}
@@ -71,11 +74,45 @@
namespace Commands {
{{/first}}
namespace {{asUpperCamelCase name}} {
-struct Type {};
+enum class Fields {
+ {{#zcl_command_arguments}}
+ k{{asUpperCamelCase label}} = {{index}},
+ {{/zcl_command_arguments}}
+};
-struct DecodableType {};
-} // namespace {{asUpperCamelCase name}}
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return {{asUpperCamelCase name}}::Id; }
+ static constexpr ClusterId GetClusterId() { return {{asUpperCamelCase parent.name}}::Id; }
+ {{#zcl_command_arguments}}
+ {{#if isArray}}
+ DataModel::List<{{#if_is_enum type}}{{type}}{{else}}{{zapTypeToEncodableClusterObjectType type}}{{/if_is_enum}}> {{asLowerCamelCase label}};
+ {{else}}
+ {{#if_is_enum type}}{{type}}{{else}}{{zapTypeToEncodableClusterObjectType type}}{{/if_is_enum}} {{asLowerCamelCase label}};
+ {{/if}}
+ {{/zcl_command_arguments}}
+
+ CHIP_ERROR Encode(TLV::TLVWriter &writer, uint64_t tag) const;
+};
+
+struct DecodableType {
+public:
+ static constexpr CommandId GetCommandId() { return {{asUpperCamelCase name}}::Id; }
+ static constexpr ClusterId GetClusterId() { return {{asUpperCamelCase parent.name}}::Id; }
+
+ {{#zcl_command_arguments}}
+ {{#if isArray}}
+ DataModel::DecodableList<{{#if_is_enum type}}{{type}}{{else}}{{zapTypeToDecodableClusterObjectType type}}{{/if_is_enum}}> {{asLowerCamelCase label}};
+ {{else}}
+ {{#if_is_enum type}}{{type}}{{else}}{{zapTypeToDecodableClusterObjectType type}}{{/if_is_enum}} {{asLowerCamelCase label}};
+ {{/if}}
+ {{/zcl_command_arguments}}
+ CHIP_ERROR Decode(TLV::TLVReader &reader);
+};
+}; // namespace {{asUpperCamelCase name}}
{{#last}}
} // namespace Commands
{{/last}}
diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js
index e493079..36e6b3b 100644
--- a/src/app/zap-templates/templates/app/helper.js
+++ b/src/app/zap-templates/templates/app/helper.js
@@ -415,7 +415,7 @@
case 'uint32_t':
case 'int64_t':
case 'uint64_t':
- return basicType;
+ return zclType;
default:
if (isDecodable) {
return type + '::DecodableType'
diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml
index 2e7fa01..a6c4dd3 100644
--- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml
@@ -29,7 +29,7 @@
<item name="ValueB" value="0x02"/>
<item name="ValueC" value="0x03"/>
</enum>
-
+
<struct name="SimpleStruct">
<cluster code="0x050F"/>
<item name="a" type="INT8U" optional="false"/>
@@ -111,49 +111,87 @@
<!-- Test Commands -->
<command source="client" code="0x00" name="Test" optional="false">
<description>
- Simple command without any parameters and without a specific response
+ Simple command without any parameters and without a specific response
</description>
</command>
<command source="client" code="0x01" name="TestNotHandled" optional="false">
<description>
- Simple command without any parameters and without a specific response not handled by the server
+ Simple command without any parameters and without a specific response not handled by the server
</description>
</command>
<command source="client" code="0x02" name="TestSpecific" optional="false">
<description>
- Simple command without any parameters and with a specific response
+ Simple command without any parameters and with a specific response
</description>
</command>
<command source="client" code="0x03" name="TestUnknownCommand" optional="true">
<description>
- Simple command that should not be added to the server.
+ Simple command that should not be added to the server.
</description>
</command>
<command source="client" code="0x04" name="TestAddArguments" optional="false">
<description>
- Command that takes two arguments and returns their sum.
+ Command that takes two arguments and returns their sum.
</description>
<arg name="arg1" type="INT8U"/>
<arg name="arg2" type="INT8U"/>
</command>
+ <command source="client" code="0x05" name="TestSimpleArgumentRequest" optional="false">
+ <description>
+ Command that takes an argument which is bool
+ </description>
+ <arg name="arg1" type="BOOLEAN"/>
+ </command>
+
+ <command source="client" code="0x06" name="TestStructArrayArgumentRequest" optional="false">
+ <description>
+ Command that takes various arguments that are arrays, including an array of structs which have a list member.
+ </description>
+ <arg name="arg1" type="NestedStructList" array="true"/>
+ <arg name="arg2" type="SimpleStruct" array="true"/>
+ <arg name="arg3" type="SimpleEnum" array="true"/>
+ <arg name="arg4" type="BOOLEAN" array="true"/>
+ <arg name="arg5" type="SimpleEnum"/>
+ <arg name="arg6" type="BOOLEAN"/>
+ </command>
+
<command source="server" code="0x00" name="TestSpecificResponse" optional="false" disableDefaultResponse="true">
<description>
- Simple response for TestWithResponse with a simple return value
+ Simple response for TestWithResponse with a simple return value
</description>
<arg name="returnValue" type="INT8U"/>
</command>
<command source="server" code="0x01" name="TestAddArgumentsResponse" optional="false" disableDefaultResponse="true">
<description>
- Response for TestAddArguments that returns the sum.
+ Response for TestAddArguments that returns the sum.
</description>
<arg name="returnValue" type="INT8U"/>
</command>
+ <command source="server" code="0x02" name="TestSimpleArgumentResponse" optional="false" disableDefaultResponse="true">
+ <description>
+ Simple response for TestSimpleArgumentRequest with a simple return value
+ </description>
+ <arg name="returnValue" type="BOOLEAN"/>
+ </command>
+
+ <command source="server" code="0x03" name="TestStructArrayArgumentResponse" optional="false" disableDefaultResponse="true">
+ <description>
+ Response for TestStructArrayArgumentRequest with complicated return arguments
+ </description>
+ <arg name="arg1" type="NestedStructList" array="true"/>
+ <arg name="arg2" type="SimpleStruct" array="true"/>
+ <arg name="arg3" type="SimpleEnum" array="true"/>
+ <arg name="arg4" type="BOOLEAN" array="true"/>
+ <arg name="arg5" type="SimpleEnum"/>
+ <arg name="arg6" type="BOOLEAN"/>
+ </command>
+
</cluster>
</configurator>
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 b1a3117..5929b4f 100644
--- a/zzz_generated/app-common/app-common/zap-generated/callback.h
+++ b/zzz_generated/app-common/app-common/zap-generated/callback.h
@@ -17128,18 +17128,44 @@
chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, chip::EndpointId endpoint,
chip::app::Clusters::TestCluster::Commands::TestSpecific::DecodableType & fields);
/**
+ * @brief Test Cluster Cluster TestSimpleArgumentResponse Command callback (from server)
+ */
+bool emberAfTestClusterClusterTestSimpleArgumentResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
+ bool returnValue);
+/**
* @brief Test Cluster Cluster TestUnknownCommand Command callback (from client)
*/
bool emberAfTestClusterClusterTestUnknownCommandCallback(
chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, chip::EndpointId endpoint,
chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::DecodableType & fields);
/**
+ * @brief Test Cluster Cluster TestStructArrayArgumentResponse Command callback (from server)
+ */
+bool emberAfTestClusterClusterTestStructArrayArgumentResponseCallback(
+ chip::EndpointId endpoint, chip::app::CommandSender * commandObj, /* TYPE WARNING: array array defaults to */ uint8_t * arg1,
+ /* TYPE WARNING: array array defaults to */ uint8_t * arg2, /* TYPE WARNING: array array defaults to */ uint8_t * arg3,
+ /* TYPE WARNING: array array defaults to */ uint8_t * arg4, uint8_t arg5, bool arg6);
+/**
* @brief Test Cluster Cluster TestAddArguments Command callback (from client)
*/
bool emberAfTestClusterClusterTestAddArgumentsCallback(
chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, chip::EndpointId endpoint,
uint8_t arg1, uint8_t arg2, chip::app::Clusters::TestCluster::Commands::TestAddArguments::DecodableType & fields);
/**
+ * @brief Test Cluster Cluster TestSimpleArgumentRequest Command callback (from client)
+ */
+bool emberAfTestClusterClusterTestSimpleArgumentRequestCallback(
+ chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, chip::EndpointId endpoint,
+ bool arg1, chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentRequest::DecodableType & fields);
+/**
+ * @brief Test Cluster Cluster TestStructArrayArgumentRequest Command callback (from client)
+ */
+bool emberAfTestClusterClusterTestStructArrayArgumentRequestCallback(
+ chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, chip::EndpointId endpoint,
+ /* TYPE WARNING: array array defaults to */ uint8_t * arg1, /* TYPE WARNING: array array defaults to */ uint8_t * arg2,
+ /* TYPE WARNING: array array defaults to */ uint8_t * arg3, /* TYPE WARNING: array array defaults to */ uint8_t * arg4,
+ uint8_t arg5, bool arg6, chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentRequest::DecodableType & fields);
+/**
* @brief Messaging Cluster DisplayMessage Command callback (from server)
*/
bool emberAfMessagingClusterDisplayMessageCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj,
diff --git a/zzz_generated/app-common/app-common/zap-generated/client-command-macro.h b/zzz_generated/app-common/app-common/zap-generated/client-command-macro.h
index b864e66..e2a8367 100644
--- a/zzz_generated/app-common/app-common/zap-generated/client-command-macro.h
+++ b/zzz_generated/app-common/app-common/zap-generated/client-command-macro.h
@@ -4697,6 +4697,17 @@
\
ZCL_TEST_SPECIFIC_COMMAND_ID, "", );
+/** @brief Command description for TestSimpleArgumentResponse
+ *
+ * Command: TestSimpleArgumentResponse
+ * @param returnValue BOOLEAN
+ */
+#define emberAfFillCommandTest \
+ ClusterClusterTestSimpleArgumentResponse(returnValue) \
+ emberAfFillExternalBuffer(mask, \
+ \
+ ZCL_TEST_SIMPLE_ARGUMENT_RESPONSE_COMMAND_ID, "u", returnValue);
+
/** @brief Command description for TestUnknownCommand
*
* Command: TestUnknownCommand
@@ -4706,6 +4717,27 @@
\
ZCL_TEST_UNKNOWN_COMMAND_COMMAND_ID, "", );
+/** @brief Command description for TestStructArrayArgumentResponse
+ *
+ * Command: TestStructArrayArgumentResponse
+ * @param arg1 NestedStructList []
+ * @param arg1Len int
+ * @param arg2 SimpleStruct []
+ * @param arg2Len int
+ * @param arg3 SimpleEnum []
+ * @param arg3Len int
+ * @param arg4 BOOLEAN []
+ * @param arg4Len int
+ * @param arg5 SimpleEnum
+ * @param arg6 BOOLEAN
+ */
+#define emberAfFillCommandTest \
+ ClusterClusterTestStructArrayArgumentResponse(arg1, arg1Len, arg2, arg2Len, arg3, arg3Len, arg4, arg4Len, arg5, arg6) \
+ emberAfFillExternalBuffer(mask, \
+ \
+ ZCL_TEST_STRUCT_ARRAY_ARGUMENT_RESPONSE_COMMAND_ID, "bbbbuu", arg1, arg1Len, arg2, arg2Len, \
+ arg3, arg3Len, arg4, arg4Len, arg5, arg6);
+
/** @brief Command description for TestAddArguments
*
* Command: TestAddArguments
@@ -4717,6 +4749,38 @@
\
ZCL_TEST_ADD_ARGUMENTS_COMMAND_ID, "uu", arg1, arg2);
+/** @brief Command description for TestSimpleArgumentRequest
+ *
+ * Command: TestSimpleArgumentRequest
+ * @param arg1 BOOLEAN
+ */
+#define emberAfFillCommandTest \
+ ClusterClusterTestSimpleArgumentRequest(arg1) \
+ emberAfFillExternalBuffer(mask, \
+ \
+ ZCL_TEST_SIMPLE_ARGUMENT_REQUEST_COMMAND_ID, "u", arg1);
+
+/** @brief Command description for TestStructArrayArgumentRequest
+ *
+ * Command: TestStructArrayArgumentRequest
+ * @param arg1 NestedStructList []
+ * @param arg1Len int
+ * @param arg2 SimpleStruct []
+ * @param arg2Len int
+ * @param arg3 SimpleEnum []
+ * @param arg3Len int
+ * @param arg4 BOOLEAN []
+ * @param arg4Len int
+ * @param arg5 SimpleEnum
+ * @param arg6 BOOLEAN
+ */
+#define emberAfFillCommandTest \
+ ClusterClusterTestStructArrayArgumentRequest(arg1, arg1Len, arg2, arg2Len, arg3, arg3Len, arg4, arg4Len, arg5, arg6) \
+ emberAfFillExternalBuffer(mask, \
+ \
+ ZCL_TEST_STRUCT_ARRAY_ARGUMENT_REQUEST_COMMAND_ID, "bbbbuu", arg1, arg1Len, arg2, arg2Len, arg3, \
+ arg3Len, arg4, arg4Len, arg5, arg6);
+
/** @brief Command description for GetLastMessage
*
* Command: GetLastMessage
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 873e73f..903113d 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
@@ -25,119 +25,2426 @@
namespace app {
namespace Clusters {
namespace PowerConfiguration {
+
+namespace Commands {
+} // namespace Commands
} // namespace PowerConfiguration
-
namespace DeviceTemperatureConfiguration {
+
+namespace Commands {
+} // namespace Commands
} // namespace DeviceTemperatureConfiguration
-
namespace Identify {
+
+namespace Commands {
+namespace Identify {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIdentifyTime)), identifyTime));
+ 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::kIdentifyTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, identifyTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Identify.
+namespace IdentifyQueryResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeout)), timeout));
+ 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::kTimeout):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeout));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace IdentifyQueryResponse.
+namespace IdentifyQuery {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace IdentifyQuery.
+namespace TriggerEffect {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEffectIdentifier)), effectIdentifier));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEffectVariant)), effectVariant));
+ 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::kEffectIdentifier):
+ ReturnErrorOnFailure(DataModel::Decode(reader, effectIdentifier));
+ break;
+ case to_underlying(Fields::kEffectVariant):
+ ReturnErrorOnFailure(DataModel::Decode(reader, effectVariant));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TriggerEffect.
+} // namespace Commands
} // namespace Identify
-
namespace Groups {
-} // namespace Groups
+namespace Commands {
+namespace AddGroup {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupName)), groupName));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kGroupName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupName));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddGroup.
+namespace AddGroupResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddGroupResponse.
+namespace ViewGroup {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ViewGroup.
+namespace ViewGroupResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupName)), groupName));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kGroupName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupName));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ViewGroupResponse.
+namespace GetGroupMembership {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupCount)), groupCount));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupList)), groupList));
+ 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::kGroupCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupCount));
+ break;
+ case to_underlying(Fields::kGroupList):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupList));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetGroupMembership.
+namespace GetGroupMembershipResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCapacity)), capacity));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupCount)), groupCount));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupList)), groupList));
+ 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::kCapacity):
+ ReturnErrorOnFailure(DataModel::Decode(reader, capacity));
+ break;
+ case to_underlying(Fields::kGroupCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupCount));
+ break;
+ case to_underlying(Fields::kGroupList):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupList));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetGroupMembershipResponse.
+namespace RemoveGroup {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveGroup.
+namespace RemoveGroupResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveGroupResponse.
+namespace RemoveAllGroups {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveAllGroups.
+namespace AddGroupIfIdentifying {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupName)), groupName));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kGroupName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupName));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddGroupIfIdentifying.
+} // namespace Commands
+} // namespace Groups
namespace Scenes {
namespace SceneExtensionFieldSet {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kClusterIdFieldId), clusterId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLengthFieldId), length));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kValueFieldId), value));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterId)), clusterId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLength)), length));
+ 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_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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kClusterIdFieldId:
+ case to_underlying(Fields::kClusterId):
ReturnErrorOnFailure(DataModel::Decode(reader, clusterId));
break;
- case kLengthFieldId:
+ case to_underlying(Fields::kLength):
ReturnErrorOnFailure(DataModel::Decode(reader, length));
break;
- case kValueFieldId:
+ 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 SceneExtensionFieldSet
-} // namespace Scenes
-namespace OnOff {
-} // namespace OnOff
-
-namespace OnOffSwitchConfiguration {
-} // namespace OnOffSwitchConfiguration
-
-namespace LevelControl {
-} // namespace LevelControl
-
-namespace Alarms {
-} // namespace Alarms
-
-namespace Time {
-} // namespace Time
-
-namespace BinaryInputBasic {
-} // namespace BinaryInputBasic
-
-namespace PowerProfile {
-namespace PowerProfileRecord {
+namespace Commands {
+namespace AddScene {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPowerProfileIdFieldId), powerProfileId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kEnergyPhaseIdFieldId), energyPhaseId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPowerProfileRemoteControlFieldId), powerProfileRemoteControl));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPowerProfileStateFieldId), powerProfileState));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneName)), sceneName));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExtensionFieldSets)), extensionFieldSets));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kPowerProfileIdFieldId:
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kSceneName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneName));
+ break;
+ case to_underlying(Fields::kExtensionFieldSets):
+ ReturnErrorOnFailure(DataModel::Decode(reader, extensionFieldSets));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddScene.
+namespace AddSceneResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddSceneResponse.
+namespace ViewScene {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ViewScene.
+namespace ViewSceneResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneName)), sceneName));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExtensionFieldSets)), extensionFieldSets));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kSceneName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneName));
+ break;
+ case to_underlying(Fields::kExtensionFieldSets):
+ ReturnErrorOnFailure(DataModel::Decode(reader, extensionFieldSets));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ViewSceneResponse.
+namespace RemoveScene {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveScene.
+namespace RemoveSceneResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveSceneResponse.
+namespace RemoveAllScenes {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveAllScenes.
+namespace RemoveAllScenesResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveAllScenesResponse.
+namespace StoreScene {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StoreScene.
+namespace StoreSceneResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StoreSceneResponse.
+namespace RecallScene {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RecallScene.
+namespace GetSceneMembership {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetSceneMembership.
+namespace GetSceneMembershipResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCapacity)), capacity));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneCount)), sceneCount));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneList)), sceneList));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kCapacity):
+ ReturnErrorOnFailure(DataModel::Decode(reader, capacity));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneCount));
+ break;
+ case to_underlying(Fields::kSceneList):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneList));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetSceneMembershipResponse.
+namespace EnhancedAddScene {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneName)), sceneName));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExtensionFieldSets)), extensionFieldSets));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kSceneName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneName));
+ break;
+ case to_underlying(Fields::kExtensionFieldSets):
+ ReturnErrorOnFailure(DataModel::Decode(reader, extensionFieldSets));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnhancedAddScene.
+namespace EnhancedAddSceneResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnhancedAddSceneResponse.
+namespace EnhancedViewScene {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ 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::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnhancedViewScene.
+namespace EnhancedViewSceneResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneName)), sceneName));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExtensionFieldSets)), extensionFieldSets));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kSceneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneId));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kSceneName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneName));
+ break;
+ case to_underlying(Fields::kExtensionFieldSets):
+ ReturnErrorOnFailure(DataModel::Decode(reader, extensionFieldSets));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnhancedViewSceneResponse.
+namespace CopyScene {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMode)), mode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdFrom)), groupIdFrom));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdFrom)), sceneIdFrom));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdTo)), groupIdTo));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdTo)), sceneIdTo));
+ 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::kMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mode));
+ break;
+ case to_underlying(Fields::kGroupIdFrom):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupIdFrom));
+ break;
+ case to_underlying(Fields::kSceneIdFrom):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdFrom));
+ break;
+ case to_underlying(Fields::kGroupIdTo):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupIdTo));
+ break;
+ case to_underlying(Fields::kSceneIdTo):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdTo));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CopyScene.
+namespace CopySceneResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdFrom)), groupIdFrom));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdFrom)), sceneIdFrom));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kGroupIdFrom):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupIdFrom));
+ break;
+ case to_underlying(Fields::kSceneIdFrom):
+ ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdFrom));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CopySceneResponse.
+} // namespace Commands
+} // namespace Scenes
+namespace OnOff {
+
+namespace Commands {
+namespace Off {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Off.
+namespace SampleMfgSpecificOffWithTransition {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SampleMfgSpecificOffWithTransition.
+namespace On {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace On.
+namespace SampleMfgSpecificOnWithTransition {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SampleMfgSpecificOnWithTransition.
+namespace SampleMfgSpecificOnWithTransition2 {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SampleMfgSpecificOnWithTransition2.
+namespace Toggle {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Toggle.
+namespace SampleMfgSpecificToggleWithTransition {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SampleMfgSpecificToggleWithTransition.
+namespace SampleMfgSpecificToggleWithTransition2 {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SampleMfgSpecificToggleWithTransition2.
+namespace OffWithEffect {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEffectId)), effectId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEffectVariant)), effectVariant));
+ 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::kEffectId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, effectId));
+ break;
+ case to_underlying(Fields::kEffectVariant):
+ ReturnErrorOnFailure(DataModel::Decode(reader, effectVariant));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OffWithEffect.
+namespace OnWithRecallGlobalScene {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OnWithRecallGlobalScene.
+namespace OnWithTimedOff {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOnOffControl)), onOffControl));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOnTime)), onTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOffWaitTime)), offWaitTime));
+ 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::kOnOffControl):
+ ReturnErrorOnFailure(DataModel::Decode(reader, onOffControl));
+ break;
+ case to_underlying(Fields::kOnTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, onTime));
+ break;
+ case to_underlying(Fields::kOffWaitTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, offWaitTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OnWithTimedOff.
+} // namespace Commands
+} // namespace OnOff
+namespace OnOffSwitchConfiguration {
+
+namespace Commands {
+} // namespace Commands
+} // namespace OnOffSwitchConfiguration
+namespace LevelControl {
+
+namespace Commands {
+namespace MoveToLevel {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLevel)), level));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride));
+ 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::kLevel):
+ ReturnErrorOnFailure(DataModel::Decode(reader, level));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionMask));
+ break;
+ case to_underlying(Fields::kOptionOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveToLevel.
+namespace Move {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride));
+ 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::kMoveMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, moveMode));
+ break;
+ case to_underlying(Fields::kRate):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rate));
+ break;
+ case to_underlying(Fields::kOptionMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionMask));
+ break;
+ case to_underlying(Fields::kOptionOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Move.
+namespace Step {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride));
+ 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::kStepMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepMode));
+ break;
+ case to_underlying(Fields::kStepSize):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepSize));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionMask));
+ break;
+ case to_underlying(Fields::kOptionOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Step.
+namespace Stop {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride));
+ 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::kOptionMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionMask));
+ break;
+ case to_underlying(Fields::kOptionOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Stop.
+namespace MoveToLevelWithOnOff {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLevel)), level));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ 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::kLevel):
+ ReturnErrorOnFailure(DataModel::Decode(reader, level));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveToLevelWithOnOff.
+namespace MoveWithOnOff {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate));
+ 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::kMoveMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, moveMode));
+ break;
+ case to_underlying(Fields::kRate):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rate));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveWithOnOff.
+namespace StepWithOnOff {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ 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::kStepMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepMode));
+ break;
+ case to_underlying(Fields::kStepSize):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepSize));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StepWithOnOff.
+namespace StopWithOnOff {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StopWithOnOff.
+} // namespace Commands
+} // namespace LevelControl
+namespace Alarms {
+
+namespace Commands {
+namespace ResetAlarm {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAlarmCode)), alarmCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterId)), clusterId));
+ 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::kAlarmCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, alarmCode));
+ break;
+ case to_underlying(Fields::kClusterId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, clusterId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ResetAlarm.
+namespace Alarm {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAlarmCode)), alarmCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterId)), clusterId));
+ 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::kAlarmCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, alarmCode));
+ break;
+ case to_underlying(Fields::kClusterId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, clusterId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Alarm.
+namespace ResetAllAlarms {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ResetAllAlarms.
+namespace GetAlarmResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAlarmCode)), alarmCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterId)), clusterId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeStamp)), timeStamp));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kAlarmCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, alarmCode));
+ break;
+ case to_underlying(Fields::kClusterId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, clusterId));
+ break;
+ case to_underlying(Fields::kTimeStamp):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeStamp));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetAlarmResponse.
+namespace GetAlarm {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetAlarm.
+namespace ResetAlarmLog {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ResetAlarmLog.
+} // namespace Commands
+} // namespace Alarms
+namespace Time {
+
+namespace Commands {
+} // namespace Commands
+} // namespace Time
+namespace BinaryInputBasic {
+
+namespace Commands {
+} // namespace Commands
+} // namespace BinaryInputBasic
+namespace PowerProfile {
+namespace PowerProfileRecord {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEnergyPhaseId)), energyPhaseId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileRemoteControl)), powerProfileRemoteControl));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileState)), powerProfileState));
+ 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::kPowerProfileId):
ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
break;
- case kEnergyPhaseIdFieldId:
+ case to_underlying(Fields::kEnergyPhaseId):
ReturnErrorOnFailure(DataModel::Decode(reader, energyPhaseId));
break;
- case kPowerProfileRemoteControlFieldId:
+ case to_underlying(Fields::kPowerProfileRemoteControl):
ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileRemoteControl));
break;
- case kPowerProfileStateFieldId:
+ case to_underlying(Fields::kPowerProfileState):
ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileState));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -149,32 +2456,35 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kEnergyPhaseIdFieldId), energyPhaseId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kScheduledTimeFieldId), scheduledTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEnergyPhaseId)), energyPhaseId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduledTime)), scheduledTime));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kEnergyPhaseIdFieldId:
+ case to_underlying(Fields::kEnergyPhaseId):
ReturnErrorOnFailure(DataModel::Decode(reader, energyPhaseId));
break;
- case kScheduledTimeFieldId:
+ case to_underlying(Fields::kScheduledTime):
ReturnErrorOnFailure(DataModel::Decode(reader, scheduledTime));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -186,178 +2496,2195 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kEnergyPhaseIdFieldId), energyPhaseId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMacroPhaseIdFieldId), macroPhaseId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kExpectedDurationFieldId), expectedDuration));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPeakPowerFieldId), peakPower));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kEnergyFieldId), energy));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMaxActivationDelayFieldId), maxActivationDelay));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEnergyPhaseId)), energyPhaseId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMacroPhaseId)), macroPhaseId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExpectedDuration)), expectedDuration));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPeakPower)), peakPower));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEnergy)), energy));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMaxActivationDelay)), maxActivationDelay));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kEnergyPhaseIdFieldId:
+ case to_underlying(Fields::kEnergyPhaseId):
ReturnErrorOnFailure(DataModel::Decode(reader, energyPhaseId));
break;
- case kMacroPhaseIdFieldId:
+ case to_underlying(Fields::kMacroPhaseId):
ReturnErrorOnFailure(DataModel::Decode(reader, macroPhaseId));
break;
- case kExpectedDurationFieldId:
+ case to_underlying(Fields::kExpectedDuration):
ReturnErrorOnFailure(DataModel::Decode(reader, expectedDuration));
break;
- case kPeakPowerFieldId:
+ case to_underlying(Fields::kPeakPower):
ReturnErrorOnFailure(DataModel::Decode(reader, peakPower));
break;
- case kEnergyFieldId:
+ case to_underlying(Fields::kEnergy):
ReturnErrorOnFailure(DataModel::Decode(reader, energy));
break;
- case kMaxActivationDelayFieldId:
+ case to_underlying(Fields::kMaxActivationDelay):
ReturnErrorOnFailure(DataModel::Decode(reader, maxActivationDelay));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace TransferredPhase
+
+namespace Commands {
+namespace PowerProfileRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfileRequest.
+namespace PowerProfileNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTotalProfileNum)), totalProfileNum));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumOfTransferredPhases)), numOfTransferredPhases));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransferredPhases)), transferredPhases));
+ 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::kTotalProfileNum):
+ ReturnErrorOnFailure(DataModel::Decode(reader, totalProfileNum));
+ break;
+ case to_underlying(Fields::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kNumOfTransferredPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numOfTransferredPhases));
+ break;
+ case to_underlying(Fields::kTransferredPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transferredPhases));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfileNotification.
+namespace PowerProfileStateRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfileStateRequest.
+namespace PowerProfileResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTotalProfileNum)), totalProfileNum));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumOfTransferredPhases)), numOfTransferredPhases));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransferredPhases)), transferredPhases));
+ 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::kTotalProfileNum):
+ ReturnErrorOnFailure(DataModel::Decode(reader, totalProfileNum));
+ break;
+ case to_underlying(Fields::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kNumOfTransferredPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numOfTransferredPhases));
+ break;
+ case to_underlying(Fields::kTransferredPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transferredPhases));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfileResponse.
+namespace GetPowerProfilePriceResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCurrency)), currency));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPrice)), price));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPriceTrailingDigit)), priceTrailingDigit));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kCurrency):
+ ReturnErrorOnFailure(DataModel::Decode(reader, currency));
+ break;
+ case to_underlying(Fields::kPrice):
+ ReturnErrorOnFailure(DataModel::Decode(reader, price));
+ break;
+ case to_underlying(Fields::kPriceTrailingDigit):
+ ReturnErrorOnFailure(DataModel::Decode(reader, priceTrailingDigit));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetPowerProfilePriceResponse.
+namespace PowerProfileStateResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileCount)), powerProfileCount));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileRecords)), powerProfileRecords));
+ 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::kPowerProfileCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileCount));
+ break;
+ case to_underlying(Fields::kPowerProfileRecords):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileRecords));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfileStateResponse.
+namespace GetOverallSchedulePriceResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCurrency)), currency));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPrice)), price));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPriceTrailingDigit)), priceTrailingDigit));
+ 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::kCurrency):
+ ReturnErrorOnFailure(DataModel::Decode(reader, currency));
+ break;
+ case to_underlying(Fields::kPrice):
+ ReturnErrorOnFailure(DataModel::Decode(reader, price));
+ break;
+ case to_underlying(Fields::kPriceTrailingDigit):
+ ReturnErrorOnFailure(DataModel::Decode(reader, priceTrailingDigit));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetOverallSchedulePriceResponse.
+namespace GetPowerProfilePrice {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetPowerProfilePrice.
+namespace EnergyPhasesScheduleNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumOfScheduledPhases)), numOfScheduledPhases));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduledPhases)), scheduledPhases));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kNumOfScheduledPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numOfScheduledPhases));
+ break;
+ case to_underlying(Fields::kScheduledPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduledPhases));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnergyPhasesScheduleNotification.
+namespace PowerProfilesStateNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileCount)), powerProfileCount));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileRecords)), powerProfileRecords));
+ 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::kPowerProfileCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileCount));
+ break;
+ case to_underlying(Fields::kPowerProfileRecords):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileRecords));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfilesStateNotification.
+namespace EnergyPhasesScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumOfScheduledPhases)), numOfScheduledPhases));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduledPhases)), scheduledPhases));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kNumOfScheduledPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numOfScheduledPhases));
+ break;
+ case to_underlying(Fields::kScheduledPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduledPhases));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnergyPhasesScheduleResponse.
+namespace GetOverallSchedulePrice {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetOverallSchedulePrice.
+namespace PowerProfileScheduleConstraintsRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfileScheduleConstraintsRequest.
+namespace EnergyPhasesScheduleRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnergyPhasesScheduleRequest.
+namespace EnergyPhasesScheduleStateRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnergyPhasesScheduleStateRequest.
+namespace EnergyPhasesScheduleStateResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumOfScheduledPhases)), numOfScheduledPhases));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduledPhases)), scheduledPhases));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kNumOfScheduledPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numOfScheduledPhases));
+ break;
+ case to_underlying(Fields::kScheduledPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduledPhases));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnergyPhasesScheduleStateResponse.
+namespace GetPowerProfilePriceExtendedResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCurrency)), currency));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPrice)), price));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPriceTrailingDigit)), priceTrailingDigit));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kCurrency):
+ ReturnErrorOnFailure(DataModel::Decode(reader, currency));
+ break;
+ case to_underlying(Fields::kPrice):
+ ReturnErrorOnFailure(DataModel::Decode(reader, price));
+ break;
+ case to_underlying(Fields::kPriceTrailingDigit):
+ ReturnErrorOnFailure(DataModel::Decode(reader, priceTrailingDigit));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetPowerProfilePriceExtendedResponse.
+namespace EnergyPhasesScheduleStateNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumOfScheduledPhases)), numOfScheduledPhases));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduledPhases)), scheduledPhases));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kNumOfScheduledPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numOfScheduledPhases));
+ break;
+ case to_underlying(Fields::kScheduledPhases):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduledPhases));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnergyPhasesScheduleStateNotification.
+namespace PowerProfileScheduleConstraintsNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartAfter)), startAfter));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStopBefore)), stopBefore));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kStartAfter):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startAfter));
+ break;
+ case to_underlying(Fields::kStopBefore):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stopBefore));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfileScheduleConstraintsNotification.
+namespace PowerProfileScheduleConstraintsResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartAfter)), startAfter));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStopBefore)), stopBefore));
+ 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::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kStartAfter):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startAfter));
+ break;
+ case to_underlying(Fields::kStopBefore):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stopBefore));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PowerProfileScheduleConstraintsResponse.
+namespace GetPowerProfilePriceExtended {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptions)), options));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileId)), powerProfileId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPowerProfileStartTime)), powerProfileStartTime));
+ 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::kOptions):
+ ReturnErrorOnFailure(DataModel::Decode(reader, options));
+ break;
+ case to_underlying(Fields::kPowerProfileId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileId));
+ break;
+ case to_underlying(Fields::kPowerProfileStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, powerProfileStartTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetPowerProfilePriceExtended.
+} // namespace Commands
} // namespace PowerProfile
-
namespace ApplianceControl {
-} // namespace ApplianceControl
+namespace Commands {
+namespace ExecutionOfACommand {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCommandId)), commandId));
+ 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::kCommandId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, commandId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ExecutionOfACommand.
+namespace SignalStateResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplianceStatus)), applianceStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRemoteEnableFlagsAndDeviceStatus2)),
+ remoteEnableFlagsAndDeviceStatus2));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplianceStatus2)), applianceStatus2));
+ 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::kApplianceStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, applianceStatus));
+ break;
+ case to_underlying(Fields::kRemoteEnableFlagsAndDeviceStatus2):
+ ReturnErrorOnFailure(DataModel::Decode(reader, remoteEnableFlagsAndDeviceStatus2));
+ break;
+ case to_underlying(Fields::kApplianceStatus2):
+ ReturnErrorOnFailure(DataModel::Decode(reader, applianceStatus2));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SignalStateResponse.
+namespace SignalState {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SignalState.
+namespace SignalStateNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplianceStatus)), applianceStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRemoteEnableFlagsAndDeviceStatus2)),
+ remoteEnableFlagsAndDeviceStatus2));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplianceStatus2)), applianceStatus2));
+ 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::kApplianceStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, applianceStatus));
+ break;
+ case to_underlying(Fields::kRemoteEnableFlagsAndDeviceStatus2):
+ ReturnErrorOnFailure(DataModel::Decode(reader, remoteEnableFlagsAndDeviceStatus2));
+ break;
+ case to_underlying(Fields::kApplianceStatus2):
+ ReturnErrorOnFailure(DataModel::Decode(reader, applianceStatus2));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SignalStateNotification.
+namespace WriteFunctions {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFunctionId)), functionId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFunctionDataType)), functionDataType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFunctionData)), functionData));
+ 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::kFunctionId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, functionId));
+ break;
+ case to_underlying(Fields::kFunctionDataType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, functionDataType));
+ break;
+ case to_underlying(Fields::kFunctionData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, functionData));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace WriteFunctions.
+namespace OverloadPauseResume {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OverloadPauseResume.
+namespace OverloadPause {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OverloadPause.
+namespace OverloadWarning {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWarningEvent)), warningEvent));
+ 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::kWarningEvent):
+ ReturnErrorOnFailure(DataModel::Decode(reader, warningEvent));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OverloadWarning.
+} // namespace Commands
+} // namespace ApplianceControl
namespace Descriptor {
namespace DeviceType {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kTypeFieldId), type));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kRevisionFieldId), revision));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRevision)), revision));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kTypeFieldId:
+ case to_underlying(Fields::kType):
ReturnErrorOnFailure(DataModel::Decode(reader, type));
break;
- case kRevisionFieldId:
+ case to_underlying(Fields::kRevision):
ReturnErrorOnFailure(DataModel::Decode(reader, revision));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace DeviceType
+
+namespace Commands {
+} // namespace Commands
} // namespace Descriptor
-
namespace PollControl {
+
+namespace Commands {
+namespace CheckIn {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CheckIn.
+namespace CheckInResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartFastPolling)), startFastPolling));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFastPollTimeout)), fastPollTimeout));
+ 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::kStartFastPolling):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startFastPolling));
+ break;
+ case to_underlying(Fields::kFastPollTimeout):
+ ReturnErrorOnFailure(DataModel::Decode(reader, fastPollTimeout));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CheckInResponse.
+namespace FastPollStop {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace FastPollStop.
+namespace SetLongPollInterval {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNewLongPollInterval)), newLongPollInterval));
+ 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::kNewLongPollInterval):
+ ReturnErrorOnFailure(DataModel::Decode(reader, newLongPollInterval));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetLongPollInterval.
+namespace SetShortPollInterval {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNewShortPollInterval)), newShortPollInterval));
+ 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::kNewShortPollInterval):
+ ReturnErrorOnFailure(DataModel::Decode(reader, newShortPollInterval));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetShortPollInterval.
+} // namespace Commands
} // namespace PollControl
-
namespace Basic {
+
+namespace Commands {
+namespace StartUp {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StartUp.
+namespace MfgSpecificPing {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MfgSpecificPing.
+namespace ShutDown {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ShutDown.
+namespace Leave {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Leave.
+} // namespace Commands
} // namespace Basic
-
namespace OtaSoftwareUpdateProvider {
+
+namespace Commands {
+namespace QueryImage {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorId)), vendorId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProductId)), productId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kHardwareVersion)), hardwareVersion));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSoftwareVersion)), softwareVersion));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProtocolsSupported)), protocolsSupported));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocation)), location));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRequestorCanConsent)), requestorCanConsent));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMetadataForProvider)), metadataForProvider));
+ 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::kVendorId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, vendorId));
+ break;
+ case to_underlying(Fields::kProductId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, productId));
+ break;
+ case to_underlying(Fields::kHardwareVersion):
+ ReturnErrorOnFailure(DataModel::Decode(reader, hardwareVersion));
+ break;
+ case to_underlying(Fields::kSoftwareVersion):
+ ReturnErrorOnFailure(DataModel::Decode(reader, softwareVersion));
+ break;
+ case to_underlying(Fields::kProtocolsSupported):
+ ReturnErrorOnFailure(DataModel::Decode(reader, protocolsSupported));
+ break;
+ case to_underlying(Fields::kLocation):
+ ReturnErrorOnFailure(DataModel::Decode(reader, location));
+ break;
+ case to_underlying(Fields::kRequestorCanConsent):
+ ReturnErrorOnFailure(DataModel::Decode(reader, requestorCanConsent));
+ break;
+ case to_underlying(Fields::kMetadataForProvider):
+ ReturnErrorOnFailure(DataModel::Decode(reader, metadataForProvider));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace QueryImage.
+namespace ApplyUpdateRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUpdateToken)), updateToken));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNewVersion)), newVersion));
+ 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::kUpdateToken):
+ ReturnErrorOnFailure(DataModel::Decode(reader, updateToken));
+ break;
+ case to_underlying(Fields::kNewVersion):
+ ReturnErrorOnFailure(DataModel::Decode(reader, newVersion));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ApplyUpdateRequest.
+namespace NotifyUpdateApplied {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUpdateToken)), updateToken));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSoftwareVersion)), softwareVersion));
+ 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::kUpdateToken):
+ ReturnErrorOnFailure(DataModel::Decode(reader, updateToken));
+ break;
+ case to_underlying(Fields::kSoftwareVersion):
+ ReturnErrorOnFailure(DataModel::Decode(reader, softwareVersion));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace NotifyUpdateApplied.
+namespace QueryImageResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDelayedActionTime)), delayedActionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kImageURI)), imageURI));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSoftwareVersion)), softwareVersion));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSoftwareVersionString)), softwareVersionString));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUpdateToken)), updateToken));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserConsentNeeded)), userConsentNeeded));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMetadataForRequestor)), metadataForRequestor));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kDelayedActionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, delayedActionTime));
+ break;
+ case to_underlying(Fields::kImageURI):
+ ReturnErrorOnFailure(DataModel::Decode(reader, imageURI));
+ break;
+ case to_underlying(Fields::kSoftwareVersion):
+ ReturnErrorOnFailure(DataModel::Decode(reader, softwareVersion));
+ break;
+ case to_underlying(Fields::kSoftwareVersionString):
+ ReturnErrorOnFailure(DataModel::Decode(reader, softwareVersionString));
+ break;
+ case to_underlying(Fields::kUpdateToken):
+ ReturnErrorOnFailure(DataModel::Decode(reader, updateToken));
+ break;
+ case to_underlying(Fields::kUserConsentNeeded):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userConsentNeeded));
+ break;
+ case to_underlying(Fields::kMetadataForRequestor):
+ ReturnErrorOnFailure(DataModel::Decode(reader, metadataForRequestor));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace QueryImageResponse.
+namespace ApplyUpdateRequestResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAction)), action));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDelayedActionTime)), delayedActionTime));
+ 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::kAction):
+ ReturnErrorOnFailure(DataModel::Decode(reader, action));
+ break;
+ case to_underlying(Fields::kDelayedActionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, delayedActionTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ApplyUpdateRequestResponse.
+} // namespace Commands
} // namespace OtaSoftwareUpdateProvider
-
namespace OtaSoftwareUpdateRequestor {
+
+namespace Commands {
+namespace AnnounceOtaProvider {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProviderLocation)), providerLocation));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorId)), vendorId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAnnouncementReason)), announcementReason));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMetadataForNode)), metadataForNode));
+ 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::kProviderLocation):
+ ReturnErrorOnFailure(DataModel::Decode(reader, providerLocation));
+ break;
+ case to_underlying(Fields::kVendorId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, vendorId));
+ break;
+ case to_underlying(Fields::kAnnouncementReason):
+ ReturnErrorOnFailure(DataModel::Decode(reader, announcementReason));
+ break;
+ case to_underlying(Fields::kMetadataForNode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, metadataForNode));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AnnounceOtaProvider.
+} // namespace Commands
} // namespace OtaSoftwareUpdateRequestor
-
namespace PowerSource {
-} // namespace PowerSource
+namespace Commands {
+} // namespace Commands
+} // namespace PowerSource
namespace GeneralCommissioning {
namespace BasicCommissioningInfoType {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFailSafeExpiryLengthMsFieldId), failSafeExpiryLengthMs));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFailSafeExpiryLengthMs)), failSafeExpiryLengthMs));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kFailSafeExpiryLengthMsFieldId:
+ case to_underlying(Fields::kFailSafeExpiryLengthMs):
ReturnErrorOnFailure(DataModel::Decode(reader, failSafeExpiryLengthMs));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace BasicCommissioningInfoType
-} // namespace GeneralCommissioning
-namespace NetworkCommissioning {
-namespace ThreadInterfaceScanResult {
+namespace Commands {
+namespace ArmFailSafe {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kDiscoveryResponseFieldId), discoveryResponse));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExpiryLengthSeconds)), expiryLengthSeconds));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kDiscoveryResponseFieldId:
+ case to_underlying(Fields::kExpiryLengthSeconds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, expiryLengthSeconds));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ArmFailSafe.
+namespace ArmFailSafeResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ArmFailSafeResponse.
+namespace SetRegulatoryConfig {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocation)), location));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCountryCode)), countryCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kLocation):
+ ReturnErrorOnFailure(DataModel::Decode(reader, location));
+ break;
+ case to_underlying(Fields::kCountryCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, countryCode));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetRegulatoryConfig.
+namespace SetRegulatoryConfigResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetRegulatoryConfigResponse.
+namespace CommissioningComplete {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CommissioningComplete.
+namespace CommissioningCompleteResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CommissioningCompleteResponse.
+} // namespace Commands
+} // namespace GeneralCommissioning
+namespace NetworkCommissioning {
+namespace ThreadInterfaceScanResult {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDiscoveryResponse)), discoveryResponse));
+ 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::kDiscoveryResponse):
ReturnErrorOnFailure(DataModel::Decode(reader, discoveryResponse));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -369,245 +4696,1096 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kSecurityFieldId), security));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kSsidFieldId), ssid));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kBssidFieldId), bssid));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kChannelFieldId), channel));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFrequencyBandFieldId), frequencyBand));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSecurity)), security));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSsid)), ssid));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBssid)), bssid));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChannel)), channel));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFrequencyBand)), frequencyBand));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kSecurityFieldId:
+ case to_underlying(Fields::kSecurity):
ReturnErrorOnFailure(DataModel::Decode(reader, security));
break;
- case kSsidFieldId:
+ case to_underlying(Fields::kSsid):
ReturnErrorOnFailure(DataModel::Decode(reader, ssid));
break;
- case kBssidFieldId:
+ case to_underlying(Fields::kBssid):
ReturnErrorOnFailure(DataModel::Decode(reader, bssid));
break;
- case kChannelFieldId:
+ case to_underlying(Fields::kChannel):
ReturnErrorOnFailure(DataModel::Decode(reader, channel));
break;
- case kFrequencyBandFieldId:
+ case to_underlying(Fields::kFrequencyBand):
ReturnErrorOnFailure(DataModel::Decode(reader, frequencyBand));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace WiFiInterfaceScanResult
+
+namespace Commands {
+namespace ScanNetworks {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSsid)), ssid));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kSsid):
+ ReturnErrorOnFailure(DataModel::Decode(reader, ssid));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ScanNetworks.
+namespace ScanNetworksResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWifiScanResults)), wifiScanResults));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kThreadScanResults)), threadScanResults));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ case to_underlying(Fields::kWifiScanResults):
+ ReturnErrorOnFailure(DataModel::Decode(reader, wifiScanResults));
+ break;
+ case to_underlying(Fields::kThreadScanResults):
+ ReturnErrorOnFailure(DataModel::Decode(reader, threadScanResults));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ScanNetworksResponse.
+namespace AddWiFiNetwork {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSsid)), ssid));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCredentials)), credentials));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kSsid):
+ ReturnErrorOnFailure(DataModel::Decode(reader, ssid));
+ break;
+ case to_underlying(Fields::kCredentials):
+ ReturnErrorOnFailure(DataModel::Decode(reader, credentials));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddWiFiNetwork.
+namespace AddWiFiNetworkResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddWiFiNetworkResponse.
+namespace UpdateWiFiNetwork {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSsid)), ssid));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCredentials)), credentials));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kSsid):
+ ReturnErrorOnFailure(DataModel::Decode(reader, ssid));
+ break;
+ case to_underlying(Fields::kCredentials):
+ ReturnErrorOnFailure(DataModel::Decode(reader, credentials));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UpdateWiFiNetwork.
+namespace UpdateWiFiNetworkResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UpdateWiFiNetworkResponse.
+namespace AddThreadNetwork {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOperationalDataset)), operationalDataset));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kOperationalDataset):
+ ReturnErrorOnFailure(DataModel::Decode(reader, operationalDataset));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddThreadNetwork.
+namespace AddThreadNetworkResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddThreadNetworkResponse.
+namespace UpdateThreadNetwork {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOperationalDataset)), operationalDataset));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kOperationalDataset):
+ ReturnErrorOnFailure(DataModel::Decode(reader, operationalDataset));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UpdateThreadNetwork.
+namespace UpdateThreadNetworkResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UpdateThreadNetworkResponse.
+namespace RemoveNetwork {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNetworkID)), networkID));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kNetworkID):
+ ReturnErrorOnFailure(DataModel::Decode(reader, networkID));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveNetwork.
+namespace RemoveNetworkResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveNetworkResponse.
+namespace EnableNetwork {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNetworkID)), networkID));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kNetworkID):
+ ReturnErrorOnFailure(DataModel::Decode(reader, networkID));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnableNetwork.
+namespace EnableNetworkResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnableNetworkResponse.
+namespace DisableNetwork {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNetworkID)), networkID));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBreadcrumb)), breadcrumb));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kNetworkID):
+ ReturnErrorOnFailure(DataModel::Decode(reader, networkID));
+ break;
+ case to_underlying(Fields::kBreadcrumb):
+ ReturnErrorOnFailure(DataModel::Decode(reader, breadcrumb));
+ break;
+ case to_underlying(Fields::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace DisableNetwork.
+namespace DisableNetworkResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorCode)), errorCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kErrorCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorCode));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace DisableNetworkResponse.
+namespace GetLastNetworkCommissioningResult {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutMs)), timeoutMs));
+ 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::kTimeoutMs):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutMs));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetLastNetworkCommissioningResult.
+} // namespace Commands
} // namespace NetworkCommissioning
-
namespace DiagnosticLogs {
-} // namespace DiagnosticLogs
+namespace Commands {
+namespace RetrieveLogsRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIntent)), intent));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRequestedProtocol)), requestedProtocol));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransferFileDesignator)), transferFileDesignator));
+ 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::kIntent):
+ ReturnErrorOnFailure(DataModel::Decode(reader, intent));
+ break;
+ case to_underlying(Fields::kRequestedProtocol):
+ ReturnErrorOnFailure(DataModel::Decode(reader, requestedProtocol));
+ break;
+ case to_underlying(Fields::kTransferFileDesignator):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transferFileDesignator));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RetrieveLogsRequest.
+namespace RetrieveLogsResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kContent)), content));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeStamp)), timeStamp));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeSinceBoot)), timeSinceBoot));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kContent):
+ ReturnErrorOnFailure(DataModel::Decode(reader, content));
+ break;
+ case to_underlying(Fields::kTimeStamp):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeStamp));
+ break;
+ case to_underlying(Fields::kTimeSinceBoot):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeSinceBoot));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RetrieveLogsResponse.
+} // namespace Commands
+} // namespace DiagnosticLogs
namespace GeneralDiagnostics {
namespace NetworkInterfaceType {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNameFieldId), name));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFabricConnectedFieldId), fabricConnected));
- ReturnErrorOnFailure(
- DataModel::Encode(writer, TLV::ContextTag(kOffPremiseServicesReachableIPv4FieldId), offPremiseServicesReachableIPv4));
- ReturnErrorOnFailure(
- DataModel::Encode(writer, TLV::ContextTag(kOffPremiseServicesReachableIPv6FieldId), offPremiseServicesReachableIPv6));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kHardwareAddressFieldId), hardwareAddress));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kTypeFieldId), type));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricConnected)), fabricConnected));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOffPremiseServicesReachableIPv4)),
+ offPremiseServicesReachableIPv4));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOffPremiseServicesReachableIPv6)),
+ offPremiseServicesReachableIPv6));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kHardwareAddress)), hardwareAddress));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kNameFieldId:
+ case to_underlying(Fields::kName):
ReturnErrorOnFailure(DataModel::Decode(reader, name));
break;
- case kFabricConnectedFieldId:
+ case to_underlying(Fields::kFabricConnected):
ReturnErrorOnFailure(DataModel::Decode(reader, fabricConnected));
break;
- case kOffPremiseServicesReachableIPv4FieldId:
+ case to_underlying(Fields::kOffPremiseServicesReachableIPv4):
ReturnErrorOnFailure(DataModel::Decode(reader, offPremiseServicesReachableIPv4));
break;
- case kOffPremiseServicesReachableIPv6FieldId:
+ case to_underlying(Fields::kOffPremiseServicesReachableIPv6):
ReturnErrorOnFailure(DataModel::Decode(reader, offPremiseServicesReachableIPv6));
break;
- case kHardwareAddressFieldId:
+ case to_underlying(Fields::kHardwareAddress):
ReturnErrorOnFailure(DataModel::Decode(reader, hardwareAddress));
break;
- case kTypeFieldId:
+ case to_underlying(Fields::kType):
ReturnErrorOnFailure(DataModel::Decode(reader, type));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace NetworkInterfaceType
-} // namespace GeneralDiagnostics
+namespace Commands {
+} // namespace Commands
+} // namespace GeneralDiagnostics
namespace SoftwareDiagnostics {
namespace ThreadMetrics {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kIdFieldId), id));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNameFieldId), name));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kStackFreeCurrentFieldId), stackFreeCurrent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kStackFreeMinimumFieldId), stackFreeMinimum));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kStackSizeFieldId), stackSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kId)), id));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStackFreeCurrent)), stackFreeCurrent));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStackFreeMinimum)), stackFreeMinimum));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStackSize)), stackSize));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kIdFieldId:
+ case to_underlying(Fields::kId):
ReturnErrorOnFailure(DataModel::Decode(reader, id));
break;
- case kNameFieldId:
+ case to_underlying(Fields::kName):
ReturnErrorOnFailure(DataModel::Decode(reader, name));
break;
- case kStackFreeCurrentFieldId:
+ case to_underlying(Fields::kStackFreeCurrent):
ReturnErrorOnFailure(DataModel::Decode(reader, stackFreeCurrent));
break;
- case kStackFreeMinimumFieldId:
+ case to_underlying(Fields::kStackFreeMinimum):
ReturnErrorOnFailure(DataModel::Decode(reader, stackFreeMinimum));
break;
- case kStackSizeFieldId:
+ case to_underlying(Fields::kStackSize):
ReturnErrorOnFailure(DataModel::Decode(reader, stackSize));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace ThreadMetrics
-} // namespace SoftwareDiagnostics
-namespace ThreadNetworkDiagnostics {
-namespace NeighborTable {
+namespace Commands {
+namespace ResetWatermarks {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kExtAddressFieldId), extAddress));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAgeFieldId), age));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kRloc16FieldId), rloc16));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLinkFrameCounterFieldId), linkFrameCounter));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMleFrameCounterFieldId), mleFrameCounter));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLqiFieldId), lqi));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAverageRssiFieldId), averageRssi));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLastRssiFieldId), lastRssi));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFrameErrorRateFieldId), frameErrorRate));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMessageErrorRateFieldId), messageErrorRate));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kRxOnWhenIdleFieldId), rxOnWhenIdle));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFullThreadDeviceFieldId), fullThreadDevice));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFullNetworkDataFieldId), fullNetworkData));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kIsChildFieldId), isChild));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kExtAddressFieldId:
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ResetWatermarks.
+} // namespace Commands
+} // namespace SoftwareDiagnostics
+namespace ThreadNetworkDiagnostics {
+namespace NeighborTable {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExtAddress)), extAddress));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAge)), age));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRloc16)), rloc16));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLinkFrameCounter)), linkFrameCounter));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMleFrameCounter)), mleFrameCounter));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLqi)), lqi));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAverageRssi)), averageRssi));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLastRssi)), lastRssi));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFrameErrorRate)), frameErrorRate));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageErrorRate)), messageErrorRate));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRxOnWhenIdle)), rxOnWhenIdle));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFullThreadDevice)), fullThreadDevice));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFullNetworkData)), fullNetworkData));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIsChild)), isChild));
+ 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::kExtAddress):
ReturnErrorOnFailure(DataModel::Decode(reader, extAddress));
break;
- case kAgeFieldId:
+ case to_underlying(Fields::kAge):
ReturnErrorOnFailure(DataModel::Decode(reader, age));
break;
- case kRloc16FieldId:
+ case to_underlying(Fields::kRloc16):
ReturnErrorOnFailure(DataModel::Decode(reader, rloc16));
break;
- case kLinkFrameCounterFieldId:
+ case to_underlying(Fields::kLinkFrameCounter):
ReturnErrorOnFailure(DataModel::Decode(reader, linkFrameCounter));
break;
- case kMleFrameCounterFieldId:
+ case to_underlying(Fields::kMleFrameCounter):
ReturnErrorOnFailure(DataModel::Decode(reader, mleFrameCounter));
break;
- case kLqiFieldId:
+ case to_underlying(Fields::kLqi):
ReturnErrorOnFailure(DataModel::Decode(reader, lqi));
break;
- case kAverageRssiFieldId:
+ case to_underlying(Fields::kAverageRssi):
ReturnErrorOnFailure(DataModel::Decode(reader, averageRssi));
break;
- case kLastRssiFieldId:
+ case to_underlying(Fields::kLastRssi):
ReturnErrorOnFailure(DataModel::Decode(reader, lastRssi));
break;
- case kFrameErrorRateFieldId:
+ case to_underlying(Fields::kFrameErrorRate):
ReturnErrorOnFailure(DataModel::Decode(reader, frameErrorRate));
break;
- case kMessageErrorRateFieldId:
+ case to_underlying(Fields::kMessageErrorRate):
ReturnErrorOnFailure(DataModel::Decode(reader, messageErrorRate));
break;
- case kRxOnWhenIdleFieldId:
+ case to_underlying(Fields::kRxOnWhenIdle):
ReturnErrorOnFailure(DataModel::Decode(reader, rxOnWhenIdle));
break;
- case kFullThreadDeviceFieldId:
+ case to_underlying(Fields::kFullThreadDevice):
ReturnErrorOnFailure(DataModel::Decode(reader, fullThreadDevice));
break;
- case kFullNetworkDataFieldId:
+ case to_underlying(Fields::kFullNetworkData):
ReturnErrorOnFailure(DataModel::Decode(reader, fullNetworkData));
break;
- case kIsChildFieldId:
+ case to_underlying(Fields::kIsChild):
ReturnErrorOnFailure(DataModel::Decode(reader, isChild));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -619,72 +5797,82 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kActiveTimestampPresentFieldId), activeTimestampPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPendingTimestampPresentFieldId), pendingTimestampPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMasterKeyPresentFieldId), masterKeyPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNetworkNamePresentFieldId), networkNamePresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kExtendedPanIdPresentFieldId), extendedPanIdPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMeshLocalPrefixPresentFieldId), meshLocalPrefixPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kDelayPresentFieldId), delayPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPanIdPresentFieldId), panIdPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kChannelPresentFieldId), channelPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPskcPresentFieldId), pskcPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kSecurityPolicyPresentFieldId), securityPolicyPresent));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kChannelMaskPresentFieldId), channelMaskPresent));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActiveTimestampPresent)), activeTimestampPresent));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPendingTimestampPresent)), pendingTimestampPresent));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMasterKeyPresent)), masterKeyPresent));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNetworkNamePresent)), networkNamePresent));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExtendedPanIdPresent)), extendedPanIdPresent));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMeshLocalPrefixPresent)), meshLocalPrefixPresent));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDelayPresent)), delayPresent));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPanIdPresent)), panIdPresent));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChannelPresent)), channelPresent));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPskcPresent)), pskcPresent));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSecurityPolicyPresent)), securityPolicyPresent));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChannelMaskPresent)), channelMaskPresent));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kActiveTimestampPresentFieldId:
+ case to_underlying(Fields::kActiveTimestampPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, activeTimestampPresent));
break;
- case kPendingTimestampPresentFieldId:
+ case to_underlying(Fields::kPendingTimestampPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, pendingTimestampPresent));
break;
- case kMasterKeyPresentFieldId:
+ case to_underlying(Fields::kMasterKeyPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, masterKeyPresent));
break;
- case kNetworkNamePresentFieldId:
+ case to_underlying(Fields::kNetworkNamePresent):
ReturnErrorOnFailure(DataModel::Decode(reader, networkNamePresent));
break;
- case kExtendedPanIdPresentFieldId:
+ case to_underlying(Fields::kExtendedPanIdPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, extendedPanIdPresent));
break;
- case kMeshLocalPrefixPresentFieldId:
+ case to_underlying(Fields::kMeshLocalPrefixPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, meshLocalPrefixPresent));
break;
- case kDelayPresentFieldId:
+ case to_underlying(Fields::kDelayPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, delayPresent));
break;
- case kPanIdPresentFieldId:
+ case to_underlying(Fields::kPanIdPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, panIdPresent));
break;
- case kChannelPresentFieldId:
+ case to_underlying(Fields::kChannelPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, channelPresent));
break;
- case kPskcPresentFieldId:
+ case to_underlying(Fields::kPskcPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, pskcPresent));
break;
- case kSecurityPolicyPresentFieldId:
+ case to_underlying(Fields::kSecurityPolicyPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, securityPolicyPresent));
break;
- case kChannelMaskPresentFieldId:
+ case to_underlying(Fields::kChannelMaskPresent):
ReturnErrorOnFailure(DataModel::Decode(reader, channelMaskPresent));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -696,64 +5884,67 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kExtAddressFieldId), extAddress));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kRloc16FieldId), rloc16));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kRouterIdFieldId), routerId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNextHopFieldId), nextHop));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPathCostFieldId), pathCost));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLQIInFieldId), lQIIn));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLQIOutFieldId), lQIOut));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAgeFieldId), age));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAllocatedFieldId), allocated));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLinkEstablishedFieldId), linkEstablished));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExtAddress)), extAddress));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRloc16)), rloc16));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRouterId)), routerId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNextHop)), nextHop));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPathCost)), pathCost));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLQIIn)), lQIIn));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLQIOut)), lQIOut));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAge)), age));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAllocated)), allocated));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLinkEstablished)), linkEstablished));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kExtAddressFieldId:
+ case to_underlying(Fields::kExtAddress):
ReturnErrorOnFailure(DataModel::Decode(reader, extAddress));
break;
- case kRloc16FieldId:
+ case to_underlying(Fields::kRloc16):
ReturnErrorOnFailure(DataModel::Decode(reader, rloc16));
break;
- case kRouterIdFieldId:
+ case to_underlying(Fields::kRouterId):
ReturnErrorOnFailure(DataModel::Decode(reader, routerId));
break;
- case kNextHopFieldId:
+ case to_underlying(Fields::kNextHop):
ReturnErrorOnFailure(DataModel::Decode(reader, nextHop));
break;
- case kPathCostFieldId:
+ case to_underlying(Fields::kPathCost):
ReturnErrorOnFailure(DataModel::Decode(reader, pathCost));
break;
- case kLQIInFieldId:
+ case to_underlying(Fields::kLQIIn):
ReturnErrorOnFailure(DataModel::Decode(reader, lQIIn));
break;
- case kLQIOutFieldId:
+ case to_underlying(Fields::kLQIOut):
ReturnErrorOnFailure(DataModel::Decode(reader, lQIOut));
break;
- case kAgeFieldId:
+ case to_underlying(Fields::kAge):
ReturnErrorOnFailure(DataModel::Decode(reader, age));
break;
- case kAllocatedFieldId:
+ case to_underlying(Fields::kAllocated):
ReturnErrorOnFailure(DataModel::Decode(reader, allocated));
break;
- case kLinkEstablishedFieldId:
+ case to_underlying(Fields::kLinkEstablished):
ReturnErrorOnFailure(DataModel::Decode(reader, linkEstablished));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -765,103 +5956,461 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kRotationTimeFieldId), rotationTime));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFlagsFieldId), flags));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRotationTime)), rotationTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFlags)), flags));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kRotationTimeFieldId:
+ case to_underlying(Fields::kRotationTime):
ReturnErrorOnFailure(DataModel::Decode(reader, rotationTime));
break;
- case kFlagsFieldId:
+ case to_underlying(Fields::kFlags):
ReturnErrorOnFailure(DataModel::Decode(reader, flags));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace SecurityPolicy
-} // namespace ThreadNetworkDiagnostics
-namespace WiFiNetworkDiagnostics {
-} // namespace WiFiNetworkDiagnostics
-
-namespace EthernetNetworkDiagnostics {
-} // namespace EthernetNetworkDiagnostics
-
-namespace BridgedDeviceBasic {
-} // namespace BridgedDeviceBasic
-
-namespace Switch {
-} // namespace Switch
-
-namespace AdministratorCommissioning {
-} // namespace AdministratorCommissioning
-
-namespace OperationalCredentials {
-namespace FabricDescriptor {
+namespace Commands {
+namespace ResetCounts {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFabricIndexFieldId), fabricIndex));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kRootPublicKeyFieldId), rootPublicKey));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kVendorIdFieldId), vendorId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFabricIdFieldId), fabricId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNodeIdFieldId), nodeId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLabelFieldId), label));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kFabricIndexFieldId:
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ResetCounts.
+} // namespace Commands
+} // namespace ThreadNetworkDiagnostics
+namespace WiFiNetworkDiagnostics {
+
+namespace Commands {
+namespace ResetCounts {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ResetCounts.
+} // namespace Commands
+} // namespace WiFiNetworkDiagnostics
+namespace EthernetNetworkDiagnostics {
+
+namespace Commands {
+namespace ResetCounts {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ResetCounts.
+} // namespace Commands
+} // namespace EthernetNetworkDiagnostics
+namespace BridgedDeviceBasic {
+
+namespace Commands {
+namespace StartUp {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StartUp.
+namespace ShutDown {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ShutDown.
+namespace Leave {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Leave.
+namespace ReachableChanged {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ReachableChanged.
+} // namespace Commands
+} // namespace BridgedDeviceBasic
+namespace Switch {
+
+namespace Commands {
+} // namespace Commands
+} // namespace Switch
+namespace AdministratorCommissioning {
+
+namespace Commands {
+namespace OpenCommissioningWindow {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCommissioningTimeout)), commissioningTimeout));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPAKEVerifier)), pAKEVerifier));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDiscriminator)), discriminator));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIterations)), iterations));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSalt)), salt));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPasscodeID)), passcodeID));
+ 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::kCommissioningTimeout):
+ ReturnErrorOnFailure(DataModel::Decode(reader, commissioningTimeout));
+ break;
+ case to_underlying(Fields::kPAKEVerifier):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pAKEVerifier));
+ break;
+ case to_underlying(Fields::kDiscriminator):
+ ReturnErrorOnFailure(DataModel::Decode(reader, discriminator));
+ break;
+ case to_underlying(Fields::kIterations):
+ ReturnErrorOnFailure(DataModel::Decode(reader, iterations));
+ break;
+ case to_underlying(Fields::kSalt):
+ ReturnErrorOnFailure(DataModel::Decode(reader, salt));
+ break;
+ case to_underlying(Fields::kPasscodeID):
+ ReturnErrorOnFailure(DataModel::Decode(reader, passcodeID));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OpenCommissioningWindow.
+namespace OpenBasicCommissioningWindow {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCommissioningTimeout)), commissioningTimeout));
+ 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::kCommissioningTimeout):
+ ReturnErrorOnFailure(DataModel::Decode(reader, commissioningTimeout));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OpenBasicCommissioningWindow.
+namespace RevokeCommissioning {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RevokeCommissioning.
+} // namespace Commands
+} // namespace AdministratorCommissioning
+namespace OperationalCredentials {
+namespace FabricDescriptor {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRootPublicKey)), rootPublicKey));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorId)), vendorId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricId)), fabricId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNodeId)), nodeId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label));
+ 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::kFabricIndex):
ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex));
break;
- case kRootPublicKeyFieldId:
+ case to_underlying(Fields::kRootPublicKey):
ReturnErrorOnFailure(DataModel::Decode(reader, rootPublicKey));
break;
- case kVendorIdFieldId:
+ case to_underlying(Fields::kVendorId):
ReturnErrorOnFailure(DataModel::Decode(reader, vendorId));
break;
- case kFabricIdFieldId:
+ case to_underlying(Fields::kFabricId):
ReturnErrorOnFailure(DataModel::Decode(reader, fabricId));
break;
- case kNodeIdFieldId:
+ case to_underlying(Fields::kNodeId):
ReturnErrorOnFailure(DataModel::Decode(reader, nodeId));
break;
- case kLabelFieldId:
+ case to_underlying(Fields::kLabel):
ReturnErrorOnFailure(DataModel::Decode(reader, label));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -873,317 +6422,5782 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFabricIndexFieldId), fabricIndex));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNocFieldId), noc));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNoc)), noc));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kFabricIndexFieldId:
+ case to_underlying(Fields::kFabricIndex):
ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex));
break;
- case kNocFieldId:
+ case to_underlying(Fields::kNoc):
ReturnErrorOnFailure(DataModel::Decode(reader, noc));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace NOCStruct
-} // namespace OperationalCredentials
+namespace Commands {
+namespace AttestationRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttestationNonce)), attestationNonce));
+ 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::kAttestationNonce):
+ ReturnErrorOnFailure(DataModel::Decode(reader, attestationNonce));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AttestationRequest.
+namespace AttestationResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttestationElements)), attestationElements));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSignature)), signature));
+ 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::kAttestationElements):
+ ReturnErrorOnFailure(DataModel::Decode(reader, attestationElements));
+ break;
+ case to_underlying(Fields::kSignature):
+ ReturnErrorOnFailure(DataModel::Decode(reader, signature));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AttestationResponse.
+namespace CertificateChainRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCertificateType)), certificateType));
+ 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::kCertificateType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, certificateType));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CertificateChainRequest.
+namespace CertificateChainResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCertificate)), certificate));
+ 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::kCertificate):
+ ReturnErrorOnFailure(DataModel::Decode(reader, certificate));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CertificateChainResponse.
+namespace OpCSRRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCSRNonce)), cSRNonce));
+ 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::kCSRNonce):
+ ReturnErrorOnFailure(DataModel::Decode(reader, cSRNonce));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OpCSRRequest.
+namespace OpCSRResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNOCSRElements)), nOCSRElements));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttestationSignature)), attestationSignature));
+ 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::kNOCSRElements):
+ ReturnErrorOnFailure(DataModel::Decode(reader, nOCSRElements));
+ break;
+ case to_underlying(Fields::kAttestationSignature):
+ ReturnErrorOnFailure(DataModel::Decode(reader, attestationSignature));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OpCSRResponse.
+namespace AddNOC {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNOCValue)), nOCValue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICACValue)), iCACValue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIPKValue)), iPKValue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCaseAdminNode)), caseAdminNode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminVendorId)), adminVendorId));
+ 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::kNOCValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, nOCValue));
+ break;
+ case to_underlying(Fields::kICACValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, iCACValue));
+ break;
+ case to_underlying(Fields::kIPKValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, iPKValue));
+ break;
+ case to_underlying(Fields::kCaseAdminNode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, caseAdminNode));
+ break;
+ case to_underlying(Fields::kAdminVendorId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, adminVendorId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddNOC.
+namespace UpdateNOC {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNOCValue)), nOCValue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICACValue)), iCACValue));
+ 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::kNOCValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, nOCValue));
+ break;
+ case to_underlying(Fields::kICACValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, iCACValue));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UpdateNOC.
+namespace NOCResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatusCode)), statusCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDebugText)), debugText));
+ 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::kStatusCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, statusCode));
+ break;
+ case to_underlying(Fields::kFabricIndex):
+ ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex));
+ break;
+ case to_underlying(Fields::kDebugText):
+ ReturnErrorOnFailure(DataModel::Decode(reader, debugText));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace NOCResponse.
+namespace UpdateFabricLabel {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t 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(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;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UpdateFabricLabel.
+namespace RemoveFabric {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex));
+ 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::kFabricIndex):
+ ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveFabric.
+namespace AddTrustedRootCertificate {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRootCertificate)), rootCertificate));
+ 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::kRootCertificate):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rootCertificate));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AddTrustedRootCertificate.
+namespace RemoveTrustedRootCertificate {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTrustedRootIdentifier)), trustedRootIdentifier));
+ 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::kTrustedRootIdentifier):
+ ReturnErrorOnFailure(DataModel::Decode(reader, trustedRootIdentifier));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RemoveTrustedRootCertificate.
+} // namespace Commands
+} // namespace OperationalCredentials
namespace FixedLabel {
namespace LabelStruct {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLabelFieldId), label));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kValueFieldId), value));
+ 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_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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kLabelFieldId:
+ case to_underlying(Fields::kLabel):
ReturnErrorOnFailure(DataModel::Decode(reader, label));
break;
- case kValueFieldId:
+ 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 Commands {
+} // namespace Commands
} // namespace FixedLabel
-
namespace ShadeConfiguration {
+
+namespace Commands {
+} // namespace Commands
} // namespace ShadeConfiguration
-
namespace DoorLock {
+
+namespace Commands {
+namespace LockDoor {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ 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::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LockDoor.
+namespace LockDoorResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LockDoorResponse.
+namespace UnlockDoor {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ 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::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UnlockDoor.
+namespace UnlockDoorResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UnlockDoorResponse.
+namespace Toggle {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ 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::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Toggle.
+namespace ToggleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ToggleResponse.
+namespace UnlockWithTimeout {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeoutInSeconds)), timeoutInSeconds));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ 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::kTimeoutInSeconds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeoutInSeconds));
+ break;
+ case to_underlying(Fields::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UnlockWithTimeout.
+namespace UnlockWithTimeoutResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UnlockWithTimeoutResponse.
+namespace GetLogRecord {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogIndex)), logIndex));
+ 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::kLogIndex):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logIndex));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetLogRecord.
+namespace GetLogRecordResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogEntryId)), logEntryId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimestamp)), timestamp));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEventType)), eventType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSource)), source));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEventIdOrAlarmCode)), eventIdOrAlarmCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ 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::kLogEntryId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logEntryId));
+ break;
+ case to_underlying(Fields::kTimestamp):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timestamp));
+ break;
+ case to_underlying(Fields::kEventType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, eventType));
+ break;
+ case to_underlying(Fields::kSource):
+ ReturnErrorOnFailure(DataModel::Decode(reader, source));
+ break;
+ case to_underlying(Fields::kEventIdOrAlarmCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, eventIdOrAlarmCode));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetLogRecordResponse.
+namespace SetPin {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserStatus)), userStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserType)), userType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kUserStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userStatus));
+ break;
+ case to_underlying(Fields::kUserType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userType));
+ break;
+ case to_underlying(Fields::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetPin.
+namespace SetPinResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetPinResponse.
+namespace GetPin {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetPin.
+namespace GetPinResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserStatus)), userStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserType)), userType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kUserStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userStatus));
+ break;
+ case to_underlying(Fields::kUserType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userType));
+ break;
+ case to_underlying(Fields::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetPinResponse.
+namespace ClearPin {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearPin.
+namespace ClearPinResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearPinResponse.
+namespace ClearAllPins {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearAllPins.
+namespace ClearAllPinsResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearAllPinsResponse.
+namespace SetUserStatus {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserStatus)), userStatus));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kUserStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetUserStatus.
+namespace SetUserStatusResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetUserStatusResponse.
+namespace GetUserStatus {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetUserStatus.
+namespace GetUserStatusResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetUserStatusResponse.
+namespace SetWeekdaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDaysMask)), daysMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartHour)), startHour));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartMinute)), startMinute));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndHour)), endHour));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndMinute)), endMinute));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kDaysMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, daysMask));
+ break;
+ case to_underlying(Fields::kStartHour):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startHour));
+ break;
+ case to_underlying(Fields::kStartMinute):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startMinute));
+ break;
+ case to_underlying(Fields::kEndHour):
+ ReturnErrorOnFailure(DataModel::Decode(reader, endHour));
+ break;
+ case to_underlying(Fields::kEndMinute):
+ ReturnErrorOnFailure(DataModel::Decode(reader, endMinute));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetWeekdaySchedule.
+namespace SetWeekdayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetWeekdayScheduleResponse.
+namespace GetWeekdaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetWeekdaySchedule.
+namespace GetWeekdayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDaysMask)), daysMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartHour)), startHour));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartMinute)), startMinute));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndHour)), endHour));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndMinute)), endMinute));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kDaysMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, daysMask));
+ break;
+ case to_underlying(Fields::kStartHour):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startHour));
+ break;
+ case to_underlying(Fields::kStartMinute):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startMinute));
+ break;
+ case to_underlying(Fields::kEndHour):
+ ReturnErrorOnFailure(DataModel::Decode(reader, endHour));
+ break;
+ case to_underlying(Fields::kEndMinute):
+ ReturnErrorOnFailure(DataModel::Decode(reader, endMinute));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetWeekdayScheduleResponse.
+namespace ClearWeekdaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearWeekdaySchedule.
+namespace ClearWeekdayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearWeekdayScheduleResponse.
+namespace SetYeardaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalStartTime)), localStartTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalEndTime)), localEndTime));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kLocalStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localStartTime));
+ break;
+ case to_underlying(Fields::kLocalEndTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localEndTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetYeardaySchedule.
+namespace SetYeardayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetYeardayScheduleResponse.
+namespace GetYeardaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetYeardaySchedule.
+namespace GetYeardayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalStartTime)), localStartTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalEndTime)), localEndTime));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kLocalStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localStartTime));
+ break;
+ case to_underlying(Fields::kLocalEndTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localEndTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetYeardayScheduleResponse.
+namespace ClearYeardaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearYeardaySchedule.
+namespace ClearYeardayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearYeardayScheduleResponse.
+namespace SetHolidaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalStartTime)), localStartTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalEndTime)), localEndTime));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOperatingModeDuringHoliday)), operatingModeDuringHoliday));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kLocalStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localStartTime));
+ break;
+ case to_underlying(Fields::kLocalEndTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localEndTime));
+ break;
+ case to_underlying(Fields::kOperatingModeDuringHoliday):
+ ReturnErrorOnFailure(DataModel::Decode(reader, operatingModeDuringHoliday));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetHolidaySchedule.
+namespace SetHolidayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetHolidayScheduleResponse.
+namespace GetHolidaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetHolidaySchedule.
+namespace GetHolidayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalStartTime)), localStartTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalEndTime)), localEndTime));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOperatingModeDuringHoliday)), operatingModeDuringHoliday));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ case to_underlying(Fields::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kLocalStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localStartTime));
+ break;
+ case to_underlying(Fields::kLocalEndTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localEndTime));
+ break;
+ case to_underlying(Fields::kOperatingModeDuringHoliday):
+ ReturnErrorOnFailure(DataModel::Decode(reader, operatingModeDuringHoliday));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetHolidayScheduleResponse.
+namespace ClearHolidaySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kScheduleId)), scheduleId));
+ 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::kScheduleId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, scheduleId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearHolidaySchedule.
+namespace ClearHolidayScheduleResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearHolidayScheduleResponse.
+namespace SetUserType {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserType)), userType));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kUserType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userType));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetUserType.
+namespace SetUserTypeResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetUserTypeResponse.
+namespace GetUserType {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetUserType.
+namespace GetUserTypeResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserType)), userType));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kUserType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userType));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetUserTypeResponse.
+namespace SetRfid {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserStatus)), userStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserType)), userType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kId)), id));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kUserStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userStatus));
+ break;
+ case to_underlying(Fields::kUserType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userType));
+ break;
+ case to_underlying(Fields::kId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, id));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetRfid.
+namespace SetRfidResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetRfidResponse.
+namespace GetRfid {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetRfid.
+namespace GetRfidResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserStatus)), userStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserType)), userType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRfid)), rfid));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kUserStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userStatus));
+ break;
+ case to_underlying(Fields::kUserType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userType));
+ break;
+ case to_underlying(Fields::kRfid):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rfid));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetRfidResponse.
+namespace ClearRfid {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ 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::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearRfid.
+namespace ClearRfidResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearRfidResponse.
+namespace ClearAllRfids {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearAllRfids.
+namespace ClearAllRfidsResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearAllRfidsResponse.
+namespace OperationEventNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSource)), source));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEventCode)), eventCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeStamp)), timeStamp));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ 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::kSource):
+ ReturnErrorOnFailure(DataModel::Decode(reader, source));
+ break;
+ case to_underlying(Fields::kEventCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, eventCode));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ case to_underlying(Fields::kTimeStamp):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeStamp));
+ break;
+ case to_underlying(Fields::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace OperationEventNotification.
+namespace ProgrammingEventNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSource)), source));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEventCode)), eventCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserId)), userId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPin)), pin));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserType)), userType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserStatus)), userStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeStamp)), timeStamp));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ 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::kSource):
+ ReturnErrorOnFailure(DataModel::Decode(reader, source));
+ break;
+ case to_underlying(Fields::kEventCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, eventCode));
+ break;
+ case to_underlying(Fields::kUserId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userId));
+ break;
+ case to_underlying(Fields::kPin):
+ ReturnErrorOnFailure(DataModel::Decode(reader, pin));
+ break;
+ case to_underlying(Fields::kUserType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userType));
+ break;
+ case to_underlying(Fields::kUserStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, userStatus));
+ break;
+ case to_underlying(Fields::kTimeStamp):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeStamp));
+ break;
+ case to_underlying(Fields::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ProgrammingEventNotification.
+} // namespace Commands
} // namespace DoorLock
-
namespace WindowCovering {
+
+namespace Commands {
+namespace UpOrOpen {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace UpOrOpen.
+namespace DownOrClose {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace DownOrClose.
+namespace StopMotion {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StopMotion.
+namespace GoToLiftValue {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLiftValue)), liftValue));
+ 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::kLiftValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, liftValue));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GoToLiftValue.
+namespace GoToLiftPercentage {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLiftPercentageValue)), liftPercentageValue));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLiftPercent100thsValue)), liftPercent100thsValue));
+ 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::kLiftPercentageValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, liftPercentageValue));
+ break;
+ case to_underlying(Fields::kLiftPercent100thsValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, liftPercent100thsValue));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GoToLiftPercentage.
+namespace GoToTiltValue {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTiltValue)), tiltValue));
+ 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::kTiltValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, tiltValue));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GoToTiltValue.
+namespace GoToTiltPercentage {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTiltPercentageValue)), tiltPercentageValue));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTiltPercent100thsValue)), tiltPercent100thsValue));
+ 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::kTiltPercentageValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, tiltPercentageValue));
+ break;
+ case to_underlying(Fields::kTiltPercent100thsValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, tiltPercent100thsValue));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GoToTiltPercentage.
+} // namespace Commands
} // namespace WindowCovering
-
namespace BarrierControl {
+
+namespace Commands {
+namespace BarrierControlGoToPercent {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPercentOpen)), percentOpen));
+ 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::kPercentOpen):
+ ReturnErrorOnFailure(DataModel::Decode(reader, percentOpen));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace BarrierControlGoToPercent.
+namespace BarrierControlStop {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace BarrierControlStop.
+} // namespace Commands
} // namespace BarrierControl
-
namespace PumpConfigurationAndControl {
+
+namespace Commands {
+} // namespace Commands
} // namespace PumpConfigurationAndControl
-
namespace Thermostat {
+
+namespace Commands {
+namespace SetpointRaiseLower {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMode)), mode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAmount)), amount));
+ 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::kMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mode));
+ break;
+ case to_underlying(Fields::kAmount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, amount));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetpointRaiseLower.
+namespace CurrentWeeklySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumberOfTransitionsForSequence)),
+ numberOfTransitionsForSequence));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDayOfWeekForSequence)), dayOfWeekForSequence));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kModeForSequence)), modeForSequence));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPayload)), payload));
+ 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::kNumberOfTransitionsForSequence):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numberOfTransitionsForSequence));
+ break;
+ case to_underlying(Fields::kDayOfWeekForSequence):
+ ReturnErrorOnFailure(DataModel::Decode(reader, dayOfWeekForSequence));
+ break;
+ case to_underlying(Fields::kModeForSequence):
+ ReturnErrorOnFailure(DataModel::Decode(reader, modeForSequence));
+ break;
+ case to_underlying(Fields::kPayload):
+ ReturnErrorOnFailure(DataModel::Decode(reader, payload));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CurrentWeeklySchedule.
+namespace SetWeeklySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumberOfTransitionsForSequence)),
+ numberOfTransitionsForSequence));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDayOfWeekForSequence)), dayOfWeekForSequence));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kModeForSequence)), modeForSequence));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPayload)), payload));
+ 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::kNumberOfTransitionsForSequence):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numberOfTransitionsForSequence));
+ break;
+ case to_underlying(Fields::kDayOfWeekForSequence):
+ ReturnErrorOnFailure(DataModel::Decode(reader, dayOfWeekForSequence));
+ break;
+ case to_underlying(Fields::kModeForSequence):
+ ReturnErrorOnFailure(DataModel::Decode(reader, modeForSequence));
+ break;
+ case to_underlying(Fields::kPayload):
+ ReturnErrorOnFailure(DataModel::Decode(reader, payload));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetWeeklySchedule.
+namespace RelayStatusLog {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeOfDay)), timeOfDay));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRelayStatus)), relayStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLocalTemperature)), localTemperature));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kHumidityInPercentage)), humidityInPercentage));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSetpoint)), setpoint));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUnreadEntries)), unreadEntries));
+ 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::kTimeOfDay):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeOfDay));
+ break;
+ case to_underlying(Fields::kRelayStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, relayStatus));
+ break;
+ case to_underlying(Fields::kLocalTemperature):
+ ReturnErrorOnFailure(DataModel::Decode(reader, localTemperature));
+ break;
+ case to_underlying(Fields::kHumidityInPercentage):
+ ReturnErrorOnFailure(DataModel::Decode(reader, humidityInPercentage));
+ break;
+ case to_underlying(Fields::kSetpoint):
+ ReturnErrorOnFailure(DataModel::Decode(reader, setpoint));
+ break;
+ case to_underlying(Fields::kUnreadEntries):
+ ReturnErrorOnFailure(DataModel::Decode(reader, unreadEntries));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RelayStatusLog.
+namespace GetWeeklySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDaysToReturn)), daysToReturn));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kModeToReturn)), modeToReturn));
+ 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::kDaysToReturn):
+ ReturnErrorOnFailure(DataModel::Decode(reader, daysToReturn));
+ break;
+ case to_underlying(Fields::kModeToReturn):
+ ReturnErrorOnFailure(DataModel::Decode(reader, modeToReturn));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetWeeklySchedule.
+namespace ClearWeeklySchedule {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ClearWeeklySchedule.
+namespace GetRelayStatusLog {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetRelayStatusLog.
+} // namespace Commands
} // namespace Thermostat
-
namespace FanControl {
+
+namespace Commands {
+} // namespace Commands
} // namespace FanControl
-
namespace DehumidificationControl {
+
+namespace Commands {
+} // namespace Commands
} // namespace DehumidificationControl
-
namespace ThermostatUserInterfaceConfiguration {
+
+namespace Commands {
+} // namespace Commands
} // namespace ThermostatUserInterfaceConfiguration
-
namespace ColorControl {
+
+namespace Commands {
+namespace MoveToHue {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kHue)), hue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDirection)), direction));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kHue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, hue));
+ break;
+ case to_underlying(Fields::kDirection):
+ ReturnErrorOnFailure(DataModel::Decode(reader, direction));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveToHue.
+namespace MoveHue {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kMoveMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, moveMode));
+ break;
+ case to_underlying(Fields::kRate):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rate));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveHue.
+namespace StepHue {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kStepMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepMode));
+ break;
+ case to_underlying(Fields::kStepSize):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepSize));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StepHue.
+namespace MoveToSaturation {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSaturation)), saturation));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kSaturation):
+ ReturnErrorOnFailure(DataModel::Decode(reader, saturation));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveToSaturation.
+namespace MoveSaturation {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kMoveMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, moveMode));
+ break;
+ case to_underlying(Fields::kRate):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rate));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveSaturation.
+namespace StepSaturation {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kStepMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepMode));
+ break;
+ case to_underlying(Fields::kStepSize):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepSize));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StepSaturation.
+namespace MoveToHueAndSaturation {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kHue)), hue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSaturation)), saturation));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kHue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, hue));
+ break;
+ case to_underlying(Fields::kSaturation):
+ ReturnErrorOnFailure(DataModel::Decode(reader, saturation));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveToHueAndSaturation.
+namespace MoveToColor {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorX)), colorX));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorY)), colorY));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kColorX):
+ ReturnErrorOnFailure(DataModel::Decode(reader, colorX));
+ break;
+ case to_underlying(Fields::kColorY):
+ ReturnErrorOnFailure(DataModel::Decode(reader, colorY));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveToColor.
+namespace MoveColor {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRateX)), rateX));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRateY)), rateY));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kRateX):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rateX));
+ break;
+ case to_underlying(Fields::kRateY):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rateY));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveColor.
+namespace StepColor {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepX)), stepX));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepY)), stepY));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kStepX):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepX));
+ break;
+ case to_underlying(Fields::kStepY):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepY));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StepColor.
+namespace MoveToColorTemperature {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorTemperature)), colorTemperature));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kColorTemperature):
+ ReturnErrorOnFailure(DataModel::Decode(reader, colorTemperature));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveToColorTemperature.
+namespace EnhancedMoveToHue {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEnhancedHue)), enhancedHue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDirection)), direction));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kEnhancedHue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, enhancedHue));
+ break;
+ case to_underlying(Fields::kDirection):
+ ReturnErrorOnFailure(DataModel::Decode(reader, direction));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnhancedMoveToHue.
+namespace EnhancedMoveHue {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kMoveMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, moveMode));
+ break;
+ case to_underlying(Fields::kRate):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rate));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnhancedMoveHue.
+namespace EnhancedStepHue {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kStepMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepMode));
+ break;
+ case to_underlying(Fields::kStepSize):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepSize));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnhancedStepHue.
+namespace EnhancedMoveToHueAndSaturation {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEnhancedHue)), enhancedHue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSaturation)), saturation));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kEnhancedHue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, enhancedHue));
+ break;
+ case to_underlying(Fields::kSaturation):
+ ReturnErrorOnFailure(DataModel::Decode(reader, saturation));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EnhancedMoveToHueAndSaturation.
+namespace ColorLoopSet {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUpdateFlags)), updateFlags));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAction)), action));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDirection)), direction));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTime)), time));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartHue)), startHue));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kUpdateFlags):
+ ReturnErrorOnFailure(DataModel::Decode(reader, updateFlags));
+ break;
+ case to_underlying(Fields::kAction):
+ ReturnErrorOnFailure(DataModel::Decode(reader, action));
+ break;
+ case to_underlying(Fields::kDirection):
+ ReturnErrorOnFailure(DataModel::Decode(reader, direction));
+ break;
+ case to_underlying(Fields::kTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, time));
+ break;
+ case to_underlying(Fields::kStartHue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startHue));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ColorLoopSet.
+namespace StopMoveStep {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StopMoveStep.
+namespace MoveColorTemperature {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorTemperatureMinimum)), colorTemperatureMinimum));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorTemperatureMaximum)), colorTemperatureMaximum));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kMoveMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, moveMode));
+ break;
+ case to_underlying(Fields::kRate):
+ ReturnErrorOnFailure(DataModel::Decode(reader, rate));
+ break;
+ case to_underlying(Fields::kColorTemperatureMinimum):
+ ReturnErrorOnFailure(DataModel::Decode(reader, colorTemperatureMinimum));
+ break;
+ case to_underlying(Fields::kColorTemperatureMaximum):
+ ReturnErrorOnFailure(DataModel::Decode(reader, colorTemperatureMaximum));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MoveColorTemperature.
+namespace StepColorTemperature {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorTemperatureMinimum)), colorTemperatureMinimum));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorTemperatureMaximum)), colorTemperatureMaximum));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride));
+ 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::kStepMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepMode));
+ break;
+ case to_underlying(Fields::kStepSize):
+ ReturnErrorOnFailure(DataModel::Decode(reader, stepSize));
+ break;
+ case to_underlying(Fields::kTransitionTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime));
+ break;
+ case to_underlying(Fields::kColorTemperatureMinimum):
+ ReturnErrorOnFailure(DataModel::Decode(reader, colorTemperatureMinimum));
+ break;
+ case to_underlying(Fields::kColorTemperatureMaximum):
+ ReturnErrorOnFailure(DataModel::Decode(reader, colorTemperatureMaximum));
+ break;
+ case to_underlying(Fields::kOptionsMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask));
+ break;
+ case to_underlying(Fields::kOptionsOverride):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StepColorTemperature.
+} // namespace Commands
} // namespace ColorControl
-
namespace BallastConfiguration {
+
+namespace Commands {
+} // namespace Commands
} // namespace BallastConfiguration
-
namespace IlluminanceMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace IlluminanceMeasurement
-
namespace IlluminanceLevelSensing {
+
+namespace Commands {
+} // namespace Commands
} // namespace IlluminanceLevelSensing
-
namespace TemperatureMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace TemperatureMeasurement
-
namespace PressureMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace PressureMeasurement
-
namespace FlowMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace FlowMeasurement
-
namespace RelativeHumidityMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace RelativeHumidityMeasurement
-
namespace OccupancySensing {
+
+namespace Commands {
+} // namespace Commands
} // namespace OccupancySensing
-
namespace CarbonMonoxideConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace CarbonMonoxideConcentrationMeasurement
-
namespace CarbonDioxideConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace CarbonDioxideConcentrationMeasurement
-
namespace EthyleneConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace EthyleneConcentrationMeasurement
-
namespace EthyleneOxideConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace EthyleneOxideConcentrationMeasurement
-
namespace HydrogenConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace HydrogenConcentrationMeasurement
-
namespace HydrogenSulphideConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace HydrogenSulphideConcentrationMeasurement
-
namespace NitricOxideConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace NitricOxideConcentrationMeasurement
-
namespace NitrogenDioxideConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace NitrogenDioxideConcentrationMeasurement
-
namespace OxygenConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace OxygenConcentrationMeasurement
-
namespace OzoneConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace OzoneConcentrationMeasurement
-
namespace SulfurDioxideConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace SulfurDioxideConcentrationMeasurement
-
namespace DissolvedOxygenConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace DissolvedOxygenConcentrationMeasurement
-
namespace BromateConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace BromateConcentrationMeasurement
-
namespace ChloraminesConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace ChloraminesConcentrationMeasurement
-
namespace ChlorineConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace ChlorineConcentrationMeasurement
-
namespace FecalColiformAndEColiConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace FecalColiformAndEColiConcentrationMeasurement
-
namespace FluorideConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace FluorideConcentrationMeasurement
-
namespace HaloaceticAcidsConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace HaloaceticAcidsConcentrationMeasurement
-
namespace TotalTrihalomethanesConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace TotalTrihalomethanesConcentrationMeasurement
-
namespace TotalColiformBacteriaConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace TotalColiformBacteriaConcentrationMeasurement
-
namespace TurbidityConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace TurbidityConcentrationMeasurement
-
namespace CopperConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace CopperConcentrationMeasurement
-
namespace LeadConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace LeadConcentrationMeasurement
-
namespace ManganeseConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace ManganeseConcentrationMeasurement
-
namespace SulfateConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace SulfateConcentrationMeasurement
-
namespace BromodichloromethaneConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace BromodichloromethaneConcentrationMeasurement
-
namespace BromoformConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace BromoformConcentrationMeasurement
-
namespace ChlorodibromomethaneConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace ChlorodibromomethaneConcentrationMeasurement
-
namespace ChloroformConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace ChloroformConcentrationMeasurement
-
namespace SodiumConcentrationMeasurement {
+
+namespace Commands {
+} // namespace Commands
} // namespace SodiumConcentrationMeasurement
-
namespace IasZone {
-} // namespace IasZone
+namespace Commands {
+namespace ZoneEnrollResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEnrollResponseCode)), enrollResponseCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneId)), zoneId));
+ 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::kEnrollResponseCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, enrollResponseCode));
+ break;
+ case to_underlying(Fields::kZoneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ZoneEnrollResponse.
+namespace ZoneStatusChangeNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneStatus)), zoneStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExtendedStatus)), extendedStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneId)), zoneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDelay)), delay));
+ 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::kZoneStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneStatus));
+ break;
+ case to_underlying(Fields::kExtendedStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, extendedStatus));
+ break;
+ case to_underlying(Fields::kZoneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneId));
+ break;
+ case to_underlying(Fields::kDelay):
+ ReturnErrorOnFailure(DataModel::Decode(reader, delay));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ZoneStatusChangeNotification.
+namespace InitiateNormalOperationMode {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace InitiateNormalOperationMode.
+namespace ZoneEnrollRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneType)), zoneType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kManufacturerCode)), manufacturerCode));
+ 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::kZoneType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneType));
+ break;
+ case to_underlying(Fields::kManufacturerCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, manufacturerCode));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ZoneEnrollRequest.
+namespace InitiateTestMode {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTestModeDuration)), testModeDuration));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCurrentZoneSensitivityLevel)),
+ currentZoneSensitivityLevel));
+ 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::kTestModeDuration):
+ ReturnErrorOnFailure(DataModel::Decode(reader, testModeDuration));
+ break;
+ case to_underlying(Fields::kCurrentZoneSensitivityLevel):
+ ReturnErrorOnFailure(DataModel::Decode(reader, currentZoneSensitivityLevel));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace InitiateTestMode.
+namespace InitiateNormalOperationModeResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace InitiateNormalOperationModeResponse.
+namespace InitiateTestModeResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace InitiateTestModeResponse.
+} // namespace Commands
+} // namespace IasZone
namespace IasAce {
namespace IasAceZoneStatusResult {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kZoneIdFieldId), zoneId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kZoneStatusFieldId), zoneStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneId)), zoneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneStatus)), zoneStatus));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kZoneIdFieldId:
+ case to_underlying(Fields::kZoneId):
ReturnErrorOnFailure(DataModel::Decode(reader, zoneId));
break;
- case kZoneStatusFieldId:
+ case to_underlying(Fields::kZoneStatus):
ReturnErrorOnFailure(DataModel::Decode(reader, zoneStatus));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace IasAceZoneStatusResult
-} // namespace IasAce
-namespace IasWd {
-} // namespace IasWd
-
-namespace WakeOnLan {
-} // namespace WakeOnLan
-
-namespace TvChannel {
-namespace TvChannelInfo {
+namespace Commands {
+namespace Arm {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMajorNumberFieldId), majorNumber));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMinorNumberFieldId), minorNumber));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNameFieldId), name));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kCallSignFieldId), callSign));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAffiliateCallSignFieldId), affiliateCallSign));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArmMode)), armMode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArmDisarmCode)), armDisarmCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneId)), zoneId));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kMajorNumberFieldId:
+ case to_underlying(Fields::kArmMode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, armMode));
+ break;
+ case to_underlying(Fields::kArmDisarmCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, armDisarmCode));
+ break;
+ case to_underlying(Fields::kZoneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Arm.
+namespace ArmResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArmNotification)), armNotification));
+ 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::kArmNotification):
+ ReturnErrorOnFailure(DataModel::Decode(reader, armNotification));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ArmResponse.
+namespace Bypass {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumberOfZones)), numberOfZones));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneIds)), zoneIds));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArmDisarmCode)), armDisarmCode));
+ 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::kNumberOfZones):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numberOfZones));
+ break;
+ case to_underlying(Fields::kZoneIds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneIds));
+ break;
+ case to_underlying(Fields::kArmDisarmCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, armDisarmCode));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Bypass.
+namespace GetZoneIdMapResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection0)), section0));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection1)), section1));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection2)), section2));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection3)), section3));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection4)), section4));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection5)), section5));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection6)), section6));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection7)), section7));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection8)), section8));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection9)), section9));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection10)), section10));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection11)), section11));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection12)), section12));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection13)), section13));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection14)), section14));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSection15)), section15));
+ 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::kSection0):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section0));
+ break;
+ case to_underlying(Fields::kSection1):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section1));
+ break;
+ case to_underlying(Fields::kSection2):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section2));
+ break;
+ case to_underlying(Fields::kSection3):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section3));
+ break;
+ case to_underlying(Fields::kSection4):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section4));
+ break;
+ case to_underlying(Fields::kSection5):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section5));
+ break;
+ case to_underlying(Fields::kSection6):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section6));
+ break;
+ case to_underlying(Fields::kSection7):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section7));
+ break;
+ case to_underlying(Fields::kSection8):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section8));
+ break;
+ case to_underlying(Fields::kSection9):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section9));
+ break;
+ case to_underlying(Fields::kSection10):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section10));
+ break;
+ case to_underlying(Fields::kSection11):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section11));
+ break;
+ case to_underlying(Fields::kSection12):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section12));
+ break;
+ case to_underlying(Fields::kSection13):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section13));
+ break;
+ case to_underlying(Fields::kSection14):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section14));
+ break;
+ case to_underlying(Fields::kSection15):
+ ReturnErrorOnFailure(DataModel::Decode(reader, section15));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetZoneIdMapResponse.
+namespace Emergency {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Emergency.
+namespace GetZoneInformationResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneId)), zoneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneType)), zoneType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIeeeAddress)), ieeeAddress));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneLabel)), zoneLabel));
+ 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::kZoneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneId));
+ break;
+ case to_underlying(Fields::kZoneType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneType));
+ break;
+ case to_underlying(Fields::kIeeeAddress):
+ ReturnErrorOnFailure(DataModel::Decode(reader, ieeeAddress));
+ break;
+ case to_underlying(Fields::kZoneLabel):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneLabel));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetZoneInformationResponse.
+namespace Fire {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Fire.
+namespace ZoneStatusChanged {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneId)), zoneId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneStatus)), zoneStatus));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAudibleNotification)), audibleNotification));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneLabel)), zoneLabel));
+ 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::kZoneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneId));
+ break;
+ case to_underlying(Fields::kZoneStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneStatus));
+ break;
+ case to_underlying(Fields::kAudibleNotification):
+ ReturnErrorOnFailure(DataModel::Decode(reader, audibleNotification));
+ break;
+ case to_underlying(Fields::kZoneLabel):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneLabel));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ZoneStatusChanged.
+namespace Panic {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Panic.
+namespace PanelStatusChanged {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPanelStatus)), panelStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSecondsRemaining)), secondsRemaining));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAudibleNotification)), audibleNotification));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAlarmStatus)), alarmStatus));
+ 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::kPanelStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, panelStatus));
+ break;
+ case to_underlying(Fields::kSecondsRemaining):
+ ReturnErrorOnFailure(DataModel::Decode(reader, secondsRemaining));
+ break;
+ case to_underlying(Fields::kAudibleNotification):
+ ReturnErrorOnFailure(DataModel::Decode(reader, audibleNotification));
+ break;
+ case to_underlying(Fields::kAlarmStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, alarmStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace PanelStatusChanged.
+namespace GetZoneIdMap {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetZoneIdMap.
+namespace GetPanelStatusResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPanelStatus)), panelStatus));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSecondsRemaining)), secondsRemaining));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAudibleNotification)), audibleNotification));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAlarmStatus)), alarmStatus));
+ 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::kPanelStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, panelStatus));
+ break;
+ case to_underlying(Fields::kSecondsRemaining):
+ ReturnErrorOnFailure(DataModel::Decode(reader, secondsRemaining));
+ break;
+ case to_underlying(Fields::kAudibleNotification):
+ ReturnErrorOnFailure(DataModel::Decode(reader, audibleNotification));
+ break;
+ case to_underlying(Fields::kAlarmStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, alarmStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetPanelStatusResponse.
+namespace GetZoneInformation {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneId)), zoneId));
+ 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::kZoneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetZoneInformation.
+namespace SetBypassedZoneList {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumberOfZones)), numberOfZones));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneIds)), zoneIds));
+ 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::kNumberOfZones):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numberOfZones));
+ break;
+ case to_underlying(Fields::kZoneIds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneIds));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SetBypassedZoneList.
+namespace GetPanelStatus {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetPanelStatus.
+namespace BypassResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumberOfZones)), numberOfZones));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBypassResult)), bypassResult));
+ 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::kNumberOfZones):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numberOfZones));
+ break;
+ case to_underlying(Fields::kBypassResult):
+ ReturnErrorOnFailure(DataModel::Decode(reader, bypassResult));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace BypassResponse.
+namespace GetBypassedZoneList {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetBypassedZoneList.
+namespace GetZoneStatusResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneStatusComplete)), zoneStatusComplete));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumberOfZones)), numberOfZones));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneStatusResult)), zoneStatusResult));
+ 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::kZoneStatusComplete):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneStatusComplete));
+ break;
+ case to_underlying(Fields::kNumberOfZones):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numberOfZones));
+ break;
+ case to_underlying(Fields::kZoneStatusResult):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneStatusResult));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetZoneStatusResponse.
+namespace GetZoneStatus {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartingZoneId)), startingZoneId));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMaxNumberOfZoneIds)), maxNumberOfZoneIds));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneStatusMaskFlag)), zoneStatusMaskFlag));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kZoneStatusMask)), zoneStatusMask));
+ 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::kStartingZoneId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startingZoneId));
+ break;
+ case to_underlying(Fields::kMaxNumberOfZoneIds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, maxNumberOfZoneIds));
+ break;
+ case to_underlying(Fields::kZoneStatusMaskFlag):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneStatusMaskFlag));
+ break;
+ case to_underlying(Fields::kZoneStatusMask):
+ ReturnErrorOnFailure(DataModel::Decode(reader, zoneStatusMask));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetZoneStatus.
+} // namespace Commands
+} // namespace IasAce
+namespace IasWd {
+
+namespace Commands {
+namespace StartWarning {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWarningInfo)), warningInfo));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWarningDuration)), warningDuration));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStrobeDutyCycle)), strobeDutyCycle));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStrobeLevel)), strobeLevel));
+ 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::kWarningInfo):
+ ReturnErrorOnFailure(DataModel::Decode(reader, warningInfo));
+ break;
+ case to_underlying(Fields::kWarningDuration):
+ ReturnErrorOnFailure(DataModel::Decode(reader, warningDuration));
+ break;
+ case to_underlying(Fields::kStrobeDutyCycle):
+ ReturnErrorOnFailure(DataModel::Decode(reader, strobeDutyCycle));
+ break;
+ case to_underlying(Fields::kStrobeLevel):
+ ReturnErrorOnFailure(DataModel::Decode(reader, strobeLevel));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StartWarning.
+namespace Squawk {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSquawkInfo)), squawkInfo));
+ 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::kSquawkInfo):
+ ReturnErrorOnFailure(DataModel::Decode(reader, squawkInfo));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Squawk.
+} // namespace Commands
+} // namespace IasWd
+namespace WakeOnLan {
+
+namespace Commands {
+} // namespace Commands
+} // namespace WakeOnLan
+namespace TvChannel {
+namespace TvChannelInfo {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMajorNumber)), majorNumber));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMinorNumber)), minorNumber));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCallSign)), callSign));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAffiliateCallSign)), affiliateCallSign));
+ 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::kMajorNumber):
ReturnErrorOnFailure(DataModel::Decode(reader, majorNumber));
break;
- case kMinorNumberFieldId:
+ case to_underlying(Fields::kMinorNumber):
ReturnErrorOnFailure(DataModel::Decode(reader, minorNumber));
break;
- case kNameFieldId:
+ case to_underlying(Fields::kName):
ReturnErrorOnFailure(DataModel::Decode(reader, name));
break;
- case kCallSignFieldId:
+ case to_underlying(Fields::kCallSign):
ReturnErrorOnFailure(DataModel::Decode(reader, callSign));
break;
- case kAffiliateCallSignFieldId:
+ case to_underlying(Fields::kAffiliateCallSign):
ReturnErrorOnFailure(DataModel::Decode(reader, affiliateCallSign));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1195,214 +12209,1455 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kOperatorNameFieldId), operatorName));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLineupNameFieldId), lineupName));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPostalCodeFieldId), postalCode));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLineupInfoTypeFieldId), lineupInfoType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOperatorName)), operatorName));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLineupName)), lineupName));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPostalCode)), postalCode));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLineupInfoType)), lineupInfoType));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kOperatorNameFieldId:
+ case to_underlying(Fields::kOperatorName):
ReturnErrorOnFailure(DataModel::Decode(reader, operatorName));
break;
- case kLineupNameFieldId:
+ case to_underlying(Fields::kLineupName):
ReturnErrorOnFailure(DataModel::Decode(reader, lineupName));
break;
- case kPostalCodeFieldId:
+ case to_underlying(Fields::kPostalCode):
ReturnErrorOnFailure(DataModel::Decode(reader, postalCode));
break;
- case kLineupInfoTypeFieldId:
+ case to_underlying(Fields::kLineupInfoType):
ReturnErrorOnFailure(DataModel::Decode(reader, lineupInfoType));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace TvChannelLineupInfo
-} // namespace TvChannel
+namespace Commands {
+namespace ChangeChannel {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMatch)), match));
+ 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::kMatch):
+ ReturnErrorOnFailure(DataModel::Decode(reader, match));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ChangeChannel.
+namespace ChangeChannelResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChannelMatch)), channelMatch));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kErrorType)), errorType));
+ 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::kChannelMatch):
+ ReturnErrorOnFailure(DataModel::Decode(reader, channelMatch));
+ break;
+ case to_underlying(Fields::kErrorType):
+ ReturnErrorOnFailure(DataModel::Decode(reader, errorType));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ChangeChannelResponse.
+namespace ChangeChannelByNumber {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMajorNumber)), majorNumber));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMinorNumber)), minorNumber));
+ 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::kMajorNumber):
+ ReturnErrorOnFailure(DataModel::Decode(reader, majorNumber));
+ break;
+ case to_underlying(Fields::kMinorNumber):
+ ReturnErrorOnFailure(DataModel::Decode(reader, minorNumber));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ChangeChannelByNumber.
+namespace SkipChannel {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCount)), count));
+ 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::kCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, count));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SkipChannel.
+} // namespace Commands
+} // namespace TvChannel
namespace TargetNavigator {
namespace NavigateTargetTargetInfo {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kIdentifierFieldId), identifier));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNameFieldId), name));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIdentifier)), identifier));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kIdentifierFieldId:
+ case to_underlying(Fields::kIdentifier):
ReturnErrorOnFailure(DataModel::Decode(reader, identifier));
break;
- case kNameFieldId:
+ case to_underlying(Fields::kName):
ReturnErrorOnFailure(DataModel::Decode(reader, name));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace NavigateTargetTargetInfo
-} // namespace TargetNavigator
+namespace Commands {
+namespace NavigateTarget {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTarget)), target));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ 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::kTarget):
+ ReturnErrorOnFailure(DataModel::Decode(reader, target));
+ break;
+ case to_underlying(Fields::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace NavigateTarget.
+namespace NavigateTargetResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace NavigateTargetResponse.
+} // namespace Commands
+} // namespace TargetNavigator
namespace MediaPlayback {
namespace MediaPlaybackPosition {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kUpdatedAtFieldId), updatedAt));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kPositionFieldId), position));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUpdatedAt)), updatedAt));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPosition)), position));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kUpdatedAtFieldId:
+ case to_underlying(Fields::kUpdatedAt):
ReturnErrorOnFailure(DataModel::Decode(reader, updatedAt));
break;
- case kPositionFieldId:
+ case to_underlying(Fields::kPosition):
ReturnErrorOnFailure(DataModel::Decode(reader, position));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace MediaPlaybackPosition
-} // namespace MediaPlayback
+namespace Commands {
+namespace MediaPlay {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaPlay.
+namespace MediaPlayResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaPlayResponse.
+namespace MediaPause {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaPause.
+namespace MediaPauseResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaPauseResponse.
+namespace MediaStop {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaStop.
+namespace MediaStopResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaStopResponse.
+namespace MediaStartOver {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaStartOver.
+namespace MediaStartOverResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaStartOverResponse.
+namespace MediaPrevious {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaPrevious.
+namespace MediaPreviousResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaPreviousResponse.
+namespace MediaNext {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaNext.
+namespace MediaNextResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaNextResponse.
+namespace MediaRewind {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaRewind.
+namespace MediaRewindResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaRewindResponse.
+namespace MediaFastForward {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaFastForward.
+namespace MediaFastForwardResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaFastForwardResponse.
+namespace MediaSkipForward {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDeltaPositionMilliseconds)), deltaPositionMilliseconds));
+ 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::kDeltaPositionMilliseconds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, deltaPositionMilliseconds));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaSkipForward.
+namespace MediaSkipForwardResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaSkipForwardResponse.
+namespace MediaSkipBackward {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDeltaPositionMilliseconds)), deltaPositionMilliseconds));
+ 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::kDeltaPositionMilliseconds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, deltaPositionMilliseconds));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaSkipBackward.
+namespace MediaSkipBackwardResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaSkipBackwardResponse.
+namespace MediaSeek {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPosition)), position));
+ 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::kPosition):
+ ReturnErrorOnFailure(DataModel::Decode(reader, position));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaSeek.
+namespace MediaSeekResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMediaPlaybackStatus)), mediaPlaybackStatus));
+ 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::kMediaPlaybackStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, mediaPlaybackStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MediaSeekResponse.
+} // namespace Commands
+} // namespace MediaPlayback
namespace MediaInput {
namespace MediaInputInfo {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kIndexFieldId), index));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kInputTypeFieldId), inputType));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNameFieldId), name));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kDescriptionFieldId), description));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIndex)), index));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInputType)), inputType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDescription)), description));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kIndexFieldId:
+ case to_underlying(Fields::kIndex):
ReturnErrorOnFailure(DataModel::Decode(reader, index));
break;
- case kInputTypeFieldId:
+ case to_underlying(Fields::kInputType):
ReturnErrorOnFailure(DataModel::Decode(reader, inputType));
break;
- case kNameFieldId:
+ case to_underlying(Fields::kName):
ReturnErrorOnFailure(DataModel::Decode(reader, name));
break;
- case kDescriptionFieldId:
+ case to_underlying(Fields::kDescription):
ReturnErrorOnFailure(DataModel::Decode(reader, description));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace MediaInputInfo
-} // namespace MediaInput
-namespace LowPower {
-} // namespace LowPower
-
-namespace KeypadInput {
-} // namespace KeypadInput
-
-namespace ContentLauncher {
-namespace ContentLaunchAdditionalInfo {
+namespace Commands {
+namespace SelectInput {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNameFieldId), name));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kValueFieldId), value));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIndex)), index));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kNameFieldId:
+ case to_underlying(Fields::kIndex):
+ ReturnErrorOnFailure(DataModel::Decode(reader, index));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SelectInput.
+namespace ShowInputStatus {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ShowInputStatus.
+namespace HideInputStatus {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace HideInputStatus.
+namespace RenameInput {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIndex)), index));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
+ 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::kIndex):
+ ReturnErrorOnFailure(DataModel::Decode(reader, index));
+ break;
+ case to_underlying(Fields::kName):
ReturnErrorOnFailure(DataModel::Decode(reader, name));
break;
- case kValueFieldId:
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RenameInput.
+} // namespace Commands
+} // namespace MediaInput
+namespace LowPower {
+
+namespace Commands {
+namespace Sleep {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Sleep.
+} // namespace Commands
+} // namespace LowPower
+namespace KeypadInput {
+
+namespace Commands {
+namespace SendKey {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kKeyCode)), keyCode));
+ 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::kKeyCode):
+ ReturnErrorOnFailure(DataModel::Decode(reader, keyCode));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SendKey.
+namespace SendKeyResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SendKeyResponse.
+} // namespace Commands
+} // namespace KeypadInput
+namespace ContentLauncher {
+namespace ContentLaunchAdditionalInfo {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
+ 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::kName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, name));
+ 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;
@@ -1414,36 +13669,39 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kTypeFieldId), type));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kValueFieldId), value));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kExternalIDListFieldId), externalIDList));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExternalIDList)), externalIDList));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kTypeFieldId:
+ case to_underlying(Fields::kType):
ReturnErrorOnFailure(DataModel::Decode(reader, type));
break;
- case kValueFieldId:
+ case to_underlying(Fields::kValue):
ReturnErrorOnFailure(DataModel::Decode(reader, value));
break;
- case kExternalIDListFieldId:
+ case to_underlying(Fields::kExternalIDList):
ReturnErrorOnFailure(DataModel::Decode(reader, externalIDList));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1455,48 +13713,51 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kProviderNameFieldId), providerName));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kBackgroundFieldId), background));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kLogoFieldId), logo));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kProgressBarFieldId), progressBar));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kSplashFieldId), splash));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kWaterMarkFieldId), waterMark));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProviderName)), providerName));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBackground)), background));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogo)), logo));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProgressBar)), progressBar));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSplash)), splash));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWaterMark)), waterMark));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kProviderNameFieldId:
+ case to_underlying(Fields::kProviderName):
ReturnErrorOnFailure(DataModel::Decode(reader, providerName));
break;
- case kBackgroundFieldId:
+ case to_underlying(Fields::kBackground):
ReturnErrorOnFailure(DataModel::Decode(reader, background));
break;
- case kLogoFieldId:
+ case to_underlying(Fields::kLogo):
ReturnErrorOnFailure(DataModel::Decode(reader, logo));
break;
- case kProgressBarFieldId:
+ case to_underlying(Fields::kProgressBar):
ReturnErrorOnFailure(DataModel::Decode(reader, progressBar));
break;
- case kSplashFieldId:
+ case to_underlying(Fields::kSplash):
ReturnErrorOnFailure(DataModel::Decode(reader, splash));
break;
- case kWaterMarkFieldId:
+ case to_underlying(Fields::kWaterMark):
ReturnErrorOnFailure(DataModel::Decode(reader, waterMark));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1508,36 +13769,39 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kWidthFieldId), width));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kHeightFieldId), height));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kMetricFieldId), metric));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWidth)), width));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kHeight)), height));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMetric)), metric));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kWidthFieldId:
+ case to_underlying(Fields::kWidth):
ReturnErrorOnFailure(DataModel::Decode(reader, width));
break;
- case kHeightFieldId:
+ case to_underlying(Fields::kHeight):
ReturnErrorOnFailure(DataModel::Decode(reader, height));
break;
- case kMetricFieldId:
+ case to_underlying(Fields::kMetric):
ReturnErrorOnFailure(DataModel::Decode(reader, metric));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1549,178 +13813,660 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kImageUrlFieldId), imageUrl));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kColorFieldId), color));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kSizeFieldId), size));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kImageUrl)), imageUrl));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColor)), color));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSize)), size));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kImageUrlFieldId:
+ case to_underlying(Fields::kImageUrl):
ReturnErrorOnFailure(DataModel::Decode(reader, imageUrl));
break;
- case kColorFieldId:
+ case to_underlying(Fields::kColor):
ReturnErrorOnFailure(DataModel::Decode(reader, color));
break;
- case kSizeFieldId:
+ case to_underlying(Fields::kSize):
ReturnErrorOnFailure(DataModel::Decode(reader, size));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace ContentLaunchStyleInformation
-} // namespace ContentLauncher
+namespace Commands {
+namespace LaunchContent {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAutoPlay)), autoPlay));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ 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::kAutoPlay):
+ ReturnErrorOnFailure(DataModel::Decode(reader, autoPlay));
+ break;
+ case to_underlying(Fields::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LaunchContent.
+namespace LaunchContentResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kContentLaunchStatus)), contentLaunchStatus));
+ 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::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ case to_underlying(Fields::kContentLaunchStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, contentLaunchStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LaunchContentResponse.
+namespace LaunchURL {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kContentURL)), contentURL));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDisplayString)), displayString));
+ 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::kContentURL):
+ ReturnErrorOnFailure(DataModel::Decode(reader, contentURL));
+ break;
+ case to_underlying(Fields::kDisplayString):
+ ReturnErrorOnFailure(DataModel::Decode(reader, displayString));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LaunchURL.
+namespace LaunchURLResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kContentLaunchStatus)), contentLaunchStatus));
+ 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::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ case to_underlying(Fields::kContentLaunchStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, contentLaunchStatus));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LaunchURLResponse.
+} // namespace Commands
+} // namespace ContentLauncher
namespace AudioOutput {
namespace AudioOutputInfo {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kIndexFieldId), index));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kOutputTypeFieldId), outputType));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kNameFieldId), name));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIndex)), index));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOutputType)), outputType));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kIndexFieldId:
+ case to_underlying(Fields::kIndex):
ReturnErrorOnFailure(DataModel::Decode(reader, index));
break;
- case kOutputTypeFieldId:
+ case to_underlying(Fields::kOutputType):
ReturnErrorOnFailure(DataModel::Decode(reader, outputType));
break;
- case kNameFieldId:
+ case to_underlying(Fields::kName):
ReturnErrorOnFailure(DataModel::Decode(reader, name));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace AudioOutputInfo
-} // namespace AudioOutput
+namespace Commands {
+namespace SelectOutput {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIndex)), index));
+ 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::kIndex):
+ ReturnErrorOnFailure(DataModel::Decode(reader, index));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace SelectOutput.
+namespace RenameOutput {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIndex)), index));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name));
+ 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::kIndex):
+ ReturnErrorOnFailure(DataModel::Decode(reader, index));
+ break;
+ case to_underlying(Fields::kName):
+ ReturnErrorOnFailure(DataModel::Decode(reader, name));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace RenameOutput.
+} // namespace Commands
+} // namespace AudioOutput
namespace ApplicationLauncher {
namespace ApplicationLauncherApp {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kCatalogVendorIdFieldId), catalogVendorId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kApplicationIdFieldId), applicationId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCatalogVendorId)), catalogVendorId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplicationId)), applicationId));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kCatalogVendorIdFieldId:
+ case to_underlying(Fields::kCatalogVendorId):
ReturnErrorOnFailure(DataModel::Decode(reader, catalogVendorId));
break;
- case kApplicationIdFieldId:
+ case to_underlying(Fields::kApplicationId):
ReturnErrorOnFailure(DataModel::Decode(reader, applicationId));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace ApplicationLauncherApp
-} // namespace ApplicationLauncher
-namespace ApplicationBasic {
-} // namespace ApplicationBasic
-
-namespace AccountLogin {
-} // namespace AccountLogin
-
-namespace TestCluster {
-namespace SimpleStruct {
+namespace Commands {
+namespace LaunchApp {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAFieldId), a));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kBFieldId), b));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kCFieldId), c));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kDFieldId), d));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kEFieldId), e));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCatalogVendorId)), catalogVendorId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplicationId)), applicationId));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kAFieldId:
+ case to_underlying(Fields::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ case to_underlying(Fields::kCatalogVendorId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, catalogVendorId));
+ break;
+ case to_underlying(Fields::kApplicationId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, applicationId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LaunchApp.
+namespace LaunchAppResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kData):
+ ReturnErrorOnFailure(DataModel::Decode(reader, data));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LaunchAppResponse.
+} // namespace Commands
+} // namespace ApplicationLauncher
+namespace ApplicationBasic {
+
+namespace Commands {
+namespace ChangeStatus {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ 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::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace ChangeStatus.
+} // namespace Commands
+} // namespace ApplicationBasic
+namespace AccountLogin {
+
+namespace Commands {
+namespace GetSetupPIN {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTempAccountIdentifier)), tempAccountIdentifier));
+ 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::kTempAccountIdentifier):
+ ReturnErrorOnFailure(DataModel::Decode(reader, tempAccountIdentifier));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetSetupPIN.
+namespace GetSetupPINResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSetupPIN)), setupPIN));
+ 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::kSetupPIN):
+ ReturnErrorOnFailure(DataModel::Decode(reader, setupPIN));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetSetupPINResponse.
+namespace Login {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTempAccountIdentifier)), tempAccountIdentifier));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSetupPIN)), setupPIN));
+ 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::kTempAccountIdentifier):
+ ReturnErrorOnFailure(DataModel::Decode(reader, tempAccountIdentifier));
+ break;
+ case to_underlying(Fields::kSetupPIN):
+ ReturnErrorOnFailure(DataModel::Decode(reader, setupPIN));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Login.
+} // namespace Commands
+} // namespace AccountLogin
+namespace TestCluster {
+namespace SimpleStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kA)), a));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kB)), b));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kC)), c));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kD)), d));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kE)), e));
+ 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::kA):
ReturnErrorOnFailure(DataModel::Decode(reader, a));
break;
- case kBFieldId:
+ case to_underlying(Fields::kB):
ReturnErrorOnFailure(DataModel::Decode(reader, b));
break;
- case kCFieldId:
+ case to_underlying(Fields::kC):
ReturnErrorOnFailure(DataModel::Decode(reader, c));
break;
- case kDFieldId:
+ case to_underlying(Fields::kD):
ReturnErrorOnFailure(DataModel::Decode(reader, d));
break;
- case kEFieldId:
+ case to_underlying(Fields::kE):
ReturnErrorOnFailure(DataModel::Decode(reader, e));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1732,36 +14478,39 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAFieldId), a));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kBFieldId), b));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kCFieldId), c));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kA)), a));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kB)), b));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kC)), c));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kAFieldId:
+ case to_underlying(Fields::kA):
ReturnErrorOnFailure(DataModel::Decode(reader, a));
break;
- case kBFieldId:
+ case to_underlying(Fields::kB):
ReturnErrorOnFailure(DataModel::Decode(reader, b));
break;
- case kCFieldId:
+ case to_underlying(Fields::kC):
ReturnErrorOnFailure(DataModel::Decode(reader, c));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1773,52 +14522,55 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAFieldId), a));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kBFieldId), b));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kCFieldId), c));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kDFieldId), d));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kEFieldId), e));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFFieldId), f));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kGFieldId), g));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kA)), a));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kB)), b));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kC)), c));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kD)), d));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kE)), e));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kF)), f));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kG)), g));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kAFieldId:
+ case to_underlying(Fields::kA):
ReturnErrorOnFailure(DataModel::Decode(reader, a));
break;
- case kBFieldId:
+ case to_underlying(Fields::kB):
ReturnErrorOnFailure(DataModel::Decode(reader, b));
break;
- case kCFieldId:
+ case to_underlying(Fields::kC):
ReturnErrorOnFailure(DataModel::Decode(reader, c));
break;
- case kDFieldId:
+ case to_underlying(Fields::kD):
ReturnErrorOnFailure(DataModel::Decode(reader, d));
break;
- case kEFieldId:
+ case to_underlying(Fields::kE):
ReturnErrorOnFailure(DataModel::Decode(reader, e));
break;
- case kFFieldId:
+ case to_underlying(Fields::kF):
ReturnErrorOnFailure(DataModel::Decode(reader, f));
break;
- case kGFieldId:
+ case to_underlying(Fields::kG):
ReturnErrorOnFailure(DataModel::Decode(reader, g));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1830,28 +14582,31 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kAFieldId), a));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kA)), a));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kAFieldId:
+ case to_underlying(Fields::kA):
ReturnErrorOnFailure(DataModel::Decode(reader, a));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1863,105 +14618,1496 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kFabricIndexFieldId), fabricIndex));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kOperationalCertFieldId), operationalCert));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOperationalCert)), operationalCert));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kFabricIndexFieldId:
+ case to_underlying(Fields::kFabricIndex):
ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex));
break;
- case kOperationalCertFieldId:
+ case to_underlying(Fields::kOperationalCert):
ReturnErrorOnFailure(DataModel::Decode(reader, operationalCert));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace TestListStructOctet
-} // namespace TestCluster
-namespace Messaging {
-} // namespace Messaging
-
-namespace ApplianceIdentification {
-} // namespace ApplianceIdentification
-
-namespace MeterIdentification {
-} // namespace MeterIdentification
-
-namespace ApplianceEventsAndAlert {
-} // namespace ApplianceEventsAndAlert
-
-namespace ApplianceStatistics {
-} // namespace ApplianceStatistics
-
-namespace ElectricalMeasurement {
-} // namespace ElectricalMeasurement
-
-namespace Binding {
-} // namespace Binding
-
-namespace GroupKeyManagement {
-namespace GroupKey {
+namespace Commands {
+namespace Test {
CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kVendorIdFieldId), vendorId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kGroupKeyIndexFieldId), groupKeyIndex));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kGroupKeyRootFieldId), groupKeyRoot));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kGroupKeyEpochStartTimeFieldId), groupKeyEpochStartTime));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kGroupKeySecurityPolicyFieldId), groupKeySecurityPolicy));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kVendorIdFieldId:
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Test.
+namespace TestSpecificResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kReturnValue)), returnValue));
+ 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::kReturnValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, returnValue));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestSpecificResponse.
+namespace TestNotHandled {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestNotHandled.
+namespace TestAddArgumentsResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kReturnValue)), returnValue));
+ 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::kReturnValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, returnValue));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestAddArgumentsResponse.
+namespace TestSpecific {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestSpecific.
+namespace TestSimpleArgumentResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kReturnValue)), returnValue));
+ 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::kReturnValue):
+ ReturnErrorOnFailure(DataModel::Decode(reader, returnValue));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestSimpleArgumentResponse.
+namespace TestUnknownCommand {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestUnknownCommand.
+namespace TestStructArrayArgumentResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg1)), arg1));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg2)), arg2));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg3)), arg3));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg4)), arg4));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg5)), arg5));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg6)), arg6));
+ 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::kArg1):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg1));
+ break;
+ case to_underlying(Fields::kArg2):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg2));
+ break;
+ case to_underlying(Fields::kArg3):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg3));
+ break;
+ case to_underlying(Fields::kArg4):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg4));
+ break;
+ case to_underlying(Fields::kArg5):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg5));
+ break;
+ case to_underlying(Fields::kArg6):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg6));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestStructArrayArgumentResponse.
+namespace TestAddArguments {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg1)), arg1));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg2)), arg2));
+ 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::kArg1):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg1));
+ break;
+ case to_underlying(Fields::kArg2):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg2));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestAddArguments.
+namespace TestSimpleArgumentRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg1)), arg1));
+ 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::kArg1):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg1));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestSimpleArgumentRequest.
+namespace TestStructArrayArgumentRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg1)), arg1));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg2)), arg2));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg3)), arg3));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg4)), arg4));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg5)), arg5));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg6)), arg6));
+ 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::kArg1):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg1));
+ break;
+ case to_underlying(Fields::kArg2):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg2));
+ break;
+ case to_underlying(Fields::kArg3):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg3));
+ break;
+ case to_underlying(Fields::kArg4):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg4));
+ break;
+ case to_underlying(Fields::kArg5):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg5));
+ break;
+ case to_underlying(Fields::kArg6):
+ ReturnErrorOnFailure(DataModel::Decode(reader, arg6));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace TestStructArrayArgumentRequest.
+} // namespace Commands
+} // namespace TestCluster
+namespace Messaging {
+
+namespace Commands {
+namespace DisplayMessage {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageId)), messageId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageControl)), messageControl));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartTime)), startTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDurationInMinutes)), durationInMinutes));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessage)), message));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionalExtendedMessageControl)),
+ optionalExtendedMessageControl));
+ 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::kMessageId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageId));
+ break;
+ case to_underlying(Fields::kMessageControl):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageControl));
+ break;
+ case to_underlying(Fields::kStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startTime));
+ break;
+ case to_underlying(Fields::kDurationInMinutes):
+ ReturnErrorOnFailure(DataModel::Decode(reader, durationInMinutes));
+ break;
+ case to_underlying(Fields::kMessage):
+ ReturnErrorOnFailure(DataModel::Decode(reader, message));
+ break;
+ case to_underlying(Fields::kOptionalExtendedMessageControl):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionalExtendedMessageControl));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace DisplayMessage.
+namespace GetLastMessage {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetLastMessage.
+namespace CancelMessage {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageId)), messageId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageControl)), messageControl));
+ 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::kMessageId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageId));
+ break;
+ case to_underlying(Fields::kMessageControl):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageControl));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CancelMessage.
+namespace MessageConfirmation {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageId)), messageId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kConfirmationTime)), confirmationTime));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageConfirmationControl)), messageConfirmationControl));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageResponse)), messageResponse));
+ 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::kMessageId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageId));
+ break;
+ case to_underlying(Fields::kConfirmationTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, confirmationTime));
+ break;
+ case to_underlying(Fields::kMessageConfirmationControl):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageConfirmationControl));
+ break;
+ case to_underlying(Fields::kMessageResponse):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageResponse));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace MessageConfirmation.
+namespace DisplayProtectedMessage {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageId)), messageId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessageControl)), messageControl));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartTime)), startTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDurationInMinutes)), durationInMinutes));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMessage)), message));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionalExtendedMessageControl)),
+ optionalExtendedMessageControl));
+ 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::kMessageId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageId));
+ break;
+ case to_underlying(Fields::kMessageControl):
+ ReturnErrorOnFailure(DataModel::Decode(reader, messageControl));
+ break;
+ case to_underlying(Fields::kStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startTime));
+ break;
+ case to_underlying(Fields::kDurationInMinutes):
+ ReturnErrorOnFailure(DataModel::Decode(reader, durationInMinutes));
+ break;
+ case to_underlying(Fields::kMessage):
+ ReturnErrorOnFailure(DataModel::Decode(reader, message));
+ break;
+ case to_underlying(Fields::kOptionalExtendedMessageControl):
+ ReturnErrorOnFailure(DataModel::Decode(reader, optionalExtendedMessageControl));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace DisplayProtectedMessage.
+namespace GetMessageCancellation {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEarliestImplementationTime)), earliestImplementationTime));
+ 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::kEarliestImplementationTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, earliestImplementationTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetMessageCancellation.
+namespace CancelAllMessages {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kImplementationDateTime)), implementationDateTime));
+ 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::kImplementationDateTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, implementationDateTime));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CancelAllMessages.
+} // namespace Commands
+} // namespace Messaging
+namespace ApplianceIdentification {
+
+namespace Commands {
+} // namespace Commands
+} // namespace ApplianceIdentification
+namespace MeterIdentification {
+
+namespace Commands {
+} // namespace Commands
+} // namespace MeterIdentification
+namespace ApplianceEventsAndAlert {
+
+namespace Commands {
+namespace GetAlerts {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetAlerts.
+namespace GetAlertsResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAlertsCount)), alertsCount));
+ 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::kAlertsCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, alertsCount));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetAlertsResponse.
+namespace AlertsNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAlertsCount)), alertsCount));
+ 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::kAlertsCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, alertsCount));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace AlertsNotification.
+namespace EventsNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEventHeader)), eventHeader));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEventId)), eventId));
+ 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::kEventHeader):
+ ReturnErrorOnFailure(DataModel::Decode(reader, eventHeader));
+ break;
+ case to_underlying(Fields::kEventId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, eventId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace EventsNotification.
+} // namespace Commands
+} // namespace ApplianceEventsAndAlert
+namespace ApplianceStatistics {
+
+namespace Commands {
+namespace LogNotification {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeStamp)), timeStamp));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogId)), logId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogLength)), logLength));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogPayload)), logPayload));
+ 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::kTimeStamp):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeStamp));
+ break;
+ case to_underlying(Fields::kLogId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logId));
+ break;
+ case to_underlying(Fields::kLogLength):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logLength));
+ break;
+ case to_underlying(Fields::kLogPayload):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logPayload));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LogNotification.
+namespace LogRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogId)), logId));
+ 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::kLogId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LogRequest.
+namespace LogResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTimeStamp)), timeStamp));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogId)), logId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogLength)), logLength));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogPayload)), logPayload));
+ 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::kTimeStamp):
+ ReturnErrorOnFailure(DataModel::Decode(reader, timeStamp));
+ break;
+ case to_underlying(Fields::kLogId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logId));
+ break;
+ case to_underlying(Fields::kLogLength):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logLength));
+ break;
+ case to_underlying(Fields::kLogPayload):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logPayload));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LogResponse.
+namespace LogQueueRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LogQueueRequest.
+namespace LogQueueResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogQueueSize)), logQueueSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogIds)), logIds));
+ 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::kLogQueueSize):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logQueueSize));
+ break;
+ case to_underlying(Fields::kLogIds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logIds));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace LogQueueResponse.
+namespace StatisticsAvailable {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogQueueSize)), logQueueSize));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogIds)), logIds));
+ 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::kLogQueueSize):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logQueueSize));
+ break;
+ case to_underlying(Fields::kLogIds):
+ ReturnErrorOnFailure(DataModel::Decode(reader, logIds));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace StatisticsAvailable.
+} // namespace Commands
+} // namespace ApplianceStatistics
+namespace ElectricalMeasurement {
+
+namespace Commands {
+namespace GetProfileInfoResponseCommand {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProfileCount)), profileCount));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProfileIntervalPeriod)), profileIntervalPeriod));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMaxNumberOfIntervals)), maxNumberOfIntervals));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kListOfAttributes)), listOfAttributes));
+ 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::kProfileCount):
+ ReturnErrorOnFailure(DataModel::Decode(reader, profileCount));
+ break;
+ case to_underlying(Fields::kProfileIntervalPeriod):
+ ReturnErrorOnFailure(DataModel::Decode(reader, profileIntervalPeriod));
+ break;
+ case to_underlying(Fields::kMaxNumberOfIntervals):
+ ReturnErrorOnFailure(DataModel::Decode(reader, maxNumberOfIntervals));
+ break;
+ case to_underlying(Fields::kListOfAttributes):
+ ReturnErrorOnFailure(DataModel::Decode(reader, listOfAttributes));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetProfileInfoResponseCommand.
+namespace GetProfileInfoCommand {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ 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()))
+ {
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetProfileInfoCommand.
+namespace GetMeasurementProfileResponseCommand {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartTime)), startTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProfileIntervalPeriod)), profileIntervalPeriod));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumberOfIntervalsDelivered)), numberOfIntervalsDelivered));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttributeId)), attributeId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIntervals)), intervals));
+ 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::kStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startTime));
+ break;
+ case to_underlying(Fields::kStatus):
+ ReturnErrorOnFailure(DataModel::Decode(reader, status));
+ break;
+ case to_underlying(Fields::kProfileIntervalPeriod):
+ ReturnErrorOnFailure(DataModel::Decode(reader, profileIntervalPeriod));
+ break;
+ case to_underlying(Fields::kNumberOfIntervalsDelivered):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numberOfIntervalsDelivered));
+ break;
+ case to_underlying(Fields::kAttributeId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, attributeId));
+ break;
+ case to_underlying(Fields::kIntervals):
+ ReturnErrorOnFailure(DataModel::Decode(reader, intervals));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetMeasurementProfileResponseCommand.
+namespace GetMeasurementProfileCommand {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttributeId)), attributeId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStartTime)), startTime));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNumberOfIntervals)), numberOfIntervals));
+ 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::kAttributeId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, attributeId));
+ break;
+ case to_underlying(Fields::kStartTime):
+ ReturnErrorOnFailure(DataModel::Decode(reader, startTime));
+ break;
+ case to_underlying(Fields::kNumberOfIntervals):
+ ReturnErrorOnFailure(DataModel::Decode(reader, numberOfIntervals));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace GetMeasurementProfileCommand.
+} // namespace Commands
+} // namespace ElectricalMeasurement
+namespace Binding {
+
+namespace Commands {
+namespace Bind {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNodeId)), nodeId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndpointId)), endpointId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterId)), clusterId));
+ 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::kNodeId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, nodeId));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kEndpointId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, endpointId));
+ break;
+ case to_underlying(Fields::kClusterId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, clusterId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Bind.
+namespace Unbind {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNodeId)), nodeId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndpointId)), endpointId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterId)), clusterId));
+ 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::kNodeId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, nodeId));
+ break;
+ case to_underlying(Fields::kGroupId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, groupId));
+ break;
+ case to_underlying(Fields::kEndpointId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, endpointId));
+ break;
+ case to_underlying(Fields::kClusterId):
+ ReturnErrorOnFailure(DataModel::Decode(reader, clusterId));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace Unbind.
+} // namespace Commands
+} // namespace Binding
+namespace GroupKeyManagement {
+namespace GroupKey {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorId)), vendorId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupKeyIndex)), groupKeyIndex));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupKeyRoot)), groupKeyRoot));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupKeyEpochStartTime)), groupKeyEpochStartTime));
+ ReturnErrorOnFailure(
+ DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupKeySecurityPolicy)), groupKeySecurityPolicy));
+ 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::kVendorId):
ReturnErrorOnFailure(DataModel::Decode(reader, vendorId));
break;
- case kGroupKeyIndexFieldId:
+ case to_underlying(Fields::kGroupKeyIndex):
ReturnErrorOnFailure(DataModel::Decode(reader, groupKeyIndex));
break;
- case kGroupKeyRootFieldId:
+ case to_underlying(Fields::kGroupKeyRoot):
ReturnErrorOnFailure(DataModel::Decode(reader, groupKeyRoot));
break;
- case kGroupKeyEpochStartTimeFieldId:
+ case to_underlying(Fields::kGroupKeyEpochStartTime):
ReturnErrorOnFailure(DataModel::Decode(reader, groupKeyEpochStartTime));
break;
- case kGroupKeySecurityPolicyFieldId:
+ case to_underlying(Fields::kGroupKeySecurityPolicy):
ReturnErrorOnFailure(DataModel::Decode(reader, groupKeySecurityPolicy));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
@@ -1973,48 +16119,128 @@
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kVendorIdFieldId), vendorId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kVendorGroupIdFieldId), vendorGroupId));
- ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(kGroupKeySetIndexFieldId), groupKeySetIndex));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorId)), vendorId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorGroupId)), vendorGroupId));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupKeySetIndex)), groupKeySetIndex));
ReturnErrorOnFailure(writer.EndContainer(outer));
return CHIP_NO_ERROR;
}
CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
{
- CHIP_ERROR err;
+ 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)
{
- switch (chip::TLV::TagNumFromTag(reader.GetTag()))
+ VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG);
+ switch (TLV::TagNumFromTag(reader.GetTag()))
{
- case kVendorIdFieldId:
+ case to_underlying(Fields::kVendorId):
ReturnErrorOnFailure(DataModel::Decode(reader, vendorId));
break;
- case kVendorGroupIdFieldId:
+ case to_underlying(Fields::kVendorGroupId):
ReturnErrorOnFailure(DataModel::Decode(reader, vendorGroupId));
break;
- case kGroupKeySetIndexFieldId:
+ case to_underlying(Fields::kGroupKeySetIndex):
ReturnErrorOnFailure(DataModel::Decode(reader, groupKeySetIndex));
break;
default:
break;
}
}
+
VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
ReturnErrorOnFailure(reader.ExitContainer(outer));
return CHIP_NO_ERROR;
}
} // namespace GroupState
+
+namespace Commands {
+} // namespace Commands
} // namespace GroupKeyManagement
-
namespace SampleMfgSpecificCluster {
-} // namespace SampleMfgSpecificCluster
+namespace Commands {
+namespace CommandOne {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArgOne)), argOne));
+ 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::kArgOne):
+ ReturnErrorOnFailure(DataModel::Decode(reader, argOne));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CommandOne.
+} // namespace Commands
+} // namespace SampleMfgSpecificCluster
namespace SampleMfgSpecificCluster2 {
+
+namespace Commands {
+namespace CommandTwo {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, uint64_t tag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArgOne)), argOne));
+ 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::kArgOne):
+ ReturnErrorOnFailure(DataModel::Decode(reader, argOne));
+ break;
+ default:
+ break;
+ }
+ }
+
+ VerifyOrReturnError(err == CHIP_END_OF_TLV, err);
+ ReturnErrorOnFailure(reader.ExitContainer(outer));
+ return CHIP_NO_ERROR;
+}
+} // namespace CommandTwo.
+} // namespace Commands
} // namespace SampleMfgSpecificCluster2
} // namespace Clusters
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 d024698..a311c58 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
@@ -19,11 +19,14 @@
#pragma once
+#include <app-common/zap-generated/ids/Clusters.h>
+#include <app-common/zap-generated/ids/Commands.h>
#include <app/data-model/DecodableList.h>
#include <app/data-model/Decode.h>
#include <app/data-model/Encode.h>
#include <app/data-model/List.h>
#include <app/util/basic-types.h>
+#include <protocols/interaction_model/Constants.h>
namespace chip {
namespace app {
@@ -64,166 +67,440 @@
namespace Commands {
namespace Identify {
+enum class Fields
+{
+ kIdentifyTime = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Identify::Id; }
+ static constexpr ClusterId GetClusterId() { return Identify::Id; }
+
+ uint16_t identifyTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Identify
+public:
+ static constexpr CommandId GetCommandId() { return Identify::Id; }
+ static constexpr ClusterId GetClusterId() { return Identify::Id; }
+ uint16_t identifyTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Identify
namespace IdentifyQueryResponse {
+enum class Fields
+{
+ kTimeout = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return IdentifyQueryResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Identify::Id; }
+
+ uint16_t timeout;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace IdentifyQueryResponse
+public:
+ static constexpr CommandId GetCommandId() { return IdentifyQueryResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Identify::Id; }
+ uint16_t timeout;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace IdentifyQueryResponse
namespace IdentifyQuery {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return IdentifyQuery::Id; }
+ static constexpr ClusterId GetClusterId() { return Identify::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace IdentifyQuery
+public:
+ static constexpr CommandId GetCommandId() { return IdentifyQuery::Id; }
+ static constexpr ClusterId GetClusterId() { return Identify::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace IdentifyQuery
namespace TriggerEffect {
+enum class Fields
+{
+ kEffectIdentifier = 0,
+ kEffectVariant = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TriggerEffect::Id; }
+ static constexpr ClusterId GetClusterId() { return Identify::Id; }
+
+ IdentifyEffectIdentifier effectIdentifier;
+ IdentifyEffectVariant effectVariant;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace TriggerEffect
+public:
+ static constexpr CommandId GetCommandId() { return TriggerEffect::Id; }
+ static constexpr ClusterId GetClusterId() { return Identify::Id; }
+ IdentifyEffectIdentifier effectIdentifier;
+ IdentifyEffectVariant effectVariant;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TriggerEffect
} // namespace Commands
} // namespace Identify
namespace Groups {
namespace Commands {
namespace AddGroup {
-struct Type
+enum class Fields
{
-};
-
-struct DecodableType
-{
-};
-} // namespace AddGroup
-
-namespace AddGroupResponse {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace AddGroupResponse
-
-namespace ViewGroup {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace ViewGroup
-
-namespace ViewGroupResponse {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace ViewGroupResponse
-
-namespace GetGroupMembership {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace GetGroupMembership
-
-namespace GetGroupMembershipResponse {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace GetGroupMembershipResponse
-
-namespace RemoveGroup {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace RemoveGroup
-
-namespace RemoveGroupResponse {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace RemoveGroupResponse
-
-namespace RemoveAllGroups {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace RemoveAllGroups
-
-namespace AddGroupIfIdentifying {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace AddGroupIfIdentifying
-
-} // namespace Commands
-} // namespace Groups
-namespace Scenes {
-
-namespace SceneExtensionFieldSet {
-enum FieldId
-{
- kClusterIdFieldId = 0,
- kLengthFieldId = 1,
- kValueFieldId = 2,
+ kGroupId = 0,
+ kGroupName = 1,
};
struct Type
{
public:
- uint32_t clusterId;
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddGroup::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint16_t groupId;
+ Span<const char> groupName;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return AddGroup::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint16_t groupId;
+ Span<const char> groupName;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddGroup
+namespace AddGroupResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddGroupResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return AddGroupResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddGroupResponse
+namespace ViewGroup {
+enum class Fields
+{
+ kGroupId = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ViewGroup::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint16_t groupId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return ViewGroup::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint16_t groupId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ViewGroup
+namespace ViewGroupResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+ kGroupName = 2,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ViewGroupResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ Span<const char> groupName;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return ViewGroupResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ Span<const char> groupName;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ViewGroupResponse
+namespace GetGroupMembership {
+enum class Fields
+{
+ kGroupCount = 0,
+ kGroupList = 1,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetGroupMembership::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t groupCount;
+ DataModel::List<uint16_t> groupList;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return GetGroupMembership::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t groupCount;
+ DataModel::DecodableList<uint16_t> groupList;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetGroupMembership
+namespace GetGroupMembershipResponse {
+enum class Fields
+{
+ kCapacity = 0,
+ kGroupCount = 1,
+ kGroupList = 2,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetGroupMembershipResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t capacity;
+ uint8_t groupCount;
+ DataModel::List<uint16_t> groupList;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return GetGroupMembershipResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t capacity;
+ uint8_t groupCount;
+ DataModel::DecodableList<uint16_t> groupList;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetGroupMembershipResponse
+namespace RemoveGroup {
+enum class Fields
+{
+ kGroupId = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveGroup::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint16_t groupId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return RemoveGroup::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint16_t groupId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveGroup
+namespace RemoveGroupResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveGroupResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return RemoveGroupResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveGroupResponse
+namespace RemoveAllGroups {
+enum class Fields
+{
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveAllGroups::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return RemoveAllGroups::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveAllGroups
+namespace AddGroupIfIdentifying {
+enum class Fields
+{
+ kGroupId = 0,
+ kGroupName = 1,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddGroupIfIdentifying::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint16_t groupId;
+ Span<const char> groupName;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return AddGroupIfIdentifying::Id; }
+ static constexpr ClusterId GetClusterId() { return Groups::Id; }
+
+ uint16_t groupId;
+ Span<const char> groupName;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddGroupIfIdentifying
+} // namespace Commands
+} // namespace Groups
+namespace Scenes {
+
+namespace SceneExtensionFieldSet {
+enum class Fields
+{
+ kClusterId = 0,
+ kLength = 1,
+ kValue = 2,
+};
+
+struct Type
+{
+public:
+ chip::ClusterId clusterId;
uint8_t length;
uint8_t value;
@@ -237,195 +514,666 @@
namespace Commands {
namespace AddScene {
+enum class Fields
+{
+ kGroupId = 0,
+ kSceneId = 1,
+ kTransitionTime = 2,
+ kSceneName = 3,
+ kExtensionFieldSets = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ Span<const char> sceneName;
+ DataModel::List<SceneExtensionFieldSet::Type> extensionFieldSets;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AddScene
+public:
+ static constexpr CommandId GetCommandId() { return AddScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ Span<const char> sceneName;
+ DataModel::DecodableList<SceneExtensionFieldSet::DecodableType> extensionFieldSets;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddScene
namespace AddSceneResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+ kSceneId = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AddSceneResponse
+public:
+ static constexpr CommandId GetCommandId() { return AddSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddSceneResponse
namespace ViewScene {
+enum class Fields
+{
+ kGroupId = 0,
+ kSceneId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ViewScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+ uint8_t sceneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ViewScene
+public:
+ static constexpr CommandId GetCommandId() { return ViewScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ uint8_t sceneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ViewScene
namespace ViewSceneResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+ kSceneId = 2,
+ kTransitionTime = 3,
+ kSceneName = 4,
+ kExtensionFieldSets = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ViewSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ Span<const char> sceneName;
+ DataModel::List<SceneExtensionFieldSet::Type> extensionFieldSets;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ViewSceneResponse
+public:
+ static constexpr CommandId GetCommandId() { return ViewSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ Span<const char> sceneName;
+ DataModel::DecodableList<SceneExtensionFieldSet::DecodableType> extensionFieldSets;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ViewSceneResponse
namespace RemoveScene {
+enum class Fields
+{
+ kGroupId = 0,
+ kSceneId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+ uint8_t sceneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RemoveScene
+public:
+ static constexpr CommandId GetCommandId() { return RemoveScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ uint8_t sceneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveScene
namespace RemoveSceneResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+ kSceneId = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RemoveSceneResponse
+public:
+ static constexpr CommandId GetCommandId() { return RemoveSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveSceneResponse
namespace RemoveAllScenes {
+enum class Fields
+{
+ kGroupId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveAllScenes::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RemoveAllScenes
+public:
+ static constexpr CommandId GetCommandId() { return RemoveAllScenes::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveAllScenes
namespace RemoveAllScenesResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveAllScenesResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RemoveAllScenesResponse
+public:
+ static constexpr CommandId GetCommandId() { return RemoveAllScenesResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint16_t groupId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveAllScenesResponse
namespace StoreScene {
+enum class Fields
+{
+ kGroupId = 0,
+ kSceneId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StoreScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+ uint8_t sceneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StoreScene
+public:
+ static constexpr CommandId GetCommandId() { return StoreScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ uint8_t sceneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StoreScene
namespace StoreSceneResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+ kSceneId = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StoreSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StoreSceneResponse
+public:
+ static constexpr CommandId GetCommandId() { return StoreSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StoreSceneResponse
namespace RecallScene {
+enum class Fields
+{
+ kGroupId = 0,
+ kSceneId = 1,
+ kTransitionTime = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RecallScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RecallScene
+public:
+ static constexpr CommandId GetCommandId() { return RecallScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RecallScene
namespace GetSceneMembership {
+enum class Fields
+{
+ kGroupId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetSceneMembership::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetSceneMembership
+public:
+ static constexpr CommandId GetCommandId() { return GetSceneMembership::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetSceneMembership
namespace GetSceneMembershipResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kCapacity = 1,
+ kGroupId = 2,
+ kSceneCount = 3,
+ kSceneList = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetSceneMembershipResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint8_t capacity;
+ uint16_t groupId;
+ uint8_t sceneCount;
+ DataModel::List<uint8_t> sceneList;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetSceneMembershipResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetSceneMembershipResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint8_t capacity;
+ uint16_t groupId;
+ uint8_t sceneCount;
+ DataModel::DecodableList<uint8_t> sceneList;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetSceneMembershipResponse
namespace EnhancedAddScene {
+enum class Fields
+{
+ kGroupId = 0,
+ kSceneId = 1,
+ kTransitionTime = 2,
+ kSceneName = 3,
+ kExtensionFieldSets = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnhancedAddScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ Span<const char> sceneName;
+ DataModel::List<SceneExtensionFieldSet::Type> extensionFieldSets;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnhancedAddScene
+public:
+ static constexpr CommandId GetCommandId() { return EnhancedAddScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ Span<const char> sceneName;
+ DataModel::DecodableList<SceneExtensionFieldSet::DecodableType> extensionFieldSets;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnhancedAddScene
namespace EnhancedAddSceneResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+ kSceneId = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnhancedAddSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnhancedAddSceneResponse
+public:
+ static constexpr CommandId GetCommandId() { return EnhancedAddSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnhancedAddSceneResponse
namespace EnhancedViewScene {
+enum class Fields
+{
+ kGroupId = 0,
+ kSceneId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnhancedViewScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint16_t groupId;
+ uint8_t sceneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnhancedViewScene
+public:
+ static constexpr CommandId GetCommandId() { return EnhancedViewScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint16_t groupId;
+ uint8_t sceneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnhancedViewScene
namespace EnhancedViewSceneResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupId = 1,
+ kSceneId = 2,
+ kTransitionTime = 3,
+ kSceneName = 4,
+ kExtensionFieldSets = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnhancedViewSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ Span<const char> sceneName;
+ DataModel::List<SceneExtensionFieldSet::Type> extensionFieldSets;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnhancedViewSceneResponse
+public:
+ static constexpr CommandId GetCommandId() { return EnhancedViewSceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint16_t groupId;
+ uint8_t sceneId;
+ uint16_t transitionTime;
+ Span<const char> sceneName;
+ DataModel::DecodableList<SceneExtensionFieldSet::DecodableType> extensionFieldSets;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnhancedViewSceneResponse
namespace CopyScene {
+enum class Fields
+{
+ kMode = 0,
+ kGroupIdFrom = 1,
+ kSceneIdFrom = 2,
+ kGroupIdTo = 3,
+ kSceneIdTo = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CopyScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t mode;
+ uint16_t groupIdFrom;
+ uint8_t sceneIdFrom;
+ uint16_t groupIdTo;
+ uint8_t sceneIdTo;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CopyScene
+public:
+ static constexpr CommandId GetCommandId() { return CopyScene::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t mode;
+ uint16_t groupIdFrom;
+ uint8_t sceneIdFrom;
+ uint16_t groupIdTo;
+ uint8_t sceneIdTo;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CopyScene
namespace CopySceneResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kGroupIdFrom = 1,
+ kSceneIdFrom = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CopySceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+
+ uint8_t status;
+ uint16_t groupIdFrom;
+ uint8_t sceneIdFrom;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CopySceneResponse
+public:
+ static constexpr CommandId GetCommandId() { return CopySceneResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Scenes::Id; }
+ uint8_t status;
+ uint16_t groupIdFrom;
+ uint8_t sceneIdFrom;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CopySceneResponse
} // namespace Commands
} // namespace Scenes
namespace OnOff {
@@ -450,115 +1198,286 @@
namespace Commands {
namespace Off {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Off::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Off
+public:
+ static constexpr CommandId GetCommandId() { return Off::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Off
namespace SampleMfgSpecificOffWithTransition {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificOffWithTransition::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SampleMfgSpecificOffWithTransition
+public:
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificOffWithTransition::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SampleMfgSpecificOffWithTransition
namespace On {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return On::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace On
+public:
+ static constexpr CommandId GetCommandId() { return On::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace On
namespace SampleMfgSpecificOnWithTransition {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificOnWithTransition::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SampleMfgSpecificOnWithTransition
+public:
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificOnWithTransition::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SampleMfgSpecificOnWithTransition
namespace SampleMfgSpecificOnWithTransition2 {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificOnWithTransition2::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SampleMfgSpecificOnWithTransition2
+public:
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificOnWithTransition2::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SampleMfgSpecificOnWithTransition2
namespace Toggle {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Toggle::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Toggle
+public:
+ static constexpr CommandId GetCommandId() { return Toggle::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Toggle
namespace SampleMfgSpecificToggleWithTransition {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificToggleWithTransition::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SampleMfgSpecificToggleWithTransition
+public:
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificToggleWithTransition::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SampleMfgSpecificToggleWithTransition
namespace SampleMfgSpecificToggleWithTransition2 {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificToggleWithTransition2::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SampleMfgSpecificToggleWithTransition2
+public:
+ static constexpr CommandId GetCommandId() { return SampleMfgSpecificToggleWithTransition2::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SampleMfgSpecificToggleWithTransition2
namespace OffWithEffect {
+enum class Fields
+{
+ kEffectId = 0,
+ kEffectVariant = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OffWithEffect::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ OnOffEffectIdentifier effectId;
+ OnOffDelayedAllOffEffectVariant effectVariant;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace OffWithEffect
+public:
+ static constexpr CommandId GetCommandId() { return OffWithEffect::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ OnOffEffectIdentifier effectId;
+ OnOffDelayedAllOffEffectVariant effectVariant;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OffWithEffect
namespace OnWithRecallGlobalScene {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OnWithRecallGlobalScene::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace OnWithRecallGlobalScene
+public:
+ static constexpr CommandId GetCommandId() { return OnWithRecallGlobalScene::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OnWithRecallGlobalScene
namespace OnWithTimedOff {
+enum class Fields
+{
+ kOnOffControl = 0,
+ kOnTime = 1,
+ kOffWaitTime = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OnWithTimedOff::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+
+ uint8_t onOffControl;
+ uint16_t onTime;
+ uint16_t offWaitTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace OnWithTimedOff
+public:
+ static constexpr CommandId GetCommandId() { return OnWithTimedOff::Id; }
+ static constexpr ClusterId GetClusterId() { return OnOff::Id; }
+ uint8_t onOffControl;
+ uint16_t onTime;
+ uint16_t offWaitTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OnWithTimedOff
} // namespace Commands
} // namespace OnOff
namespace OnOffSwitchConfiguration {
@@ -580,150 +1499,446 @@
namespace Commands {
namespace MoveToLevel {
+enum class Fields
+{
+ kLevel = 0,
+ kTransitionTime = 1,
+ kOptionMask = 2,
+ kOptionOverride = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveToLevel::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+
+ uint8_t level;
+ uint16_t transitionTime;
+ uint8_t optionMask;
+ uint8_t optionOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveToLevel
+public:
+ static constexpr CommandId GetCommandId() { return MoveToLevel::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+ uint8_t level;
+ uint16_t transitionTime;
+ uint8_t optionMask;
+ uint8_t optionOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveToLevel
namespace Move {
+enum class Fields
+{
+ kMoveMode = 0,
+ kRate = 1,
+ kOptionMask = 2,
+ kOptionOverride = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Move::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+
+ MoveMode moveMode;
+ uint8_t rate;
+ uint8_t optionMask;
+ uint8_t optionOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Move
+public:
+ static constexpr CommandId GetCommandId() { return Move::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+ MoveMode moveMode;
+ uint8_t rate;
+ uint8_t optionMask;
+ uint8_t optionOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Move
namespace Step {
+enum class Fields
+{
+ kStepMode = 0,
+ kStepSize = 1,
+ kTransitionTime = 2,
+ kOptionMask = 3,
+ kOptionOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Step::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+
+ StepMode stepMode;
+ uint8_t stepSize;
+ uint16_t transitionTime;
+ uint8_t optionMask;
+ uint8_t optionOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Step
+public:
+ static constexpr CommandId GetCommandId() { return Step::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+ StepMode stepMode;
+ uint8_t stepSize;
+ uint16_t transitionTime;
+ uint8_t optionMask;
+ uint8_t optionOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Step
namespace Stop {
+enum class Fields
+{
+ kOptionMask = 0,
+ kOptionOverride = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Stop::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+
+ uint8_t optionMask;
+ uint8_t optionOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Stop
+public:
+ static constexpr CommandId GetCommandId() { return Stop::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+ uint8_t optionMask;
+ uint8_t optionOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Stop
namespace MoveToLevelWithOnOff {
+enum class Fields
+{
+ kLevel = 0,
+ kTransitionTime = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveToLevelWithOnOff::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+
+ uint8_t level;
+ uint16_t transitionTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveToLevelWithOnOff
+public:
+ static constexpr CommandId GetCommandId() { return MoveToLevelWithOnOff::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+ uint8_t level;
+ uint16_t transitionTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveToLevelWithOnOff
namespace MoveWithOnOff {
+enum class Fields
+{
+ kMoveMode = 0,
+ kRate = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveWithOnOff::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+
+ MoveMode moveMode;
+ uint8_t rate;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveWithOnOff
+public:
+ static constexpr CommandId GetCommandId() { return MoveWithOnOff::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+ MoveMode moveMode;
+ uint8_t rate;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveWithOnOff
namespace StepWithOnOff {
+enum class Fields
+{
+ kStepMode = 0,
+ kStepSize = 1,
+ kTransitionTime = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StepWithOnOff::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+
+ StepMode stepMode;
+ uint8_t stepSize;
+ uint16_t transitionTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StepWithOnOff
+public:
+ static constexpr CommandId GetCommandId() { return StepWithOnOff::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+ StepMode stepMode;
+ uint8_t stepSize;
+ uint16_t transitionTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StepWithOnOff
namespace StopWithOnOff {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StopWithOnOff::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StopWithOnOff
+public:
+ static constexpr CommandId GetCommandId() { return StopWithOnOff::Id; }
+ static constexpr ClusterId GetClusterId() { return LevelControl::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StopWithOnOff
} // namespace Commands
} // namespace LevelControl
namespace Alarms {
namespace Commands {
namespace ResetAlarm {
+enum class Fields
+{
+ kAlarmCode = 0,
+ kClusterId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ResetAlarm::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+
+ uint8_t alarmCode;
+ chip::ClusterId clusterId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ResetAlarm
+public:
+ static constexpr CommandId GetCommandId() { return ResetAlarm::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+ uint8_t alarmCode;
+ chip::ClusterId clusterId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ResetAlarm
namespace Alarm {
+enum class Fields
+{
+ kAlarmCode = 0,
+ kClusterId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Alarm::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+
+ uint8_t alarmCode;
+ chip::ClusterId clusterId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Alarm
+public:
+ static constexpr CommandId GetCommandId() { return Alarm::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+ uint8_t alarmCode;
+ chip::ClusterId clusterId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Alarm
namespace ResetAllAlarms {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ResetAllAlarms::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ResetAllAlarms
+public:
+ static constexpr CommandId GetCommandId() { return ResetAllAlarms::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ResetAllAlarms
namespace GetAlarmResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kAlarmCode = 1,
+ kClusterId = 2,
+ kTimeStamp = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetAlarmResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+
+ uint8_t status;
+ uint8_t alarmCode;
+ chip::ClusterId clusterId;
+ uint32_t timeStamp;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetAlarmResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetAlarmResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+ uint8_t status;
+ uint8_t alarmCode;
+ chip::ClusterId clusterId;
+ uint32_t timeStamp;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetAlarmResponse
namespace GetAlarm {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetAlarm::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetAlarm
+public:
+ static constexpr CommandId GetCommandId() { return GetAlarm::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetAlarm
namespace ResetAlarmLog {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ResetAlarmLog::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ResetAlarmLog
+public:
+ static constexpr CommandId GetCommandId() { return ResetAlarmLog::Id; }
+ static constexpr ClusterId GetClusterId() { return Alarms::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ResetAlarmLog
} // namespace Commands
} // namespace Alarms
namespace Time {
@@ -735,12 +1950,12 @@
namespace PowerProfile {
namespace PowerProfileRecord {
-enum FieldId
+enum class Fields
{
- kPowerProfileIdFieldId = 0,
- kEnergyPhaseIdFieldId = 1,
- kPowerProfileRemoteControlFieldId = 2,
- kPowerProfileStateFieldId = 3,
+ kPowerProfileId = 0,
+ kEnergyPhaseId = 1,
+ kPowerProfileRemoteControl = 2,
+ kPowerProfileState = 3,
};
struct Type
@@ -759,10 +1974,10 @@
} // namespace PowerProfileRecord
namespace ScheduledPhase {
-enum FieldId
+enum class Fields
{
- kEnergyPhaseIdFieldId = 0,
- kScheduledTimeFieldId = 1,
+ kEnergyPhaseId = 0,
+ kScheduledTime = 1,
};
struct Type
@@ -779,14 +1994,14 @@
} // namespace ScheduledPhase
namespace TransferredPhase {
-enum FieldId
+enum class Fields
{
- kEnergyPhaseIdFieldId = 0,
- kMacroPhaseIdFieldId = 1,
- kExpectedDurationFieldId = 2,
- kPeakPowerFieldId = 3,
- kEnergyFieldId = 4,
- kMaxActivationDelayFieldId = 5,
+ kEnergyPhaseId = 0,
+ kMacroPhaseId = 1,
+ kExpectedDuration = 2,
+ kPeakPower = 3,
+ kEnergy = 4,
+ kMaxActivationDelay = 5,
};
struct Type
@@ -809,215 +2024,675 @@
namespace Commands {
namespace PowerProfileRequest {
+enum class Fields
+{
+ kPowerProfileId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfileRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfileRequest
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfileRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfileRequest
namespace PowerProfileNotification {
+enum class Fields
+{
+ kTotalProfileNum = 0,
+ kPowerProfileId = 1,
+ kNumOfTransferredPhases = 2,
+ kTransferredPhases = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfileNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t totalProfileNum;
+ uint8_t powerProfileId;
+ uint8_t numOfTransferredPhases;
+ DataModel::List<TransferredPhase::Type> transferredPhases;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfileNotification
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfileNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t totalProfileNum;
+ uint8_t powerProfileId;
+ uint8_t numOfTransferredPhases;
+ DataModel::DecodableList<TransferredPhase::DecodableType> transferredPhases;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfileNotification
namespace PowerProfileStateRequest {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfileStateRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfileStateRequest
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfileStateRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfileStateRequest
namespace PowerProfileResponse {
+enum class Fields
+{
+ kTotalProfileNum = 0,
+ kPowerProfileId = 1,
+ kNumOfTransferredPhases = 2,
+ kTransferredPhases = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfileResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t totalProfileNum;
+ uint8_t powerProfileId;
+ uint8_t numOfTransferredPhases;
+ DataModel::List<TransferredPhase::Type> transferredPhases;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfileResponse
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfileResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t totalProfileNum;
+ uint8_t powerProfileId;
+ uint8_t numOfTransferredPhases;
+ DataModel::DecodableList<TransferredPhase::DecodableType> transferredPhases;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfileResponse
namespace GetPowerProfilePriceResponse {
+enum class Fields
+{
+ kPowerProfileId = 0,
+ kCurrency = 1,
+ kPrice = 2,
+ kPriceTrailingDigit = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetPowerProfilePriceResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+ uint16_t currency;
+ uint32_t price;
+ uint8_t priceTrailingDigit;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetPowerProfilePriceResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetPowerProfilePriceResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ uint16_t currency;
+ uint32_t price;
+ uint8_t priceTrailingDigit;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetPowerProfilePriceResponse
namespace PowerProfileStateResponse {
+enum class Fields
+{
+ kPowerProfileCount = 0,
+ kPowerProfileRecords = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfileStateResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileCount;
+ DataModel::List<PowerProfileRecord::Type> powerProfileRecords;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfileStateResponse
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfileStateResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileCount;
+ DataModel::DecodableList<PowerProfileRecord::DecodableType> powerProfileRecords;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfileStateResponse
namespace GetOverallSchedulePriceResponse {
+enum class Fields
+{
+ kCurrency = 0,
+ kPrice = 1,
+ kPriceTrailingDigit = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetOverallSchedulePriceResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint16_t currency;
+ uint32_t price;
+ uint8_t priceTrailingDigit;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetOverallSchedulePriceResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetOverallSchedulePriceResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint16_t currency;
+ uint32_t price;
+ uint8_t priceTrailingDigit;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetOverallSchedulePriceResponse
namespace GetPowerProfilePrice {
+enum class Fields
+{
+ kPowerProfileId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetPowerProfilePrice::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetPowerProfilePrice
+public:
+ static constexpr CommandId GetCommandId() { return GetPowerProfilePrice::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetPowerProfilePrice
namespace EnergyPhasesScheduleNotification {
+enum class Fields
+{
+ kPowerProfileId = 0,
+ kNumOfScheduledPhases = 1,
+ kScheduledPhases = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+ uint8_t numOfScheduledPhases;
+ DataModel::List<ScheduledPhase::Type> scheduledPhases;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnergyPhasesScheduleNotification
+public:
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ uint8_t numOfScheduledPhases;
+ DataModel::DecodableList<ScheduledPhase::DecodableType> scheduledPhases;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnergyPhasesScheduleNotification
namespace PowerProfilesStateNotification {
+enum class Fields
+{
+ kPowerProfileCount = 0,
+ kPowerProfileRecords = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfilesStateNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileCount;
+ DataModel::List<PowerProfileRecord::Type> powerProfileRecords;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfilesStateNotification
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfilesStateNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileCount;
+ DataModel::DecodableList<PowerProfileRecord::DecodableType> powerProfileRecords;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfilesStateNotification
namespace EnergyPhasesScheduleResponse {
+enum class Fields
+{
+ kPowerProfileId = 0,
+ kNumOfScheduledPhases = 1,
+ kScheduledPhases = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+ uint8_t numOfScheduledPhases;
+ DataModel::List<ScheduledPhase::Type> scheduledPhases;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnergyPhasesScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ uint8_t numOfScheduledPhases;
+ DataModel::DecodableList<ScheduledPhase::DecodableType> scheduledPhases;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnergyPhasesScheduleResponse
namespace GetOverallSchedulePrice {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetOverallSchedulePrice::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetOverallSchedulePrice
+public:
+ static constexpr CommandId GetCommandId() { return GetOverallSchedulePrice::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetOverallSchedulePrice
namespace PowerProfileScheduleConstraintsRequest {
+enum class Fields
+{
+ kPowerProfileId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfileScheduleConstraintsRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfileScheduleConstraintsRequest
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfileScheduleConstraintsRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfileScheduleConstraintsRequest
namespace EnergyPhasesScheduleRequest {
+enum class Fields
+{
+ kPowerProfileId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnergyPhasesScheduleRequest
+public:
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnergyPhasesScheduleRequest
namespace EnergyPhasesScheduleStateRequest {
+enum class Fields
+{
+ kPowerProfileId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleStateRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnergyPhasesScheduleStateRequest
+public:
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleStateRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnergyPhasesScheduleStateRequest
namespace EnergyPhasesScheduleStateResponse {
+enum class Fields
+{
+ kPowerProfileId = 0,
+ kNumOfScheduledPhases = 1,
+ kScheduledPhases = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleStateResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+ uint8_t numOfScheduledPhases;
+ DataModel::List<ScheduledPhase::Type> scheduledPhases;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnergyPhasesScheduleStateResponse
+public:
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleStateResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ uint8_t numOfScheduledPhases;
+ DataModel::DecodableList<ScheduledPhase::DecodableType> scheduledPhases;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnergyPhasesScheduleStateResponse
namespace GetPowerProfilePriceExtendedResponse {
+enum class Fields
+{
+ kPowerProfileId = 0,
+ kCurrency = 1,
+ kPrice = 2,
+ kPriceTrailingDigit = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetPowerProfilePriceExtendedResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+ uint16_t currency;
+ uint32_t price;
+ uint8_t priceTrailingDigit;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetPowerProfilePriceExtendedResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetPowerProfilePriceExtendedResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ uint16_t currency;
+ uint32_t price;
+ uint8_t priceTrailingDigit;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetPowerProfilePriceExtendedResponse
namespace EnergyPhasesScheduleStateNotification {
+enum class Fields
+{
+ kPowerProfileId = 0,
+ kNumOfScheduledPhases = 1,
+ kScheduledPhases = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleStateNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+ uint8_t numOfScheduledPhases;
+ DataModel::List<ScheduledPhase::Type> scheduledPhases;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnergyPhasesScheduleStateNotification
+public:
+ static constexpr CommandId GetCommandId() { return EnergyPhasesScheduleStateNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ uint8_t numOfScheduledPhases;
+ DataModel::DecodableList<ScheduledPhase::DecodableType> scheduledPhases;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnergyPhasesScheduleStateNotification
namespace PowerProfileScheduleConstraintsNotification {
+enum class Fields
+{
+ kPowerProfileId = 0,
+ kStartAfter = 1,
+ kStopBefore = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfileScheduleConstraintsNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+ uint16_t startAfter;
+ uint16_t stopBefore;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfileScheduleConstraintsNotification
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfileScheduleConstraintsNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ uint16_t startAfter;
+ uint16_t stopBefore;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfileScheduleConstraintsNotification
namespace PowerProfileScheduleConstraintsResponse {
+enum class Fields
+{
+ kPowerProfileId = 0,
+ kStartAfter = 1,
+ kStopBefore = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PowerProfileScheduleConstraintsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t powerProfileId;
+ uint16_t startAfter;
+ uint16_t stopBefore;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PowerProfileScheduleConstraintsResponse
+public:
+ static constexpr CommandId GetCommandId() { return PowerProfileScheduleConstraintsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t powerProfileId;
+ uint16_t startAfter;
+ uint16_t stopBefore;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PowerProfileScheduleConstraintsResponse
namespace GetPowerProfilePriceExtended {
+enum class Fields
+{
+ kOptions = 0,
+ kPowerProfileId = 1,
+ kPowerProfileStartTime = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetPowerProfilePriceExtended::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+
+ uint8_t options;
+ uint8_t powerProfileId;
+ uint16_t powerProfileStartTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetPowerProfilePriceExtended
+public:
+ static constexpr CommandId GetCommandId() { return GetPowerProfilePriceExtended::Id; }
+ static constexpr ClusterId GetClusterId() { return PowerProfile::Id; }
+ uint8_t options;
+ uint8_t powerProfileId;
+ uint16_t powerProfileStartTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetPowerProfilePriceExtended
} // namespace Commands
} // namespace PowerProfile
namespace ApplianceControl {
@@ -1067,100 +2742,250 @@
namespace Commands {
namespace ExecutionOfACommand {
-struct Type
+enum class Fields
{
-};
-
-struct DecodableType
-{
-};
-} // namespace ExecutionOfACommand
-
-namespace SignalStateResponse {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace SignalStateResponse
-
-namespace SignalState {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace SignalState
-
-namespace SignalStateNotification {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace SignalStateNotification
-
-namespace WriteFunctions {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace WriteFunctions
-
-namespace OverloadPauseResume {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace OverloadPauseResume
-
-namespace OverloadPause {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace OverloadPause
-
-namespace OverloadWarning {
-struct Type
-{
-};
-
-struct DecodableType
-{
-};
-} // namespace OverloadWarning
-
-} // namespace Commands
-} // namespace ApplianceControl
-namespace Descriptor {
-
-namespace DeviceType {
-enum FieldId
-{
- kTypeFieldId = 0,
- kRevisionFieldId = 1,
+ kCommandId = 0,
};
struct Type
{
public:
- uint32_t type;
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ExecutionOfACommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ CommandIdentification commandId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return ExecutionOfACommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ CommandIdentification commandId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ExecutionOfACommand
+namespace SignalStateResponse {
+enum class Fields
+{
+ kApplianceStatus = 0,
+ kRemoteEnableFlagsAndDeviceStatus2 = 1,
+ kApplianceStatus2 = 2,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SignalStateResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ ApplianceStatus applianceStatus;
+ uint8_t remoteEnableFlagsAndDeviceStatus2;
+ ApplianceStatus applianceStatus2;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return SignalStateResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ ApplianceStatus applianceStatus;
+ uint8_t remoteEnableFlagsAndDeviceStatus2;
+ ApplianceStatus applianceStatus2;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SignalStateResponse
+namespace SignalState {
+enum class Fields
+{
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SignalState::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return SignalState::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SignalState
+namespace SignalStateNotification {
+enum class Fields
+{
+ kApplianceStatus = 0,
+ kRemoteEnableFlagsAndDeviceStatus2 = 1,
+ kApplianceStatus2 = 2,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SignalStateNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ ApplianceStatus applianceStatus;
+ uint8_t remoteEnableFlagsAndDeviceStatus2;
+ ApplianceStatus applianceStatus2;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return SignalStateNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ ApplianceStatus applianceStatus;
+ uint8_t remoteEnableFlagsAndDeviceStatus2;
+ ApplianceStatus applianceStatus2;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SignalStateNotification
+namespace WriteFunctions {
+enum class Fields
+{
+ kFunctionId = 0,
+ kFunctionDataType = 1,
+ kFunctionData = 2,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return WriteFunctions::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ uint16_t functionId;
+ uint8_t functionDataType;
+ DataModel::List<uint8_t> functionData;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return WriteFunctions::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ uint16_t functionId;
+ uint8_t functionDataType;
+ DataModel::DecodableList<uint8_t> functionData;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace WriteFunctions
+namespace OverloadPauseResume {
+enum class Fields
+{
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OverloadPauseResume::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return OverloadPauseResume::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OverloadPauseResume
+namespace OverloadPause {
+enum class Fields
+{
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OverloadPause::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return OverloadPause::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OverloadPause
+namespace OverloadWarning {
+enum class Fields
+{
+ kWarningEvent = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OverloadWarning::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ WarningEvent warningEvent;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return OverloadWarning::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; }
+
+ WarningEvent warningEvent;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OverloadWarning
+} // namespace Commands
+} // namespace ApplianceControl
+namespace Descriptor {
+
+namespace DeviceType {
+enum class Fields
+{
+ kType = 0,
+ kRevision = 1,
+};
+
+struct Type
+{
+public:
+ chip::DeviceTypeId type;
uint16_t revision;
CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
@@ -1176,100 +3001,241 @@
namespace Commands {
namespace CheckIn {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CheckIn::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CheckIn
+public:
+ static constexpr CommandId GetCommandId() { return CheckIn::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CheckIn
namespace CheckInResponse {
+enum class Fields
+{
+ kStartFastPolling = 0,
+ kFastPollTimeout = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CheckInResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+
+ bool startFastPolling;
+ uint16_t fastPollTimeout;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CheckInResponse
+public:
+ static constexpr CommandId GetCommandId() { return CheckInResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+ bool startFastPolling;
+ uint16_t fastPollTimeout;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CheckInResponse
namespace FastPollStop {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return FastPollStop::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace FastPollStop
+public:
+ static constexpr CommandId GetCommandId() { return FastPollStop::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace FastPollStop
namespace SetLongPollInterval {
+enum class Fields
+{
+ kNewLongPollInterval = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetLongPollInterval::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+
+ uint32_t newLongPollInterval;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetLongPollInterval
+public:
+ static constexpr CommandId GetCommandId() { return SetLongPollInterval::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+ uint32_t newLongPollInterval;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetLongPollInterval
namespace SetShortPollInterval {
+enum class Fields
+{
+ kNewShortPollInterval = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetShortPollInterval::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+
+ uint16_t newShortPollInterval;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetShortPollInterval
+public:
+ static constexpr CommandId GetCommandId() { return SetShortPollInterval::Id; }
+ static constexpr ClusterId GetClusterId() { return PollControl::Id; }
+ uint16_t newShortPollInterval;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetShortPollInterval
} // namespace Commands
} // namespace PollControl
namespace Basic {
namespace Commands {
namespace StartUp {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StartUp::Id; }
+ static constexpr ClusterId GetClusterId() { return Basic::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StartUp
+public:
+ static constexpr CommandId GetCommandId() { return StartUp::Id; }
+ static constexpr ClusterId GetClusterId() { return Basic::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StartUp
namespace MfgSpecificPing {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MfgSpecificPing::Id; }
+ static constexpr ClusterId GetClusterId() { return Basic::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MfgSpecificPing
+public:
+ static constexpr CommandId GetCommandId() { return MfgSpecificPing::Id; }
+ static constexpr ClusterId GetClusterId() { return Basic::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MfgSpecificPing
namespace ShutDown {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ShutDown::Id; }
+ static constexpr ClusterId GetClusterId() { return Basic::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ShutDown
+public:
+ static constexpr CommandId GetCommandId() { return ShutDown::Id; }
+ static constexpr ClusterId GetClusterId() { return Basic::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ShutDown
namespace Leave {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Leave::Id; }
+ static constexpr ClusterId GetClusterId() { return Basic::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Leave
+public:
+ static constexpr CommandId GetCommandId() { return Leave::Id; }
+ static constexpr ClusterId GetClusterId() { return Basic::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Leave
} // namespace Commands
} // namespace Basic
namespace OtaSoftwareUpdateProvider {
@@ -1298,55 +3264,196 @@
namespace Commands {
namespace QueryImage {
+enum class Fields
+{
+ kVendorId = 0,
+ kProductId = 1,
+ kHardwareVersion = 2,
+ kSoftwareVersion = 3,
+ kProtocolsSupported = 4,
+ kLocation = 5,
+ kRequestorCanConsent = 6,
+ kMetadataForProvider = 7,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return QueryImage::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+
+ uint16_t vendorId;
+ uint16_t productId;
+ uint16_t hardwareVersion;
+ uint32_t softwareVersion;
+ OTADownloadProtocol protocolsSupported;
+ Span<const char> location;
+ bool requestorCanConsent;
+ chip::ByteSpan metadataForProvider;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace QueryImage
+public:
+ static constexpr CommandId GetCommandId() { return QueryImage::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+ uint16_t vendorId;
+ uint16_t productId;
+ uint16_t hardwareVersion;
+ uint32_t softwareVersion;
+ OTADownloadProtocol protocolsSupported;
+ Span<const char> location;
+ bool requestorCanConsent;
+ chip::ByteSpan metadataForProvider;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace QueryImage
namespace ApplyUpdateRequest {
+enum class Fields
+{
+ kUpdateToken = 0,
+ kNewVersion = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ApplyUpdateRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+
+ chip::ByteSpan updateToken;
+ uint32_t newVersion;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ApplyUpdateRequest
+public:
+ static constexpr CommandId GetCommandId() { return ApplyUpdateRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+ chip::ByteSpan updateToken;
+ uint32_t newVersion;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ApplyUpdateRequest
namespace NotifyUpdateApplied {
+enum class Fields
+{
+ kUpdateToken = 0,
+ kSoftwareVersion = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return NotifyUpdateApplied::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+
+ chip::ByteSpan updateToken;
+ uint32_t softwareVersion;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace NotifyUpdateApplied
+public:
+ static constexpr CommandId GetCommandId() { return NotifyUpdateApplied::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+ chip::ByteSpan updateToken;
+ uint32_t softwareVersion;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace NotifyUpdateApplied
namespace QueryImageResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kDelayedActionTime = 1,
+ kImageURI = 2,
+ kSoftwareVersion = 3,
+ kSoftwareVersionString = 4,
+ kUpdateToken = 5,
+ kUserConsentNeeded = 6,
+ kMetadataForRequestor = 7,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return QueryImageResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+
+ OTAQueryStatus status;
+ uint32_t delayedActionTime;
+ Span<const char> imageURI;
+ uint32_t softwareVersion;
+ Span<const char> softwareVersionString;
+ chip::ByteSpan updateToken;
+ bool userConsentNeeded;
+ chip::ByteSpan metadataForRequestor;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace QueryImageResponse
+public:
+ static constexpr CommandId GetCommandId() { return QueryImageResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+ OTAQueryStatus status;
+ uint32_t delayedActionTime;
+ Span<const char> imageURI;
+ uint32_t softwareVersion;
+ Span<const char> softwareVersionString;
+ chip::ByteSpan updateToken;
+ bool userConsentNeeded;
+ chip::ByteSpan metadataForRequestor;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace QueryImageResponse
namespace ApplyUpdateRequestResponse {
+enum class Fields
+{
+ kAction = 0,
+ kDelayedActionTime = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ApplyUpdateRequestResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+
+ OTAApplyUpdateAction action;
+ uint32_t delayedActionTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ApplyUpdateRequestResponse
+public:
+ static constexpr CommandId GetCommandId() { return ApplyUpdateRequestResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateProvider::Id; }
+ OTAApplyUpdateAction action;
+ uint32_t delayedActionTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ApplyUpdateRequestResponse
} // namespace Commands
} // namespace OtaSoftwareUpdateProvider
namespace OtaSoftwareUpdateRequestor {
@@ -1360,15 +3467,42 @@
namespace Commands {
namespace AnnounceOtaProvider {
+enum class Fields
+{
+ kProviderLocation = 0,
+ kVendorId = 1,
+ kAnnouncementReason = 2,
+ kMetadataForNode = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AnnounceOtaProvider::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateRequestor::Id; }
+
+ chip::ByteSpan providerLocation;
+ uint16_t vendorId;
+ OTAAnnouncementReason announcementReason;
+ chip::ByteSpan metadataForNode;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AnnounceOtaProvider
+public:
+ static constexpr CommandId GetCommandId() { return AnnounceOtaProvider::Id; }
+ static constexpr ClusterId GetClusterId() { return OtaSoftwareUpdateRequestor::Id; }
+ chip::ByteSpan providerLocation;
+ uint16_t vendorId;
+ OTAAnnouncementReason announcementReason;
+ chip::ByteSpan metadataForNode;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AnnounceOtaProvider
} // namespace Commands
} // namespace OtaSoftwareUpdateRequestor
namespace PowerSource {
@@ -1391,9 +3525,9 @@
};
namespace BasicCommissioningInfoType {
-enum FieldId
+enum class Fields
{
- kFailSafeExpiryLengthMsFieldId = 0,
+ kFailSafeExpiryLengthMs = 0,
};
struct Type
@@ -1411,65 +3545,193 @@
namespace Commands {
namespace ArmFailSafe {
+enum class Fields
+{
+ kExpiryLengthSeconds = 0,
+ kBreadcrumb = 1,
+ kTimeoutMs = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ArmFailSafe::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+
+ uint16_t expiryLengthSeconds;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ArmFailSafe
+public:
+ static constexpr CommandId GetCommandId() { return ArmFailSafe::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+ uint16_t expiryLengthSeconds;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ArmFailSafe
namespace ArmFailSafeResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ArmFailSafeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+
+ GeneralCommissioningError errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ArmFailSafeResponse
+public:
+ static constexpr CommandId GetCommandId() { return ArmFailSafeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+ GeneralCommissioningError errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ArmFailSafeResponse
namespace SetRegulatoryConfig {
+enum class Fields
+{
+ kLocation = 0,
+ kCountryCode = 1,
+ kBreadcrumb = 2,
+ kTimeoutMs = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetRegulatoryConfig::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+
+ RegulatoryLocationType location;
+ Span<const char> countryCode;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetRegulatoryConfig
+public:
+ static constexpr CommandId GetCommandId() { return SetRegulatoryConfig::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+ RegulatoryLocationType location;
+ Span<const char> countryCode;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetRegulatoryConfig
namespace SetRegulatoryConfigResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetRegulatoryConfigResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+
+ GeneralCommissioningError errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetRegulatoryConfigResponse
+public:
+ static constexpr CommandId GetCommandId() { return SetRegulatoryConfigResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+ GeneralCommissioningError errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetRegulatoryConfigResponse
namespace CommissioningComplete {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CommissioningComplete::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CommissioningComplete
+public:
+ static constexpr CommandId GetCommandId() { return CommissioningComplete::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CommissioningComplete
namespace CommissioningCompleteResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CommissioningCompleteResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+
+ GeneralCommissioningError errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CommissioningCompleteResponse
+public:
+ static constexpr CommandId GetCommandId() { return CommissioningCompleteResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return GeneralCommissioning::Id; }
+ GeneralCommissioningError errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CommissioningCompleteResponse
} // namespace Commands
} // namespace GeneralCommissioning
namespace NetworkCommissioning {
@@ -1499,9 +3761,9 @@
};
namespace ThreadInterfaceScanResult {
-enum FieldId
+enum class Fields
{
- kDiscoveryResponseFieldId = 0,
+ kDiscoveryResponse = 0,
};
struct Type
@@ -1517,13 +3779,13 @@
} // namespace ThreadInterfaceScanResult
namespace WiFiInterfaceScanResult {
-enum FieldId
+enum class Fields
{
- kSecurityFieldId = 0,
- kSsidFieldId = 1,
- kBssidFieldId = 2,
- kChannelFieldId = 3,
- kFrequencyBandFieldId = 4,
+ kSecurity = 0,
+ kSsid = 1,
+ kBssid = 2,
+ kChannel = 3,
+ kFrequencyBand = 4,
};
struct Type
@@ -1545,175 +3807,565 @@
namespace Commands {
namespace ScanNetworks {
+enum class Fields
+{
+ kSsid = 0,
+ kBreadcrumb = 1,
+ kTimeoutMs = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ScanNetworks::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ chip::ByteSpan ssid;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ScanNetworks
+public:
+ static constexpr CommandId GetCommandId() { return ScanNetworks::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ chip::ByteSpan ssid;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ScanNetworks
namespace ScanNetworksResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+ kWifiScanResults = 2,
+ kThreadScanResults = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ScanNetworksResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint8_t errorCode;
+ Span<const char> debugText;
+ DataModel::List<WiFiInterfaceScanResult::Type> wifiScanResults;
+ DataModel::List<ThreadInterfaceScanResult::Type> threadScanResults;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ScanNetworksResponse
+public:
+ static constexpr CommandId GetCommandId() { return ScanNetworksResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint8_t errorCode;
+ Span<const char> debugText;
+ DataModel::DecodableList<WiFiInterfaceScanResult::DecodableType> wifiScanResults;
+ DataModel::DecodableList<ThreadInterfaceScanResult::DecodableType> threadScanResults;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ScanNetworksResponse
namespace AddWiFiNetwork {
+enum class Fields
+{
+ kSsid = 0,
+ kCredentials = 1,
+ kBreadcrumb = 2,
+ kTimeoutMs = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddWiFiNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ chip::ByteSpan ssid;
+ chip::ByteSpan credentials;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AddWiFiNetwork
+public:
+ static constexpr CommandId GetCommandId() { return AddWiFiNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ chip::ByteSpan ssid;
+ chip::ByteSpan credentials;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddWiFiNetwork
namespace AddWiFiNetworkResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddWiFiNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint8_t errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AddWiFiNetworkResponse
+public:
+ static constexpr CommandId GetCommandId() { return AddWiFiNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint8_t errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddWiFiNetworkResponse
namespace UpdateWiFiNetwork {
+enum class Fields
+{
+ kSsid = 0,
+ kCredentials = 1,
+ kBreadcrumb = 2,
+ kTimeoutMs = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UpdateWiFiNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ chip::ByteSpan ssid;
+ chip::ByteSpan credentials;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UpdateWiFiNetwork
+public:
+ static constexpr CommandId GetCommandId() { return UpdateWiFiNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ chip::ByteSpan ssid;
+ chip::ByteSpan credentials;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UpdateWiFiNetwork
namespace UpdateWiFiNetworkResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UpdateWiFiNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint8_t errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UpdateWiFiNetworkResponse
+public:
+ static constexpr CommandId GetCommandId() { return UpdateWiFiNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint8_t errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UpdateWiFiNetworkResponse
namespace AddThreadNetwork {
+enum class Fields
+{
+ kOperationalDataset = 0,
+ kBreadcrumb = 1,
+ kTimeoutMs = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddThreadNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ chip::ByteSpan operationalDataset;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AddThreadNetwork
+public:
+ static constexpr CommandId GetCommandId() { return AddThreadNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ chip::ByteSpan operationalDataset;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddThreadNetwork
namespace AddThreadNetworkResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddThreadNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint8_t errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AddThreadNetworkResponse
+public:
+ static constexpr CommandId GetCommandId() { return AddThreadNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint8_t errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddThreadNetworkResponse
namespace UpdateThreadNetwork {
+enum class Fields
+{
+ kOperationalDataset = 0,
+ kBreadcrumb = 1,
+ kTimeoutMs = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UpdateThreadNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ chip::ByteSpan operationalDataset;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UpdateThreadNetwork
+public:
+ static constexpr CommandId GetCommandId() { return UpdateThreadNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ chip::ByteSpan operationalDataset;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UpdateThreadNetwork
namespace UpdateThreadNetworkResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UpdateThreadNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint8_t errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UpdateThreadNetworkResponse
+public:
+ static constexpr CommandId GetCommandId() { return UpdateThreadNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint8_t errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UpdateThreadNetworkResponse
namespace RemoveNetwork {
+enum class Fields
+{
+ kNetworkID = 0,
+ kBreadcrumb = 1,
+ kTimeoutMs = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ chip::ByteSpan networkID;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RemoveNetwork
+public:
+ static constexpr CommandId GetCommandId() { return RemoveNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ chip::ByteSpan networkID;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveNetwork
namespace RemoveNetworkResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint8_t errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RemoveNetworkResponse
+public:
+ static constexpr CommandId GetCommandId() { return RemoveNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint8_t errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveNetworkResponse
namespace EnableNetwork {
+enum class Fields
+{
+ kNetworkID = 0,
+ kBreadcrumb = 1,
+ kTimeoutMs = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnableNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ chip::ByteSpan networkID;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnableNetwork
+public:
+ static constexpr CommandId GetCommandId() { return EnableNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ chip::ByteSpan networkID;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnableNetwork
namespace EnableNetworkResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnableNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint8_t errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnableNetworkResponse
+public:
+ static constexpr CommandId GetCommandId() { return EnableNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint8_t errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnableNetworkResponse
namespace DisableNetwork {
+enum class Fields
+{
+ kNetworkID = 0,
+ kBreadcrumb = 1,
+ kTimeoutMs = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return DisableNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ chip::ByteSpan networkID;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace DisableNetwork
+public:
+ static constexpr CommandId GetCommandId() { return DisableNetwork::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ chip::ByteSpan networkID;
+ uint64_t breadcrumb;
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace DisableNetwork
namespace DisableNetworkResponse {
+enum class Fields
+{
+ kErrorCode = 0,
+ kDebugText = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return DisableNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint8_t errorCode;
+ Span<const char> debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace DisableNetworkResponse
+public:
+ static constexpr CommandId GetCommandId() { return DisableNetworkResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint8_t errorCode;
+ Span<const char> debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace DisableNetworkResponse
namespace GetLastNetworkCommissioningResult {
+enum class Fields
+{
+ kTimeoutMs = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetLastNetworkCommissioningResult::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+
+ uint32_t timeoutMs;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetLastNetworkCommissioningResult
+public:
+ static constexpr CommandId GetCommandId() { return GetLastNetworkCommissioningResult::Id; }
+ static constexpr ClusterId GetClusterId() { return NetworkCommissioning::Id; }
+ uint32_t timeoutMs;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetLastNetworkCommissioningResult
} // namespace Commands
} // namespace NetworkCommissioning
namespace DiagnosticLogs {
@@ -1742,25 +4394,76 @@
namespace Commands {
namespace RetrieveLogsRequest {
+enum class Fields
+{
+ kIntent = 0,
+ kRequestedProtocol = 1,
+ kTransferFileDesignator = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RetrieveLogsRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return DiagnosticLogs::Id; }
+
+ LogsIntent intent;
+ LogsTransferProtocol requestedProtocol;
+ chip::ByteSpan transferFileDesignator;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RetrieveLogsRequest
+public:
+ static constexpr CommandId GetCommandId() { return RetrieveLogsRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return DiagnosticLogs::Id; }
+ LogsIntent intent;
+ LogsTransferProtocol requestedProtocol;
+ chip::ByteSpan transferFileDesignator;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RetrieveLogsRequest
namespace RetrieveLogsResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kContent = 1,
+ kTimeStamp = 2,
+ kTimeSinceBoot = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RetrieveLogsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DiagnosticLogs::Id; }
+
+ LogsStatus status;
+ chip::ByteSpan content;
+ uint32_t timeStamp;
+ uint32_t timeSinceBoot;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RetrieveLogsResponse
+public:
+ static constexpr CommandId GetCommandId() { return RetrieveLogsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DiagnosticLogs::Id; }
+ LogsStatus status;
+ chip::ByteSpan content;
+ uint32_t timeStamp;
+ uint32_t timeSinceBoot;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RetrieveLogsResponse
} // namespace Commands
} // namespace DiagnosticLogs
namespace GeneralDiagnostics {
@@ -1820,14 +4523,14 @@
};
namespace NetworkInterfaceType {
-enum FieldId
+enum class Fields
{
- kNameFieldId = 0,
- kFabricConnectedFieldId = 1,
- kOffPremiseServicesReachableIPv4FieldId = 2,
- kOffPremiseServicesReachableIPv6FieldId = 3,
- kHardwareAddressFieldId = 4,
- kTypeFieldId = 5,
+ kName = 0,
+ kFabricConnected = 1,
+ kOffPremiseServicesReachableIPv4 = 2,
+ kOffPremiseServicesReachableIPv6 = 3,
+ kHardwareAddress = 4,
+ kType = 5,
};
struct Type
@@ -1852,13 +4555,13 @@
namespace SoftwareDiagnostics {
namespace ThreadMetrics {
-enum FieldId
+enum class Fields
{
- kIdFieldId = 0,
- kNameFieldId = 1,
- kStackFreeCurrentFieldId = 2,
- kStackFreeMinimumFieldId = 3,
- kStackSizeFieldId = 4,
+ kId = 0,
+ kName = 1,
+ kStackFreeCurrent = 2,
+ kStackFreeMinimum = 3,
+ kStackSize = 4,
};
struct Type
@@ -1880,15 +4583,29 @@
namespace Commands {
namespace ResetWatermarks {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ResetWatermarks::Id; }
+ static constexpr ClusterId GetClusterId() { return SoftwareDiagnostics::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ResetWatermarks
+public:
+ static constexpr CommandId GetCommandId() { return ResetWatermarks::Id; }
+ static constexpr ClusterId GetClusterId() { return SoftwareDiagnostics::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ResetWatermarks
} // namespace Commands
} // namespace SoftwareDiagnostics
namespace ThreadNetworkDiagnostics {
@@ -1913,22 +4630,22 @@
};
namespace NeighborTable {
-enum FieldId
+enum class Fields
{
- kExtAddressFieldId = 0,
- kAgeFieldId = 1,
- kRloc16FieldId = 2,
- kLinkFrameCounterFieldId = 3,
- kMleFrameCounterFieldId = 4,
- kLqiFieldId = 5,
- kAverageRssiFieldId = 6,
- kLastRssiFieldId = 7,
- kFrameErrorRateFieldId = 8,
- kMessageErrorRateFieldId = 9,
- kRxOnWhenIdleFieldId = 10,
- kFullThreadDeviceFieldId = 11,
- kFullNetworkDataFieldId = 12,
- kIsChildFieldId = 13,
+ kExtAddress = 0,
+ kAge = 1,
+ kRloc16 = 2,
+ kLinkFrameCounter = 3,
+ kMleFrameCounter = 4,
+ kLqi = 5,
+ kAverageRssi = 6,
+ kLastRssi = 7,
+ kFrameErrorRate = 8,
+ kMessageErrorRate = 9,
+ kRxOnWhenIdle = 10,
+ kFullThreadDevice = 11,
+ kFullNetworkData = 12,
+ kIsChild = 13,
};
struct Type
@@ -1957,20 +4674,20 @@
} // namespace NeighborTable
namespace OperationalDatasetComponents {
-enum FieldId
+enum class Fields
{
- kActiveTimestampPresentFieldId = 0,
- kPendingTimestampPresentFieldId = 1,
- kMasterKeyPresentFieldId = 2,
- kNetworkNamePresentFieldId = 3,
- kExtendedPanIdPresentFieldId = 4,
- kMeshLocalPrefixPresentFieldId = 5,
- kDelayPresentFieldId = 6,
- kPanIdPresentFieldId = 7,
- kChannelPresentFieldId = 8,
- kPskcPresentFieldId = 9,
- kSecurityPolicyPresentFieldId = 10,
- kChannelMaskPresentFieldId = 11,
+ kActiveTimestampPresent = 0,
+ kPendingTimestampPresent = 1,
+ kMasterKeyPresent = 2,
+ kNetworkNamePresent = 3,
+ kExtendedPanIdPresent = 4,
+ kMeshLocalPrefixPresent = 5,
+ kDelayPresent = 6,
+ kPanIdPresent = 7,
+ kChannelPresent = 8,
+ kPskcPresent = 9,
+ kSecurityPolicyPresent = 10,
+ kChannelMaskPresent = 11,
};
struct Type
@@ -1997,18 +4714,18 @@
} // namespace OperationalDatasetComponents
namespace RouteTable {
-enum FieldId
+enum class Fields
{
- kExtAddressFieldId = 0,
- kRloc16FieldId = 1,
- kRouterIdFieldId = 2,
- kNextHopFieldId = 3,
- kPathCostFieldId = 4,
- kLQIInFieldId = 5,
- kLQIOutFieldId = 6,
- kAgeFieldId = 7,
- kAllocatedFieldId = 8,
- kLinkEstablishedFieldId = 9,
+ kExtAddress = 0,
+ kRloc16 = 1,
+ kRouterId = 2,
+ kNextHop = 3,
+ kPathCost = 4,
+ kLQIIn = 5,
+ kLQIOut = 6,
+ kAge = 7,
+ kAllocated = 8,
+ kLinkEstablished = 9,
};
struct Type
@@ -2033,10 +4750,10 @@
} // namespace RouteTable
namespace SecurityPolicy {
-enum FieldId
+enum class Fields
{
- kRotationTimeFieldId = 0,
- kFlagsFieldId = 1,
+ kRotationTime = 0,
+ kFlags = 1,
};
struct Type
@@ -2055,15 +4772,29 @@
namespace Commands {
namespace ResetCounts {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ResetCounts::Id; }
+ static constexpr ClusterId GetClusterId() { return ThreadNetworkDiagnostics::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ResetCounts
+public:
+ static constexpr CommandId GetCommandId() { return ResetCounts::Id; }
+ static constexpr ClusterId GetClusterId() { return ThreadNetworkDiagnostics::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ResetCounts
} // namespace Commands
} // namespace ThreadNetworkDiagnostics
namespace WiFiNetworkDiagnostics {
@@ -2090,15 +4821,29 @@
namespace Commands {
namespace ResetCounts {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ResetCounts::Id; }
+ static constexpr ClusterId GetClusterId() { return WiFiNetworkDiagnostics::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ResetCounts
+public:
+ static constexpr CommandId GetCommandId() { return ResetCounts::Id; }
+ static constexpr ClusterId GetClusterId() { return WiFiNetworkDiagnostics::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ResetCounts
} // namespace Commands
} // namespace WiFiNetworkDiagnostics
namespace EthernetNetworkDiagnostics {
@@ -2119,60 +4864,130 @@
namespace Commands {
namespace ResetCounts {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ResetCounts::Id; }
+ static constexpr ClusterId GetClusterId() { return EthernetNetworkDiagnostics::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ResetCounts
+public:
+ static constexpr CommandId GetCommandId() { return ResetCounts::Id; }
+ static constexpr ClusterId GetClusterId() { return EthernetNetworkDiagnostics::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ResetCounts
} // namespace Commands
} // namespace EthernetNetworkDiagnostics
namespace BridgedDeviceBasic {
namespace Commands {
namespace StartUp {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StartUp::Id; }
+ static constexpr ClusterId GetClusterId() { return BridgedDeviceBasic::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StartUp
+public:
+ static constexpr CommandId GetCommandId() { return StartUp::Id; }
+ static constexpr ClusterId GetClusterId() { return BridgedDeviceBasic::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StartUp
namespace ShutDown {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ShutDown::Id; }
+ static constexpr ClusterId GetClusterId() { return BridgedDeviceBasic::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ShutDown
+public:
+ static constexpr CommandId GetCommandId() { return ShutDown::Id; }
+ static constexpr ClusterId GetClusterId() { return BridgedDeviceBasic::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ShutDown
namespace Leave {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Leave::Id; }
+ static constexpr ClusterId GetClusterId() { return BridgedDeviceBasic::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Leave
+public:
+ static constexpr CommandId GetCommandId() { return Leave::Id; }
+ static constexpr ClusterId GetClusterId() { return BridgedDeviceBasic::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Leave
namespace ReachableChanged {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ReachableChanged::Id; }
+ static constexpr ClusterId GetClusterId() { return BridgedDeviceBasic::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ReachableChanged
+public:
+ static constexpr CommandId GetCommandId() { return ReachableChanged::Id; }
+ static constexpr ClusterId GetClusterId() { return BridgedDeviceBasic::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ReachableChanged
} // namespace Commands
} // namespace BridgedDeviceBasic
namespace Switch {
@@ -2189,35 +5004,100 @@
namespace Commands {
namespace OpenCommissioningWindow {
+enum class Fields
+{
+ kCommissioningTimeout = 0,
+ kPAKEVerifier = 1,
+ kDiscriminator = 2,
+ kIterations = 3,
+ kSalt = 4,
+ kPasscodeID = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OpenCommissioningWindow::Id; }
+ static constexpr ClusterId GetClusterId() { return AdministratorCommissioning::Id; }
+
+ uint16_t commissioningTimeout;
+ chip::ByteSpan pAKEVerifier;
+ uint16_t discriminator;
+ uint32_t iterations;
+ chip::ByteSpan salt;
+ uint16_t passcodeID;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace OpenCommissioningWindow
+public:
+ static constexpr CommandId GetCommandId() { return OpenCommissioningWindow::Id; }
+ static constexpr ClusterId GetClusterId() { return AdministratorCommissioning::Id; }
+ uint16_t commissioningTimeout;
+ chip::ByteSpan pAKEVerifier;
+ uint16_t discriminator;
+ uint32_t iterations;
+ chip::ByteSpan salt;
+ uint16_t passcodeID;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OpenCommissioningWindow
namespace OpenBasicCommissioningWindow {
+enum class Fields
+{
+ kCommissioningTimeout = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OpenBasicCommissioningWindow::Id; }
+ static constexpr ClusterId GetClusterId() { return AdministratorCommissioning::Id; }
+
+ uint16_t commissioningTimeout;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace OpenBasicCommissioningWindow
+public:
+ static constexpr CommandId GetCommandId() { return OpenBasicCommissioningWindow::Id; }
+ static constexpr ClusterId GetClusterId() { return AdministratorCommissioning::Id; }
+ uint16_t commissioningTimeout;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OpenBasicCommissioningWindow
namespace RevokeCommissioning {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RevokeCommissioning::Id; }
+ static constexpr ClusterId GetClusterId() { return AdministratorCommissioning::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RevokeCommissioning
+public:
+ static constexpr CommandId GetCommandId() { return RevokeCommissioning::Id; }
+ static constexpr ClusterId GetClusterId() { return AdministratorCommissioning::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RevokeCommissioning
} // namespace Commands
} // namespace AdministratorCommissioning
namespace OperationalCredentials {
@@ -2237,14 +5117,14 @@
};
namespace FabricDescriptor {
-enum FieldId
+enum class Fields
{
- kFabricIndexFieldId = 0,
- kRootPublicKeyFieldId = 1,
- kVendorIdFieldId = 2,
- kFabricIdFieldId = 3,
- kNodeIdFieldId = 4,
- kLabelFieldId = 5,
+ kFabricIndex = 0,
+ kRootPublicKey = 1,
+ kVendorId = 2,
+ kFabricId = 3,
+ kNodeId = 4,
+ kLabel = 5,
};
struct Type
@@ -2253,8 +5133,8 @@
uint8_t fabricIndex;
chip::ByteSpan rootPublicKey;
uint16_t vendorId;
- uint64_t fabricId;
- uint64_t nodeId;
+ chip::FabricId fabricId;
+ chip::NodeId nodeId;
chip::ByteSpan label;
CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
@@ -2265,10 +5145,10 @@
} // namespace FabricDescriptor
namespace NOCStruct {
-enum FieldId
+enum class Fields
{
- kFabricIndexFieldId = 0,
- kNocFieldId = 1,
+ kFabricIndex = 0,
+ kNoc = 1,
};
struct Type
@@ -2287,144 +5167,405 @@
namespace Commands {
namespace AttestationRequest {
+enum class Fields
+{
+ kAttestationNonce = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AttestationRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan attestationNonce;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AttestationRequest
+public:
+ static constexpr CommandId GetCommandId() { return AttestationRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan attestationNonce;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AttestationRequest
namespace AttestationResponse {
+enum class Fields
+{
+ kAttestationElements = 0,
+ kSignature = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AttestationResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan attestationElements;
+ chip::ByteSpan signature;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AttestationResponse
+public:
+ static constexpr CommandId GetCommandId() { return AttestationResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan attestationElements;
+ chip::ByteSpan signature;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AttestationResponse
namespace CertificateChainRequest {
+enum class Fields
+{
+ kCertificateType = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CertificateChainRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ uint8_t certificateType;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CertificateChainRequest
+public:
+ static constexpr CommandId GetCommandId() { return CertificateChainRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ uint8_t certificateType;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CertificateChainRequest
namespace CertificateChainResponse {
+enum class Fields
+{
+ kCertificate = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CertificateChainResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan certificate;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CertificateChainResponse
+public:
+ static constexpr CommandId GetCommandId() { return CertificateChainResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan certificate;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CertificateChainResponse
namespace OpCSRRequest {
+enum class Fields
+{
+ kCSRNonce = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OpCSRRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan cSRNonce;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace OpCSRRequest
+public:
+ static constexpr CommandId GetCommandId() { return OpCSRRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan cSRNonce;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OpCSRRequest
namespace OpCSRResponse {
+enum class Fields
+{
+ kNOCSRElements = 0,
+ kAttestationSignature = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OpCSRResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan nOCSRElements;
+ chip::ByteSpan attestationSignature;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace OpCSRResponse
+public:
+ static constexpr CommandId GetCommandId() { return OpCSRResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan nOCSRElements;
+ chip::ByteSpan attestationSignature;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OpCSRResponse
namespace AddNOC {
+enum class Fields
+{
+ kNOCValue = 0,
+ kICACValue = 1,
+ kIPKValue = 2,
+ kCaseAdminNode = 3,
+ kAdminVendorId = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddNOC::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan nOCValue;
+ chip::ByteSpan iCACValue;
+ chip::ByteSpan iPKValue;
+ chip::NodeId caseAdminNode;
+ uint16_t adminVendorId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AddNOC
+public:
+ static constexpr CommandId GetCommandId() { return AddNOC::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan nOCValue;
+ chip::ByteSpan iCACValue;
+ chip::ByteSpan iPKValue;
+ chip::NodeId caseAdminNode;
+ uint16_t adminVendorId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddNOC
namespace UpdateNOC {
+enum class Fields
+{
+ kNOCValue = 0,
+ kICACValue = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UpdateNOC::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan nOCValue;
+ chip::ByteSpan iCACValue;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UpdateNOC
+public:
+ static constexpr CommandId GetCommandId() { return UpdateNOC::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan nOCValue;
+ chip::ByteSpan iCACValue;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UpdateNOC
namespace NOCResponse {
+enum class Fields
+{
+ kStatusCode = 0,
+ kFabricIndex = 1,
+ kDebugText = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return NOCResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ uint8_t statusCode;
+ uint8_t fabricIndex;
+ chip::ByteSpan debugText;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace NOCResponse
+public:
+ static constexpr CommandId GetCommandId() { return NOCResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ uint8_t statusCode;
+ uint8_t fabricIndex;
+ chip::ByteSpan debugText;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace NOCResponse
namespace UpdateFabricLabel {
+enum class Fields
+{
+ kLabel = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UpdateFabricLabel::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ Span<const char> label;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UpdateFabricLabel
+public:
+ static constexpr CommandId GetCommandId() { return UpdateFabricLabel::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ Span<const char> label;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UpdateFabricLabel
namespace RemoveFabric {
+enum class Fields
+{
+ kFabricIndex = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveFabric::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ uint8_t fabricIndex;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RemoveFabric
+public:
+ static constexpr CommandId GetCommandId() { return RemoveFabric::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ uint8_t fabricIndex;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveFabric
namespace AddTrustedRootCertificate {
+enum class Fields
+{
+ kRootCertificate = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AddTrustedRootCertificate::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan rootCertificate;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AddTrustedRootCertificate
+public:
+ static constexpr CommandId GetCommandId() { return AddTrustedRootCertificate::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan rootCertificate;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AddTrustedRootCertificate
namespace RemoveTrustedRootCertificate {
+enum class Fields
+{
+ kTrustedRootIdentifier = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RemoveTrustedRootCertificate::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+
+ chip::ByteSpan trustedRootIdentifier;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RemoveTrustedRootCertificate
+public:
+ static constexpr CommandId GetCommandId() { return RemoveTrustedRootCertificate::Id; }
+ static constexpr ClusterId GetClusterId() { return OperationalCredentials::Id; }
+ chip::ByteSpan trustedRootIdentifier;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RemoveTrustedRootCertificate
} // namespace Commands
} // namespace OperationalCredentials
namespace FixedLabel {
namespace LabelStruct {
-enum FieldId
+enum class Fields
{
- kLabelFieldId = 0,
- kValueFieldId = 1,
+ kLabel = 0,
+ kValue = 1,
};
struct Type
@@ -2505,545 +5646,1707 @@
namespace Commands {
namespace LockDoor {
+enum class Fields
+{
+ kPin = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LockDoor::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ Span<const char> pin;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LockDoor
+public:
+ static constexpr CommandId GetCommandId() { return LockDoor::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ Span<const char> pin;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LockDoor
namespace LockDoorResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LockDoorResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LockDoorResponse
+public:
+ static constexpr CommandId GetCommandId() { return LockDoorResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LockDoorResponse
namespace UnlockDoor {
+enum class Fields
+{
+ kPin = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UnlockDoor::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ Span<const char> pin;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UnlockDoor
+public:
+ static constexpr CommandId GetCommandId() { return UnlockDoor::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ Span<const char> pin;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UnlockDoor
namespace UnlockDoorResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UnlockDoorResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UnlockDoorResponse
+public:
+ static constexpr CommandId GetCommandId() { return UnlockDoorResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UnlockDoorResponse
namespace Toggle {
+enum class Fields
+{
+ kPin = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Toggle::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ Span<const char> pin;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Toggle
+public:
+ static constexpr CommandId GetCommandId() { return Toggle::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ Span<const char> pin;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Toggle
namespace ToggleResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ToggleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ToggleResponse
+public:
+ static constexpr CommandId GetCommandId() { return ToggleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ToggleResponse
namespace UnlockWithTimeout {
+enum class Fields
+{
+ kTimeoutInSeconds = 0,
+ kPin = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UnlockWithTimeout::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t timeoutInSeconds;
+ Span<const char> pin;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UnlockWithTimeout
+public:
+ static constexpr CommandId GetCommandId() { return UnlockWithTimeout::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t timeoutInSeconds;
+ Span<const char> pin;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UnlockWithTimeout
namespace UnlockWithTimeoutResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UnlockWithTimeoutResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UnlockWithTimeoutResponse
+public:
+ static constexpr CommandId GetCommandId() { return UnlockWithTimeoutResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UnlockWithTimeoutResponse
namespace GetLogRecord {
+enum class Fields
+{
+ kLogIndex = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetLogRecord::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t logIndex;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetLogRecord
+public:
+ static constexpr CommandId GetCommandId() { return GetLogRecord::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t logIndex;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetLogRecord
namespace GetLogRecordResponse {
+enum class Fields
+{
+ kLogEntryId = 0,
+ kTimestamp = 1,
+ kEventType = 2,
+ kSource = 3,
+ kEventIdOrAlarmCode = 4,
+ kUserId = 5,
+ kPin = 6,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetLogRecordResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t logEntryId;
+ uint32_t timestamp;
+ uint8_t eventType;
+ uint8_t source;
+ uint8_t eventIdOrAlarmCode;
+ uint16_t userId;
+ Span<const char> pin;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetLogRecordResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetLogRecordResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t logEntryId;
+ uint32_t timestamp;
+ uint8_t eventType;
+ uint8_t source;
+ uint8_t eventIdOrAlarmCode;
+ uint16_t userId;
+ Span<const char> pin;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetLogRecordResponse
namespace SetPin {
+enum class Fields
+{
+ kUserId = 0,
+ kUserStatus = 1,
+ kUserType = 2,
+ kPin = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetPin::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+ DoorLockUserStatus userStatus;
+ DoorLockUserType userType;
+ Span<const char> pin;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetPin
+public:
+ static constexpr CommandId GetCommandId() { return SetPin::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ DoorLockUserStatus userStatus;
+ DoorLockUserType userType;
+ Span<const char> pin;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetPin
namespace SetPinResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetPinResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ DoorLockSetPinOrIdStatus status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetPinResponse
+public:
+ static constexpr CommandId GetCommandId() { return SetPinResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ DoorLockSetPinOrIdStatus status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetPinResponse
namespace GetPin {
+enum class Fields
+{
+ kUserId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetPin::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetPin
+public:
+ static constexpr CommandId GetCommandId() { return GetPin::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetPin
namespace GetPinResponse {
+enum class Fields
+{
+ kUserId = 0,
+ kUserStatus = 1,
+ kUserType = 2,
+ kPin = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetPinResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+ DoorLockUserStatus userStatus;
+ DoorLockUserType userType;
+ Span<const char> pin;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetPinResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetPinResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ DoorLockUserStatus userStatus;
+ DoorLockUserType userType;
+ Span<const char> pin;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetPinResponse
namespace ClearPin {
+enum class Fields
+{
+ kUserId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearPin::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearPin
+public:
+ static constexpr CommandId GetCommandId() { return ClearPin::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearPin
namespace ClearPinResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearPinResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearPinResponse
+public:
+ static constexpr CommandId GetCommandId() { return ClearPinResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearPinResponse
namespace ClearAllPins {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearAllPins::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearAllPins
+public:
+ static constexpr CommandId GetCommandId() { return ClearAllPins::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearAllPins
namespace ClearAllPinsResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearAllPinsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearAllPinsResponse
+public:
+ static constexpr CommandId GetCommandId() { return ClearAllPinsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearAllPinsResponse
namespace SetUserStatus {
+enum class Fields
+{
+ kUserId = 0,
+ kUserStatus = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetUserStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+ uint8_t userStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetUserStatus
+public:
+ static constexpr CommandId GetCommandId() { return SetUserStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ uint8_t userStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetUserStatus
namespace SetUserStatusResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetUserStatusResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetUserStatusResponse
+public:
+ static constexpr CommandId GetCommandId() { return SetUserStatusResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetUserStatusResponse
namespace GetUserStatus {
+enum class Fields
+{
+ kUserId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetUserStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetUserStatus
+public:
+ static constexpr CommandId GetCommandId() { return GetUserStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetUserStatus
namespace GetUserStatusResponse {
+enum class Fields
+{
+ kUserId = 0,
+ kStatus = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetUserStatusResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetUserStatusResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetUserStatusResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetUserStatusResponse
namespace SetWeekdaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+ kUserId = 1,
+ kDaysMask = 2,
+ kStartHour = 3,
+ kStartMinute = 4,
+ kEndHour = 5,
+ kEndMinute = 6,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetWeekdaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint16_t userId;
+ uint8_t daysMask;
+ uint8_t startHour;
+ uint8_t startMinute;
+ uint8_t endHour;
+ uint8_t endMinute;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetWeekdaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return SetWeekdaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint16_t userId;
+ uint8_t daysMask;
+ uint8_t startHour;
+ uint8_t startMinute;
+ uint8_t endHour;
+ uint8_t endMinute;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetWeekdaySchedule
namespace SetWeekdayScheduleResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetWeekdayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetWeekdayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return SetWeekdayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetWeekdayScheduleResponse
namespace GetWeekdaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+ kUserId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetWeekdaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetWeekdaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return GetWeekdaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetWeekdaySchedule
namespace GetWeekdayScheduleResponse {
+enum class Fields
+{
+ kScheduleId = 0,
+ kUserId = 1,
+ kStatus = 2,
+ kDaysMask = 3,
+ kStartHour = 4,
+ kStartMinute = 5,
+ kEndHour = 6,
+ kEndMinute = 7,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetWeekdayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint16_t userId;
+ uint8_t status;
+ uint8_t daysMask;
+ uint8_t startHour;
+ uint8_t startMinute;
+ uint8_t endHour;
+ uint8_t endMinute;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetWeekdayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetWeekdayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint16_t userId;
+ uint8_t status;
+ uint8_t daysMask;
+ uint8_t startHour;
+ uint8_t startMinute;
+ uint8_t endHour;
+ uint8_t endMinute;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetWeekdayScheduleResponse
namespace ClearWeekdaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+ kUserId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearWeekdaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearWeekdaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return ClearWeekdaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearWeekdaySchedule
namespace ClearWeekdayScheduleResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearWeekdayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearWeekdayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return ClearWeekdayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearWeekdayScheduleResponse
namespace SetYeardaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+ kUserId = 1,
+ kLocalStartTime = 2,
+ kLocalEndTime = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetYeardaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint16_t userId;
+ uint32_t localStartTime;
+ uint32_t localEndTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetYeardaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return SetYeardaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint16_t userId;
+ uint32_t localStartTime;
+ uint32_t localEndTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetYeardaySchedule
namespace SetYeardayScheduleResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetYeardayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetYeardayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return SetYeardayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetYeardayScheduleResponse
namespace GetYeardaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+ kUserId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetYeardaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetYeardaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return GetYeardaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetYeardaySchedule
namespace GetYeardayScheduleResponse {
+enum class Fields
+{
+ kScheduleId = 0,
+ kUserId = 1,
+ kStatus = 2,
+ kLocalStartTime = 3,
+ kLocalEndTime = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetYeardayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint16_t userId;
+ uint8_t status;
+ uint32_t localStartTime;
+ uint32_t localEndTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetYeardayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetYeardayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint16_t userId;
+ uint8_t status;
+ uint32_t localStartTime;
+ uint32_t localEndTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetYeardayScheduleResponse
namespace ClearYeardaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+ kUserId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearYeardaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearYeardaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return ClearYeardaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearYeardaySchedule
namespace ClearYeardayScheduleResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearYeardayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearYeardayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return ClearYeardayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearYeardayScheduleResponse
namespace SetHolidaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+ kLocalStartTime = 1,
+ kLocalEndTime = 2,
+ kOperatingModeDuringHoliday = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetHolidaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint32_t localStartTime;
+ uint32_t localEndTime;
+ uint8_t operatingModeDuringHoliday;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetHolidaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return SetHolidaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint32_t localStartTime;
+ uint32_t localEndTime;
+ uint8_t operatingModeDuringHoliday;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetHolidaySchedule
namespace SetHolidayScheduleResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetHolidayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetHolidayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return SetHolidayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetHolidayScheduleResponse
namespace GetHolidaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetHolidaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetHolidaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return GetHolidaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetHolidaySchedule
namespace GetHolidayScheduleResponse {
+enum class Fields
+{
+ kScheduleId = 0,
+ kStatus = 1,
+ kLocalStartTime = 2,
+ kLocalEndTime = 3,
+ kOperatingModeDuringHoliday = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetHolidayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+ uint8_t status;
+ uint32_t localStartTime;
+ uint32_t localEndTime;
+ uint8_t operatingModeDuringHoliday;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetHolidayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetHolidayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ uint8_t status;
+ uint32_t localStartTime;
+ uint32_t localEndTime;
+ uint8_t operatingModeDuringHoliday;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetHolidayScheduleResponse
namespace ClearHolidaySchedule {
+enum class Fields
+{
+ kScheduleId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearHolidaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t scheduleId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearHolidaySchedule
+public:
+ static constexpr CommandId GetCommandId() { return ClearHolidaySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t scheduleId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearHolidaySchedule
namespace ClearHolidayScheduleResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearHolidayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearHolidayScheduleResponse
+public:
+ static constexpr CommandId GetCommandId() { return ClearHolidayScheduleResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearHolidayScheduleResponse
namespace SetUserType {
+enum class Fields
+{
+ kUserId = 0,
+ kUserType = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetUserType::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+ DoorLockUserType userType;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetUserType
+public:
+ static constexpr CommandId GetCommandId() { return SetUserType::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ DoorLockUserType userType;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetUserType
namespace SetUserTypeResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetUserTypeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetUserTypeResponse
+public:
+ static constexpr CommandId GetCommandId() { return SetUserTypeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetUserTypeResponse
namespace GetUserType {
+enum class Fields
+{
+ kUserId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetUserType::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetUserType
+public:
+ static constexpr CommandId GetCommandId() { return GetUserType::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetUserType
namespace GetUserTypeResponse {
+enum class Fields
+{
+ kUserId = 0,
+ kUserType = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetUserTypeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+ DoorLockUserType userType;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetUserTypeResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetUserTypeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ DoorLockUserType userType;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetUserTypeResponse
namespace SetRfid {
+enum class Fields
+{
+ kUserId = 0,
+ kUserStatus = 1,
+ kUserType = 2,
+ kId = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetRfid::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+ DoorLockUserStatus userStatus;
+ DoorLockUserType userType;
+ Span<const char> id;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetRfid
+public:
+ static constexpr CommandId GetCommandId() { return SetRfid::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ DoorLockUserStatus userStatus;
+ DoorLockUserType userType;
+ Span<const char> id;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetRfid
namespace SetRfidResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetRfidResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ DoorLockSetPinOrIdStatus status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetRfidResponse
+public:
+ static constexpr CommandId GetCommandId() { return SetRfidResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ DoorLockSetPinOrIdStatus status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetRfidResponse
namespace GetRfid {
+enum class Fields
+{
+ kUserId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetRfid::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetRfid
+public:
+ static constexpr CommandId GetCommandId() { return GetRfid::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetRfid
namespace GetRfidResponse {
+enum class Fields
+{
+ kUserId = 0,
+ kUserStatus = 1,
+ kUserType = 2,
+ kRfid = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetRfidResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+ DoorLockUserStatus userStatus;
+ DoorLockUserType userType;
+ Span<const char> rfid;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetRfidResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetRfidResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ DoorLockUserStatus userStatus;
+ DoorLockUserType userType;
+ Span<const char> rfid;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetRfidResponse
namespace ClearRfid {
+enum class Fields
+{
+ kUserId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearRfid::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint16_t userId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearRfid
+public:
+ static constexpr CommandId GetCommandId() { return ClearRfid::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint16_t userId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearRfid
namespace ClearRfidResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearRfidResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearRfidResponse
+public:
+ static constexpr CommandId GetCommandId() { return ClearRfidResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearRfidResponse
namespace ClearAllRfids {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearAllRfids::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearAllRfids
+public:
+ static constexpr CommandId GetCommandId() { return ClearAllRfids::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearAllRfids
namespace ClearAllRfidsResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearAllRfidsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearAllRfidsResponse
+public:
+ static constexpr CommandId GetCommandId() { return ClearAllRfidsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearAllRfidsResponse
namespace OperationEventNotification {
+enum class Fields
+{
+ kSource = 0,
+ kEventCode = 1,
+ kUserId = 2,
+ kPin = 3,
+ kTimeStamp = 4,
+ kData = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return OperationEventNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t source;
+ DoorLockOperationEventCode eventCode;
+ uint16_t userId;
+ Span<const char> pin;
+ uint32_t timeStamp;
+ Span<const char> data;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace OperationEventNotification
+public:
+ static constexpr CommandId GetCommandId() { return OperationEventNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t source;
+ DoorLockOperationEventCode eventCode;
+ uint16_t userId;
+ Span<const char> pin;
+ uint32_t timeStamp;
+ Span<const char> data;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace OperationEventNotification
namespace ProgrammingEventNotification {
+enum class Fields
+{
+ kSource = 0,
+ kEventCode = 1,
+ kUserId = 2,
+ kPin = 3,
+ kUserType = 4,
+ kUserStatus = 5,
+ kTimeStamp = 6,
+ kData = 7,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ProgrammingEventNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+
+ uint8_t source;
+ DoorLockProgrammingEventCode eventCode;
+ uint16_t userId;
+ Span<const char> pin;
+ DoorLockUserType userType;
+ DoorLockUserStatus userStatus;
+ uint32_t timeStamp;
+ Span<const char> data;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ProgrammingEventNotification
+public:
+ static constexpr CommandId GetCommandId() { return ProgrammingEventNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return DoorLock::Id; }
+ uint8_t source;
+ DoorLockProgrammingEventCode eventCode;
+ uint16_t userId;
+ Span<const char> pin;
+ DoorLockUserType userType;
+ DoorLockUserStatus userStatus;
+ uint32_t timeStamp;
+ Span<const char> data;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ProgrammingEventNotification
} // namespace Commands
} // namespace DoorLock
namespace WindowCovering {
@@ -3094,100 +7397,252 @@
namespace Commands {
namespace UpOrOpen {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return UpOrOpen::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace UpOrOpen
+public:
+ static constexpr CommandId GetCommandId() { return UpOrOpen::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace UpOrOpen
namespace DownOrClose {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return DownOrClose::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace DownOrClose
+public:
+ static constexpr CommandId GetCommandId() { return DownOrClose::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace DownOrClose
namespace StopMotion {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StopMotion::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StopMotion
+public:
+ static constexpr CommandId GetCommandId() { return StopMotion::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StopMotion
namespace GoToLiftValue {
+enum class Fields
+{
+ kLiftValue = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GoToLiftValue::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+
+ uint16_t liftValue;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GoToLiftValue
+public:
+ static constexpr CommandId GetCommandId() { return GoToLiftValue::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+ uint16_t liftValue;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GoToLiftValue
namespace GoToLiftPercentage {
+enum class Fields
+{
+ kLiftPercentageValue = 0,
+ kLiftPercent100thsValue = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GoToLiftPercentage::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+
+ uint8_t liftPercentageValue;
+ uint16_t liftPercent100thsValue;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GoToLiftPercentage
+public:
+ static constexpr CommandId GetCommandId() { return GoToLiftPercentage::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+ uint8_t liftPercentageValue;
+ uint16_t liftPercent100thsValue;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GoToLiftPercentage
namespace GoToTiltValue {
+enum class Fields
+{
+ kTiltValue = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GoToTiltValue::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+
+ uint16_t tiltValue;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GoToTiltValue
+public:
+ static constexpr CommandId GetCommandId() { return GoToTiltValue::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+ uint16_t tiltValue;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GoToTiltValue
namespace GoToTiltPercentage {
+enum class Fields
+{
+ kTiltPercentageValue = 0,
+ kTiltPercent100thsValue = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GoToTiltPercentage::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+
+ uint8_t tiltPercentageValue;
+ uint16_t tiltPercent100thsValue;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GoToTiltPercentage
+public:
+ static constexpr CommandId GetCommandId() { return GoToTiltPercentage::Id; }
+ static constexpr ClusterId GetClusterId() { return WindowCovering::Id; }
+ uint8_t tiltPercentageValue;
+ uint16_t tiltPercent100thsValue;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GoToTiltPercentage
} // namespace Commands
} // namespace WindowCovering
namespace BarrierControl {
namespace Commands {
namespace BarrierControlGoToPercent {
+enum class Fields
+{
+ kPercentOpen = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return BarrierControlGoToPercent::Id; }
+ static constexpr ClusterId GetClusterId() { return BarrierControl::Id; }
+
+ uint8_t percentOpen;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace BarrierControlGoToPercent
+public:
+ static constexpr CommandId GetCommandId() { return BarrierControlGoToPercent::Id; }
+ static constexpr ClusterId GetClusterId() { return BarrierControl::Id; }
+ uint8_t percentOpen;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace BarrierControlGoToPercent
namespace BarrierControlStop {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return BarrierControlStop::Id; }
+ static constexpr ClusterId GetClusterId() { return BarrierControl::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace BarrierControlStop
+public:
+ static constexpr CommandId GetCommandId() { return BarrierControlStop::Id; }
+ static constexpr ClusterId GetClusterId() { return BarrierControl::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace BarrierControlStop
} // namespace Commands
} // namespace BarrierControl
namespace PumpConfigurationAndControl {
@@ -3222,75 +7677,232 @@
namespace Commands {
namespace SetpointRaiseLower {
+enum class Fields
+{
+ kMode = 0,
+ kAmount = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetpointRaiseLower::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+
+ SetpointAdjustMode mode;
+ int8_t amount;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetpointRaiseLower
+public:
+ static constexpr CommandId GetCommandId() { return SetpointRaiseLower::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+ SetpointAdjustMode mode;
+ int8_t amount;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetpointRaiseLower
namespace CurrentWeeklySchedule {
+enum class Fields
+{
+ kNumberOfTransitionsForSequence = 0,
+ kDayOfWeekForSequence = 1,
+ kModeForSequence = 2,
+ kPayload = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CurrentWeeklySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+
+ uint8_t numberOfTransitionsForSequence;
+ uint8_t dayOfWeekForSequence;
+ uint8_t modeForSequence;
+ DataModel::List<uint8_t> payload;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CurrentWeeklySchedule
+public:
+ static constexpr CommandId GetCommandId() { return CurrentWeeklySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+ uint8_t numberOfTransitionsForSequence;
+ uint8_t dayOfWeekForSequence;
+ uint8_t modeForSequence;
+ DataModel::DecodableList<uint8_t> payload;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CurrentWeeklySchedule
namespace SetWeeklySchedule {
+enum class Fields
+{
+ kNumberOfTransitionsForSequence = 0,
+ kDayOfWeekForSequence = 1,
+ kModeForSequence = 2,
+ kPayload = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetWeeklySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+
+ uint8_t numberOfTransitionsForSequence;
+ uint8_t dayOfWeekForSequence;
+ uint8_t modeForSequence;
+ DataModel::List<uint8_t> payload;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetWeeklySchedule
+public:
+ static constexpr CommandId GetCommandId() { return SetWeeklySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+ uint8_t numberOfTransitionsForSequence;
+ uint8_t dayOfWeekForSequence;
+ uint8_t modeForSequence;
+ DataModel::DecodableList<uint8_t> payload;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetWeeklySchedule
namespace RelayStatusLog {
+enum class Fields
+{
+ kTimeOfDay = 0,
+ kRelayStatus = 1,
+ kLocalTemperature = 2,
+ kHumidityInPercentage = 3,
+ kSetpoint = 4,
+ kUnreadEntries = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RelayStatusLog::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+
+ uint16_t timeOfDay;
+ uint16_t relayStatus;
+ int16_t localTemperature;
+ uint8_t humidityInPercentage;
+ int16_t setpoint;
+ uint16_t unreadEntries;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RelayStatusLog
+public:
+ static constexpr CommandId GetCommandId() { return RelayStatusLog::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+ uint16_t timeOfDay;
+ uint16_t relayStatus;
+ int16_t localTemperature;
+ uint8_t humidityInPercentage;
+ int16_t setpoint;
+ uint16_t unreadEntries;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RelayStatusLog
namespace GetWeeklySchedule {
+enum class Fields
+{
+ kDaysToReturn = 0,
+ kModeToReturn = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetWeeklySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+
+ uint8_t daysToReturn;
+ uint8_t modeToReturn;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetWeeklySchedule
+public:
+ static constexpr CommandId GetCommandId() { return GetWeeklySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+ uint8_t daysToReturn;
+ uint8_t modeToReturn;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetWeeklySchedule
namespace ClearWeeklySchedule {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ClearWeeklySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ClearWeeklySchedule
+public:
+ static constexpr CommandId GetCommandId() { return ClearWeeklySchedule::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ClearWeeklySchedule
namespace GetRelayStatusLog {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetRelayStatusLog::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetRelayStatusLog
+public:
+ static constexpr CommandId GetCommandId() { return GetRelayStatusLog::Id; }
+ static constexpr ClusterId GetClusterId() { return Thermostat::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetRelayStatusLog
} // namespace Commands
} // namespace Thermostat
namespace FanControl {
@@ -3360,195 +7972,753 @@
namespace Commands {
namespace MoveToHue {
+enum class Fields
+{
+ kHue = 0,
+ kDirection = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveToHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint8_t hue;
+ HueDirection direction;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveToHue
+public:
+ static constexpr CommandId GetCommandId() { return MoveToHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint8_t hue;
+ HueDirection direction;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveToHue
namespace MoveHue {
+enum class Fields
+{
+ kMoveMode = 0,
+ kRate = 1,
+ kOptionsMask = 2,
+ kOptionsOverride = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ HueMoveMode moveMode;
+ uint8_t rate;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveHue
+public:
+ static constexpr CommandId GetCommandId() { return MoveHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ HueMoveMode moveMode;
+ uint8_t rate;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveHue
namespace StepHue {
+enum class Fields
+{
+ kStepMode = 0,
+ kStepSize = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StepHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ HueStepMode stepMode;
+ uint8_t stepSize;
+ uint8_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StepHue
+public:
+ static constexpr CommandId GetCommandId() { return StepHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ HueStepMode stepMode;
+ uint8_t stepSize;
+ uint8_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StepHue
namespace MoveToSaturation {
+enum class Fields
+{
+ kSaturation = 0,
+ kTransitionTime = 1,
+ kOptionsMask = 2,
+ kOptionsOverride = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveToSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint8_t saturation;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveToSaturation
+public:
+ static constexpr CommandId GetCommandId() { return MoveToSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint8_t saturation;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveToSaturation
namespace MoveSaturation {
+enum class Fields
+{
+ kMoveMode = 0,
+ kRate = 1,
+ kOptionsMask = 2,
+ kOptionsOverride = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ SaturationMoveMode moveMode;
+ uint8_t rate;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveSaturation
+public:
+ static constexpr CommandId GetCommandId() { return MoveSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ SaturationMoveMode moveMode;
+ uint8_t rate;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveSaturation
namespace StepSaturation {
+enum class Fields
+{
+ kStepMode = 0,
+ kStepSize = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StepSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ SaturationStepMode stepMode;
+ uint8_t stepSize;
+ uint8_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StepSaturation
+public:
+ static constexpr CommandId GetCommandId() { return StepSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ SaturationStepMode stepMode;
+ uint8_t stepSize;
+ uint8_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StepSaturation
namespace MoveToHueAndSaturation {
+enum class Fields
+{
+ kHue = 0,
+ kSaturation = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveToHueAndSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint8_t hue;
+ uint8_t saturation;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveToHueAndSaturation
+public:
+ static constexpr CommandId GetCommandId() { return MoveToHueAndSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint8_t hue;
+ uint8_t saturation;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveToHueAndSaturation
namespace MoveToColor {
+enum class Fields
+{
+ kColorX = 0,
+ kColorY = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveToColor::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint16_t colorX;
+ uint16_t colorY;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveToColor
+public:
+ static constexpr CommandId GetCommandId() { return MoveToColor::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint16_t colorX;
+ uint16_t colorY;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveToColor
namespace MoveColor {
+enum class Fields
+{
+ kRateX = 0,
+ kRateY = 1,
+ kOptionsMask = 2,
+ kOptionsOverride = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveColor::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ int16_t rateX;
+ int16_t rateY;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveColor
+public:
+ static constexpr CommandId GetCommandId() { return MoveColor::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ int16_t rateX;
+ int16_t rateY;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveColor
namespace StepColor {
+enum class Fields
+{
+ kStepX = 0,
+ kStepY = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StepColor::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ int16_t stepX;
+ int16_t stepY;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StepColor
+public:
+ static constexpr CommandId GetCommandId() { return StepColor::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ int16_t stepX;
+ int16_t stepY;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StepColor
namespace MoveToColorTemperature {
+enum class Fields
+{
+ kColorTemperature = 0,
+ kTransitionTime = 1,
+ kOptionsMask = 2,
+ kOptionsOverride = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveToColorTemperature::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint16_t colorTemperature;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveToColorTemperature
+public:
+ static constexpr CommandId GetCommandId() { return MoveToColorTemperature::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint16_t colorTemperature;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveToColorTemperature
namespace EnhancedMoveToHue {
+enum class Fields
+{
+ kEnhancedHue = 0,
+ kDirection = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnhancedMoveToHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint16_t enhancedHue;
+ HueDirection direction;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnhancedMoveToHue
+public:
+ static constexpr CommandId GetCommandId() { return EnhancedMoveToHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint16_t enhancedHue;
+ HueDirection direction;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnhancedMoveToHue
namespace EnhancedMoveHue {
+enum class Fields
+{
+ kMoveMode = 0,
+ kRate = 1,
+ kOptionsMask = 2,
+ kOptionsOverride = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnhancedMoveHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ HueMoveMode moveMode;
+ uint16_t rate;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnhancedMoveHue
+public:
+ static constexpr CommandId GetCommandId() { return EnhancedMoveHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ HueMoveMode moveMode;
+ uint16_t rate;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnhancedMoveHue
namespace EnhancedStepHue {
+enum class Fields
+{
+ kStepMode = 0,
+ kStepSize = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnhancedStepHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ HueStepMode stepMode;
+ uint16_t stepSize;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnhancedStepHue
+public:
+ static constexpr CommandId GetCommandId() { return EnhancedStepHue::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ HueStepMode stepMode;
+ uint16_t stepSize;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnhancedStepHue
namespace EnhancedMoveToHueAndSaturation {
+enum class Fields
+{
+ kEnhancedHue = 0,
+ kSaturation = 1,
+ kTransitionTime = 2,
+ kOptionsMask = 3,
+ kOptionsOverride = 4,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EnhancedMoveToHueAndSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint16_t enhancedHue;
+ uint8_t saturation;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EnhancedMoveToHueAndSaturation
+public:
+ static constexpr CommandId GetCommandId() { return EnhancedMoveToHueAndSaturation::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint16_t enhancedHue;
+ uint8_t saturation;
+ uint16_t transitionTime;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EnhancedMoveToHueAndSaturation
namespace ColorLoopSet {
+enum class Fields
+{
+ kUpdateFlags = 0,
+ kAction = 1,
+ kDirection = 2,
+ kTime = 3,
+ kStartHue = 4,
+ kOptionsMask = 5,
+ kOptionsOverride = 6,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ColorLoopSet::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint8_t updateFlags;
+ ColorLoopAction action;
+ ColorLoopDirection direction;
+ uint16_t time;
+ uint16_t startHue;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ColorLoopSet
+public:
+ static constexpr CommandId GetCommandId() { return ColorLoopSet::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint8_t updateFlags;
+ ColorLoopAction action;
+ ColorLoopDirection direction;
+ uint16_t time;
+ uint16_t startHue;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ColorLoopSet
namespace StopMoveStep {
+enum class Fields
+{
+ kOptionsMask = 0,
+ kOptionsOverride = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StopMoveStep::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StopMoveStep
+public:
+ static constexpr CommandId GetCommandId() { return StopMoveStep::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StopMoveStep
namespace MoveColorTemperature {
+enum class Fields
+{
+ kMoveMode = 0,
+ kRate = 1,
+ kColorTemperatureMinimum = 2,
+ kColorTemperatureMaximum = 3,
+ kOptionsMask = 4,
+ kOptionsOverride = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MoveColorTemperature::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ HueMoveMode moveMode;
+ uint16_t rate;
+ uint16_t colorTemperatureMinimum;
+ uint16_t colorTemperatureMaximum;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MoveColorTemperature
+public:
+ static constexpr CommandId GetCommandId() { return MoveColorTemperature::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ HueMoveMode moveMode;
+ uint16_t rate;
+ uint16_t colorTemperatureMinimum;
+ uint16_t colorTemperatureMaximum;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MoveColorTemperature
namespace StepColorTemperature {
+enum class Fields
+{
+ kStepMode = 0,
+ kStepSize = 1,
+ kTransitionTime = 2,
+ kColorTemperatureMinimum = 3,
+ kColorTemperatureMaximum = 4,
+ kOptionsMask = 5,
+ kOptionsOverride = 6,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StepColorTemperature::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+
+ HueStepMode stepMode;
+ uint16_t stepSize;
+ uint16_t transitionTime;
+ uint16_t colorTemperatureMinimum;
+ uint16_t colorTemperatureMaximum;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StepColorTemperature
+public:
+ static constexpr CommandId GetCommandId() { return StepColorTemperature::Id; }
+ static constexpr ClusterId GetClusterId() { return ColorControl::Id; }
+ HueStepMode stepMode;
+ uint16_t stepSize;
+ uint16_t transitionTime;
+ uint16_t colorTemperatureMinimum;
+ uint16_t colorTemperatureMaximum;
+ uint8_t optionsMask;
+ uint8_t optionsOverride;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StepColorTemperature
} // namespace Commands
} // namespace ColorControl
namespace BallastConfiguration {
@@ -3697,75 +8867,207 @@
namespace Commands {
namespace ZoneEnrollResponse {
+enum class Fields
+{
+ kEnrollResponseCode = 0,
+ kZoneId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ZoneEnrollResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+
+ IasEnrollResponseCode enrollResponseCode;
+ uint8_t zoneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ZoneEnrollResponse
+public:
+ static constexpr CommandId GetCommandId() { return ZoneEnrollResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+ IasEnrollResponseCode enrollResponseCode;
+ uint8_t zoneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ZoneEnrollResponse
namespace ZoneStatusChangeNotification {
+enum class Fields
+{
+ kZoneStatus = 0,
+ kExtendedStatus = 1,
+ kZoneId = 2,
+ kDelay = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ZoneStatusChangeNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+
+ uint16_t zoneStatus;
+ uint8_t extendedStatus;
+ uint8_t zoneId;
+ uint16_t delay;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ZoneStatusChangeNotification
+public:
+ static constexpr CommandId GetCommandId() { return ZoneStatusChangeNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+ uint16_t zoneStatus;
+ uint8_t extendedStatus;
+ uint8_t zoneId;
+ uint16_t delay;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ZoneStatusChangeNotification
namespace InitiateNormalOperationMode {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return InitiateNormalOperationMode::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace InitiateNormalOperationMode
+public:
+ static constexpr CommandId GetCommandId() { return InitiateNormalOperationMode::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace InitiateNormalOperationMode
namespace ZoneEnrollRequest {
+enum class Fields
+{
+ kZoneType = 0,
+ kManufacturerCode = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ZoneEnrollRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+
+ IasZoneType zoneType;
+ uint16_t manufacturerCode;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ZoneEnrollRequest
+public:
+ static constexpr CommandId GetCommandId() { return ZoneEnrollRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+ IasZoneType zoneType;
+ uint16_t manufacturerCode;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ZoneEnrollRequest
namespace InitiateTestMode {
+enum class Fields
+{
+ kTestModeDuration = 0,
+ kCurrentZoneSensitivityLevel = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return InitiateTestMode::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+
+ uint8_t testModeDuration;
+ uint8_t currentZoneSensitivityLevel;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace InitiateTestMode
+public:
+ static constexpr CommandId GetCommandId() { return InitiateTestMode::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+ uint8_t testModeDuration;
+ uint8_t currentZoneSensitivityLevel;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace InitiateTestMode
namespace InitiateNormalOperationModeResponse {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return InitiateNormalOperationModeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace InitiateNormalOperationModeResponse
+public:
+ static constexpr CommandId GetCommandId() { return InitiateNormalOperationModeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace InitiateNormalOperationModeResponse
namespace InitiateTestModeResponse {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return InitiateTestModeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace InitiateTestModeResponse
+public:
+ static constexpr CommandId GetCommandId() { return InitiateTestModeResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasZone::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace InitiateTestModeResponse
} // namespace Commands
} // namespace IasZone
namespace IasAce {
@@ -3852,10 +9154,10 @@
};
namespace IasAceZoneStatusResult {
-enum FieldId
+enum class Fields
{
- kZoneIdFieldId = 0,
- kZoneStatusFieldId = 1,
+ kZoneId = 0,
+ kZoneStatus = 1,
};
struct Type
@@ -3874,220 +9176,697 @@
namespace Commands {
namespace Arm {
+enum class Fields
+{
+ kArmMode = 0,
+ kArmDisarmCode = 1,
+ kZoneId = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Arm::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ IasAceArmMode armMode;
+ Span<const char> armDisarmCode;
+ uint8_t zoneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Arm
+public:
+ static constexpr CommandId GetCommandId() { return Arm::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ IasAceArmMode armMode;
+ Span<const char> armDisarmCode;
+ uint8_t zoneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Arm
namespace ArmResponse {
+enum class Fields
+{
+ kArmNotification = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ArmResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ IasAceArmNotification armNotification;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ArmResponse
+public:
+ static constexpr CommandId GetCommandId() { return ArmResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ IasAceArmNotification armNotification;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ArmResponse
namespace Bypass {
+enum class Fields
+{
+ kNumberOfZones = 0,
+ kZoneIds = 1,
+ kArmDisarmCode = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Bypass::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ uint8_t numberOfZones;
+ DataModel::List<uint8_t> zoneIds;
+ Span<const char> armDisarmCode;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Bypass
+public:
+ static constexpr CommandId GetCommandId() { return Bypass::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ uint8_t numberOfZones;
+ DataModel::DecodableList<uint8_t> zoneIds;
+ Span<const char> armDisarmCode;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Bypass
namespace GetZoneIdMapResponse {
+enum class Fields
+{
+ kSection0 = 0,
+ kSection1 = 1,
+ kSection2 = 2,
+ kSection3 = 3,
+ kSection4 = 4,
+ kSection5 = 5,
+ kSection6 = 6,
+ kSection7 = 7,
+ kSection8 = 8,
+ kSection9 = 9,
+ kSection10 = 10,
+ kSection11 = 11,
+ kSection12 = 12,
+ kSection13 = 13,
+ kSection14 = 14,
+ kSection15 = 15,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetZoneIdMapResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ uint16_t section0;
+ uint16_t section1;
+ uint16_t section2;
+ uint16_t section3;
+ uint16_t section4;
+ uint16_t section5;
+ uint16_t section6;
+ uint16_t section7;
+ uint16_t section8;
+ uint16_t section9;
+ uint16_t section10;
+ uint16_t section11;
+ uint16_t section12;
+ uint16_t section13;
+ uint16_t section14;
+ uint16_t section15;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetZoneIdMapResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetZoneIdMapResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ uint16_t section0;
+ uint16_t section1;
+ uint16_t section2;
+ uint16_t section3;
+ uint16_t section4;
+ uint16_t section5;
+ uint16_t section6;
+ uint16_t section7;
+ uint16_t section8;
+ uint16_t section9;
+ uint16_t section10;
+ uint16_t section11;
+ uint16_t section12;
+ uint16_t section13;
+ uint16_t section14;
+ uint16_t section15;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetZoneIdMapResponse
namespace Emergency {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Emergency::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Emergency
+public:
+ static constexpr CommandId GetCommandId() { return Emergency::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Emergency
namespace GetZoneInformationResponse {
+enum class Fields
+{
+ kZoneId = 0,
+ kZoneType = 1,
+ kIeeeAddress = 2,
+ kZoneLabel = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetZoneInformationResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ uint8_t zoneId;
+ IasZoneType zoneType;
+ chip::NodeId ieeeAddress;
+ Span<const char> zoneLabel;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetZoneInformationResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetZoneInformationResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ uint8_t zoneId;
+ IasZoneType zoneType;
+ chip::NodeId ieeeAddress;
+ Span<const char> zoneLabel;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetZoneInformationResponse
namespace Fire {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Fire::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Fire
+public:
+ static constexpr CommandId GetCommandId() { return Fire::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Fire
namespace ZoneStatusChanged {
+enum class Fields
+{
+ kZoneId = 0,
+ kZoneStatus = 1,
+ kAudibleNotification = 2,
+ kZoneLabel = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ZoneStatusChanged::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ uint8_t zoneId;
+ uint16_t zoneStatus;
+ IasAceAudibleNotification audibleNotification;
+ Span<const char> zoneLabel;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ZoneStatusChanged
+public:
+ static constexpr CommandId GetCommandId() { return ZoneStatusChanged::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ uint8_t zoneId;
+ uint16_t zoneStatus;
+ IasAceAudibleNotification audibleNotification;
+ Span<const char> zoneLabel;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ZoneStatusChanged
namespace Panic {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Panic::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Panic
+public:
+ static constexpr CommandId GetCommandId() { return Panic::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Panic
namespace PanelStatusChanged {
+enum class Fields
+{
+ kPanelStatus = 0,
+ kSecondsRemaining = 1,
+ kAudibleNotification = 2,
+ kAlarmStatus = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return PanelStatusChanged::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ IasAcePanelStatus panelStatus;
+ uint8_t secondsRemaining;
+ IasAceAudibleNotification audibleNotification;
+ IasAceAlarmStatus alarmStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace PanelStatusChanged
+public:
+ static constexpr CommandId GetCommandId() { return PanelStatusChanged::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ IasAcePanelStatus panelStatus;
+ uint8_t secondsRemaining;
+ IasAceAudibleNotification audibleNotification;
+ IasAceAlarmStatus alarmStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PanelStatusChanged
namespace GetZoneIdMap {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetZoneIdMap::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetZoneIdMap
+public:
+ static constexpr CommandId GetCommandId() { return GetZoneIdMap::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetZoneIdMap
namespace GetPanelStatusResponse {
+enum class Fields
+{
+ kPanelStatus = 0,
+ kSecondsRemaining = 1,
+ kAudibleNotification = 2,
+ kAlarmStatus = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetPanelStatusResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ IasAcePanelStatus panelStatus;
+ uint8_t secondsRemaining;
+ IasAceAudibleNotification audibleNotification;
+ IasAceAlarmStatus alarmStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetPanelStatusResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetPanelStatusResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ IasAcePanelStatus panelStatus;
+ uint8_t secondsRemaining;
+ IasAceAudibleNotification audibleNotification;
+ IasAceAlarmStatus alarmStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetPanelStatusResponse
namespace GetZoneInformation {
+enum class Fields
+{
+ kZoneId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetZoneInformation::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ uint8_t zoneId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetZoneInformation
+public:
+ static constexpr CommandId GetCommandId() { return GetZoneInformation::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ uint8_t zoneId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetZoneInformation
namespace SetBypassedZoneList {
+enum class Fields
+{
+ kNumberOfZones = 0,
+ kZoneIds = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SetBypassedZoneList::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ uint8_t numberOfZones;
+ DataModel::List<uint8_t> zoneIds;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SetBypassedZoneList
+public:
+ static constexpr CommandId GetCommandId() { return SetBypassedZoneList::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ uint8_t numberOfZones;
+ DataModel::DecodableList<uint8_t> zoneIds;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SetBypassedZoneList
namespace GetPanelStatus {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetPanelStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetPanelStatus
+public:
+ static constexpr CommandId GetCommandId() { return GetPanelStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetPanelStatus
namespace BypassResponse {
+enum class Fields
+{
+ kNumberOfZones = 0,
+ kBypassResult = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return BypassResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ uint8_t numberOfZones;
+ DataModel::List<IasAceBypassResult> bypassResult;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace BypassResponse
+public:
+ static constexpr CommandId GetCommandId() { return BypassResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ uint8_t numberOfZones;
+ DataModel::DecodableList<IasAceBypassResult> bypassResult;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace BypassResponse
namespace GetBypassedZoneList {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetBypassedZoneList::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetBypassedZoneList
+public:
+ static constexpr CommandId GetCommandId() { return GetBypassedZoneList::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetBypassedZoneList
namespace GetZoneStatusResponse {
+enum class Fields
+{
+ kZoneStatusComplete = 0,
+ kNumberOfZones = 1,
+ kZoneStatusResult = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetZoneStatusResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ bool zoneStatusComplete;
+ uint8_t numberOfZones;
+ DataModel::List<IasAceZoneStatusResult::Type> zoneStatusResult;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetZoneStatusResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetZoneStatusResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ bool zoneStatusComplete;
+ uint8_t numberOfZones;
+ DataModel::DecodableList<IasAceZoneStatusResult::DecodableType> zoneStatusResult;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetZoneStatusResponse
namespace GetZoneStatus {
+enum class Fields
+{
+ kStartingZoneId = 0,
+ kMaxNumberOfZoneIds = 1,
+ kZoneStatusMaskFlag = 2,
+ kZoneStatusMask = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetZoneStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+
+ uint8_t startingZoneId;
+ uint8_t maxNumberOfZoneIds;
+ bool zoneStatusMaskFlag;
+ uint16_t zoneStatusMask;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetZoneStatus
+public:
+ static constexpr CommandId GetCommandId() { return GetZoneStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return IasAce::Id; }
+ uint8_t startingZoneId;
+ uint8_t maxNumberOfZoneIds;
+ bool zoneStatusMaskFlag;
+ uint16_t zoneStatusMask;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetZoneStatus
} // namespace Commands
} // namespace IasAce
namespace IasWd {
namespace Commands {
namespace StartWarning {
+enum class Fields
+{
+ kWarningInfo = 0,
+ kWarningDuration = 1,
+ kStrobeDutyCycle = 2,
+ kStrobeLevel = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StartWarning::Id; }
+ static constexpr ClusterId GetClusterId() { return IasWd::Id; }
+
+ uint8_t warningInfo;
+ uint16_t warningDuration;
+ uint8_t strobeDutyCycle;
+ uint8_t strobeLevel;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StartWarning
+public:
+ static constexpr CommandId GetCommandId() { return StartWarning::Id; }
+ static constexpr ClusterId GetClusterId() { return IasWd::Id; }
+ uint8_t warningInfo;
+ uint16_t warningDuration;
+ uint8_t strobeDutyCycle;
+ uint8_t strobeLevel;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StartWarning
namespace Squawk {
+enum class Fields
+{
+ kSquawkInfo = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Squawk::Id; }
+ static constexpr ClusterId GetClusterId() { return IasWd::Id; }
+
+ uint8_t squawkInfo;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Squawk
+public:
+ static constexpr CommandId GetCommandId() { return Squawk::Id; }
+ static constexpr ClusterId GetClusterId() { return IasWd::Id; }
+ uint8_t squawkInfo;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Squawk
} // namespace Commands
} // namespace IasWd
namespace WakeOnLan {
@@ -4107,13 +9886,13 @@
};
namespace TvChannelInfo {
-enum FieldId
+enum class Fields
{
- kMajorNumberFieldId = 0,
- kMinorNumberFieldId = 1,
- kNameFieldId = 2,
- kCallSignFieldId = 3,
- kAffiliateCallSignFieldId = 4,
+ kMajorNumber = 0,
+ kMinorNumber = 1,
+ kName = 2,
+ kCallSign = 3,
+ kAffiliateCallSign = 4,
};
struct Type
@@ -4133,12 +9912,12 @@
} // namespace TvChannelInfo
namespace TvChannelLineupInfo {
-enum FieldId
+enum class Fields
{
- kOperatorNameFieldId = 0,
- kLineupNameFieldId = 1,
- kPostalCodeFieldId = 2,
- kLineupInfoTypeFieldId = 3,
+ kOperatorName = 0,
+ kLineupName = 1,
+ kPostalCode = 2,
+ kLineupInfoType = 3,
};
struct Type
@@ -4159,45 +9938,123 @@
namespace Commands {
namespace ChangeChannel {
+enum class Fields
+{
+ kMatch = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ChangeChannel::Id; }
+ static constexpr ClusterId GetClusterId() { return TvChannel::Id; }
+
+ Span<const char> match;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ChangeChannel
+public:
+ static constexpr CommandId GetCommandId() { return ChangeChannel::Id; }
+ static constexpr ClusterId GetClusterId() { return TvChannel::Id; }
+ Span<const char> match;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ChangeChannel
namespace ChangeChannelResponse {
+enum class Fields
+{
+ kChannelMatch = 0,
+ kErrorType = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ChangeChannelResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TvChannel::Id; }
+
+ DataModel::List<TvChannelInfo::Type> channelMatch;
+ TvChannelErrorType errorType;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ChangeChannelResponse
+public:
+ static constexpr CommandId GetCommandId() { return ChangeChannelResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TvChannel::Id; }
+ DataModel::DecodableList<TvChannelInfo::DecodableType> channelMatch;
+ TvChannelErrorType errorType;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ChangeChannelResponse
namespace ChangeChannelByNumber {
+enum class Fields
+{
+ kMajorNumber = 0,
+ kMinorNumber = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ChangeChannelByNumber::Id; }
+ static constexpr ClusterId GetClusterId() { return TvChannel::Id; }
+
+ uint16_t majorNumber;
+ uint16_t minorNumber;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ChangeChannelByNumber
+public:
+ static constexpr CommandId GetCommandId() { return ChangeChannelByNumber::Id; }
+ static constexpr ClusterId GetClusterId() { return TvChannel::Id; }
+ uint16_t majorNumber;
+ uint16_t minorNumber;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ChangeChannelByNumber
namespace SkipChannel {
+enum class Fields
+{
+ kCount = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SkipChannel::Id; }
+ static constexpr ClusterId GetClusterId() { return TvChannel::Id; }
+
+ uint16_t count;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SkipChannel
+public:
+ static constexpr CommandId GetCommandId() { return SkipChannel::Id; }
+ static constexpr ClusterId GetClusterId() { return TvChannel::Id; }
+ uint16_t count;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SkipChannel
} // namespace Commands
} // namespace TvChannel
namespace TargetNavigator {
@@ -4210,10 +10067,10 @@
};
namespace NavigateTargetTargetInfo {
-enum FieldId
+enum class Fields
{
- kIdentifierFieldId = 0,
- kNameFieldId = 1,
+ kIdentifier = 0,
+ kName = 1,
};
struct Type
@@ -4232,25 +10089,67 @@
namespace Commands {
namespace NavigateTarget {
+enum class Fields
+{
+ kTarget = 0,
+ kData = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return NavigateTarget::Id; }
+ static constexpr ClusterId GetClusterId() { return TargetNavigator::Id; }
+
+ uint8_t target;
+ Span<const char> data;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace NavigateTarget
+public:
+ static constexpr CommandId GetCommandId() { return NavigateTarget::Id; }
+ static constexpr ClusterId GetClusterId() { return TargetNavigator::Id; }
+ uint8_t target;
+ Span<const char> data;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace NavigateTarget
namespace NavigateTargetResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kData = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return NavigateTargetResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TargetNavigator::Id; }
+
+ NavigateTargetStatus status;
+ Span<const char> data;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace NavigateTargetResponse
+public:
+ static constexpr CommandId GetCommandId() { return NavigateTargetResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TargetNavigator::Id; }
+ NavigateTargetStatus status;
+ Span<const char> data;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace NavigateTargetResponse
} // namespace Commands
} // namespace TargetNavigator
namespace MediaPlayback {
@@ -4274,10 +10173,10 @@
};
namespace MediaPlaybackPosition {
-enum FieldId
+enum class Fields
{
- kUpdatedAtFieldId = 0,
- kPositionFieldId = 1,
+ kUpdatedAt = 0,
+ kPosition = 1,
};
struct Type
@@ -4296,225 +10195,589 @@
namespace Commands {
namespace MediaPlay {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaPlay::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaPlay
+public:
+ static constexpr CommandId GetCommandId() { return MediaPlay::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaPlay
namespace MediaPlayResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaPlayResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaPlayResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaPlayResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaPlayResponse
namespace MediaPause {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaPause::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaPause
+public:
+ static constexpr CommandId GetCommandId() { return MediaPause::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaPause
namespace MediaPauseResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaPauseResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaPauseResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaPauseResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaPauseResponse
namespace MediaStop {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaStop::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaStop
+public:
+ static constexpr CommandId GetCommandId() { return MediaStop::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaStop
namespace MediaStopResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaStopResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaStopResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaStopResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaStopResponse
namespace MediaStartOver {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaStartOver::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaStartOver
+public:
+ static constexpr CommandId GetCommandId() { return MediaStartOver::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaStartOver
namespace MediaStartOverResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaStartOverResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaStartOverResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaStartOverResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaStartOverResponse
namespace MediaPrevious {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaPrevious::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaPrevious
+public:
+ static constexpr CommandId GetCommandId() { return MediaPrevious::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaPrevious
namespace MediaPreviousResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaPreviousResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaPreviousResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaPreviousResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaPreviousResponse
namespace MediaNext {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaNext::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaNext
+public:
+ static constexpr CommandId GetCommandId() { return MediaNext::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaNext
namespace MediaNextResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaNextResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaNextResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaNextResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaNextResponse
namespace MediaRewind {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaRewind::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaRewind
+public:
+ static constexpr CommandId GetCommandId() { return MediaRewind::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaRewind
namespace MediaRewindResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaRewindResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaRewindResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaRewindResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaRewindResponse
namespace MediaFastForward {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaFastForward::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaFastForward
+public:
+ static constexpr CommandId GetCommandId() { return MediaFastForward::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaFastForward
namespace MediaFastForwardResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaFastForwardResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaFastForwardResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaFastForwardResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaFastForwardResponse
namespace MediaSkipForward {
+enum class Fields
+{
+ kDeltaPositionMilliseconds = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaSkipForward::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ uint64_t deltaPositionMilliseconds;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaSkipForward
+public:
+ static constexpr CommandId GetCommandId() { return MediaSkipForward::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ uint64_t deltaPositionMilliseconds;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaSkipForward
namespace MediaSkipForwardResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaSkipForwardResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaSkipForwardResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaSkipForwardResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaSkipForwardResponse
namespace MediaSkipBackward {
+enum class Fields
+{
+ kDeltaPositionMilliseconds = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaSkipBackward::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ uint64_t deltaPositionMilliseconds;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaSkipBackward
+public:
+ static constexpr CommandId GetCommandId() { return MediaSkipBackward::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ uint64_t deltaPositionMilliseconds;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaSkipBackward
namespace MediaSkipBackwardResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaSkipBackwardResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaSkipBackwardResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaSkipBackwardResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaSkipBackwardResponse
namespace MediaSeek {
+enum class Fields
+{
+ kPosition = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaSeek::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ uint64_t position;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaSeek
+public:
+ static constexpr CommandId GetCommandId() { return MediaSeek::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ uint64_t position;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaSeek
namespace MediaSeekResponse {
+enum class Fields
+{
+ kMediaPlaybackStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MediaSeekResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+
+ MediaPlaybackStatus mediaPlaybackStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MediaSeekResponse
+public:
+ static constexpr CommandId GetCommandId() { return MediaSeekResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaPlayback::Id; }
+ MediaPlaybackStatus mediaPlaybackStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MediaSeekResponse
} // namespace Commands
} // namespace MediaPlayback
namespace MediaInput {
@@ -4536,12 +10799,12 @@
};
namespace MediaInputInfo {
-enum FieldId
+enum class Fields
{
- kIndexFieldId = 0,
- kInputTypeFieldId = 1,
- kNameFieldId = 2,
- kDescriptionFieldId = 3,
+ kIndex = 0,
+ kInputType = 1,
+ kName = 2,
+ kDescription = 3,
};
struct Type
@@ -4562,60 +10825,141 @@
namespace Commands {
namespace SelectInput {
+enum class Fields
+{
+ kIndex = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SelectInput::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaInput::Id; }
+
+ uint8_t index;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SelectInput
+public:
+ static constexpr CommandId GetCommandId() { return SelectInput::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaInput::Id; }
+ uint8_t index;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SelectInput
namespace ShowInputStatus {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ShowInputStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaInput::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ShowInputStatus
+public:
+ static constexpr CommandId GetCommandId() { return ShowInputStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaInput::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ShowInputStatus
namespace HideInputStatus {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return HideInputStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaInput::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace HideInputStatus
+public:
+ static constexpr CommandId GetCommandId() { return HideInputStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaInput::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace HideInputStatus
namespace RenameInput {
+enum class Fields
+{
+ kIndex = 0,
+ kName = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RenameInput::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaInput::Id; }
+
+ uint8_t index;
+ Span<const char> name;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RenameInput
+public:
+ static constexpr CommandId GetCommandId() { return RenameInput::Id; }
+ static constexpr ClusterId GetClusterId() { return MediaInput::Id; }
+ uint8_t index;
+ Span<const char> name;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RenameInput
} // namespace Commands
} // namespace MediaInput
namespace LowPower {
namespace Commands {
namespace Sleep {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Sleep::Id; }
+ static constexpr ClusterId GetClusterId() { return LowPower::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Sleep
+public:
+ static constexpr CommandId GetCommandId() { return Sleep::Id; }
+ static constexpr ClusterId GetClusterId() { return LowPower::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Sleep
} // namespace Commands
} // namespace LowPower
namespace KeypadInput {
@@ -4719,25 +11063,61 @@
namespace Commands {
namespace SendKey {
+enum class Fields
+{
+ kKeyCode = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SendKey::Id; }
+ static constexpr ClusterId GetClusterId() { return KeypadInput::Id; }
+
+ KeypadInputCecKeyCode keyCode;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SendKey
+public:
+ static constexpr CommandId GetCommandId() { return SendKey::Id; }
+ static constexpr ClusterId GetClusterId() { return KeypadInput::Id; }
+ KeypadInputCecKeyCode keyCode;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SendKey
namespace SendKeyResponse {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SendKeyResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return KeypadInput::Id; }
+
+ KeypadInputStatus status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SendKeyResponse
+public:
+ static constexpr CommandId GetCommandId() { return SendKeyResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return KeypadInput::Id; }
+ KeypadInputStatus status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SendKeyResponse
} // namespace Commands
} // namespace KeypadInput
namespace ContentLauncher {
@@ -4777,10 +11157,10 @@
};
namespace ContentLaunchAdditionalInfo {
-enum FieldId
+enum class Fields
{
- kNameFieldId = 0,
- kValueFieldId = 1,
+ kName = 0,
+ kValue = 1,
};
struct Type
@@ -4797,11 +11177,11 @@
} // namespace ContentLaunchAdditionalInfo
namespace ContentLaunchParamater {
-enum FieldId
+enum class Fields
{
- kTypeFieldId = 0,
- kValueFieldId = 1,
- kExternalIDListFieldId = 2,
+ kType = 0,
+ kValue = 1,
+ kExternalIDList = 2,
};
struct Type
@@ -4825,14 +11205,14 @@
} // namespace ContentLaunchParamater
namespace ContentLaunchBrandingInformation {
-enum FieldId
+enum class Fields
{
- kProviderNameFieldId = 0,
- kBackgroundFieldId = 1,
- kLogoFieldId = 2,
- kProgressBarFieldId = 3,
- kSplashFieldId = 4,
- kWaterMarkFieldId = 5,
+ kProviderName = 0,
+ kBackground = 1,
+ kLogo = 2,
+ kProgressBar = 3,
+ kSplash = 4,
+ kWaterMark = 5,
};
struct Type
@@ -4853,11 +11233,11 @@
} // namespace ContentLaunchBrandingInformation
namespace ContentLaunchDimension {
-enum FieldId
+enum class Fields
{
- kWidthFieldId = 0,
- kHeightFieldId = 1,
- kMetricFieldId = 2,
+ kWidth = 0,
+ kHeight = 1,
+ kMetric = 2,
};
struct Type
@@ -4875,11 +11255,11 @@
} // namespace ContentLaunchDimension
namespace ContentLaunchStyleInformation {
-enum FieldId
+enum class Fields
{
- kImageUrlFieldId = 0,
- kColorFieldId = 1,
- kSizeFieldId = 2,
+ kImageUrl = 0,
+ kColor = 1,
+ kSize = 2,
};
struct Type
@@ -4899,45 +11279,129 @@
namespace Commands {
namespace LaunchContent {
+enum class Fields
+{
+ kAutoPlay = 0,
+ kData = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LaunchContent::Id; }
+ static constexpr ClusterId GetClusterId() { return ContentLauncher::Id; }
+
+ bool autoPlay;
+ Span<const char> data;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LaunchContent
+public:
+ static constexpr CommandId GetCommandId() { return LaunchContent::Id; }
+ static constexpr ClusterId GetClusterId() { return ContentLauncher::Id; }
+ bool autoPlay;
+ Span<const char> data;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LaunchContent
namespace LaunchContentResponse {
+enum class Fields
+{
+ kData = 0,
+ kContentLaunchStatus = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LaunchContentResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ContentLauncher::Id; }
+
+ Span<const char> data;
+ ContentLaunchStatus contentLaunchStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LaunchContentResponse
+public:
+ static constexpr CommandId GetCommandId() { return LaunchContentResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ContentLauncher::Id; }
+ Span<const char> data;
+ ContentLaunchStatus contentLaunchStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LaunchContentResponse
namespace LaunchURL {
+enum class Fields
+{
+ kContentURL = 0,
+ kDisplayString = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LaunchURL::Id; }
+ static constexpr ClusterId GetClusterId() { return ContentLauncher::Id; }
+
+ Span<const char> contentURL;
+ Span<const char> displayString;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LaunchURL
+public:
+ static constexpr CommandId GetCommandId() { return LaunchURL::Id; }
+ static constexpr ClusterId GetClusterId() { return ContentLauncher::Id; }
+ Span<const char> contentURL;
+ Span<const char> displayString;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LaunchURL
namespace LaunchURLResponse {
+enum class Fields
+{
+ kData = 0,
+ kContentLaunchStatus = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LaunchURLResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ContentLauncher::Id; }
+
+ Span<const char> data;
+ ContentLaunchStatus contentLaunchStatus;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LaunchURLResponse
+public:
+ static constexpr CommandId GetCommandId() { return LaunchURLResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ContentLauncher::Id; }
+ Span<const char> data;
+ ContentLaunchStatus contentLaunchStatus;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LaunchURLResponse
} // namespace Commands
} // namespace ContentLauncher
namespace AudioOutput {
@@ -4953,11 +11417,11 @@
};
namespace AudioOutputInfo {
-enum FieldId
+enum class Fields
{
- kIndexFieldId = 0,
- kOutputTypeFieldId = 1,
- kNameFieldId = 2,
+ kIndex = 0,
+ kOutputType = 1,
+ kName = 2,
};
struct Type
@@ -4977,25 +11441,64 @@
namespace Commands {
namespace SelectOutput {
+enum class Fields
+{
+ kIndex = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return SelectOutput::Id; }
+ static constexpr ClusterId GetClusterId() { return AudioOutput::Id; }
+
+ uint8_t index;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace SelectOutput
+public:
+ static constexpr CommandId GetCommandId() { return SelectOutput::Id; }
+ static constexpr ClusterId GetClusterId() { return AudioOutput::Id; }
+ uint8_t index;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace SelectOutput
namespace RenameOutput {
+enum class Fields
+{
+ kIndex = 0,
+ kName = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return RenameOutput::Id; }
+ static constexpr ClusterId GetClusterId() { return AudioOutput::Id; }
+
+ uint8_t index;
+ Span<const char> name;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace RenameOutput
+public:
+ static constexpr CommandId GetCommandId() { return RenameOutput::Id; }
+ static constexpr ClusterId GetClusterId() { return AudioOutput::Id; }
+ uint8_t index;
+ Span<const char> name;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace RenameOutput
} // namespace Commands
} // namespace AudioOutput
namespace ApplicationLauncher {
@@ -5008,10 +11511,10 @@
};
namespace ApplicationLauncherApp {
-enum FieldId
+enum class Fields
{
- kCatalogVendorIdFieldId = 0,
- kApplicationIdFieldId = 1,
+ kCatalogVendorId = 0,
+ kApplicationId = 1,
};
struct Type
@@ -5030,25 +11533,70 @@
namespace Commands {
namespace LaunchApp {
+enum class Fields
+{
+ kData = 0,
+ kCatalogVendorId = 1,
+ kApplicationId = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LaunchApp::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplicationLauncher::Id; }
+
+ Span<const char> data;
+ uint16_t catalogVendorId;
+ Span<const char> applicationId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LaunchApp
+public:
+ static constexpr CommandId GetCommandId() { return LaunchApp::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplicationLauncher::Id; }
+ Span<const char> data;
+ uint16_t catalogVendorId;
+ Span<const char> applicationId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LaunchApp
namespace LaunchAppResponse {
+enum class Fields
+{
+ kStatus = 0,
+ kData = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LaunchAppResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplicationLauncher::Id; }
+
+ ApplicationLauncherStatus status;
+ Span<const char> data;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LaunchAppResponse
+public:
+ static constexpr CommandId GetCommandId() { return LaunchAppResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplicationLauncher::Id; }
+ ApplicationLauncherStatus status;
+ Span<const char> data;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LaunchAppResponse
} // namespace Commands
} // namespace ApplicationLauncher
namespace ApplicationBasic {
@@ -5063,50 +11611,125 @@
namespace Commands {
namespace ChangeStatus {
+enum class Fields
+{
+ kStatus = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return ChangeStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplicationBasic::Id; }
+
+ ApplicationBasicStatus status;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace ChangeStatus
+public:
+ static constexpr CommandId GetCommandId() { return ChangeStatus::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplicationBasic::Id; }
+ ApplicationBasicStatus status;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace ChangeStatus
} // namespace Commands
} // namespace ApplicationBasic
namespace AccountLogin {
namespace Commands {
namespace GetSetupPIN {
+enum class Fields
+{
+ kTempAccountIdentifier = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetSetupPIN::Id; }
+ static constexpr ClusterId GetClusterId() { return AccountLogin::Id; }
+
+ Span<const char> tempAccountIdentifier;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetSetupPIN
+public:
+ static constexpr CommandId GetCommandId() { return GetSetupPIN::Id; }
+ static constexpr ClusterId GetClusterId() { return AccountLogin::Id; }
+ Span<const char> tempAccountIdentifier;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetSetupPIN
namespace GetSetupPINResponse {
+enum class Fields
+{
+ kSetupPIN = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetSetupPINResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return AccountLogin::Id; }
+
+ Span<const char> setupPIN;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetSetupPINResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetSetupPINResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return AccountLogin::Id; }
+ Span<const char> setupPIN;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetSetupPINResponse
namespace Login {
+enum class Fields
+{
+ kTempAccountIdentifier = 0,
+ kSetupPIN = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Login::Id; }
+ static constexpr ClusterId GetClusterId() { return AccountLogin::Id; }
+
+ Span<const char> tempAccountIdentifier;
+ Span<const char> setupPIN;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Login
+public:
+ static constexpr CommandId GetCommandId() { return Login::Id; }
+ static constexpr ClusterId GetClusterId() { return AccountLogin::Id; }
+ Span<const char> tempAccountIdentifier;
+ Span<const char> setupPIN;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Login
} // namespace Commands
} // namespace AccountLogin
namespace TestCluster {
@@ -5120,13 +11743,13 @@
};
namespace SimpleStruct {
-enum FieldId
+enum class Fields
{
- kAFieldId = 0,
- kBFieldId = 1,
- kCFieldId = 2,
- kDFieldId = 3,
- kEFieldId = 4,
+ kA = 0,
+ kB = 1,
+ kC = 2,
+ kD = 3,
+ kE = 4,
};
struct Type
@@ -5146,11 +11769,11 @@
} // namespace SimpleStruct
namespace NestedStruct {
-enum FieldId
+enum class Fields
{
- kAFieldId = 0,
- kBFieldId = 1,
- kCFieldId = 2,
+ kA = 0,
+ kB = 1,
+ kC = 2,
};
struct Type
@@ -5168,15 +11791,15 @@
} // namespace NestedStruct
namespace NestedStructList {
-enum FieldId
+enum class Fields
{
- kAFieldId = 0,
- kBFieldId = 1,
- kCFieldId = 2,
- kDFieldId = 3,
- kEFieldId = 4,
- kFFieldId = 5,
- kGFieldId = 6,
+ kA = 0,
+ kB = 1,
+ kC = 2,
+ kD = 3,
+ kE = 4,
+ kF = 5,
+ kG = 6,
};
struct Type
@@ -5208,9 +11831,9 @@
} // namespace NestedStructList
namespace DoubleNestedStructList {
-enum FieldId
+enum class Fields
{
- kAFieldId = 0,
+ kA = 0,
};
struct Type
@@ -5230,10 +11853,10 @@
} // namespace DoubleNestedStructList
namespace TestListStructOctet {
-enum FieldId
+enum class Fields
{
- kFabricIndexFieldId = 0,
- kOperationalCertFieldId = 1,
+ kFabricIndex = 0,
+ kOperationalCert = 1,
};
struct Type
@@ -5252,75 +11875,330 @@
namespace Commands {
namespace Test {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Test::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Test
+public:
+ static constexpr CommandId GetCommandId() { return Test::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Test
namespace TestSpecificResponse {
+enum class Fields
+{
+ kReturnValue = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestSpecificResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ uint8_t returnValue;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace TestSpecificResponse
+public:
+ static constexpr CommandId GetCommandId() { return TestSpecificResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+ uint8_t returnValue;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestSpecificResponse
namespace TestNotHandled {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestNotHandled::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace TestNotHandled
+public:
+ static constexpr CommandId GetCommandId() { return TestNotHandled::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestNotHandled
namespace TestAddArgumentsResponse {
+enum class Fields
+{
+ kReturnValue = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestAddArgumentsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ uint8_t returnValue;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace TestAddArgumentsResponse
+public:
+ static constexpr CommandId GetCommandId() { return TestAddArgumentsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+ uint8_t returnValue;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestAddArgumentsResponse
namespace TestSpecific {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestSpecific::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace TestSpecific
+public:
+ static constexpr CommandId GetCommandId() { return TestSpecific::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestSpecific
+namespace TestSimpleArgumentResponse {
+enum class Fields
+{
+ kReturnValue = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestSimpleArgumentResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ bool returnValue;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return TestSimpleArgumentResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ bool returnValue;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestSimpleArgumentResponse
namespace TestUnknownCommand {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestUnknownCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace TestUnknownCommand
+public:
+ static constexpr CommandId GetCommandId() { return TestUnknownCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestUnknownCommand
+namespace TestStructArrayArgumentResponse {
+enum class Fields
+{
+ kArg1 = 0,
+ kArg2 = 1,
+ kArg3 = 2,
+ kArg4 = 3,
+ kArg5 = 4,
+ kArg6 = 5,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestStructArrayArgumentResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ DataModel::List<NestedStructList::Type> arg1;
+ DataModel::List<SimpleStruct::Type> arg2;
+ DataModel::List<SimpleEnum> arg3;
+ DataModel::List<bool> arg4;
+ SimpleEnum arg5;
+ bool arg6;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return TestStructArrayArgumentResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ DataModel::DecodableList<NestedStructList::DecodableType> arg1;
+ DataModel::DecodableList<SimpleStruct::DecodableType> arg2;
+ DataModel::DecodableList<SimpleEnum> arg3;
+ DataModel::DecodableList<bool> arg4;
+ SimpleEnum arg5;
+ bool arg6;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestStructArrayArgumentResponse
namespace TestAddArguments {
+enum class Fields
+{
+ kArg1 = 0,
+ kArg2 = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestAddArguments::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ uint8_t arg1;
+ uint8_t arg2;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace TestAddArguments
+public:
+ static constexpr CommandId GetCommandId() { return TestAddArguments::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+ uint8_t arg1;
+ uint8_t arg2;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestAddArguments
+namespace TestSimpleArgumentRequest {
+enum class Fields
+{
+ kArg1 = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestSimpleArgumentRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ bool arg1;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return TestSimpleArgumentRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ bool arg1;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestSimpleArgumentRequest
+namespace TestStructArrayArgumentRequest {
+enum class Fields
+{
+ kArg1 = 0,
+ kArg2 = 1,
+ kArg3 = 2,
+ kArg4 = 3,
+ kArg5 = 4,
+ kArg6 = 5,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return TestStructArrayArgumentRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ DataModel::List<NestedStructList::Type> arg1;
+ DataModel::List<SimpleStruct::Type> arg2;
+ DataModel::List<SimpleEnum> arg3;
+ DataModel::List<bool> arg4;
+ SimpleEnum arg5;
+ bool arg6;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return TestStructArrayArgumentRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return TestCluster::Id; }
+
+ DataModel::DecodableList<NestedStructList::DecodableType> arg1;
+ DataModel::DecodableList<SimpleStruct::DecodableType> arg2;
+ DataModel::DecodableList<SimpleEnum> arg3;
+ DataModel::DecodableList<bool> arg4;
+ SimpleEnum arg5;
+ bool arg6;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace TestStructArrayArgumentRequest
} // namespace Commands
} // namespace TestCluster
namespace Messaging {
@@ -5440,75 +12318,239 @@
namespace Commands {
namespace DisplayMessage {
+enum class Fields
+{
+ kMessageId = 0,
+ kMessageControl = 1,
+ kStartTime = 2,
+ kDurationInMinutes = 3,
+ kMessage = 4,
+ kOptionalExtendedMessageControl = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return DisplayMessage::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+
+ uint32_t messageId;
+ uint8_t messageControl;
+ uint32_t startTime;
+ uint16_t durationInMinutes;
+ Span<const char> message;
+ uint8_t optionalExtendedMessageControl;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace DisplayMessage
+public:
+ static constexpr CommandId GetCommandId() { return DisplayMessage::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+ uint32_t messageId;
+ uint8_t messageControl;
+ uint32_t startTime;
+ uint16_t durationInMinutes;
+ Span<const char> message;
+ uint8_t optionalExtendedMessageControl;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace DisplayMessage
namespace GetLastMessage {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetLastMessage::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetLastMessage
+public:
+ static constexpr CommandId GetCommandId() { return GetLastMessage::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetLastMessage
namespace CancelMessage {
+enum class Fields
+{
+ kMessageId = 0,
+ kMessageControl = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CancelMessage::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+
+ uint32_t messageId;
+ uint8_t messageControl;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CancelMessage
+public:
+ static constexpr CommandId GetCommandId() { return CancelMessage::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+ uint32_t messageId;
+ uint8_t messageControl;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CancelMessage
namespace MessageConfirmation {
+enum class Fields
+{
+ kMessageId = 0,
+ kConfirmationTime = 1,
+ kMessageConfirmationControl = 2,
+ kMessageResponse = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return MessageConfirmation::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+
+ uint32_t messageId;
+ uint32_t confirmationTime;
+ uint8_t messageConfirmationControl;
+ chip::ByteSpan messageResponse;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace MessageConfirmation
+public:
+ static constexpr CommandId GetCommandId() { return MessageConfirmation::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+ uint32_t messageId;
+ uint32_t confirmationTime;
+ uint8_t messageConfirmationControl;
+ chip::ByteSpan messageResponse;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace MessageConfirmation
namespace DisplayProtectedMessage {
+enum class Fields
+{
+ kMessageId = 0,
+ kMessageControl = 1,
+ kStartTime = 2,
+ kDurationInMinutes = 3,
+ kMessage = 4,
+ kOptionalExtendedMessageControl = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return DisplayProtectedMessage::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+
+ uint32_t messageId;
+ uint8_t messageControl;
+ uint32_t startTime;
+ uint16_t durationInMinutes;
+ Span<const char> message;
+ uint8_t optionalExtendedMessageControl;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace DisplayProtectedMessage
+public:
+ static constexpr CommandId GetCommandId() { return DisplayProtectedMessage::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+ uint32_t messageId;
+ uint8_t messageControl;
+ uint32_t startTime;
+ uint16_t durationInMinutes;
+ Span<const char> message;
+ uint8_t optionalExtendedMessageControl;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace DisplayProtectedMessage
namespace GetMessageCancellation {
+enum class Fields
+{
+ kEarliestImplementationTime = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetMessageCancellation::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+
+ uint32_t earliestImplementationTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetMessageCancellation
+public:
+ static constexpr CommandId GetCommandId() { return GetMessageCancellation::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+ uint32_t earliestImplementationTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetMessageCancellation
namespace CancelAllMessages {
+enum class Fields
+{
+ kImplementationDateTime = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CancelAllMessages::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+
+ uint32_t implementationDateTime;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CancelAllMessages
+public:
+ static constexpr CommandId GetCommandId() { return CancelAllMessages::Id; }
+ static constexpr ClusterId GetClusterId() { return Messaging::Id; }
+ uint32_t implementationDateTime;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CancelAllMessages
} // namespace Commands
} // namespace Messaging
namespace ApplianceIdentification {
@@ -5530,180 +12572,531 @@
namespace Commands {
namespace GetAlerts {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetAlerts::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetAlerts
+public:
+ static constexpr CommandId GetCommandId() { return GetAlerts::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetAlerts
namespace GetAlertsResponse {
+enum class Fields
+{
+ kAlertsCount = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetAlertsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; }
+
+ uint8_t alertsCount;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetAlertsResponse
+public:
+ static constexpr CommandId GetCommandId() { return GetAlertsResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; }
+ uint8_t alertsCount;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetAlertsResponse
namespace AlertsNotification {
+enum class Fields
+{
+ kAlertsCount = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return AlertsNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; }
+
+ uint8_t alertsCount;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace AlertsNotification
+public:
+ static constexpr CommandId GetCommandId() { return AlertsNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; }
+ uint8_t alertsCount;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace AlertsNotification
namespace EventsNotification {
+enum class Fields
+{
+ kEventHeader = 0,
+ kEventId = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return EventsNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; }
+
+ uint8_t eventHeader;
+ EventIdentification eventId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace EventsNotification
+public:
+ static constexpr CommandId GetCommandId() { return EventsNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; }
+ uint8_t eventHeader;
+ EventIdentification eventId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace EventsNotification
} // namespace Commands
} // namespace ApplianceEventsAndAlert
namespace ApplianceStatistics {
namespace Commands {
namespace LogNotification {
+enum class Fields
+{
+ kTimeStamp = 0,
+ kLogId = 1,
+ kLogLength = 2,
+ kLogPayload = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LogNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+
+ uint32_t timeStamp;
+ uint32_t logId;
+ uint32_t logLength;
+ DataModel::List<uint8_t> logPayload;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LogNotification
+public:
+ static constexpr CommandId GetCommandId() { return LogNotification::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+ uint32_t timeStamp;
+ uint32_t logId;
+ uint32_t logLength;
+ DataModel::DecodableList<uint8_t> logPayload;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LogNotification
namespace LogRequest {
+enum class Fields
+{
+ kLogId = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LogRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+
+ uint32_t logId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LogRequest
+public:
+ static constexpr CommandId GetCommandId() { return LogRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+ uint32_t logId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LogRequest
namespace LogResponse {
+enum class Fields
+{
+ kTimeStamp = 0,
+ kLogId = 1,
+ kLogLength = 2,
+ kLogPayload = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LogResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+
+ uint32_t timeStamp;
+ uint32_t logId;
+ uint32_t logLength;
+ DataModel::List<uint8_t> logPayload;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LogResponse
+public:
+ static constexpr CommandId GetCommandId() { return LogResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+ uint32_t timeStamp;
+ uint32_t logId;
+ uint32_t logLength;
+ DataModel::DecodableList<uint8_t> logPayload;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LogResponse
namespace LogQueueRequest {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LogQueueRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LogQueueRequest
+public:
+ static constexpr CommandId GetCommandId() { return LogQueueRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LogQueueRequest
namespace LogQueueResponse {
+enum class Fields
+{
+ kLogQueueSize = 0,
+ kLogIds = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return LogQueueResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+
+ uint8_t logQueueSize;
+ DataModel::List<uint32_t> logIds;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace LogQueueResponse
+public:
+ static constexpr CommandId GetCommandId() { return LogQueueResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+ uint8_t logQueueSize;
+ DataModel::DecodableList<uint32_t> logIds;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace LogQueueResponse
namespace StatisticsAvailable {
+enum class Fields
+{
+ kLogQueueSize = 0,
+ kLogIds = 1,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return StatisticsAvailable::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+
+ uint8_t logQueueSize;
+ DataModel::List<uint32_t> logIds;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace StatisticsAvailable
+public:
+ static constexpr CommandId GetCommandId() { return StatisticsAvailable::Id; }
+ static constexpr ClusterId GetClusterId() { return ApplianceStatistics::Id; }
+ uint8_t logQueueSize;
+ DataModel::DecodableList<uint32_t> logIds;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace StatisticsAvailable
} // namespace Commands
} // namespace ApplianceStatistics
namespace ElectricalMeasurement {
namespace Commands {
namespace GetProfileInfoResponseCommand {
+enum class Fields
+{
+ kProfileCount = 0,
+ kProfileIntervalPeriod = 1,
+ kMaxNumberOfIntervals = 2,
+ kListOfAttributes = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetProfileInfoResponseCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ElectricalMeasurement::Id; }
+
+ uint8_t profileCount;
+ uint8_t profileIntervalPeriod;
+ uint8_t maxNumberOfIntervals;
+ DataModel::List<uint16_t> listOfAttributes;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetProfileInfoResponseCommand
+public:
+ static constexpr CommandId GetCommandId() { return GetProfileInfoResponseCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ElectricalMeasurement::Id; }
+ uint8_t profileCount;
+ uint8_t profileIntervalPeriod;
+ uint8_t maxNumberOfIntervals;
+ DataModel::DecodableList<uint16_t> listOfAttributes;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetProfileInfoResponseCommand
namespace GetProfileInfoCommand {
+enum class Fields
+{
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetProfileInfoCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ElectricalMeasurement::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetProfileInfoCommand
+public:
+ static constexpr CommandId GetCommandId() { return GetProfileInfoCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ElectricalMeasurement::Id; }
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetProfileInfoCommand
namespace GetMeasurementProfileResponseCommand {
+enum class Fields
+{
+ kStartTime = 0,
+ kStatus = 1,
+ kProfileIntervalPeriod = 2,
+ kNumberOfIntervalsDelivered = 3,
+ kAttributeId = 4,
+ kIntervals = 5,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetMeasurementProfileResponseCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ElectricalMeasurement::Id; }
+
+ uint32_t startTime;
+ uint8_t status;
+ uint8_t profileIntervalPeriod;
+ uint8_t numberOfIntervalsDelivered;
+ uint16_t attributeId;
+ DataModel::List<uint8_t> intervals;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetMeasurementProfileResponseCommand
+public:
+ static constexpr CommandId GetCommandId() { return GetMeasurementProfileResponseCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ElectricalMeasurement::Id; }
+ uint32_t startTime;
+ uint8_t status;
+ uint8_t profileIntervalPeriod;
+ uint8_t numberOfIntervalsDelivered;
+ uint16_t attributeId;
+ DataModel::DecodableList<uint8_t> intervals;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetMeasurementProfileResponseCommand
namespace GetMeasurementProfileCommand {
+enum class Fields
+{
+ kAttributeId = 0,
+ kStartTime = 1,
+ kNumberOfIntervals = 2,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return GetMeasurementProfileCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ElectricalMeasurement::Id; }
+
+ uint16_t attributeId;
+ uint32_t startTime;
+ uint8_t numberOfIntervals;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace GetMeasurementProfileCommand
+public:
+ static constexpr CommandId GetCommandId() { return GetMeasurementProfileCommand::Id; }
+ static constexpr ClusterId GetClusterId() { return ElectricalMeasurement::Id; }
+ uint16_t attributeId;
+ uint32_t startTime;
+ uint8_t numberOfIntervals;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetMeasurementProfileCommand
} // namespace Commands
} // namespace ElectricalMeasurement
namespace Binding {
namespace Commands {
namespace Bind {
+enum class Fields
+{
+ kNodeId = 0,
+ kGroupId = 1,
+ kEndpointId = 2,
+ kClusterId = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Bind::Id; }
+ static constexpr ClusterId GetClusterId() { return Binding::Id; }
+
+ chip::NodeId nodeId;
+ chip::GroupId groupId;
+ chip::EndpointId endpointId;
+ chip::ClusterId clusterId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Bind
+public:
+ static constexpr CommandId GetCommandId() { return Bind::Id; }
+ static constexpr ClusterId GetClusterId() { return Binding::Id; }
+ chip::NodeId nodeId;
+ chip::GroupId groupId;
+ chip::EndpointId endpointId;
+ chip::ClusterId clusterId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Bind
namespace Unbind {
+enum class Fields
+{
+ kNodeId = 0,
+ kGroupId = 1,
+ kEndpointId = 2,
+ kClusterId = 3,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Unbind::Id; }
+ static constexpr ClusterId GetClusterId() { return Binding::Id; }
+
+ chip::NodeId nodeId;
+ chip::GroupId groupId;
+ chip::EndpointId endpointId;
+ chip::ClusterId clusterId;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace Unbind
+public:
+ static constexpr CommandId GetCommandId() { return Unbind::Id; }
+ static constexpr ClusterId GetClusterId() { return Binding::Id; }
+ chip::NodeId nodeId;
+ chip::GroupId groupId;
+ chip::EndpointId endpointId;
+ chip::ClusterId clusterId;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace Unbind
} // namespace Commands
} // namespace Binding
namespace GroupKeyManagement {
@@ -5715,13 +13108,13 @@
};
namespace GroupKey {
-enum FieldId
+enum class Fields
{
- kVendorIdFieldId = 0,
- kGroupKeyIndexFieldId = 1,
- kGroupKeyRootFieldId = 2,
- kGroupKeyEpochStartTimeFieldId = 3,
- kGroupKeySecurityPolicyFieldId = 4,
+ kVendorId = 0,
+ kGroupKeyIndex = 1,
+ kGroupKeyRoot = 2,
+ kGroupKeyEpochStartTime = 3,
+ kGroupKeySecurityPolicy = 4,
};
struct Type
@@ -5741,11 +13134,11 @@
} // namespace GroupKey
namespace GroupState {
-enum FieldId
+enum class Fields
{
- kVendorIdFieldId = 0,
- kVendorGroupIdFieldId = 1,
- kGroupKeySetIndexFieldId = 2,
+ kVendorId = 0,
+ kVendorGroupId = 1,
+ kGroupKeySetIndex = 2,
};
struct Type
@@ -5768,30 +13161,66 @@
namespace Commands {
namespace CommandOne {
+enum class Fields
+{
+ kArgOne = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CommandOne::Id; }
+ static constexpr ClusterId GetClusterId() { return SampleMfgSpecificCluster::Id; }
+
+ uint8_t argOne;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CommandOne
+public:
+ static constexpr CommandId GetCommandId() { return CommandOne::Id; }
+ static constexpr ClusterId GetClusterId() { return SampleMfgSpecificCluster::Id; }
+ uint8_t argOne;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CommandOne
} // namespace Commands
} // namespace SampleMfgSpecificCluster
namespace SampleMfgSpecificCluster2 {
namespace Commands {
namespace CommandTwo {
+enum class Fields
+{
+ kArgOne = 0,
+};
+
struct Type
{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return CommandTwo::Id; }
+ static constexpr ClusterId GetClusterId() { return SampleMfgSpecificCluster2::Id; }
+
+ uint8_t argOne;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & writer, uint64_t tag) const;
};
struct DecodableType
{
-};
-} // namespace CommandTwo
+public:
+ static constexpr CommandId GetCommandId() { return CommandTwo::Id; }
+ static constexpr ClusterId GetClusterId() { return SampleMfgSpecificCluster2::Id; }
+ uint8_t argOne;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace CommandTwo
} // namespace Commands
} // namespace SampleMfgSpecificCluster2
diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h
index a4a8634..b7d5ef5 100644
--- a/zzz_generated/app-common/app-common/zap-generated/command-id.h
+++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h
@@ -448,8 +448,12 @@
#define ZCL_TEST_NOT_HANDLED_COMMAND_ID (0x01)
#define ZCL_TEST_ADD_ARGUMENTS_RESPONSE_COMMAND_ID (0x01)
#define ZCL_TEST_SPECIFIC_COMMAND_ID (0x02)
+#define ZCL_TEST_SIMPLE_ARGUMENT_RESPONSE_COMMAND_ID (0x02)
#define ZCL_TEST_UNKNOWN_COMMAND_COMMAND_ID (0x03)
+#define ZCL_TEST_STRUCT_ARRAY_ARGUMENT_RESPONSE_COMMAND_ID (0x03)
#define ZCL_TEST_ADD_ARGUMENTS_COMMAND_ID (0x04)
+#define ZCL_TEST_SIMPLE_ARGUMENT_REQUEST_COMMAND_ID (0x05)
+#define ZCL_TEST_STRUCT_ARRAY_ARGUMENT_REQUEST_COMMAND_ID (0x06)
// Commands for cluster: Messaging
#define ZCL_DISPLAY_MESSAGE_COMMAND_ID (0x00)
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
index fe88151..3664809 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
@@ -1556,14 +1556,30 @@
static constexpr CommandId Id = 0x00000002;
} // namespace TestSpecific
+namespace TestSimpleArgumentResponse {
+static constexpr CommandId Id = 0x00000002;
+} // namespace TestSimpleArgumentResponse
+
namespace TestUnknownCommand {
static constexpr CommandId Id = 0x00000003;
} // namespace TestUnknownCommand
+namespace TestStructArrayArgumentResponse {
+static constexpr CommandId Id = 0x00000003;
+} // namespace TestStructArrayArgumentResponse
+
namespace TestAddArguments {
static constexpr CommandId Id = 0x00000004;
} // namespace TestAddArguments
+namespace TestSimpleArgumentRequest {
+static constexpr CommandId Id = 0x00000005;
+} // namespace TestSimpleArgumentRequest
+
+namespace TestStructArrayArgumentRequest {
+static constexpr CommandId Id = 0x00000006;
+} // namespace TestStructArrayArgumentRequest
+
} // namespace Commands
} // namespace TestCluster