From 4b5ef25ea7190ac79e5820ee9b83e7231e1ab6cc Mon Sep 17 00:00:00 2001 From: Lazar Kovacic Date: Fri, 10 Dec 2021 16:26:27 +0100 Subject: [PATCH] Disable TV channel attributes that cause Cirque failiure --- .../data-model/chip/tv-channel-cluster.xml | 4 +- .../java/zap-generated/CHIPCallbackTypes.h | 4 - .../python/chip/clusters/CHIPClusters.py | 14 - .../python/chip/clusters/Objects.py | 36 --- .../CHIPAttributeTLVValueDecoder.mm | 43 ---- .../zap-generated/endpoint_config.h | 42 ++- .../app-common/zap-generated/attribute-id.h | 2 - .../zap-generated/cluster-objects.h | 24 -- .../app-common/zap-generated/ids/Attributes.h | 8 - .../zap-generated/cluster/Commands.h | 2 - .../zap-generated/CHIPClusters.cpp | 240 ++++++++++++++++++ .../lighting-app/zap-generated/CHIPClusters.h | 12 + .../zap-generated/IMClusterCommandHandler.cpp | 81 +----- .../tv-app/zap-generated/endpoint_config.h | 50 ++-- .../zap-generated/endpoint_config.h | 36 ++- 15 files changed, 315 insertions(+), 283 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml index 8a19be92066061..5110385f58d497 100644 --- a/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml @@ -26,8 +26,8 @@ limitations under the License. This cluster provides an interface for controlling the current TV Channel on a device. channel list - channel lineup - current channel + Change the channel on the TV to the channel case-insensitive exact matching the value passed as an argument. diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 13c792f38ef54e..65646edaee1f04 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -914,10 +914,6 @@ typedef void (*CHIPTvChannelClusterChangeChannelResponseCallbackType)( typedef void (*CHIPTvChannelClusterChannelListAttributeCallbackType)( void *, const chip::app::Clusters::TvChannel::Attributes::ChannelList::TypeInfo::DecodableType &); -typedef void (*CHIPTvChannelClusterChannelLineupAttributeCallbackType)( - void *, chip::app::Clusters::TvChannel::Attributes::ChannelLineup::TypeInfo::DecodableArgType); -typedef void (*CHIPTvChannelClusterCurrentChannelAttributeCallbackType)( - void *, chip::app::Clusters::TvChannel::Attributes::CurrentChannel::TypeInfo::DecodableArgType); typedef void (*CHIPTvChannelClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::TvChannel::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPTvChannelClusterClusterRevisionAttributeCallbackType)( diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index bc6ac8cd7a44fa..bb7be3b6867c60 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3761,20 +3761,6 @@ class ChipClusters: "type": "", "reportable": True, }, - 0x00000001: { - "attributeName": "ChannelLineup", - "attributeId": 0x00000001, - "type": "", - "reportable": True, - "writable": True, - }, - 0x00000002: { - "attributeName": "CurrentChannel", - "attributeId": 0x00000002, - "type": "", - "reportable": True, - "writable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 6468b2e8d3507e..9d28fba0ee9689 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -27198,16 +27198,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="channelList", Tag=0x00000000, Type=typing.List[TvChannel.Structs.TvChannelInfo]), - ClusterObjectFieldDescriptor(Label="channelLineup", Tag=0x00000001, Type=TvChannel.Structs.TvChannelLineupInfo), - ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=TvChannel.Structs.TvChannelInfo), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) channelList: 'typing.List[TvChannel.Structs.TvChannelInfo]' = None - channelLineup: 'TvChannel.Structs.TvChannelLineupInfo' = None - currentChannel: 'TvChannel.Structs.TvChannelInfo' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None @@ -27343,38 +27339,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[TvChannel.Structs.TvChannelInfo]' = field(default_factory=lambda: []) - @dataclass - class ChannelLineup(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0504 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=TvChannel.Structs.TvChannelLineupInfo) - - value: 'TvChannel.Structs.TvChannelLineupInfo' = field(default_factory=lambda: TvChannel.Structs.TvChannelLineupInfo()) - - @dataclass - class CurrentChannel(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0504 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=TvChannel.Structs.TvChannelInfo) - - value: 'TvChannel.Structs.TvChannelInfo' = field(default_factory=lambda: TvChannel.Structs.TvChannelInfo()) - @dataclass class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 21e60df3f544c1..f58415a864536f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -5917,49 +5917,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = array_0; return value; } - case Attributes::ChannelLineup::Id: { - using TypeInfo = Attributes::ChannelLineup::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - CHIPTvChannelClusterTvChannelLineupInfo * _Nonnull value; - value = [CHIPTvChannelClusterTvChannelLineupInfo new]; - value.operatorName = [[NSString alloc] initWithBytes:cppValue.operatorName.data() - length:cppValue.operatorName.size() - encoding:NSUTF8StringEncoding]; - value.lineupName = [[NSString alloc] initWithBytes:cppValue.lineupName.data() - length:cppValue.lineupName.size() - encoding:NSUTF8StringEncoding]; - value.postalCode = [[NSString alloc] initWithBytes:cppValue.postalCode.data() - length:cppValue.postalCode.size() - encoding:NSUTF8StringEncoding]; - value.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.lineupInfoType)]; - return value; - } - case Attributes::CurrentChannel::Id: { - using TypeInfo = Attributes::CurrentChannel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - CHIPTvChannelClusterTvChannelInfo * _Nonnull value; - value = [CHIPTvChannelClusterTvChannelInfo new]; - value.majorNumber = [NSNumber numberWithUnsignedShort:cppValue.majorNumber]; - value.minorNumber = [NSNumber numberWithUnsignedShort:cppValue.minorNumber]; - value.name = [[NSString alloc] initWithBytes:cppValue.name.data() - length:cppValue.name.size() - encoding:NSUTF8StringEncoding]; - value.callSign = [[NSString alloc] initWithBytes:cppValue.callSign.data() - length:cppValue.callSign.size() - encoding:NSUTF8StringEncoding]; - value.affiliateCallSign = [[NSString alloc] initWithBytes:cppValue.affiliateCallSign.data() - length:cppValue.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index b41bc45b368da9..ce15fa2c08a026 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1448,7 +1448,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 576 +#define GENERATED_ATTRIBUTE_COUNT 574 #define GENERATED_ATTRIBUTES \ { \ \ @@ -2041,11 +2041,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1450) }, /* channel list */ \ - { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ - { 0x0002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* current channel */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1704) }, /* target navigator list */ \ @@ -2528,61 +2524,61 @@ 0x0503, ZAP_ATTRIBUTE_INDEX(429), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(431), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(431), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(435), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(433), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(438), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(436), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(446), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(444), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(449), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(447), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(450), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(448), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(451), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(449), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(454), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(452), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(457), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(455), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(460), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(458), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(467), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(465), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(468), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(466), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(546), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(544), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(558), \ + ZAP_ATTRIBUTE_INDEX(556), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(560), \ + ZAP_ATTRIBUTE_INDEX(558), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(567), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(565), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(572), \ + ZAP_ATTRIBUTE_INDEX(570), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 5d277559ed65cd..fe1e939d163ceb 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -1359,8 +1359,6 @@ // Server attributes #define ZCL_TV_CHANNEL_LIST_ATTRIBUTE_ID (0x0000) -#define ZCL_TV_CHANNEL_LINEUP_ATTRIBUTE_ID (0x0001) -#define ZCL_TV_CHANNEL_CURRENT_CHANNEL_ATTRIBUTE_ID (0x0002) // Attribute ids for cluster: Target Navigator 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 b306c6e01a51db..25ccdb9e2e52b3 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 @@ -28106,30 +28106,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ChannelList -namespace ChannelLineup { -struct TypeInfo -{ - using Type = Structs::TvChannelLineupInfo::Type; - using DecodableType = Structs::TvChannelLineupInfo::DecodableType; - using DecodableArgType = const Structs::TvChannelLineupInfo::DecodableType &; - - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ChannelLineup::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ChannelLineup -namespace CurrentChannel { -struct TypeInfo -{ - using Type = Structs::TvChannelInfo::Type; - using DecodableType = Structs::TvChannelInfo::DecodableType; - using DecodableArgType = const Structs::TvChannelInfo::DecodableType &; - - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentChannel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentChannel namespace AttributeList { struct TypeInfo { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 62ea80977f6ad0..7b15fd67f97a05 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4760,14 +4760,6 @@ namespace ChannelList { static constexpr AttributeId Id = 0x00000000; } // namespace ChannelList -namespace ChannelLineup { -static constexpr AttributeId Id = 0x00000001; -} // namespace ChannelLineup - -namespace CurrentChannel { -static constexpr AttributeId Id = 0x00000002; -} // namespace CurrentChannel - namespace AttributeList { static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; } // namespace AttributeList diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 51a784f011e88d..bf222180c330aa 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -31958,8 +31958,6 @@ class ReportSwitchClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * ChannelList | 0x0000 | -| * ChannelLineup | 0x0001 | -| * CurrentChannel | 0x0002 | | * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp index ba1cdf93cacdfe..cff1f482383cc8 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp @@ -187,6 +187,246 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * o // OtaSoftwareUpdateProvider Cluster Attributes // OnOff Cluster Commands +CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::Off::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + // Command takes no arguments. + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OnOffCluster::OffWithEffect(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t effectId, uint8_t effectVariant) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OffWithEffect::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // effectId: onOffEffectIdentifier + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectId)); + // effectVariant: onOffDelayedAllOffEffectVariant + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectVariant)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OnOffCluster::On(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::On::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + // Command takes no arguments. + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OnOffCluster::OnWithRecallGlobalScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OnWithRecallGlobalScene::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + // Command takes no arguments. + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OnOffCluster::OnWithTimedOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t onOffControl, uint16_t onTime, uint16_t offWaitTime) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OnWithTimedOff::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // onOffControl: onOffControl + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), onOffControl)); + // onTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), onTime)); + // offWaitTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), offWaitTime)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::Toggle::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + // Command takes no arguments. + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + // OnOff Cluster Attributes CHIP_ERROR OnOffCluster::SubscribeAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.h b/zzz_generated/lighting-app/zap-generated/CHIPClusters.h index 08c9d3509a9f43..4698783a12eb99 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.h @@ -57,6 +57,16 @@ class DLL_EXPORT OnOffCluster : public ClusterBase OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} ~OnOffCluster() {} + // Cluster Commands + CHIP_ERROR Off(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR OffWithEffect(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t effectId, + uint8_t effectVariant); + CHIP_ERROR On(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR OnWithRecallGlobalScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR OnWithTimedOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t onOffControl, uint16_t onTime, uint16_t offWaitTime); + CHIP_ERROR Toggle(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + // Cluster Attributes CHIP_ERROR SubscribeAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); @@ -80,6 +90,8 @@ class DLL_EXPORT OnOffCluster : public ClusterBase CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); + +private: }; } // namespace Controller diff --git a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp index e4a6e20f188fad..cd6c17eb233641 100644 --- a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp @@ -909,84 +909,9 @@ namespace OnOff { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - // The following variables are used for all commands to save code size. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::Off::Id: { - Commands::Off::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOffCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::OffWithEffect::Id: { - Commands::OffWithEffect::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOffWithEffectCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::On::Id: { - Commands::On::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOnCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::OnWithRecallGlobalScene::Id: { - Commands::OnWithRecallGlobalScene::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOnWithRecallGlobalSceneCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::OnWithTimedOff::Id: { - Commands::OnWithTimedOff::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOnWithTimedOffCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::Toggle::Id: { - Commands::Toggle::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); } } // namespace OnOff diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index cb1c8cb49abd42..f9f87fc320d880 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -954,7 +954,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 263 +#define GENERATED_ATTRIBUTE_COUNT 261 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1180,11 +1180,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1107) }, /* channel list */ \ - { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ - { 0x0002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* current channel */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1361) }, /* target navigator list */ \ @@ -1416,73 +1412,73 @@ 0x0503, ZAP_ATTRIBUTE_INDEX(167), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(169), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(169), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(173), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(171), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(176), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(174), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(179), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(177), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(180), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(178), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(181), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(179), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(184), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(182), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(187), \ + ZAP_ATTRIBUTE_INDEX(185), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(189), \ + ZAP_ATTRIBUTE_INDEX(187), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(204), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(202), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(209), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(207), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(212), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(210), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(217), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(215), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(225), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(223), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(228), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(226), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(233), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(236), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(234), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(241), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(239), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(244), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(242), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(251), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(249), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(256), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(254), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 36a1695e22f027..a7ca4595cb1567 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1074,7 +1074,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 405 +#define GENERATED_ATTRIBUTE_COUNT 403 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1541,11 +1541,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1405) }, /* channel list */ \ - { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ - { 0x0002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* current channel */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1659) }, /* target navigator list */ \ @@ -1812,49 +1808,49 @@ 0x0503, ZAP_ATTRIBUTE_INDEX(346), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(348), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(348), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(352), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(350), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(354), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(352), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(355), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(353), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(357), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(355), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(358), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(356), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(361), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(359), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(363), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(361), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(365), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(363), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(370), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(373), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(371), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(394), \ + ZAP_ATTRIBUTE_INDEX(392), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(396), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(394), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(401), \ + ZAP_ATTRIBUTE_INDEX(399), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \