From 1102656c71a55c3fc5610746cb5a75f58db63a1e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 18 Oct 2021 14:10:22 -0400 Subject: [PATCH] Fix namespace handling for bitmap types in zapTypeToClusterObjectType. (#10620) --- src/app/zap-templates/templates/app/helper.js | 2 +- .../zap-generated/cluster-objects.h | 100 +++++++++--------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 1b15464497c4a3..de583da6de33c0 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -396,7 +396,7 @@ async function zapTypeToClusterObjectType(type, isDecodable, options) } if (await typeChecker('isBitmap')) { - return ns + 'BitFlags<' + type + '>'; + return 'chip::BitFlags<' + ns + type + '>'; } if (await typeChecker('isStruct')) { 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 79a26af4d2eee4..31ba7bb7af762b 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 @@ -1846,7 +1846,7 @@ struct Type static constexpr CommandId GetCommandId() { return CopyScene::Id; } static constexpr ClusterId GetClusterId() { return Scenes::Id; } - BitFlags mode; + chip::BitFlags mode; uint16_t groupIdFrom; uint8_t sceneIdFrom; uint16_t groupIdTo; @@ -1861,7 +1861,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return CopyScene::Id; } static constexpr ClusterId GetClusterId() { return Scenes::Id; } - BitFlags mode; + chip::BitFlags mode; uint16_t groupIdFrom; uint8_t sceneIdFrom; uint16_t groupIdTo; @@ -2275,7 +2275,7 @@ struct Type static constexpr CommandId GetCommandId() { return OnWithTimedOff::Id; } static constexpr ClusterId GetClusterId() { return OnOff::Id; } - BitFlags onOffControl; + chip::BitFlags onOffControl; uint16_t onTime; uint16_t offWaitTime; @@ -2288,7 +2288,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return OnWithTimedOff::Id; } static constexpr ClusterId GetClusterId() { return OnOff::Id; } - BitFlags onOffControl; + chip::BitFlags onOffControl; uint16_t onTime; uint16_t offWaitTime; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -4158,7 +4158,7 @@ struct Type static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; } ApplianceStatus applianceStatus; - BitFlags remoteEnableFlagsAndDeviceStatus2; + chip::BitFlags remoteEnableFlagsAndDeviceStatus2; ApplianceStatus applianceStatus2; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4171,7 +4171,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; } ApplianceStatus applianceStatus; - BitFlags remoteEnableFlagsAndDeviceStatus2; + chip::BitFlags remoteEnableFlagsAndDeviceStatus2; ApplianceStatus applianceStatus2; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -4216,7 +4216,7 @@ struct Type static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; } ApplianceStatus applianceStatus; - BitFlags remoteEnableFlagsAndDeviceStatus2; + chip::BitFlags remoteEnableFlagsAndDeviceStatus2; ApplianceStatus applianceStatus2; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4229,7 +4229,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return ApplianceControl::Id; } ApplianceStatus applianceStatus; - BitFlags remoteEnableFlagsAndDeviceStatus2; + chip::BitFlags remoteEnableFlagsAndDeviceStatus2; ApplianceStatus applianceStatus2; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -9865,7 +9865,7 @@ struct Type uint8_t scheduleId; uint16_t userId; - BitFlags daysMask; + chip::BitFlags daysMask; uint8_t startHour; uint8_t startMinute; uint8_t endHour; @@ -9882,7 +9882,7 @@ struct DecodableType uint8_t scheduleId; uint16_t userId; - BitFlags daysMask; + chip::BitFlags daysMask; uint8_t startHour; uint8_t startMinute; uint8_t endHour; @@ -12427,8 +12427,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Thermostat::Id; } uint8_t numberOfTransitionsForSequence; - BitFlags dayOfWeekForSequence; - BitFlags modeForSequence; + chip::BitFlags dayOfWeekForSequence; + chip::BitFlags modeForSequence; DataModel::List payload; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -12441,8 +12441,8 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Thermostat::Id; } uint8_t numberOfTransitionsForSequence; - BitFlags dayOfWeekForSequence; - BitFlags modeForSequence; + chip::BitFlags dayOfWeekForSequence; + chip::BitFlags modeForSequence; DataModel::DecodableList payload; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -12464,8 +12464,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Thermostat::Id; } uint8_t numberOfTransitionsForSequence; - BitFlags dayOfWeekForSequence; - BitFlags modeForSequence; + chip::BitFlags dayOfWeekForSequence; + chip::BitFlags modeForSequence; DataModel::List payload; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -12478,8 +12478,8 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Thermostat::Id; } uint8_t numberOfTransitionsForSequence; - BitFlags dayOfWeekForSequence; - BitFlags modeForSequence; + chip::BitFlags dayOfWeekForSequence; + chip::BitFlags modeForSequence; DataModel::DecodableList payload; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -12541,8 +12541,8 @@ struct Type static constexpr CommandId GetCommandId() { return GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Thermostat::Id; } - BitFlags daysToReturn; - BitFlags modeToReturn; + chip::BitFlags daysToReturn; + chip::BitFlags modeToReturn; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -12553,8 +12553,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Thermostat::Id; } - BitFlags daysToReturn; - BitFlags modeToReturn; + chip::BitFlags daysToReturn; + chip::BitFlags modeToReturn; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeeklySchedule @@ -13911,7 +13911,7 @@ struct Type static constexpr CommandId GetCommandId() { return ColorLoopSet::Id; } static constexpr ClusterId GetClusterId() { return ColorControl::Id; } - BitFlags updateFlags; + chip::BitFlags updateFlags; ColorLoopAction action; ColorLoopDirection direction; uint16_t time; @@ -13928,7 +13928,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return ColorLoopSet::Id; } static constexpr ClusterId GetClusterId() { return ColorControl::Id; } - BitFlags updateFlags; + chip::BitFlags updateFlags; ColorLoopAction action; ColorLoopDirection direction; uint16_t time; @@ -16648,7 +16648,7 @@ struct Type static constexpr CommandId GetCommandId() { return ZoneStatusChangeNotification::Id; } static constexpr ClusterId GetClusterId() { return IasZone::Id; } - BitFlags zoneStatus; + chip::BitFlags zoneStatus; uint8_t extendedStatus; uint8_t zoneId; uint16_t delay; @@ -16662,7 +16662,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return ZoneStatusChangeNotification::Id; } static constexpr ClusterId GetClusterId() { return IasZone::Id; } - BitFlags zoneStatus; + chip::BitFlags zoneStatus; uint8_t extendedStatus; uint8_t zoneId; uint16_t delay; @@ -17030,7 +17030,7 @@ struct Type { public: uint8_t zoneId; - BitFlags zoneStatus; + chip::BitFlags zoneStatus; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -17702,7 +17702,7 @@ struct Type static constexpr CommandId GetCommandId() { return StartWarning::Id; } static constexpr ClusterId GetClusterId() { return IasWd::Id; } - BitFlags warningInfo; + chip::BitFlags warningInfo; uint16_t warningDuration; uint8_t strobeDutyCycle; uint8_t strobeLevel; @@ -17716,7 +17716,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return StartWarning::Id; } static constexpr ClusterId GetClusterId() { return IasWd::Id; } - BitFlags warningInfo; + chip::BitFlags warningInfo; uint16_t warningDuration; uint8_t strobeDutyCycle; uint8_t strobeLevel; @@ -17736,7 +17736,7 @@ struct Type static constexpr CommandId GetCommandId() { return Squawk::Id; } static constexpr ClusterId GetClusterId() { return IasWd::Id; } - BitFlags squawkInfo; + chip::BitFlags squawkInfo; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -17747,7 +17747,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Squawk::Id; } static constexpr ClusterId GetClusterId() { return IasWd::Id; } - BitFlags squawkInfo; + chip::BitFlags squawkInfo; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Squawk @@ -20106,7 +20106,7 @@ struct Type SimpleEnum c; chip::ByteSpan d; chip::Span e; - BitFlags f; + chip::BitFlags f; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21157,11 +21157,11 @@ struct Type static constexpr ClusterId GetClusterId() { return Messaging::Id; } uint32_t messageId; - BitFlags messageControl; + chip::BitFlags messageControl; uint32_t startTime; uint16_t durationInMinutes; chip::Span message; - BitFlags optionalExtendedMessageControl; + chip::BitFlags optionalExtendedMessageControl; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -21173,11 +21173,11 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Messaging::Id; } uint32_t messageId; - BitFlags messageControl; + chip::BitFlags messageControl; uint32_t startTime; uint16_t durationInMinutes; chip::Span message; - BitFlags optionalExtendedMessageControl; + chip::BitFlags optionalExtendedMessageControl; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace DisplayMessage @@ -21220,7 +21220,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Messaging::Id; } uint32_t messageId; - BitFlags messageControl; + chip::BitFlags messageControl; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -21232,7 +21232,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Messaging::Id; } uint32_t messageId; - BitFlags messageControl; + chip::BitFlags messageControl; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CancelMessage @@ -21292,11 +21292,11 @@ struct Type static constexpr ClusterId GetClusterId() { return Messaging::Id; } uint32_t messageId; - BitFlags messageControl; + chip::BitFlags messageControl; uint32_t startTime; uint16_t durationInMinutes; chip::Span message; - BitFlags optionalExtendedMessageControl; + chip::BitFlags optionalExtendedMessageControl; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -21308,11 +21308,11 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Messaging::Id; } uint32_t messageId; - BitFlags messageControl; + chip::BitFlags messageControl; uint32_t startTime; uint16_t durationInMinutes; chip::Span message; - BitFlags optionalExtendedMessageControl; + chip::BitFlags optionalExtendedMessageControl; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace DisplayProtectedMessage @@ -21696,8 +21696,8 @@ struct Type static constexpr CommandId GetCommandId() { return GetAlertsResponse::Id; } static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; } - BitFlags alertsCount; - DataModel::List> alertStructures; + chip::BitFlags alertsCount; + DataModel::List> alertStructures; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -21708,8 +21708,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return GetAlertsResponse::Id; } static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; } - BitFlags alertsCount; - DataModel::DecodableList> alertStructures; + chip::BitFlags alertsCount; + DataModel::DecodableList> alertStructures; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetAlertsResponse @@ -21727,8 +21727,8 @@ struct Type static constexpr CommandId GetCommandId() { return AlertsNotification::Id; } static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; } - BitFlags alertsCount; - DataModel::List> alertStructures; + chip::BitFlags alertsCount; + DataModel::List> alertStructures; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -21739,8 +21739,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return AlertsNotification::Id; } static constexpr ClusterId GetClusterId() { return ApplianceEventsAndAlert::Id; } - BitFlags alertsCount; - DataModel::DecodableList> alertStructures; + chip::BitFlags alertsCount; + DataModel::DecodableList> alertStructures; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AlertsNotification