diff --git a/src/app/zap-templates/zcl/data-model/chip/global-structs.xml b/src/app/zap-templates/zcl/data-model/chip/global-structs.xml index 454a7380f78937..743fdf366b724b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/global-structs.xml +++ b/src/app/zap-templates/zcl/data-model/chip/global-structs.xml @@ -39,14 +39,4 @@ limitations under the License. - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 3d23f976e6dd8f..a2114b13685df5 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -49,6 +49,7 @@ "microwave-oven-control-cluster.xml", "door-lock-cluster.xml", "ecosystem-information-cluster.xml", + "energy-calendar-cluster.xml", "energy-preference-cluster.xml", "electrical-energy-measurement-cluster.xml", "electrical-measurement-cluster.xml", @@ -140,7 +141,6 @@ "window-covering.xml", "matter-devices.xml", "sample-mei-cluster.xml", - "energy-calendar-cluster.xml", "types/door-lock.xml", "types/occupancy-sensing.xml", "types/thermostat-user-interface-configuration.xml" @@ -665,6 +665,16 @@ "NeutralCurrent", "FeatureMap" ], + "Energy Calendar": [ + "CalendarPeriods", + "SpecialDays", + "CurrentDay", + "NextDay", + "CurrentTransition", + "CurrentPeakPeriod", + "NextPeakPeriod", + "FeatureMap" + ], "Power Topology": ["FeatureMap"], "Valve Configuration and Control": ["RemainingDuration"], "Boolean State Configuration": ["CurrentSensitivityLevel"], @@ -686,16 +696,6 @@ "ThreadNetworkTableSize" ], "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"] - "Energy Calendar": [ - "CalendarPeriods", - "SpecialDays", - "CurrentDay", - "NextDay", - "CurrentTransition", - "CurrentPeakPeriod", - "NextPeakPeriod", - "FeatureMap" - ] }, "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index cf2ce7b932e891..956247d27ac86c 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -50,6 +50,7 @@ "electrical-energy-measurement-cluster.xml", "electrical-measurement-cluster.xml", "electrical-power-measurement-cluster.xml", + "energy-calendar-cluster.xml", "energy-evse-cluster.xml", "energy-evse-mode-cluster.xml", "energy-preference-cluster.xml", @@ -138,7 +139,6 @@ "window-covering.xml", "matter-devices.xml", "sample-mei-cluster.xml", - "energy-calendar-cluster.xml", "types/door-lock.xml", "types/occupancy-sensing.xml", "types/thermostat-user-interface-configuration.xml" @@ -663,6 +663,16 @@ "NeutralCurrent", "FeatureMap" ], + "Energy Calendar": [ + "CalendarPeriods", + "SpecialDays", + "CurrentDay", + "NextDay", + "CurrentTransition", + "CurrentPeakPeriod", + "NextPeakPeriod", + "FeatureMap" + ], "Power Topology": ["FeatureMap"], "Valve Configuration and Control": ["RemainingDuration"], "Boolean State Configuration": ["CurrentSensitivityLevel"], @@ -684,16 +694,6 @@ "ThreadNetworkTableSize" ], "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"] - "Energy Calendar": [ - "CalendarPeriods", - "SpecialDays", - "CurrentDay", - "NextDay", - "CurrentTransition", - "CurrentPeakPeriod", - "NextPeakPeriod", - "FeatureMap" - ] }, "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index 1c128977818910..a760569ab4790b 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -35,6 +35,7 @@ "DIAGNOSTIC_LOGS_CLUSTER": [], "DISHWASHER_ALARM_CLUSTER": [], "DISHWASHER_MODE_CLUSTER": [], + "ENERGY_CALENDAR_CLUSTER": [], "MICROWAVE_OVEN_MODE_CLUSTER": [], "DOOR_LOCK_CLUSTER": [], "ECOSYSTEM_INFORMATION_CLUSTER": [], @@ -137,7 +138,6 @@ "WATER_HEATER_MODE_CLUSTER": [], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], "WINDOW_COVERING_CLUSTER": [], - "ENERGY_CALENDAR_CLUSTER": [], "ZLL_COMMISSIONING_CLUSTER": [] }, "ServerDirectories": { @@ -187,6 +187,7 @@ "DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"], "DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"], "DISHWASHER_MODE_CLUSTER": ["mode-base-server"], + "ENERGY_CALENDAR_CLUSTER": [], "MICROWAVE_OVEN_MODE_CLUSTER": ["mode-base-server"], "DOOR_LOCK_CLUSTER": ["door-lock-server"], "ECOSYSTEM_INFORMATION_CLUSTER": ["ecosystem-information-server"], @@ -325,7 +326,6 @@ "WINDOW_COVERING_CLUSTER": ["window-covering-server"], "WATER_HEATER_MANAGEMENT_CLUSTER": ["water-heater-management-server"], "WATER_HEATER_MODE_CLUSTER": ["mode-base-server"], - "ENERGY_CALENDAR_CLUSTER": ["energy-calendar-server"], "ZLL_COMMISSIONING_CLUSTER": [] } } diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index d0ace456204ad9..d523db3c627b81 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -27009,8 +27009,8 @@ class PeakPeriodSeverityEnum(MatterIntEnum): kHigh = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index ae4edf5d7faaa5..3707037c305ac1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -4865,6 +4865,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeEnergyPreferenceID: @@ -10551,6 +10552,16 @@ } break; + case MTRClusterIDTypeEnergyCalendarID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + case MTRClusterIDTypeEnergyPreferenceID: switch (eventID) { 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 dd7519eb03984d..cf3516739717a1 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 @@ -335,57 +335,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace DeviceTypeStruct -namespace DateStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kYear), year); - encoder.Encode(to_underlying(Fields::kMonth), month); - encoder.Encode(to_underlying(Fields::kDay), day); - encoder.Encode(to_underlying(Fields::kDayOfWeek), dayOfWeek); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kYear)) - { - err = DataModel::Decode(reader, year); - } - else if (__context_tag == to_underlying(Fields::kMonth)) - { - err = DataModel::Decode(reader, month); - } - else if (__context_tag == to_underlying(Fields::kDay)) - { - err = DataModel::Decode(reader, day); - } - else if (__context_tag == to_underlying(Fields::kDayOfWeek)) - { - err = DataModel::Decode(reader, dayOfWeek); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} - -} // namespace DateStruct - namespace ApplicationStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { 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 79fb1e25acb9a8..7e3149f85a13c6 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 @@ -173,7 +173,6 @@ struct DecodableType }; } // namespace MeasurementAccuracyStruct - namespace DeviceTypeStruct { enum class Fields : uint8_t { @@ -197,35 +196,6 @@ struct Type using DecodableType = Type; } // namespace DeviceTypeStruct - -namespace DateStruct { -enum class Fields : uint8_t -{ - kYear = 0, - kMonth = 1, - kDay = 2, - kDayOfWeek = 3, -}; - -struct Type -{ -public: - DataModel::Nullable year; - DataModel::Nullable month; - DataModel::Nullable day; - DataModel::Nullable dayOfWeek; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace DateStruct - namespace ApplicationStruct { enum class Fields : uint8_t { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index b2197a26196aae..91489bfd7fee76 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -327,48 +327,6 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::Devic ComplexArgumentParser::Finalize(request.revision); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::DateStruct::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DateStruct.year", "year", value.isMember("year"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DateStruct.month", "month", value.isMember("month"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DateStruct.day", "day", value.isMember("day"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("DateStruct.dayOfWeek", "dayOfWeek", value.isMember("dayOfWeek"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "year"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.year, value["year"])); - valueCopy.removeMember("year"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "month"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.month, value["month"])); - valueCopy.removeMember("month"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "day"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.day, value["day"])); - valueCopy.removeMember("day"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayOfWeek"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayOfWeek, value["dayOfWeek"])); - valueCopy.removeMember("dayOfWeek"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::DateStruct::Type & request) -{ - ComplexArgumentParser::Finalize(request.year); - ComplexArgumentParser::Finalize(request.month); - ComplexArgumentParser::Finalize(request.day); - ComplexArgumentParser::Finalize(request.dayOfWeek); -} - CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request, Json::Value & value) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index f4cc3f6e33ef8a..4d05bb09f58db8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -57,10 +57,6 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs static void Finalize(chip::app::Clusters::detail::Structs::DeviceTypeStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::DateStruct::Type & request, Json::Value & value); - -static void Finalize(chip::app::Clusters::detail::Structs::DateStruct::Type & request); - static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 8dcc2196fa1276..5b3ceaf6977305 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -293,47 +293,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::detail::Structs::DateStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("Year", indent + 1, value.year); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Year'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("Month", indent + 1, value.month); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Month'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("Day", indent + 1, value.day); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Day'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("DayOfWeek", indent + 1, value.dayOfWeek); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayOfWeek'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 2c51a9f2077f2c..d56d165e7ef860 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -41,9 +41,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::detail::Structs::DeviceTypeStruct::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::detail::Structs::DateStruct::DecodableType & value); - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value);