From 91c71f526844c9f9789747ce37b70f0049a5db01 Mon Sep 17 00:00:00 2001 From: Lazar Kovacic Date: Thu, 6 May 2021 14:32:51 +0200 Subject: [PATCH] Adding list attriubtes to the clusters and updating the TV example app Problem We do not have list attributes enabled on app clusters. Summary of Changes - Updated all the app clusters where list attributes are used - Updated the TV example app to use the new attributes Test - Tested locally using chip-tool client and newly created tv-server - Used the zap_regen_all.py and gn_build.sh to verify the building is successful --- .../all-clusters-common/gen/af-structs.h | 14 +- .../bridge-app/bridge-common/gen/af-structs.h | 14 +- .../chip-tool/commands/clusters/Commands.h | 141 +- .../chip-tool/gen/CHIPClientCallbacks.cpp | 170 ++ examples/chip-tool/gen/CHIPClientCallbacks.h | 8 + examples/chip-tool/gen/CHIPClustersObjc.mm | 294 +- examples/chip-tool/gen/af-structs.h | 14 +- .../lighting-common/gen/af-structs.h | 14 +- .../lock-app/lock-common/gen/af-structs.h | 14 +- .../pump-app/pump-common/gen/af-structs.h | 14 +- .../pump-controller-common/gen/af-structs.h | 14 +- .../esp32/main/gen/af-structs.h | 14 +- examples/tv-app/linux/BUILD.gn | 1 - .../ApplicationLauncherManager.cpp | 10 +- .../ApplicationLauncherManager.h | 4 +- .../audio-output/AudioOutputManager.cpp | 32 +- .../include/audio-output/AudioOutputManager.h | 4 +- .../tv-app/linux/include/cluster-init.cpp | 109 +- .../include/cluster-util/ClusterManager.h | 67 + .../ContentLauncherManager.cpp | 32 +- .../content-launcher/ContentLauncherManager.h | 6 +- .../include/media-input/MediaInputManager.cpp | 25 +- .../include/media-input/MediaInputManager.h | 4 +- .../TargetNavigatorManager.cpp | 22 +- .../target-navigator/TargetNavigatorManager.h | 4 +- .../include/tv-channel/TvChannelManager.cpp | 38 +- .../include/tv-channel/TvChannelManager.h | 1 + examples/tv-app/linux/main.cpp | 4 + .../tv-common/gen/IMClusterCommandHandler.cpp | 1764 +---------- examples/tv-app/tv-common/gen/af-gen-event.h | 84 - examples/tv-app/tv-common/gen/af-structs.h | 14 +- .../tv-app/tv-common/gen/attribute-size.cpp | 276 ++ .../tv-common/gen/call-command-handler.cpp | 530 +--- .../tv-app/tv-common/gen/callback-stub.cpp | 24 - examples/tv-app/tv-common/gen/callback.h | 421 --- .../tv-app/tv-common/gen/endpoint_config.h | 583 ++-- examples/tv-app/tv-common/gen/gen_config.h | 24 +- examples/tv-app/tv-common/tv-app.zap | 2697 +++-------------- examples/window-app/common/gen/af-structs.h | 14 +- src/app/chip-zcl-zpro-codec-api.h | 2 +- .../zcl/application-launcher-cluster.xml | 3 +- .../zcl/audio-output-cluster.xml | 5 +- .../zcl/content-launch-cluster.xml | 6 +- .../zap-templates/zcl/media-input-cluster.xml | 7 +- .../zcl/target-navigator-cluster.xml | 5 +- .../zap-templates/zcl/tv-channel-cluster.xml | 9 +- .../python/chip/clusters/CHIPClusters.cpp | 66 - .../python/chip/clusters/CHIPClusters.py | 42 - .../python/gen/CHIPClientCallbacks.cpp | 170 ++ .../python/gen/CHIPClientCallbacks.h | 8 + src/controller/python/gen/CHIPClustersObjc.mm | 294 +- src/controller/python/gen/af-structs.h | 14 +- src/darwin/Framework/CHIP/gen/af-structs.h | 14 +- 53 files changed, 2619 insertions(+), 5545 deletions(-) create mode 100644 examples/tv-app/linux/include/cluster-util/ClusterManager.h diff --git a/examples/all-clusters-app/all-clusters-common/gen/af-structs.h b/examples/all-clusters-app/all-clusters-common/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/af-structs.h +++ b/examples/all-clusters-app/all-clusters-common/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/bridge-app/bridge-common/gen/af-structs.h b/examples/bridge-app/bridge-common/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/bridge-app/bridge-common/gen/af-structs.h +++ b/examples/bridge-app/bridge-common/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/chip-tool/commands/clusters/Commands.h b/examples/chip-tool/commands/clusters/Commands.h index bb02805b293642..a5b097a2b65ee4 100644 --- a/examples/chip-tool/commands/clusters/Commands.h +++ b/examples/chip-tool/commands/clusters/Commands.h @@ -660,6 +660,61 @@ static void OnTestClusterClusterTestSpecificResponse(void * context, uint8_t ret command->SetCommandExitStatus(true); } +static void OnApplicationLauncherApplicationLauncherListListAttributeResponse(void * context, uint16_t count, uint16_t * entries) +{ + ChipLogProgress(chipTool, "OnApplicationLauncherApplicationLauncherListListAttributeResponse: %lu entries", count); + + for (uint16_t i = 0; i < count; i++) + { + ChipLogProgress(chipTool, "INT16U[%lu]: %" PRIu16 "", i, entries[i]); + } + + ModelCommand * command = reinterpret_cast(context); + command->SetCommandExitStatus(true); +} + +static void OnAudioOutputAudioOutputListListAttributeResponse(void * context, uint16_t count, _AudioOutputInfo * entries) +{ + ChipLogProgress(chipTool, "OnAudioOutputAudioOutputListListAttributeResponse: %lu entries", count); + + for (uint16_t i = 0; i < count; i++) + { + ChipLogProgress(chipTool, "AudioOutputInfo[%lu]:", i); + ChipLogProgress(chipTool, " index: %" PRIu8 "", entries[i].index); + ChipLogProgress(chipTool, " outputType: %" PRIu8 "", entries[i].outputType); + ChipLogProgress(chipTool, " name: %s", entries[i].name); + } + + ModelCommand * command = reinterpret_cast(context); + command->SetCommandExitStatus(true); +} + +static void OnContentLaunchAcceptsHeaderListListAttributeResponse(void * context, uint16_t count, chip::ByteSpan * entries) +{ + ChipLogProgress(chipTool, "OnContentLaunchAcceptsHeaderListListAttributeResponse: %lu entries", count); + + for (uint16_t i = 0; i < count; i++) + { + ChipLogProgress(chipTool, "OCTET_STRING[%lu]: %s", i, entries[i]); + } + + ModelCommand * command = reinterpret_cast(context); + command->SetCommandExitStatus(true); +} + +static void OnContentLaunchSupportedStreamingTypesListAttributeResponse(void * context, uint16_t count, uint8_t * entries) +{ + ChipLogProgress(chipTool, "OnContentLaunchSupportedStreamingTypesListAttributeResponse: %lu entries", count); + + for (uint16_t i = 0; i < count; i++) + { + ChipLogProgress(chipTool, "ContentLaunchStreamingType[%lu]: %" PRIu8 "", i, entries[i]); + } + + ModelCommand * command = reinterpret_cast(context); + command->SetCommandExitStatus(true); +} + static void OnDescriptorDeviceListListAttributeResponse(void * context, uint16_t count, _DeviceType * entries) { ChipLogProgress(chipTool, "OnDescriptorDeviceListListAttributeResponse: %lu entries", count); @@ -768,6 +823,23 @@ static void OnGroupKeyManagementGroupKeysListAttributeResponse(void * context, u command->SetCommandExitStatus(true); } +static void OnMediaInputMediaInputListListAttributeResponse(void * context, uint16_t count, _MediaInputInfo * entries) +{ + ChipLogProgress(chipTool, "OnMediaInputMediaInputListListAttributeResponse: %lu entries", count); + + for (uint16_t i = 0; i < count; i++) + { + ChipLogProgress(chipTool, "MediaInputInfo[%lu]:", i); + ChipLogProgress(chipTool, " index: %" PRIu8 "", entries[i].index); + ChipLogProgress(chipTool, " inputType: %" PRIu8 "", entries[i].inputType); + ChipLogProgress(chipTool, " name: %s", entries[i].name); + ChipLogProgress(chipTool, " description: %s", entries[i].description); + } + + ModelCommand * command = reinterpret_cast(context); + command->SetCommandExitStatus(true); +} + static void OnOperationalCredentialsFabricsListListAttributeResponse(void * context, uint16_t count, _FabricDescriptor * entries) { ChipLogProgress(chipTool, "OnOperationalCredentialsFabricsListListAttributeResponse: %lu entries", count); @@ -784,6 +856,40 @@ static void OnOperationalCredentialsFabricsListListAttributeResponse(void * cont command->SetCommandExitStatus(true); } +static void OnTvChannelTvChannelListListAttributeResponse(void * context, uint16_t count, _TvChannelInfo * entries) +{ + ChipLogProgress(chipTool, "OnTvChannelTvChannelListListAttributeResponse: %lu entries", count); + + for (uint16_t i = 0; i < count; i++) + { + ChipLogProgress(chipTool, "TvChannelInfo[%lu]:", i); + ChipLogProgress(chipTool, " majorNumber: %" PRIu16 "", entries[i].majorNumber); + ChipLogProgress(chipTool, " minorNumber: %" PRIu16 "", entries[i].minorNumber); + ChipLogProgress(chipTool, " name: %s", entries[i].name); + ChipLogProgress(chipTool, " callSign: %s", entries[i].callSign); + ChipLogProgress(chipTool, " affiliateCallSign: %s", entries[i].affiliateCallSign); + } + + ModelCommand * command = reinterpret_cast(context); + command->SetCommandExitStatus(true); +} + +static void OnTargetNavigatorTargetNavigatorListListAttributeResponse(void * context, uint16_t count, + _NavigateTargetTargetInfo * entries) +{ + ChipLogProgress(chipTool, "OnTargetNavigatorTargetNavigatorListListAttributeResponse: %lu entries", count); + + for (uint16_t i = 0; i < count; i++) + { + ChipLogProgress(chipTool, "NavigateTargetTargetInfo[%lu]:", i); + ChipLogProgress(chipTool, " identifier: %" PRIu8 "", entries[i].identifier); + ChipLogProgress(chipTool, " name: %s", entries[i].name); + } + + ModelCommand * command = reinterpret_cast(context); + command->SetCommandExitStatus(true); +} + static void OnTestClusterListInt8uListAttributeResponse(void * context, uint16_t count, uint8_t * entries) { ChipLogProgress(chipTool, "OnTestClusterListInt8uListAttributeResponse: %lu entries", count); @@ -1474,8 +1580,9 @@ class ReadApplicationLauncherApplicationLauncherList : public ModelCommand } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback( + OnApplicationLauncherApplicationLauncherListListAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; @@ -1655,8 +1762,9 @@ class ReadAudioOutputAudioOutputList : public ModelCommand } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback( + OnAudioOutputAudioOutputListListAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; @@ -6173,8 +6281,9 @@ class ReadContentLaunchAcceptsHeaderList : public ModelCommand } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback( + OnContentLaunchAcceptsHeaderListListAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; @@ -6207,8 +6316,9 @@ class ReadContentLaunchSupportedStreamingTypes : public ModelCommand } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback( + OnContentLaunchSupportedStreamingTypesListAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; @@ -9531,8 +9641,9 @@ class ReadMediaInputMediaInputList : public ModelCommand } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnMediaInputMediaInputListListAttributeResponse, + this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; @@ -12224,8 +12335,9 @@ class ReadTvChannelTvChannelList : public ModelCommand } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnTvChannelTvChannelListListAttributeResponse, + this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; @@ -12439,8 +12551,9 @@ class ReadTargetNavigatorTargetNavigatorList : public ModelCommand } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback( + OnTargetNavigatorTargetNavigatorListListAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; diff --git a/examples/chip-tool/gen/CHIPClientCallbacks.cpp b/examples/chip-tool/gen/CHIPClientCallbacks.cpp index 88764f942ac395..cb0fa6c0356806 100644 --- a/examples/chip-tool/gen/CHIPClientCallbacks.cpp +++ b/examples/chip-tool/gen/CHIPClientCallbacks.cpp @@ -419,6 +419,91 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * messag switch (clusterId) { + case 0x050C: + switch (attributeId) + { + case 0x0000: // INT16U + { + uint16_t data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(2); + data[i] = emberAfGetInt16u(message, 0, 2); + message += 2; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; + case 0x050B: + switch (attributeId) + { + case 0x0000: // AudioOutputInfo + { + _AudioOutputInfo data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(1); + data[i].index = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_MESSAGE_LENGTH(1); + data[i].outputType = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].name)); + messageLen -= 34; + message += 34; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; + case 0x050A: + switch (attributeId) + { + case 0x0000: // OCTET_STRING + { + chip::ByteSpan data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_STATUS(ReadByteSpan(message, messageLen, &data[i])); + uint16_t entryLength = static_cast(data[i].size() + kByteSpanSizeLengthInBytes); + messageLen -= entryLength; + message += entryLength; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + case 0x0001: // ContentLaunchStreamingType + { + uint8_t data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(1); + data[i] = emberAfGetInt8u(message, 0, 1); + message += 1; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; case 0x001D: switch (attributeId) { @@ -576,6 +661,35 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * messag } } break; + case 0x0507: + switch (attributeId) + { + case 0x0000: // MediaInputInfo + { + _MediaInputInfo data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(1); + data[i].index = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_MESSAGE_LENGTH(1); + data[i].inputType = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].name)); + messageLen -= 34; + message += 34; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].description)); + messageLen -= 34; + message += 34; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; case 0x003E: switch (attributeId) { @@ -603,6 +717,62 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * messag } } break; + case 0x0504: + switch (attributeId) + { + case 0x0000: // TvChannelInfo + { + _TvChannelInfo data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(2); + data[i].majorNumber = emberAfGetInt16u(message, 0, 2); + message += 2; + CHECK_MESSAGE_LENGTH(2); + data[i].minorNumber = emberAfGetInt16u(message, 0, 2); + message += 2; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].name)); + messageLen -= 34; + message += 34; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].callSign)); + messageLen -= 34; + message += 34; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].affiliateCallSign)); + messageLen -= 34; + message += 34; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; + case 0x0505: + switch (attributeId) + { + case 0x0000: // NavigateTargetTargetInfo + { + _NavigateTargetTargetInfo data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(1); + data[i].identifier = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].name)); + messageLen -= 34; + message += 34; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; case 0x050F: switch (attributeId) { diff --git a/examples/chip-tool/gen/CHIPClientCallbacks.h b/examples/chip-tool/gen/CHIPClientCallbacks.h index cdad603b34fe3a..1ab470a9a0f591 100644 --- a/examples/chip-tool/gen/CHIPClientCallbacks.h +++ b/examples/chip-tool/gen/CHIPClientCallbacks.h @@ -141,6 +141,10 @@ typedef void (*ThermostatClusterRelayStatusLogCallback)(void * context, uint16_t uint16_t unreadEntries); // List specific responses +typedef void (*ApplicationLauncherApplicationLauncherListListAttributeCallback)(void * context, uint16_t count, uint16_t * entries); +typedef void (*AudioOutputAudioOutputListListAttributeCallback)(void * context, uint16_t count, _AudioOutputInfo * entries); +typedef void (*ContentLaunchAcceptsHeaderListListAttributeCallback)(void * context, uint16_t count, chip::ByteSpan * entries); +typedef void (*ContentLaunchSupportedStreamingTypesListAttributeCallback)(void * context, uint16_t count, uint8_t * entries); typedef void (*DescriptorDeviceListListAttributeCallback)(void * context, uint16_t count, _DeviceType * entries); typedef void (*DescriptorServerListListAttributeCallback)(void * context, uint16_t count, chip::ClusterId * entries); typedef void (*DescriptorClientListListAttributeCallback)(void * context, uint16_t count, chip::ClusterId * entries); @@ -149,7 +153,11 @@ typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)(void * _NetworkInterfaceType * entries); typedef void (*GroupKeyManagementGroupsListAttributeCallback)(void * context, uint16_t count, _GroupState * entries); typedef void (*GroupKeyManagementGroupKeysListAttributeCallback)(void * context, uint16_t count, _GroupKey * entries); +typedef void (*MediaInputMediaInputListListAttributeCallback)(void * context, uint16_t count, _MediaInputInfo * entries); typedef void (*OperationalCredentialsFabricsListListAttributeCallback)(void * context, uint16_t count, _FabricDescriptor * entries); +typedef void (*TvChannelTvChannelListListAttributeCallback)(void * context, uint16_t count, _TvChannelInfo * entries); +typedef void (*TargetNavigatorTargetNavigatorListListAttributeCallback)(void * context, uint16_t count, + _NavigateTargetTargetInfo * entries); typedef void (*TestClusterListInt8uListAttributeCallback)(void * context, uint16_t count, uint8_t * entries); typedef void (*TestClusterListOctetStringListAttributeCallback)(void * context, uint16_t count, chip::ByteSpan * entries); typedef void (*TestClusterListStructOctetStringListAttributeCallback)(void * context, uint16_t count, diff --git a/examples/chip-tool/gen/CHIPClustersObjc.mm b/examples/chip-tool/gen/CHIPClustersObjc.mm index 9666ed00e9c0e9..9299448ec9d2ab 100644 --- a/examples/chip-tool/gen/CHIPClustersObjc.mm +++ b/examples/chip-tool/gen/CHIPClustersObjc.mm @@ -2589,6 +2589,153 @@ static void CallbackFn(void * context, uint16_t timeOfDay, uint16_t relayStatus, dispatch_queue_t mQueue; }; +class CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, uint16_t * entries) + { + CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [NSNumber numberWithUnsignedShort:entries[i]]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + +class CHIPAudioOutputAudioOutputListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPAudioOutputAudioOutputListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPAudioOutputAudioOutputListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _AudioOutputInfo * entries) + { + CHIPAudioOutputAudioOutputListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].index], + @"index", [NSNumber numberWithUnsignedChar:entries[i].outputType], @"outputType", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], + @"name", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + +class CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, chip::ByteSpan * entries) + { + CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [NSData dataWithBytes:entries[i].data() length:entries[i].size()]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + +class CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, uint8_t * entries) + { + CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [NSNumber numberWithUnsignedChar:entries[i]]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + class CHIPDescriptorDeviceListAttributeCallbackBridge : public Callback::Callback { public: CHIPDescriptorDeviceListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) @@ -2853,6 +3000,46 @@ static void CallbackFn(void * context, uint16_t count, _GroupKey * entries) dispatch_queue_t mQueue; }; +class CHIPMediaInputMediaInputListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPMediaInputMediaInputListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPMediaInputMediaInputListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _MediaInputInfo * entries) + { + CHIPMediaInputMediaInputListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] + initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].index], @"index", + [NSNumber numberWithUnsignedChar:entries[i].inputType], @"inputType", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", + [NSData dataWithBytes:entries[i].description.data() length:entries[i].description.size()], @"description", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + class CHIPOperationalCredentialsFabricsListAttributeCallbackBridge : public Callback::Callback { public: @@ -2891,6 +3078,85 @@ static void CallbackFn(void * context, uint16_t count, _FabricDescriptor * entri dispatch_queue_t mQueue; }; +class CHIPTvChannelTvChannelListAttributeCallbackBridge : public Callback::Callback { +public: + CHIPTvChannelTvChannelListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPTvChannelTvChannelListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _TvChannelInfo * entries) + { + CHIPTvChannelTvChannelListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] + initWithObjectsAndKeys:[NSNumber numberWithUnsignedShort:entries[i].majorNumber], @"majorNumber", + [NSNumber numberWithUnsignedShort:entries[i].minorNumber], @"minorNumber", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", + [NSData dataWithBytes:entries[i].callSign.data() length:entries[i].callSign.size()], @"callSign", + [NSData dataWithBytes:entries[i].affiliateCallSign.data() length:entries[i].affiliateCallSign.size()], + @"affiliateCallSign", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + +class CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _NavigateTargetTargetInfo * entries) + { + CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] + initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].identifier], @"identifier", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + class CHIPTestClusterListInt8uAttributeCallbackBridge : public Callback::Callback { public: CHIPTestClusterListInt8uAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) @@ -3422,8 +3688,8 @@ - (void)launchApp:(NSString *)data - (void)readAttributeApplicationLauncherListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge * onSuccess + = new CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -3545,8 +3811,8 @@ - (void)selectOutput:(uint8_t)index responseHandler:(ResponseHandler)responseHan - (void)readAttributeAudioOutputListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPAudioOutputAudioOutputListAttributeCallbackBridge * onSuccess + = new CHIPAudioOutputAudioOutputListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -7029,8 +7295,8 @@ - (void)launchURL:(NSString *)contentURL displayString:(NSString *)displayString - (void)readAttributeAcceptsHeaderListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge * onSuccess + = new CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -7057,8 +7323,8 @@ - (void)readAttributeAcceptsHeaderListWithResponseHandler:(ResponseHandler)respo - (void)readAttributeSupportedStreamingTypesWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge * onSuccess + = new CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -9475,8 +9741,8 @@ - (void)showInputStatus:(ResponseHandler)responseHandler - (void)readAttributeMediaInputListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPMediaInputMediaInputListAttributeCallbackBridge * onSuccess + = new CHIPMediaInputMediaInputListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -11485,8 +11751,8 @@ - (void)skipChannel:(uint16_t)count responseHandler:(ResponseHandler)responseHan - (void)readAttributeTvChannelListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPTvChannelTvChannelListAttributeCallbackBridge * onSuccess + = new CHIPTvChannelTvChannelListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -11639,8 +11905,8 @@ - (void)navigateTarget:(uint8_t)target data:(NSString *)data responseHandler:(Re - (void)readAttributeTargetNavigatorListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge * onSuccess + = new CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; diff --git a/examples/chip-tool/gen/af-structs.h b/examples/chip-tool/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/chip-tool/gen/af-structs.h +++ b/examples/chip-tool/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/lighting-app/lighting-common/gen/af-structs.h b/examples/lighting-app/lighting-common/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/lighting-app/lighting-common/gen/af-structs.h +++ b/examples/lighting-app/lighting-common/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/lock-app/lock-common/gen/af-structs.h b/examples/lock-app/lock-common/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/lock-app/lock-common/gen/af-structs.h +++ b/examples/lock-app/lock-common/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/pump-app/pump-common/gen/af-structs.h b/examples/pump-app/pump-common/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/pump-app/pump-common/gen/af-structs.h +++ b/examples/pump-app/pump-common/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/pump-controller-app/pump-controller-common/gen/af-structs.h b/examples/pump-controller-app/pump-controller-common/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/af-structs.h +++ b/examples/pump-controller-app/pump-controller-common/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/temperature-measurement-app/esp32/main/gen/af-structs.h b/examples/temperature-measurement-app/esp32/main/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/af-structs.h +++ b/examples/temperature-measurement-app/esp32/main/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/tv-app/linux/BUILD.gn b/examples/tv-app/linux/BUILD.gn index 0a1b7cc7ed11a6..6ee0e5386dfaef 100644 --- a/examples/tv-app/linux/BUILD.gn +++ b/examples/tv-app/linux/BUILD.gn @@ -30,7 +30,6 @@ executable("chip-tv-app") { "include/application-launcher/ApplicationLauncherManager.h", "include/audio-output/AudioOutputManager.cpp", "include/audio-output/AudioOutputManager.h", - "include/cluster-change-attribute.cpp", "include/cluster-init.cpp", "include/content-launcher/ContentLauncherManager.cpp", "include/content-launcher/ContentLauncherManager.h", diff --git a/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.cpp b/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.cpp index ac2019ae10f896..1f77624e23631b 100644 --- a/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.cpp +++ b/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.cpp @@ -32,20 +32,16 @@ CHIP_ERROR ApplicationLauncherManager::Init() { CHIP_ERROR err = CHIP_NO_ERROR; - // TODO: Update once storing a list attribute is supported - // ApplicationLauncherManager().proxyGetApplicationList(); - // emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_LAUNCH_CLUSTER_ID, ZCL_APPLICATION_LAUNCHER_CURRENT_APP_APPLICATION_ID, - // (uint8_t *) &application, ZCL_STRUCT_ATTRIBUTE_TYPE); - SuccessOrExit(err); exit: return err; } -list ApplicationLauncherManager::proxyGetApplicationList() +vector ApplicationLauncherManager::proxyGetApplicationList() { - list applications; + vector applications; applications.push_back(123); + applications.push_back(456); return applications; } diff --git a/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.h b/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.h index d5d770ce8b810a..8dd8404dc98bef 100644 --- a/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.h +++ b/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.h @@ -21,8 +21,8 @@ #include "gen/af-structs.h" #include -#include #include +#include struct ApplicationLaunchResponse { @@ -35,5 +35,5 @@ class ApplicationLauncherManager public: CHIP_ERROR Init(); ApplicationLaunchResponse proxyApplicationLaunchRequest(EmberAfApplicationLauncherApp application, std::string data); - std::list proxyGetApplicationList(); + std::vector proxyGetApplicationList(); }; diff --git a/examples/tv-app/linux/include/audio-output/AudioOutputManager.cpp b/examples/tv-app/linux/include/audio-output/AudioOutputManager.cpp index 32f276f19494cc..6ed1d60d371c22 100644 --- a/examples/tv-app/linux/include/audio-output/AudioOutputManager.cpp +++ b/examples/tv-app/linux/include/audio-output/AudioOutputManager.cpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include @@ -40,28 +42,26 @@ CHIP_ERROR AudioOutputManager::Init() map featureMap; featureMap["NU"] = true; - // TODO: when list is not supported enable - // list listOfAudioOutputs = AudioOutputManager().proxyGetListOfAudioOutputInfo(); - // EmberAfStatus status = emberAfWriteServerAttribute(endpoint, ZCL_AUDIO_OUTPUT_CLUSTER_ID, ZCL_AUDIO_OUTPUT_LIST_ATTRIBUTE_ID, - // (uint8_t *) &listOfAudioOutputs, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); - // if (status != EMBER_ZCL_STATUS_SUCCESS) - // { - // emberAfAudioOutputClusterPrintln("Failed to write Output List attribute: 0x%X", status); - // } return err; } -list AudioOutputManager::proxyGetListOfAudioOutputInfo() +vector AudioOutputManager::proxyGetListOfAudioOutputInfo() { // TODO: Insert code here - list listOfAudioOutputInfos; - EmberAfAudioOutputInfo audioOutputInfo = {}; - // audioOutputInfo.Name = ""; - audioOutputInfo.outputType = EMBER_ZCL_AUDIO_OUTPUT_TYPE_HDMI; - audioOutputInfo.index = 1; + vector audioOutputInfos; + int maximumVectorSize = 3; + char name[] = "exampleName"; - listOfAudioOutputInfos.push_back(audioOutputInfo); - return listOfAudioOutputInfos; + for (uint8_t i = 0; i < maximumVectorSize; ++i) + { + EmberAfAudioOutputInfo audioOutputInfo; + audioOutputInfo.outputType = EMBER_ZCL_AUDIO_OUTPUT_TYPE_HDMI; + audioOutputInfo.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name)); + audioOutputInfo.index = 1 + i; + audioOutputInfos.push_back(audioOutputInfo); + } + + return audioOutputInfos; } bool AudioOutputManager::proxySelectOutputRequest(uint8_t index) diff --git a/examples/tv-app/linux/include/audio-output/AudioOutputManager.h b/examples/tv-app/linux/include/audio-output/AudioOutputManager.h index 832526dbe6e2e7..e068ea7b30b554 100644 --- a/examples/tv-app/linux/include/audio-output/AudioOutputManager.h +++ b/examples/tv-app/linux/include/audio-output/AudioOutputManager.h @@ -21,12 +21,12 @@ #include "gen/af-structs.h" #include -#include +#include class AudioOutputManager { public: CHIP_ERROR Init(); bool proxySelectOutputRequest(uint8_t index); bool proxyRenameOutputRequest(uint8_t index, uint8_t * name); - std::list proxyGetListOfAudioOutputInfo(); + std::vector proxyGetListOfAudioOutputInfo(); }; diff --git a/examples/tv-app/linux/include/cluster-init.cpp b/examples/tv-app/linux/include/cluster-init.cpp index 28c571909824d3..b266b25281d38f 100644 --- a/examples/tv-app/linux/include/cluster-init.cpp +++ b/examples/tv-app/linux/include/cluster-init.cpp @@ -17,18 +17,19 @@ */ #include "application-basic/ApplicationBasicManager.h" +#include "application-launcher/ApplicationLauncherManager.h" #include "audio-output/AudioOutputManager.h" +#include "cluster-util/ClusterManager.h" +#include "content-launcher/ContentLauncherManager.h" +#include "media-input/MediaInputManager.h" +#include "target-navigator/TargetNavigatorManager.h" +#include "tv-channel/TvChannelManager.h" #include "wake-on-lan/WakeOnLanManager.h" -#include -#include -#include - #include "gen/attribute-id.h" -#include "gen/attribute-type.h" #include "gen/cluster-id.h" -#include "gen/command-id.h" -#include "gen/enums.h" + +using namespace chip; /** @brief Application Basic Cluster Init * @@ -72,3 +73,97 @@ void emberAfWakeOnLanClusterInitCallback(chip::EndpointId endpoint) wolManager.store(endpoint, macAddress); } } + +/** @brief Tv Channel Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfTvChannelClusterInitCallback(EndpointId endpoint) +{ + ClusterManager().writeListAttribute(endpoint, ZCL_TV_CHANNEL_CLUSTER_ID, ZCL_TV_CHANNEL_LIST_ATTRIBUTE_ID, + TvChannelManager().proxyGetTvChannelList()); +} + +/** @brief Application Launcher Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfApplicationLauncherClusterInitCallback(EndpointId endpoint) +{ + ClusterManager().writeListAttribute(endpoint, ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, ZCL_APPLICATION_LAUNCHER_LIST_ATTRIBUTE_ID, + ApplicationLauncherManager().proxyGetApplicationList()); +} + +/** @brief Audio Output Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfAudioOutputClusterInitCallback(EndpointId endpoint) +{ + ClusterManager().writeListAttribute(endpoint, ZCL_AUDIO_OUTPUT_CLUSTER_ID, ZCL_AUDIO_OUTPUT_LIST_ATTRIBUTE_ID, + AudioOutputManager().proxyGetListOfAudioOutputInfo()); +} + +/** @brief Content Launch Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfContentLaunchClusterInitCallback(EndpointId endpoint) +{ + ClusterManager().writeListAttribute(endpoint, ZCL_CONTENT_LAUNCH_CLUSTER_ID, ZCL_CONTENT_LAUNCHER_ACCEPTS_HEADER_ATTRIBUTE_ID, + ContentLauncherManager().proxyGetAcceptsHeader()); + + ClusterManager().writeListAttribute(endpoint, ZCL_CONTENT_LAUNCH_CLUSTER_ID, + ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_TYPES_ATTRIBUTE_ID, + ContentLauncherManager().proxyGetSupportedStreamingTypes()); +} + +/** @brief Media Input Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfMediaInputClusterInitCallback(EndpointId endpoint) +{ + ClusterManager().writeListAttribute(endpoint, ZCL_MEDIA_INPUT_CLUSTER_ID, ZCL_MEDIA_INPUT_LIST_ATTRIBUTE_ID, + MediaInputManager().proxyGetInputList()); +} + +/** @brief Target Navigator Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfTargetNavigatorClusterInitCallback(EndpointId endpoint) +{ + ClusterManager().writeListAttribute(endpoint, ZCL_TARGET_NAVIGATOR_CLUSTER_ID, ZCL_TARGET_NAVIGATOR_LIST_ATTRIBUTE_ID, + TargetNavigatorManager().proxyGetTargetInfoList()); +} diff --git a/examples/tv-app/linux/include/cluster-util/ClusterManager.h b/examples/tv-app/linux/include/cluster-util/ClusterManager.h new file mode 100644 index 00000000000000..d4a2b41f98c37d --- /dev/null +++ b/examples/tv-app/linux/include/cluster-util/ClusterManager.h @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "gen/enums.h" +#include +#include + +#include +#include + +class ClusterManager +{ +public: + EmberAfStatus writeAttribute(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t * buffer, int32_t index = -1) + { + EmberAfAttributeSearchRecord record; + record.endpoint = endpointId; + record.clusterId = clusterId; + record.clusterMask = CLUSTER_MASK_SERVER; + record.manufacturerCode = EMBER_AF_NULL_MANUFACTURER_CODE; + record.attributeId = attributeId; + + // When reading or writing a List attribute the 'index' value could have 3 types of values: + // -1: Read/Write the whole list content, including the number of elements in the list + // 0: Read/Write the number of elements in the list, represented as a uint16_t + // n: Read/Write the nth element of the list + // + // Since the first 2 bytes of the attribute are used to store the number of elements, elements indexing starts + // at 1. In order to hide this to the rest of the code of this file, the element index is incremented by 1 here. + // This also allows calling writeAttribute() with no index arg to mean "write the length". + return emAfReadOrWriteAttribute(&record, NULL, buffer, 0, true, index + 1); + } + + template + EmberAfStatus writeListAttribute(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, + const std::vector vector) + { + EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; + size_t vectorSize = vector.size(); + + for (size_t i = 0; i < vectorSize; ++i) + { + status = writeAttribute(endpointId, clusterId, attributeId, (uint8_t *) &vector[i], static_cast(i)); + VerifyOrReturnError(status == EMBER_ZCL_STATUS_SUCCESS, status); + } + + return writeAttribute(endpointId, clusterId, attributeId, (uint8_t *) &vectorSize); + } +}; diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp index 95094f6e90da70..ebe4b08899bb94 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include @@ -41,35 +43,31 @@ CHIP_ERROR ContentLauncherManager::Init() featureMap["UP"] = true; featureMap["WA"] = true; - // TODO: Update once storing a list attribute is supported - // list acceptedHeaderList = ContentLauncherManager().proxyGetAcceptsHeader(); - // emberAfWriteServerAttribute(endpoint, ZCL_CONTENT_LAUNCH_CLUSTER_ID, ZCL_CONTENT_LAUNCHER_ACCEPTS_HEADER_ATTRIBUTE_ID, - // (uint8_t *) &acceptedHeaderList, ZCL_STRUCT_ATTRIBUTE_TYPE); - - // TODO: Update once storing a list attribute is supported - // list supportedStreamingTypes = ContentLauncherManager().proxyGetAcceptsHeader(); - // emberAfWriteServerAttribute(endpoint, ZCL_CONTENT_LAUNCH_CLUSTER_ID, - // ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_TYPES_ATTRIBUTE_ID, (uint8_t *) - // &supportedStreamingTypes, ZCL_STRUCT_ATTRIBUTE_TYPE); - SuccessOrExit(err); exit: return err; } -list ContentLauncherManager::proxyGetAcceptsHeader() +vector ContentLauncherManager::proxyGetAcceptsHeader() { // TODO: Insert code here - list acceptedHeaderList; - acceptedHeaderList.push_back("HeaderExample"); - return acceptedHeaderList; + vector acceptedHeader; + char headerExample[] = "exampleHeader"; + int maximumVectorSize = 1; + + for (uint16_t i = 0; i < maximumVectorSize; ++i) + { + acceptedHeader.push_back(chip::ByteSpan(chip::Uint8::from_char(headerExample), sizeof(headerExample))); + } + return acceptedHeader; } -list ContentLauncherManager::proxyGetSupportedStreamingTypes() +vector ContentLauncherManager::proxyGetSupportedStreamingTypes() { // TODO: Insert code here - list supportedStreamingTypes; + vector supportedStreamingTypes; supportedStreamingTypes.push_back(EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_DASH); + supportedStreamingTypes.push_back(EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_HLS); return supportedStreamingTypes; } diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h index 068e440adca517..7c4dab36aff996 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h @@ -23,7 +23,7 @@ #include #include #include - +#include struct ContentLaunchResponse { EmberAfContentLaunchStatus status; @@ -34,8 +34,8 @@ class ContentLauncherManager { public: CHIP_ERROR Init(); - std::list proxyGetAcceptsHeader(); - std::list proxyGetSupportedStreamingTypes(); + std::vector proxyGetAcceptsHeader(); + std::vector proxyGetSupportedStreamingTypes(); ContentLaunchResponse proxyLaunchContentRequest(std::list parameterList, bool autoplay, std::string data); ContentLaunchResponse proxyLaunchUrlRequest(std::string contentUrl, std::string displayString, diff --git a/examples/tv-app/linux/include/media-input/MediaInputManager.cpp b/examples/tv-app/linux/include/media-input/MediaInputManager.cpp index c0081fc978a9b2..90842a8acc4421 100644 --- a/examples/tv-app/linux/include/media-input/MediaInputManager.cpp +++ b/examples/tv-app/linux/include/media-input/MediaInputManager.cpp @@ -17,8 +17,10 @@ #include "MediaInputManager.h" #include +#include #include #include +#include #include "gen/attribute-id.h" #include "gen/attribute-type.h" @@ -32,11 +34,6 @@ CHIP_ERROR MediaInputManager::Init() // TODO: Store feature map once it is supported std::map featureMap; featureMap["NU"] = true; - - // TODO: Update once storing a list attribute is supported - // std::list mediaInputList = MediaInputManager().proxyGetInputList(); - // emberAfWriteServerAttribute(endpoint, ZCL_MEDIA_INPUT_CLUSTER_ID, ZCL_MEDIA_INPUT_CURRENT_INPUT_ATTRIBUTE_ID, - // (uint8_t *) &mediaInputList, ZCL_STRUCT_ATTRIBUTE_TYPE); SuccessOrExit(err); exit: return err; @@ -66,10 +63,24 @@ bool MediaInputManager::proxyRenameInputRequest(uint8_t input, std::string name) return true; } -std::list MediaInputManager::proxyGetInputList() +std::vector MediaInputManager::proxyGetInputList() { // TODO: Insert code here - std::list mediaInputList; + std::vector mediaInputList; + int maximumVectorSize = 2; + char description[] = "exampleDescription"; + char name[] = "exampleName"; + + for (uint8_t i = 0; i < maximumVectorSize; ++i) + { + EmberAfMediaInputInfo mediaInput; + mediaInput.description = chip::ByteSpan(chip::Uint8::from_char(description), sizeof(description)); + mediaInput.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name)); + mediaInput.inputType = EMBER_ZCL_MEDIA_INPUT_TYPE_HDMI; + mediaInput.index = 1 + i; + mediaInputList.push_back(mediaInput); + } + return mediaInputList; } diff --git a/examples/tv-app/linux/include/media-input/MediaInputManager.h b/examples/tv-app/linux/include/media-input/MediaInputManager.h index 070580c6f626d5..c7215f073f58df 100644 --- a/examples/tv-app/linux/include/media-input/MediaInputManager.h +++ b/examples/tv-app/linux/include/media-input/MediaInputManager.h @@ -21,14 +21,14 @@ #include "gen/af-structs.h" #include -#include #include +#include class MediaInputManager { public: CHIP_ERROR Init(); - std::list proxyGetInputList(); + std::vector proxyGetInputList(); bool proxySelectInputRequest(uint8_t input); bool proxyShowInputStatusRequest(); bool proxyHideInputStatusRequest(); diff --git a/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp index f4f8333b232141..a68a890964ed94 100644 --- a/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp @@ -24,6 +24,8 @@ #include #include +#include +#include #include #include @@ -34,20 +36,26 @@ CHIP_ERROR TargetNavigatorManager::Init() { CHIP_ERROR err = CHIP_NO_ERROR; - // TODO: Update once storing a list attribute is supported - // std::list list = TargetNavigatorManager().proxyGetTargetInfoList(); - // emberAfWriteServerAttribute(endpoint, ZCL_TARGET_NAVIGATOR_CLUSTER_ID, ZCL_TARGET_NAVIGATOR_LIST_ATTRIBUTE_ID, - // (uint8_t *) &list, ZCL_STRUCT_ATTRIBUTE_TYPE); - SuccessOrExit(err); exit: return err; } -std::list TargetNavigatorManager::proxyGetTargetInfoList() +std::vector TargetNavigatorManager::proxyGetTargetInfoList() { // TODO: Insert code here - std::list targets; + std::vector targets; + int maximumVectorSize = 2; + char name[] = "exampleName"; + + for (uint8_t i = 0; i < maximumVectorSize; ++i) + { + EmberAfNavigateTargetTargetInfo targetInfo; + targetInfo.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name)); + targetInfo.identifier = 1 + i; + targets.push_back(targetInfo); + } + return targets; } diff --git a/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.h b/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.h index c850edc31ca734..9bf95578b97007 100644 --- a/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.h +++ b/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.h @@ -20,8 +20,8 @@ #include "gen/af-structs.h" #include -#include #include +#include struct TargetNavigatorLaunchResponse { @@ -34,5 +34,5 @@ class TargetNavigatorManager public: CHIP_ERROR Init(); TargetNavigatorLaunchResponse proxyNavigateTargetRequest(uint8_t target, std::string data); - std::list proxyGetTargetInfoList(); + std::vector proxyGetTargetInfoList(); }; diff --git a/examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp b/examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp index 66db57f840e40c..1f1da76d90cffd 100644 --- a/examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp +++ b/examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp @@ -17,24 +17,29 @@ #include "TvChannelManager.h" +#include +#include +#include +#include +#include + +#include "gen/af-structs.h" #include "gen/attribute-id.h" #include "gen/attribute-type.h" #include "gen/cluster-id.h" #include "gen/command-id.h" -#include -#include - #include #include +#include -using namespace std; +using namespace chip; CHIP_ERROR TvChannelManager::Init() { CHIP_ERROR err = CHIP_NO_ERROR; // TODO: Store feature map once it is supported - map featureMap; + std::map featureMap; featureMap["CL"] = true; featureMap["LI"] = true; @@ -61,6 +66,29 @@ bool TvChannelManager::proxySkipChannelRequest(uint16_t count) return true; } +std::vector TvChannelManager::proxyGetTvChannelList() +{ + // TODO: Insert code here + std::vector tvChannels; + int maximumVectorSize = 2; + char affiliateCallSign[] = "exampleASign"; + char callSign[] = "exampleCSign"; + char name[] = "exampleName"; + + for (uint16_t i = 0; i < maximumVectorSize; ++i) + { + EmberAfTvChannelInfo channelInfo; + channelInfo.affiliateCallSign = ByteSpan(Uint8::from_char(affiliateCallSign), sizeof(affiliateCallSign)); + channelInfo.callSign = ByteSpan(Uint8::from_char(callSign), sizeof(callSign)); + channelInfo.name = ByteSpan(Uint8::from_char(name), sizeof(name)); + channelInfo.majorNumber = 1 + i; + channelInfo.minorNumber = 2 + i; + tvChannels.push_back(channelInfo); + } + + return tvChannels; +} + static void sendResponse(const char * responseName, EmberAfTvChannelInfo channelInfo) { emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), ZCL_TV_CHANNEL_CLUSTER_ID, diff --git a/examples/tv-app/linux/include/tv-channel/TvChannelManager.h b/examples/tv-app/linux/include/tv-channel/TvChannelManager.h index 02928c0024da65..6217663156f66e 100644 --- a/examples/tv-app/linux/include/tv-channel/TvChannelManager.h +++ b/examples/tv-app/linux/include/tv-channel/TvChannelManager.h @@ -29,4 +29,5 @@ class TvChannelManager EmberAfTvChannelInfo proxyChangeChannelRequest(std::string match); bool proxyChangeChannelByNumberRequest(uint16_t majorNumer, uint16_t minorNumber); bool proxySkipChannelRequest(uint16_t count); + std::vector proxyGetTvChannelList(); }; diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index 6b5c859328aefc..64bd0db8a7ef6c 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -51,6 +51,10 @@ using namespace chip; using namespace chip::Transport; using namespace chip::DeviceLayer; +void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, + uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) +{} + bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::Command * commandObj) { emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); diff --git a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp index 74754a044ea9d5..f35b122227944e 100644 --- a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp +++ b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp @@ -214,120 +214,6 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // namespace AccountLogin -namespace ApplicationLauncher { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_LAUNCH_APP_COMMAND_ID: { - expectArgumentCount = 2; - const uint8_t * data; - /* TYPE WARNING: array array defaults to */ uint8_t * application; - bool argExists[2]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(data); - break; - case 1: - // Just for compatibility, we will add array type support in IM later. - TLVUnpackError = aDataTlv.GetDataPtr(const_cast(application)); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = - emberAfApplicationLauncherClusterLaunchAppCallback(apCommandObj, const_cast(data), application); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_APPLICATION_LAUNCHER_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace ApplicationLauncher - namespace AudioOutput { void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) @@ -499,7 +385,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // namespace AudioOutput -namespace ContentLaunch { +namespace LevelControl { void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) { @@ -516,11 +402,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_LAUNCH_CONTENT_COMMAND_ID: { - expectArgumentCount = 2; - uint8_t autoPlay; - const uint8_t * data; - bool argExists[2]; + case ZCL_MOVE_COMMAND_ID: { + expectArgumentCount = 4; + uint8_t moveMode; + uint8_t rate; + uint8_t optionMask; + uint8_t optionOverride; + bool argExists[4]; memset(argExists, 0, sizeof argExists); @@ -533,7 +421,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En continue; } currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) + if (currentDecodeTagId < 4) { if (argExists[currentDecodeTagId]) { @@ -550,11 +438,16 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (currentDecodeTagId) { case 0: - TLVUnpackError = aDataTlv.Get(autoPlay); + TLVUnpackError = aDataTlv.Get(moveMode); break; case 1: - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(data); + TLVUnpackError = aDataTlv.Get(rate); + break; + case 2: + TLVUnpackError = aDataTlv.Get(optionMask); + break; + case 3: + TLVUnpackError = aDataTlv.Get(optionOverride); break; default: // Unsupported tag, ignore it. @@ -573,18 +466,20 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En TLVError = CHIP_NO_ERROR; } - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfContentLaunchClusterLaunchContentCallback(apCommandObj, autoPlay, const_cast(data)); + wasHandled = emberAfLevelControlClusterMoveCallback(apCommandObj, moveMode, rate, optionMask, optionOverride); } break; } - case ZCL_LAUNCH_URL_COMMAND_ID: { - expectArgumentCount = 2; - const uint8_t * contentURL; - const uint8_t * displayString; - bool argExists[2]; + case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { + expectArgumentCount = 4; + uint8_t level; + uint16_t transitionTime; + uint8_t optionMask; + uint8_t optionOverride; + bool argExists[4]; memset(argExists, 0, sizeof argExists); @@ -597,7 +492,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En continue; } currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) + if (currentDecodeTagId < 4) { if (argExists[currentDecodeTagId]) { @@ -614,12 +509,16 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (currentDecodeTagId) { case 0: - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(contentURL); + TLVUnpackError = aDataTlv.Get(level); break; case 1: - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(displayString); + TLVUnpackError = aDataTlv.Get(transitionTime); + break; + case 2: + TLVUnpackError = aDataTlv.Get(optionMask); + break; + case 3: + TLVUnpackError = aDataTlv.Get(optionOverride); break; default: // Unsupported tag, ignore it. @@ -638,68 +537,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En TLVError = CHIP_NO_ERROR; } - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfContentLaunchClusterLaunchURLCallback(apCommandObj, const_cast(contentURL), - const_cast(displayString)); + wasHandled = + emberAfLevelControlClusterMoveToLevelCallback(apCommandObj, level, transitionTime, optionMask, optionOverride); } break; } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_CONTENT_LAUNCH_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_CONTENT_LAUNCH_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_CONTENT_LAUNCH_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace ContentLaunch - -namespace GeneralCommissioning { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { - expectArgumentCount = 3; - uint16_t expiryLengthSeconds; - uint64_t breadcrumb; - uint32_t timeoutMs; - bool argExists[3]; + case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { + expectArgumentCount = 2; + uint8_t level; + uint16_t transitionTime; + bool argExists[2]; memset(argExists, 0, sizeof argExists); @@ -712,7 +562,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En continue; } currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 3) + if (currentDecodeTagId < 2) { if (argExists[currentDecodeTagId]) { @@ -729,13 +579,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (currentDecodeTagId) { case 0: - TLVUnpackError = aDataTlv.Get(expiryLengthSeconds); + TLVUnpackError = aDataTlv.Get(level); break; case 1: - TLVUnpackError = aDataTlv.Get(breadcrumb); - break; - case 2: - TLVUnpackError = aDataTlv.Get(timeoutMs); + TLVUnpackError = aDataTlv.Get(transitionTime); break; default: // Unsupported tag, ignore it. @@ -754,27 +601,18 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En TLVError = CHIP_NO_ERROR; } - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = - emberAfGeneralCommissioningClusterArmFailSafeCallback(apCommandObj, expiryLengthSeconds, breadcrumb, timeoutMs); + wasHandled = emberAfLevelControlClusterMoveToLevelWithOnOffCallback(apCommandObj, level, transitionTime); } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); - break; - } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { - expectArgumentCount = 4; - uint8_t location; - const uint8_t * countryCode; - uint64_t breadcrumb; - uint32_t timeoutMs; - bool argExists[4]; + case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { + expectArgumentCount = 2; + uint8_t moveMode; + uint8_t rate; + bool argExists[2]; memset(argExists, 0, sizeof argExists); @@ -787,7 +625,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En continue; } currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 4) + if (currentDecodeTagId < 2) { if (argExists[currentDecodeTagId]) { @@ -804,17 +642,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (currentDecodeTagId) { case 0: - TLVUnpackError = aDataTlv.Get(location); + TLVUnpackError = aDataTlv.Get(moveMode); break; case 1: - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(countryCode); - break; - case 2: - TLVUnpackError = aDataTlv.Get(breadcrumb); - break; - case 3: - TLVUnpackError = aDataTlv.Get(timeoutMs); + TLVUnpackError = aDataTlv.Get(rate); break; default: // Unsupported tag, ignore it. @@ -833,1278 +664,21 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En TLVError = CHIP_NO_ERROR; } - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback( - apCommandObj, location, const_cast(countryCode), breadcrumb, timeoutMs); + wasHandled = emberAfLevelControlClusterMoveWithOnOffCallback(apCommandObj, moveMode, rate); } break; } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace GeneralCommissioning - -namespace KeypadInput { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_SEND_KEY_COMMAND_ID: { - expectArgumentCount = 1; - uint8_t keyCode; - bool argExists[1]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 1) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(keyCode); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfKeypadInputClusterSendKeyCallback(apCommandObj, keyCode); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_KEYPAD_INPUT_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_KEYPAD_INPUT_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_KEYPAD_INPUT_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace KeypadInput - -namespace LevelControl { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_MOVE_COMMAND_ID: { - expectArgumentCount = 4; - uint8_t moveMode; - uint8_t rate; - uint8_t optionMask; - uint8_t optionOverride; - bool argExists[4]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 4) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(moveMode); - break; - case 1: - TLVUnpackError = aDataTlv.Get(rate); - break; - case 2: - TLVUnpackError = aDataTlv.Get(optionMask); - break; - case 3: - TLVUnpackError = aDataTlv.Get(optionOverride); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfLevelControlClusterMoveCallback(apCommandObj, moveMode, rate, optionMask, optionOverride); - } - break; - } - case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { - expectArgumentCount = 4; - uint8_t level; - uint16_t transitionTime; - uint8_t optionMask; - uint8_t optionOverride; - bool argExists[4]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 4) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(level); - break; - case 1: - TLVUnpackError = aDataTlv.Get(transitionTime); - break; - case 2: - TLVUnpackError = aDataTlv.Get(optionMask); - break; - case 3: - TLVUnpackError = aDataTlv.Get(optionOverride); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = - emberAfLevelControlClusterMoveToLevelCallback(apCommandObj, level, transitionTime, optionMask, optionOverride); - } - break; - } - case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { - expectArgumentCount = 2; - uint8_t level; - uint16_t transitionTime; - bool argExists[2]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(level); - break; - case 1: - TLVUnpackError = aDataTlv.Get(transitionTime); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfLevelControlClusterMoveToLevelWithOnOffCallback(apCommandObj, level, transitionTime); - } - break; - } - case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { - expectArgumentCount = 2; - uint8_t moveMode; - uint8_t rate; - bool argExists[2]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(moveMode); - break; - case 1: - TLVUnpackError = aDataTlv.Get(rate); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfLevelControlClusterMoveWithOnOffCallback(apCommandObj, moveMode, rate); - } - break; - } - case ZCL_STEP_COMMAND_ID: { - expectArgumentCount = 5; - uint8_t stepMode; - uint8_t stepSize; - uint16_t transitionTime; - uint8_t optionMask; - uint8_t optionOverride; - bool argExists[5]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 5) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(stepMode); - break; - case 1: - TLVUnpackError = aDataTlv.Get(stepSize); - break; - case 2: - TLVUnpackError = aDataTlv.Get(transitionTime); - break; - case 3: - TLVUnpackError = aDataTlv.Get(optionMask); - break; - case 4: - TLVUnpackError = aDataTlv.Get(optionOverride); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 5 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfLevelControlClusterStepCallback(apCommandObj, stepMode, stepSize, transitionTime, optionMask, - optionOverride); - } - break; - } - case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { - expectArgumentCount = 3; - uint8_t stepMode; - uint8_t stepSize; - uint16_t transitionTime; - bool argExists[3]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 3) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(stepMode); - break; - case 1: - TLVUnpackError = aDataTlv.Get(stepSize); - break; - case 2: - TLVUnpackError = aDataTlv.Get(transitionTime); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfLevelControlClusterStepWithOnOffCallback(apCommandObj, stepMode, stepSize, transitionTime); - } - break; - } - case ZCL_STOP_COMMAND_ID: { - expectArgumentCount = 2; - uint8_t optionMask; - uint8_t optionOverride; - bool argExists[2]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(optionMask); - break; - case 1: - TLVUnpackError = aDataTlv.Get(optionOverride); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfLevelControlClusterStopCallback(apCommandObj, optionMask, optionOverride); - } - break; - } - case ZCL_STOP_WITH_ON_OFF_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfLevelControlClusterStopWithOnOffCallback(apCommandObj); - break; - } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace LevelControl - -namespace LowPower { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_SLEEP_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfLowPowerClusterSleepCallback(apCommandObj); - break; - } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_LOW_POWER_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_LOW_POWER_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_LOW_POWER_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace LowPower - -namespace MediaInput { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_HIDE_INPUT_STATUS_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaInputClusterHideInputStatusCallback(apCommandObj); - break; - } - case ZCL_RENAME_INPUT_COMMAND_ID: { - expectArgumentCount = 2; - uint8_t index; - const uint8_t * name; - bool argExists[2]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(index); - break; - case 1: - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(name); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaInputClusterRenameInputCallback(apCommandObj, index, const_cast(name)); - } - break; - } - case ZCL_SELECT_INPUT_COMMAND_ID: { - expectArgumentCount = 1; - uint8_t index; - bool argExists[1]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 1) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(index); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaInputClusterSelectInputCallback(apCommandObj, index); - } - break; - } - case ZCL_SHOW_INPUT_STATUS_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaInputClusterShowInputStatusCallback(apCommandObj); - break; - } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_MEDIA_INPUT_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_MEDIA_INPUT_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_MEDIA_INPUT_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace MediaInput - -namespace MediaPlayback { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_MEDIA_FAST_FORWARD_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaFastForwardCallback(apCommandObj); - break; - } - case ZCL_MEDIA_NEXT_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaNextCallback(apCommandObj); - break; - } - case ZCL_MEDIA_PAUSE_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaPauseCallback(apCommandObj); - break; - } - case ZCL_MEDIA_PLAY_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaPlayCallback(apCommandObj); - break; - } - case ZCL_MEDIA_PREVIOUS_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaPreviousCallback(apCommandObj); - break; - } - case ZCL_MEDIA_REWIND_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaRewindCallback(apCommandObj); - break; - } - case ZCL_MEDIA_SKIP_BACKWARD_COMMAND_ID: { - expectArgumentCount = 1; - uint64_t deltaPositionMilliseconds; - bool argExists[1]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 1) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(deltaPositionMilliseconds); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaSkipBackwardCallback(apCommandObj, deltaPositionMilliseconds); - } - break; - } - case ZCL_MEDIA_SKIP_FORWARD_COMMAND_ID: { - expectArgumentCount = 1; - uint64_t deltaPositionMilliseconds; - bool argExists[1]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 1) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(deltaPositionMilliseconds); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaSkipForwardCallback(apCommandObj, deltaPositionMilliseconds); - } - break; - } - case ZCL_MEDIA_SKIP_SEEK_COMMAND_ID: { - expectArgumentCount = 1; - uint64_t position; - bool argExists[1]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 1) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(position); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaSkipSeekCallback(apCommandObj, position); - } - break; - } - case ZCL_MEDIA_START_OVER_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaStartOverCallback(apCommandObj); - break; - } - case ZCL_MEDIA_STOP_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfMediaPlaybackClusterMediaStopCallback(apCommandObj); - break; - } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_MEDIA_PLAYBACK_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_MEDIA_PLAYBACK_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_MEDIA_PLAYBACK_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace MediaPlayback - -namespace OnOff { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_OFF_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfOnOffClusterOffCallback(apCommandObj); - break; - } - case ZCL_ON_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfOnOffClusterOnCallback(apCommandObj); - break; - } - case ZCL_TOGGLE_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj); - break; - } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_ON_OFF_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace OnOff - -namespace TvChannel { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_CHANGE_CHANNEL_COMMAND_ID: { - expectArgumentCount = 1; - const uint8_t * match; - bool argExists[1]; + case ZCL_STEP_COMMAND_ID: { + expectArgumentCount = 5; + uint8_t stepMode; + uint8_t stepSize; + uint16_t transitionTime; + uint8_t optionMask; + uint8_t optionOverride; + bool argExists[5]; memset(argExists, 0, sizeof argExists); @@ -2117,7 +691,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En continue; } currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 1) + if (currentDecodeTagId < 5) { if (argExists[currentDecodeTagId]) { @@ -2134,71 +708,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (currentDecodeTagId) { case 0: - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(match); + TLVUnpackError = aDataTlv.Get(stepMode); break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); + case 1: + TLVUnpackError = aDataTlv.Get(stepSize); break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { + case 2: + TLVUnpackError = aDataTlv.Get(transitionTime); break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfTvChannelClusterChangeChannelCallback(apCommandObj, const_cast(match)); - } - break; - } - case ZCL_CHANGE_CHANNEL_BY_NUMBER_COMMAND_ID: { - expectArgumentCount = 2; - uint16_t majorNumber; - uint16_t minorNumber; - bool argExists[2]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - TLVUnpackError = aDataTlv.Get(majorNumber); + case 3: + TLVUnpackError = aDataTlv.Get(optionMask); break; - case 1: - TLVUnpackError = aDataTlv.Get(minorNumber); + case 4: + TLVUnpackError = aDataTlv.Get(optionOverride); break; default: // Unsupported tag, ignore it. @@ -2217,17 +739,20 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En TLVError = CHIP_NO_ERROR; } - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 5 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfTvChannelClusterChangeChannelByNumberCallback(apCommandObj, majorNumber, minorNumber); + wasHandled = emberAfLevelControlClusterStepCallback(apCommandObj, stepMode, stepSize, transitionTime, optionMask, + optionOverride); } break; } - case ZCL_SKIP_CHANNEL_COMMAND_ID: { - expectArgumentCount = 1; - uint16_t Count; - bool argExists[1]; + case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { + expectArgumentCount = 3; + uint8_t stepMode; + uint8_t stepSize; + uint16_t transitionTime; + bool argExists[3]; memset(argExists, 0, sizeof argExists); @@ -2240,7 +765,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En continue; } currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 1) + if (currentDecodeTagId < 3) { if (argExists[currentDecodeTagId]) { @@ -2257,7 +782,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (currentDecodeTagId) { case 0: - TLVUnpackError = aDataTlv.Get(Count); + TLVUnpackError = aDataTlv.Get(stepMode); + break; + case 1: + TLVUnpackError = aDataTlv.Get(stepSize); + break; + case 2: + TLVUnpackError = aDataTlv.Get(transitionTime); break; default: // Unsupported tag, ignore it. @@ -2276,65 +807,17 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En TLVError = CHIP_NO_ERROR; } - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfTvChannelClusterSkipChannelCallback(apCommandObj, Count); + wasHandled = emberAfLevelControlClusterStepWithOnOffCallback(apCommandObj, stepMode, stepSize, transitionTime); } break; } - default: { - // Unrecognized command ID, error status will apply. - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_TV_CHANNEL_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_TV_CHANNEL_CLUSTER_ID); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - chip::app::CommandPathParams returnStatusParam = { aEndpointId, - 0, // GroupId - ZCL_TV_CHANNEL_CLUSTER_ID, aCommandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress(Zcl, - "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 - " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); - } -} - -} // namespace TvChannel - -namespace TargetNavigator { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, 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; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandId) - { - case ZCL_NAVIGATE_TARGET_COMMAND_ID: { + case ZCL_STOP_COMMAND_ID: { expectArgumentCount = 2; - uint8_t target; - const uint8_t * data; + uint8_t optionMask; + uint8_t optionOverride; bool argExists[2]; memset(argExists, 0, sizeof argExists); @@ -2365,11 +848,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (currentDecodeTagId) { case 0: - TLVUnpackError = aDataTlv.Get(target); + TLVUnpackError = aDataTlv.Get(optionMask); break; case 1: - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(data); + TLVUnpackError = aDataTlv.Get(optionOverride); break; default: // Unsupported tag, ignore it. @@ -2391,19 +873,25 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfTargetNavigatorClusterNavigateTargetCallback(apCommandObj, target, const_cast(data)); + wasHandled = emberAfLevelControlClusterStopCallback(apCommandObj, optionMask, optionOverride); } break; } + case ZCL_STOP_WITH_ON_OFF_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + wasHandled = emberAfLevelControlClusterStopWithOnOffCallback(apCommandObj); + break; + } default: { // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TARGET_NAVIGATOR_CLUSTER_ID, aCommandId, + ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_TARGET_NAVIGATOR_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID); return; } } @@ -2413,7 +901,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TARGET_NAVIGATOR_CLUSTER_ID, aCommandId, + ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(&returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); @@ -2424,7 +912,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } } -} // namespace TargetNavigator +} // namespace LevelControl } // namespace clusters @@ -2441,42 +929,12 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC case ZCL_ACCOUNT_LOGIN_CLUSTER_ID: clusters::AccountLogin::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_APPLICATION_LAUNCHER_CLUSTER_ID: - clusters::ApplicationLauncher::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; case ZCL_AUDIO_OUTPUT_CLUSTER_ID: clusters::AudioOutput::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_CONTENT_LAUNCH_CLUSTER_ID: - clusters::ContentLaunch::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: - clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; - case ZCL_KEYPAD_INPUT_CLUSTER_ID: - clusters::KeypadInput::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; case ZCL_LEVEL_CONTROL_CLUSTER_ID: clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_LOW_POWER_CLUSTER_ID: - clusters::LowPower::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; - case ZCL_MEDIA_INPUT_CLUSTER_ID: - clusters::MediaInput::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; - case ZCL_MEDIA_PLAYBACK_CLUSTER_ID: - clusters::MediaPlayback::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; - case ZCL_ON_OFF_CLUSTER_ID: - clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; - case ZCL_TV_CHANNEL_CLUSTER_ID: - clusters::TvChannel::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; - case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: - clusters::TargetNavigator::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; default: // Unrecognized cluster ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndPointId, diff --git a/examples/tv-app/tv-common/gen/af-gen-event.h b/examples/tv-app/tv-common/gen/af-gen-event.h index 8c1cc0513cdd79..814d4aab6b8bec 100644 --- a/examples/tv-app/tv-common/gen/af-gen-event.h +++ b/examples/tv-app/tv-common/gen/af-gen-event.h @@ -31,93 +31,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// This file is generated by Simplicity Studio. Please do not edit manually. -// -// // Enclosing macro to prevent multiple inclusion #ifndef __AF_GEN_EVENT__ #define __AF_GEN_EVENT__ -// Code used to configure the cluster event mechanism -#define EMBER_AF_GENERATED_EVENT_CODE \ - EmberEventControl emberAfIdentifyClusterServerTickCallbackControl1; \ - EmberEventControl emberAfLevelControlClusterServerTickCallbackControl1; \ - EmberEventControl emberAfBarrierControlClusterServerTickCallbackControl1; \ - EmberEventControl emberAfIasZoneClusterServerTickCallbackControl1; \ - extern EmberEventControl emberAfPluginColorControlServerHueSatTransitionEventControl; \ - extern EmberEventControl emberAfPluginColorControlServerTempTransitionEventControl; \ - extern EmberEventControl emberAfPluginColorControlServerXyTransitionEventControl; \ - extern EmberEventControl emberAfPluginDoorLockServerLockoutEventControl; \ - extern EmberEventControl emberAfPluginDoorLockServerRelockEventControl; \ - extern EmberEventControl emberAfPluginIasZoneServerManageQueueEventControl; \ - extern EmberEventControl emberAfPluginReportingTickEventControl; \ - extern void emberAfPluginColorControlServerHueSatTransitionEventHandler(void); \ - extern void emberAfPluginColorControlServerTempTransitionEventHandler(void); \ - extern void emberAfPluginColorControlServerXyTransitionEventHandler(void); \ - extern void emberAfPluginDoorLockServerLockoutEventHandler(void); \ - extern void emberAfPluginDoorLockServerRelockEventHandler(void); \ - extern void emberAfPluginIasZoneServerManageQueueEventHandler(void); \ - extern void emberAfPluginReportingTickEventHandler(void); \ - static void clusterTickWrapper(EmberEventControl * control, EmberAfTickFunction callback, chip::EndpointId endpoint) \ - { \ - /* emberAfPushEndpointNetworkIndex(endpoint); */ \ - emberEventControlSetInactive(control); \ - (*callback)(endpoint); \ - /* emberAfPopNetworkIndex(); */ \ - } \ - void emberAfIdentifyClusterServerTickCallbackWrapperFunction1(void) \ - { \ - clusterTickWrapper(&emberAfIdentifyClusterServerTickCallbackControl1, emberAfIdentifyClusterServerTickCallback, 1); \ - } \ - void emberAfLevelControlClusterServerTickCallbackWrapperFunction1(void) \ - { \ - clusterTickWrapper(&emberAfLevelControlClusterServerTickCallbackControl1, emberAfLevelControlClusterServerTickCallback, \ - 1); \ - } \ - void emberAfBarrierControlClusterServerTickCallbackWrapperFunction1(void) \ - { \ - clusterTickWrapper(&emberAfBarrierControlClusterServerTickCallbackControl1, \ - emberAfBarrierControlClusterServerTickCallback, 1); \ - } \ - void emberAfIasZoneClusterServerTickCallbackWrapperFunction1(void) \ - { \ - clusterTickWrapper(&emberAfIasZoneClusterServerTickCallbackControl1, emberAfIasZoneClusterServerTickCallback, 1); \ - } - -// EmberEventData structs used to populate the EmberEventData table -#define EMBER_AF_GENERATED_EVENTS \ - { &emberAfIdentifyClusterServerTickCallbackControl1, emberAfIdentifyClusterServerTickCallbackWrapperFunction1 }, \ - { &emberAfLevelControlClusterServerTickCallbackControl1, emberAfLevelControlClusterServerTickCallbackWrapperFunction1 }, \ - { &emberAfBarrierControlClusterServerTickCallbackControl1, \ - emberAfBarrierControlClusterServerTickCallbackWrapperFunction1 }, \ - { &emberAfIasZoneClusterServerTickCallbackControl1, emberAfIasZoneClusterServerTickCallbackWrapperFunction1 }, \ - { &emberAfPluginColorControlServerHueSatTransitionEventControl, \ - emberAfPluginColorControlServerHueSatTransitionEventHandler }, \ - { &emberAfPluginColorControlServerTempTransitionEventControl, emberAfPluginColorControlServerTempTransitionEventHandler }, \ - { &emberAfPluginColorControlServerXyTransitionEventControl, emberAfPluginColorControlServerXyTransitionEventHandler }, \ - { &emberAfPluginDoorLockServerLockoutEventControl, emberAfPluginDoorLockServerLockoutEventHandler }, \ - { &emberAfPluginDoorLockServerRelockEventControl, emberAfPluginDoorLockServerRelockEventHandler }, \ - { &emberAfPluginIasZoneServerManageQueueEventControl, emberAfPluginIasZoneServerManageQueueEventHandler }, \ - { &emberAfPluginReportingTickEventControl, emberAfPluginReportingTickEventHandler }, - -#define EMBER_AF_GENERATED_EVENT_STRINGS \ - "Identify Cluster Server EP 1", "Level Control Cluster Server EP 1", "Barrier Control Cluster Server EP 1", \ - "IAS Zone Cluster Server EP 1", "Color Control Cluster Server Plugin HueSatTransition", \ - "Color Control Cluster Server Plugin TempTransition", "Color Control Cluster Server Plugin XyTransition", \ - "Door Lock Server Cluster Plugin Lockout", "Door Lock Server Cluster Plugin Relock", "IAS Zone Server Plugin ManageQueue", \ - "Reporting Plugin Tick", - -// The length of the event context table used to track and retrieve cluster events -#define EMBER_AF_EVENT_CONTEXT_LENGTH 4 - -// EmberAfEventContext structs used to populate the EmberAfEventContext table -#define EMBER_AF_GENERATED_EVENT_CONTEXT \ - { 0x1, 0x3, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfIdentifyClusterServerTickCallbackControl1 }, \ - { 0x1, 0x8, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfLevelControlClusterServerTickCallbackControl1 }, \ - { 0x1, 0x103, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfBarrierControlClusterServerTickCallbackControl1 }, \ - { \ - 0x1, 0x500, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfIasZoneClusterServerTickCallbackControl1 \ - } - #endif // __AF_GEN_EVENT__ diff --git a/examples/tv-app/tv-common/gen/af-structs.h b/examples/tv-app/tv-common/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/tv-app/tv-common/gen/af-structs.h +++ b/examples/tv-app/tv-common/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/examples/tv-app/tv-common/gen/attribute-size.cpp b/examples/tv-app/tv-common/gen/attribute-size.cpp index 34bd0e76523a88..c705952d73e96b 100644 --- a/examples/tv-app/tv-common/gen/attribute-size.cpp +++ b/examples/tv-app/tv-common/gen/attribute-size.cpp @@ -79,6 +79,101 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo uint16_t entryLength = 0; switch (clusterId) { + case 0x050C: // Application Launcher Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // application launcher list + { + entryLength = 2; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %l is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // INT16U + break; + } + } + break; + } + case 0x050B: // Audio Output Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // audio output list + { + entryLength = 36; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %l is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _AudioOutputInfo + _AudioOutputInfo * entry = reinterpret_cast<_AudioOutputInfo *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->index, write ? (uint8_t *) &entry->index : src, write, &entryOffset, + sizeof(entry->index)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->outputType, write ? (uint8_t *) &entry->outputType : src, write, + &entryOffset, sizeof(entry->outputType)); // AudioOutputType + chip::ByteSpan * nameSpan = &entry->name; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } + case 0x050A: // Content Launch Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // acceptsHeaderList + { + entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, index - 1); + if (entryOffset == 0) + { + ChipLogError(Zcl, "Index %l is invalid.", index); + return 0; + } + + chip::ByteSpan * acceptsHeaderListSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING + uint16_t acceptsHeaderListRemainingSpace = static_cast(am->size - entryOffset); + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, acceptsHeaderListRemainingSpace, acceptsHeaderListSpan) + : ReadByteSpan(src + entryOffset, acceptsHeaderListRemainingSpace, acceptsHeaderListSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + + entryLength = acceptsHeaderListSpan->size(); + break; + } + case 0x0001: // supported streaming types + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %l is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ContentLaunchStreamingType + break; + } + } + break; + } case 0x0033: // General Diagnostics Cluster { uint16_t entryOffset = kSizeLengthInBytes; @@ -120,6 +215,129 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo } break; } + case 0x0507: // Media Input Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // media input list + { + entryLength = 70; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %l is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _MediaInputInfo + _MediaInputInfo * entry = reinterpret_cast<_MediaInputInfo *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->index, write ? (uint8_t *) &entry->index : src, write, &entryOffset, + sizeof(entry->index)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->inputType, write ? (uint8_t *) &entry->inputType : src, write, + &entryOffset, sizeof(entry->inputType)); // MediaInputType + chip::ByteSpan * nameSpan = &entry->name; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + chip::ByteSpan * descriptionSpan = &entry->description; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, descriptionSpan) + : ReadByteSpan(src + entryOffset, 34, descriptionSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } + case 0x0504: // TV Channel Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // tv channel list + { + entryLength = 106; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %l is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _TvChannelInfo + _TvChannelInfo * entry = reinterpret_cast<_TvChannelInfo *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->majorNumber, write ? (uint8_t *) &entry->majorNumber : src, write, + &entryOffset, sizeof(entry->majorNumber)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->minorNumber, write ? (uint8_t *) &entry->minorNumber : src, write, + &entryOffset, sizeof(entry->minorNumber)); // INT16U + chip::ByteSpan * nameSpan = &entry->name; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + chip::ByteSpan * callSignSpan = &entry->callSign; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, callSignSpan) : ReadByteSpan(src + entryOffset, 34, callSignSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + chip::ByteSpan * affiliateCallSignSpan = &entry->affiliateCallSign; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, affiliateCallSignSpan) + : ReadByteSpan(src + entryOffset, 34, affiliateCallSignSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } + case 0x0505: // Target Navigator Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // target navigator list + { + entryLength = 35; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %l is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _NavigateTargetTargetInfo + _NavigateTargetTargetInfo * entry = reinterpret_cast<_NavigateTargetTargetInfo *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->identifier, write ? (uint8_t *) &entry->identifier : src, write, + &entryOffset, sizeof(entry->identifier)); // INT8U + chip::ByteSpan * nameSpan = &entry->name; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } case 0x0035: // Thread Network Diagnostics Cluster { uint16_t entryOffset = kSizeLengthInBytes; @@ -294,6 +512,37 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut uint16_t entryLength = 0; switch (clusterId) { + case 0x050C: // Application Launcher Cluster + switch (attributeId) + { + case 0x0000: // application launcher list + // uint16_t + entryLength = 2; + break; + } + break; + case 0x050B: // Audio Output Cluster + switch (attributeId) + { + case 0x0000: // audio output list + // Struct _AudioOutputInfo + entryLength = 36; + break; + } + break; + case 0x050A: // Content Launch Cluster + switch (attributeId) + { + case 0x0000: // acceptsHeaderList + // chip::ByteSpan + return GetByteSpanOffsetFromIndex(buffer, 256, entryCount); + break; + case 0x0001: // supported streaming types + // uint8_t + entryLength = 1; + break; + } + break; case 0x0033: // General Diagnostics Cluster switch (attributeId) { @@ -303,6 +552,33 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut break; } break; + case 0x0507: // Media Input Cluster + switch (attributeId) + { + case 0x0000: // media input list + // Struct _MediaInputInfo + entryLength = 70; + break; + } + break; + case 0x0504: // TV Channel Cluster + switch (attributeId) + { + case 0x0000: // tv channel list + // Struct _TvChannelInfo + entryLength = 106; + break; + } + break; + case 0x0505: // Target Navigator Cluster + switch (attributeId) + { + case 0x0000: // target navigator list + // Struct _NavigateTargetTargetInfo + entryLength = 35; + break; + } + break; case 0x0035: // Thread Network Diagnostics Cluster switch (attributeId) { diff --git a/examples/tv-app/tv-common/gen/call-command-handler.cpp b/examples/tv-app/tv-common/gen/call-command-handler.cpp index 64c61acca26296..79f1290bbd3531 100644 --- a/examples/tv-app/tv-common/gen/call-command-handler.cpp +++ b/examples/tv-app/tv-common/gen/call-command-handler.cpp @@ -32,9 +32,7 @@ EmberAfStatus emberAfAccountLoginClusterServerCommandParse(EmberAfClusterCommand EmberAfStatus emberAfApplicationBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfApplicationLauncherClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfContentLaunchClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfKeypadInputClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -46,7 +44,6 @@ EmberAfStatus emberAfTvChannelClusterServerCommandParse(EmberAfClusterCommand * EmberAfStatus emberAfTargetNavigatorClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfThreadNetworkDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfWakeOnLanClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfWiFiNetworkDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); static EmberAfStatus status(bool wasHandled, bool clusterExists, bool mfgSpecific) { @@ -95,48 +92,50 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) result = status(false, true, cmd->mfgSpecific); break; case ZCL_APPLICATION_LAUNCHER_CLUSTER_ID: - result = emberAfApplicationLauncherClusterServerCommandParse(cmd); + // No commands are enabled for cluster Application Launcher + result = status(false, true, cmd->mfgSpecific); break; case ZCL_AUDIO_OUTPUT_CLUSTER_ID: result = emberAfAudioOutputClusterServerCommandParse(cmd); break; - case ZCL_COLOR_CONTROL_CLUSTER_ID: - // No commands are enabled for cluster Color Control - result = status(false, true, cmd->mfgSpecific); - break; case ZCL_CONTENT_LAUNCH_CLUSTER_ID: - result = emberAfContentLaunchClusterServerCommandParse(cmd); - break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: - result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); + // No commands are enabled for cluster Content Launch + result = status(false, true, cmd->mfgSpecific); break; case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: // No commands are enabled for cluster General Diagnostics result = status(false, true, cmd->mfgSpecific); break; case ZCL_KEYPAD_INPUT_CLUSTER_ID: - result = emberAfKeypadInputClusterServerCommandParse(cmd); + // No commands are enabled for cluster Keypad Input + result = status(false, true, cmd->mfgSpecific); break; case ZCL_LEVEL_CONTROL_CLUSTER_ID: result = emberAfLevelControlClusterServerCommandParse(cmd); break; case ZCL_LOW_POWER_CLUSTER_ID: - result = emberAfLowPowerClusterServerCommandParse(cmd); + // No commands are enabled for cluster Low Power + result = status(false, true, cmd->mfgSpecific); break; case ZCL_MEDIA_INPUT_CLUSTER_ID: - result = emberAfMediaInputClusterServerCommandParse(cmd); + // No commands are enabled for cluster Media Input + result = status(false, true, cmd->mfgSpecific); break; case ZCL_MEDIA_PLAYBACK_CLUSTER_ID: - result = emberAfMediaPlaybackClusterServerCommandParse(cmd); + // No commands are enabled for cluster Media Playback + result = status(false, true, cmd->mfgSpecific); break; case ZCL_ON_OFF_CLUSTER_ID: - result = emberAfOnOffClusterServerCommandParse(cmd); + // No commands are enabled for cluster On/off + result = status(false, true, cmd->mfgSpecific); break; case ZCL_TV_CHANNEL_CLUSTER_ID: - result = emberAfTvChannelClusterServerCommandParse(cmd); + // No commands are enabled for cluster TV Channel + result = status(false, true, cmd->mfgSpecific); break; case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: - result = emberAfTargetNavigatorClusterServerCommandParse(cmd); + // No commands are enabled for cluster Target Navigator + result = status(false, true, cmd->mfgSpecific); break; case ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID: // No commands are enabled for cluster Thread Network Diagnostics @@ -146,10 +145,6 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) // No commands are enabled for cluster Wake on LAN result = status(false, true, cmd->mfgSpecific); break; - case ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID: - // No commands are enabled for cluster WiFi Network Diagnostics - result = status(false, true, cmd->mfgSpecific); - break; default: // Unrecognized cluster ID, error status will apply. break; @@ -209,38 +204,6 @@ EmberAfStatus emberAfAccountLoginClusterServerCommandParse(EmberAfClusterCommand } return status(wasHandled, true, cmd->mfgSpecific); } -EmberAfStatus emberAfApplicationLauncherClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_LAUNCH_APP_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t * data; - /* TYPE WARNING: array array defaults to */ uint8_t * application; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - data = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + emberAfStringLength(data) + 1u); - application = cmd->buffer + payloadOffset; - - wasHandled = emberAfApplicationLauncherClusterLaunchAppCallback(nullptr, data, application); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand * cmd) { bool wasHandled = false; @@ -290,173 +253,6 @@ EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand } return status(wasHandled, true, cmd->mfgSpecific); } -EmberAfStatus emberAfContentLaunchClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_LAUNCH_CONTENT_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t autoPlay; - uint8_t * data; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - autoPlay = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - data = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfContentLaunchClusterLaunchContentCallback(nullptr, autoPlay, data); - break; - } - case ZCL_LAUNCH_URL_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t * contentURL; - uint8_t * displayString; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - contentURL = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + emberAfStringLength(contentURL) + 1u); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - displayString = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfContentLaunchClusterLaunchURLCallback(nullptr, contentURL, displayString); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t expiryLengthSeconds; - uint64_t breadcrumb; - uint32_t timeoutMs; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - expiryLengthSeconds = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - breadcrumb = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 8); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - timeoutMs = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfGeneralCommissioningClusterArmFailSafeCallback(nullptr, expiryLengthSeconds, breadcrumb, timeoutMs); - break; - } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { - wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(nullptr); - break; - } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t location; - uint8_t * countryCode; - uint64_t breadcrumb; - uint32_t timeoutMs; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - location = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - countryCode = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + emberAfStringLength(countryCode) + 1u); - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - breadcrumb = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 8); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - timeoutMs = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(nullptr, location, countryCode, breadcrumb, - timeoutMs); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfKeypadInputClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_SEND_KEY_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t keyCode; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - keyCode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfKeypadInputClusterSendKeyCallback(nullptr, keyCode); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand * cmd) { bool wasHandled = false; @@ -674,293 +470,3 @@ EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand } return status(wasHandled, true, cmd->mfgSpecific); } -EmberAfStatus emberAfLowPowerClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_SLEEP_COMMAND_ID: { - wasHandled = emberAfLowPowerClusterSleepCallback(nullptr); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfMediaInputClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_HIDE_INPUT_STATUS_COMMAND_ID: { - wasHandled = emberAfMediaInputClusterHideInputStatusCallback(nullptr); - break; - } - case ZCL_RENAME_INPUT_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t index; - uint8_t * name; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - index = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - name = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfMediaInputClusterRenameInputCallback(nullptr, index, name); - break; - } - case ZCL_SELECT_INPUT_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t index; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - index = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfMediaInputClusterSelectInputCallback(nullptr, index); - break; - } - case ZCL_SHOW_INPUT_STATUS_COMMAND_ID: { - wasHandled = emberAfMediaInputClusterShowInputStatusCallback(nullptr); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfMediaPlaybackClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_MEDIA_FAST_FORWARD_COMMAND_ID: { - wasHandled = emberAfMediaPlaybackClusterMediaFastForwardCallback(nullptr); - break; - } - case ZCL_MEDIA_NEXT_COMMAND_ID: { - wasHandled = emberAfMediaPlaybackClusterMediaNextCallback(nullptr); - break; - } - case ZCL_MEDIA_PAUSE_COMMAND_ID: { - wasHandled = emberAfMediaPlaybackClusterMediaPauseCallback(nullptr); - break; - } - case ZCL_MEDIA_PLAY_COMMAND_ID: { - wasHandled = emberAfMediaPlaybackClusterMediaPlayCallback(nullptr); - break; - } - case ZCL_MEDIA_PREVIOUS_COMMAND_ID: { - wasHandled = emberAfMediaPlaybackClusterMediaPreviousCallback(nullptr); - break; - } - case ZCL_MEDIA_REWIND_COMMAND_ID: { - wasHandled = emberAfMediaPlaybackClusterMediaRewindCallback(nullptr); - break; - } - case ZCL_MEDIA_SKIP_BACKWARD_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint64_t deltaPositionMilliseconds; - - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - deltaPositionMilliseconds = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfMediaPlaybackClusterMediaSkipBackwardCallback(nullptr, deltaPositionMilliseconds); - break; - } - case ZCL_MEDIA_SKIP_FORWARD_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint64_t deltaPositionMilliseconds; - - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - deltaPositionMilliseconds = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfMediaPlaybackClusterMediaSkipForwardCallback(nullptr, deltaPositionMilliseconds); - break; - } - case ZCL_MEDIA_SKIP_SEEK_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint64_t position; - - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - position = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfMediaPlaybackClusterMediaSkipSeekCallback(nullptr, position); - break; - } - case ZCL_MEDIA_START_OVER_COMMAND_ID: { - wasHandled = emberAfMediaPlaybackClusterMediaStartOverCallback(nullptr); - break; - } - case ZCL_MEDIA_STOP_COMMAND_ID: { - wasHandled = emberAfMediaPlaybackClusterMediaStopCallback(nullptr); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_OFF_COMMAND_ID: { - wasHandled = emberAfOnOffClusterOffCallback(nullptr); - break; - } - case ZCL_ON_COMMAND_ID: { - wasHandled = emberAfOnOffClusterOnCallback(nullptr); - break; - } - case ZCL_TOGGLE_COMMAND_ID: { - wasHandled = emberAfOnOffClusterToggleCallback(nullptr); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfTvChannelClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_CHANGE_CHANNEL_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t * match; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - match = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfTvChannelClusterChangeChannelCallback(nullptr, match); - break; - } - case ZCL_CHANGE_CHANNEL_BY_NUMBER_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t majorNumber; - uint16_t minorNumber; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - majorNumber = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - minorNumber = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfTvChannelClusterChangeChannelByNumberCallback(nullptr, majorNumber, minorNumber); - break; - } - case ZCL_SKIP_CHANNEL_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t Count; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - Count = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfTvChannelClusterSkipChannelCallback(nullptr, Count); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfTargetNavigatorClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_NAVIGATE_TARGET_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t target; - uint8_t * data; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - target = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - data = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfTargetNavigatorClusterNavigateTargetCallback(nullptr, target, data); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} diff --git a/examples/tv-app/tv-common/gen/callback-stub.cpp b/examples/tv-app/tv-common/gen/callback-stub.cpp index e66f3bf00a8cfc..0190fd65bb05e4 100644 --- a/examples/tv-app/tv-common/gen/callback-stub.cpp +++ b/examples/tv-app/tv-common/gen/callback-stub.cpp @@ -41,15 +41,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_AUDIO_OUTPUT_CLUSTER_ID: emberAfAudioOutputClusterInitCallback(endpoint); break; - case ZCL_COLOR_CONTROL_CLUSTER_ID: - emberAfColorControlClusterInitCallback(endpoint); - break; case ZCL_CONTENT_LAUNCH_CLUSTER_ID: emberAfContentLaunchClusterInitCallback(endpoint); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: - emberAfGeneralCommissioningClusterInitCallback(endpoint); - break; case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; @@ -83,9 +77,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_WAKE_ON_LAN_CLUSTER_ID: emberAfWakeOnLanClusterInitCallback(endpoint); break; - case ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID: - emberAfWiFiNetworkDiagnosticsClusterInitCallback(endpoint); - break; default: // Unrecognized cluster ID break; @@ -112,21 +103,11 @@ void __attribute__((weak)) emberAfAudioOutputClusterInitCallback(EndpointId endp // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfContentLaunchClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -182,11 +163,6 @@ void __attribute__((weak)) emberAfWakeOnLanClusterInitCallback(EndpointId endpoi // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfWiFiNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} // // Non-Cluster Related Callbacks diff --git a/examples/tv-app/tv-common/gen/callback.h b/examples/tv-app/tv-common/gen/callback.h index 35afce85008631..64a31d24a332b7 100644 --- a/examples/tv-app/tv-common/gen/callback.h +++ b/examples/tv-app/tv-common/gen/callback.h @@ -72,14 +72,6 @@ void emberAfApplicationLauncherClusterInitCallback(chip::EndpointId endpoint); */ void emberAfAudioOutputClusterInitCallback(chip::EndpointId endpoint); -/** @brief Color Control Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfColorControlClusterInitCallback(chip::EndpointId endpoint); - /** @brief Content Launch Cluster Init * * Cluster Init @@ -88,14 +80,6 @@ void emberAfColorControlClusterInitCallback(chip::EndpointId endpoint); */ void emberAfContentLaunchClusterInitCallback(chip::EndpointId endpoint); -/** @brief General Commissioning Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfGeneralCommissioningClusterInitCallback(chip::EndpointId endpoint); - /** @brief General Diagnostics Cluster Init * * Cluster Init @@ -184,14 +168,6 @@ void emberAfThreadNetworkDiagnosticsClusterInitCallback(chip::EndpointId endpoin */ void emberAfWakeOnLanClusterInitCallback(chip::EndpointId endpoint); -/** @brief WiFi Network Diagnostics Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfWiFiNetworkDiagnosticsClusterInitCallback(chip::EndpointId endpoint); - // Cluster Server/Client Init Functions // @@ -476,76 +452,6 @@ EmberAfStatus emberAfAudioOutputClusterServerPreAttributeChangedCallback(chip::E */ void emberAfAudioOutputClusterServerTickCallback(chip::EndpointId endpoint); -// -// Color Control Cluster server -// - -/** @brief Color Control Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfColorControlClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief Color Control Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfColorControlClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief Color Control Cluster Server Manufacturer Specific Attribute Changed - * - * Server Manufacturer Specific Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - * @param manufacturerCode Manufacturer Code of the attribute that changed - */ -void emberAfColorControlClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief Color Control Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param destination The destination to which the message was sent - * @param apsFrame The APS frame for the message - * @param msgLen The length of the message - * @param message The message that was sent - * @param status The status of the sent message - */ -void emberAfColorControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Color Control Cluster Server Pre Attribute Changed - * - * server Pre Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute to be changed - * @param attributeType Attribute type - * @param size Attribute size - * @param value Attribute value - */ -EmberAfStatus emberAfColorControlClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint16_t size, - uint8_t * value); - -/** @brief Color Control Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfColorControlClusterServerTickCallback(chip::EndpointId endpoint); - // // Content Launch Cluster server // @@ -616,77 +522,6 @@ EmberAfStatus emberAfContentLaunchClusterServerPreAttributeChangedCallback(chip: */ void emberAfContentLaunchClusterServerTickCallback(chip::EndpointId endpoint); -// -// General Commissioning Cluster server -// - -/** @brief General Commissioning Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfGeneralCommissioningClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief General Commissioning Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfGeneralCommissioningClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief General Commissioning Cluster Server Manufacturer Specific Attribute Changed - * - * Server Manufacturer Specific Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - * @param manufacturerCode Manufacturer Code of the attribute that changed - */ -void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief General Commissioning Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param destination The destination to which the message was sent - * @param apsFrame The APS frame for the message - * @param msgLen The length of the message - * @param message The message that was sent - * @param status The status of the sent message - */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); - -/** @brief General Commissioning Cluster Server Pre Attribute Changed - * - * server Pre Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute to be changed - * @param attributeType Attribute type - * @param size Attribute size - * @param value Attribute value - */ -EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint16_t size, - uint8_t * value); - -/** @brief General Commissioning Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfGeneralCommissioningClusterServerTickCallback(chip::EndpointId endpoint); - // // General Diagnostics Cluster server // @@ -1459,78 +1294,6 @@ EmberAfStatus emberAfWakeOnLanClusterServerPreAttributeChangedCallback(chip::End */ void emberAfWakeOnLanClusterServerTickCallback(chip::EndpointId endpoint); -// -// WiFi Network Diagnostics Cluster server -// - -/** @brief WiFi Network Diagnostics Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfWiFiNetworkDiagnosticsClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief WiFi Network Diagnostics Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfWiFiNetworkDiagnosticsClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief WiFi Network Diagnostics Cluster Server Manufacturer Specific Attribute Changed - * - * Server Manufacturer Specific Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - * @param manufacturerCode Manufacturer Code of the attribute that changed - */ -void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief WiFi Network Diagnostics Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param destination The destination to which the message was sent - * @param apsFrame The APS frame for the message - * @param msgLen The length of the message - * @param message The message that was sent - * @param status The status of the sent message - */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief WiFi Network Diagnostics Cluster Server Pre Attribute Changed - * - * server Pre Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute to be changed - * @param attributeType Attribute type - * @param size Attribute size - * @param value Attribute value - */ -EmberAfStatus emberAfWiFiNetworkDiagnosticsClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - EmberAfAttributeType attributeType, - uint16_t size, uint8_t * value); - -/** @brief WiFi Network Diagnostics Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfWiFiNetworkDiagnosticsClusterServerTickCallback(chip::EndpointId endpoint); - // Cluster Commands Callback /** @@ -1545,13 +1308,6 @@ bool emberAfAccountLoginClusterGetSetupPINCallback(chip::app::Command * commandO bool emberAfAccountLoginClusterLoginCallback(chip::app::Command * commandObj, uint8_t * tempAccountIdentifier, uint8_t * setupPIN); -/** - * @brief Application Launcher Cluster LaunchApp Command callback - */ - -bool emberAfApplicationLauncherClusterLaunchAppCallback(chip::app::Command * commandObj, uint8_t * data, - /* TYPE WARNING: array array defaults to */ uint8_t * application); - /** * @brief Audio Output Cluster RenameOutput Command callback */ @@ -1564,44 +1320,6 @@ bool emberAfAudioOutputClusterRenameOutputCallback(chip::app::Command * commandO bool emberAfAudioOutputClusterSelectOutputCallback(chip::app::Command * commandObj, uint8_t index); -/** - * @brief Content Launch Cluster LaunchContent Command callback - */ - -bool emberAfContentLaunchClusterLaunchContentCallback(chip::app::Command * commandObj, uint8_t autoPlay, uint8_t * data); - -/** - * @brief Content Launch Cluster LaunchURL Command callback - */ - -bool emberAfContentLaunchClusterLaunchURLCallback(chip::app::Command * commandObj, uint8_t * contentURL, uint8_t * displayString); - -/** - * @brief General Commissioning Cluster ArmFailSafe Command callback - */ - -bool emberAfGeneralCommissioningClusterArmFailSafeCallback(chip::app::Command * commandObj, uint16_t expiryLengthSeconds, - uint64_t breadcrumb, uint32_t timeoutMs); - -/** - * @brief General Commissioning Cluster CommissioningComplete Command callback - */ - -bool emberAfGeneralCommissioningClusterCommissioningCompleteCallback(chip::app::Command * commandObj); - -/** - * @brief General Commissioning Cluster SetRegulatoryConfig Command callback - */ - -bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(chip::app::Command * commandObj, uint8_t location, - uint8_t * countryCode, uint64_t breadcrumb, uint32_t timeoutMs); - -/** - * @brief Keypad Input Cluster SendKey Command callback - */ - -bool emberAfKeypadInputClusterSendKeyCallback(chip::app::Command * commandObj, uint8_t keyCode); - /** * @brief Level Control Cluster Move Command callback */ @@ -1655,145 +1373,6 @@ bool emberAfLevelControlClusterStopCallback(chip::app::Command * commandObj, uin bool emberAfLevelControlClusterStopWithOnOffCallback(chip::app::Command * commandObj); -/** - * @brief Low Power Cluster Sleep Command callback - */ - -bool emberAfLowPowerClusterSleepCallback(chip::app::Command * commandObj); - -/** - * @brief Media Input Cluster HideInputStatus Command callback - */ - -bool emberAfMediaInputClusterHideInputStatusCallback(chip::app::Command * commandObj); - -/** - * @brief Media Input Cluster RenameInput Command callback - */ - -bool emberAfMediaInputClusterRenameInputCallback(chip::app::Command * commandObj, uint8_t index, uint8_t * name); - -/** - * @brief Media Input Cluster SelectInput Command callback - */ - -bool emberAfMediaInputClusterSelectInputCallback(chip::app::Command * commandObj, uint8_t index); - -/** - * @brief Media Input Cluster ShowInputStatus Command callback - */ - -bool emberAfMediaInputClusterShowInputStatusCallback(chip::app::Command * commandObj); - -/** - * @brief Media Playback Cluster MediaFastForward Command callback - */ - -bool emberAfMediaPlaybackClusterMediaFastForwardCallback(chip::app::Command * commandObj); - -/** - * @brief Media Playback Cluster MediaNext Command callback - */ - -bool emberAfMediaPlaybackClusterMediaNextCallback(chip::app::Command * commandObj); - -/** - * @brief Media Playback Cluster MediaPause Command callback - */ - -bool emberAfMediaPlaybackClusterMediaPauseCallback(chip::app::Command * commandObj); - -/** - * @brief Media Playback Cluster MediaPlay Command callback - */ - -bool emberAfMediaPlaybackClusterMediaPlayCallback(chip::app::Command * commandObj); - -/** - * @brief Media Playback Cluster MediaPrevious Command callback - */ - -bool emberAfMediaPlaybackClusterMediaPreviousCallback(chip::app::Command * commandObj); - -/** - * @brief Media Playback Cluster MediaRewind Command callback - */ - -bool emberAfMediaPlaybackClusterMediaRewindCallback(chip::app::Command * commandObj); - -/** - * @brief Media Playback Cluster MediaSkipBackward Command callback - */ - -bool emberAfMediaPlaybackClusterMediaSkipBackwardCallback(chip::app::Command * commandObj, uint64_t deltaPositionMilliseconds); - -/** - * @brief Media Playback Cluster MediaSkipForward Command callback - */ - -bool emberAfMediaPlaybackClusterMediaSkipForwardCallback(chip::app::Command * commandObj, uint64_t deltaPositionMilliseconds); - -/** - * @brief Media Playback Cluster MediaSkipSeek Command callback - */ - -bool emberAfMediaPlaybackClusterMediaSkipSeekCallback(chip::app::Command * commandObj, uint64_t position); - -/** - * @brief Media Playback Cluster MediaStartOver Command callback - */ - -bool emberAfMediaPlaybackClusterMediaStartOverCallback(chip::app::Command * commandObj); - -/** - * @brief Media Playback Cluster MediaStop Command callback - */ - -bool emberAfMediaPlaybackClusterMediaStopCallback(chip::app::Command * commandObj); - -/** - * @brief On/off Cluster Off Command callback - */ - -bool emberAfOnOffClusterOffCallback(chip::app::Command * commandObj); - -/** - * @brief On/off Cluster On Command callback - */ - -bool emberAfOnOffClusterOnCallback(chip::app::Command * commandObj); - -/** - * @brief On/off Cluster Toggle Command callback - */ - -bool emberAfOnOffClusterToggleCallback(chip::app::Command * commandObj); - -/** - * @brief TV Channel Cluster ChangeChannel Command callback - */ - -bool emberAfTvChannelClusterChangeChannelCallback(chip::app::Command * commandObj, uint8_t * match); - -/** - * @brief TV Channel Cluster ChangeChannelByNumber Command callback - */ - -bool emberAfTvChannelClusterChangeChannelByNumberCallback(chip::app::Command * commandObj, uint16_t majorNumber, - uint16_t minorNumber); - -/** - * @brief TV Channel Cluster SkipChannel Command callback - */ - -bool emberAfTvChannelClusterSkipChannelCallback(chip::app::Command * commandObj, uint16_t Count); - -/** - * @brief Target Navigator Cluster NavigateTarget Command callback - */ - -bool emberAfTargetNavigatorClusterNavigateTargetCallback(chip::app::Command * commandObj, uint8_t target, uint8_t * data); - // // Non-Cluster Related Callbacks // diff --git a/examples/tv-app/tv-common/gen/endpoint_config.h b/examples/tv-app/tv-common/gen/endpoint_config.h index bc4138812aeaa4..a87edcebd52100 100644 --- a/examples/tv-app/tv-common/gen/endpoint_config.h +++ b/examples/tv-app/tv-common/gen/endpoint_config.h @@ -199,146 +199,200 @@ /* 951 - ActiveNetworkFaultsList, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ - \ - /* 955 - bssid, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Wake on LAN (server), big-endian */ \ - \ - /* 961 - wake on lan mac address, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ /* Endpoint: 0, Cluster: TV Channel (server), big-endian */ \ \ - /* 993 - tv channel list, */ \ - 1, 'o', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 955 - tv channel list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1025 - tv channel lineup, */ \ + /* 1209 - tv channel lineup, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1057 - current tv channel, */ \ + /* 1241 - current tv channel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1089 - target navigator list, */ \ + /* 1273 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Media Playback (server), big-endian */ \ - \ - /* 1121 - start time, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ - \ - /* 1129 - duration, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1137 - updated at, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1145 - posistion, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1153 - playback speed, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1161 - seek range end, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1169 - seek range start, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Media Input (server), big-endian */ \ \ - /* 1177 - media input list, */ \ + /* 1527 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Content Launch (server), big-endian */ \ \ - /* 1209 - accepts header list, */ \ + /* 1781 - acceptsHeaderList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2035 - supported streaming types, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Application Launcher (server), big-endian */ \ \ - /* 1241 - application launcher list, */ \ + /* 2289 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 1273 - audio output list, */ \ + /* 2543 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Media Playback (server), big-endian */ \ \ - /* 1305 - start time, */ \ + /* 2797 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1313 - duration, */ \ + /* 2805 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1321 - updated at, */ \ + /* 2813 - updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1329 - posistion, */ \ + /* 2821 - posistion, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1337 - playback speed, */ \ + /* 2829 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1345 - seek range end, */ \ + /* 2837 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1353 - seek range start, */ \ + /* 2845 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Application Basic (server), big-endian */ \ \ - /* 1361 - vendor name, */ \ + /* 2853 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1393 - application name, */ \ + /* 2885 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1425 - application id, */ \ + /* 2917 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Application Basic (server), big-endian */ \ \ - /* 1457 - vendor name, */ \ + /* 2949 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1489 - application name, */ \ + /* 2981 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1521 - application id, */ \ + /* 3013 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), big-endian */ \ \ - /* 1553 - vendor name, */ \ + /* 3045 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1585 - application name, */ \ + /* 3077 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1617 - application id, */ \ + /* 3109 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } @@ -519,153 +573,207 @@ /* 951 - ActiveNetworkFaultsList, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ - \ - /* 955 - bssid, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Wake on LAN (server), little-endian */ \ - \ - /* 961 - wake on lan mac address, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ /* Endpoint: 0, Cluster: TV Channel (server), little-endian */ \ \ - /* 993 - tv channel list, */ \ - 1, 'o', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 955 - tv channel list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1025 - tv channel lineup, */ \ + /* 1209 - tv channel lineup, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1057 - current tv channel, */ \ + /* 1241 - current tv channel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1089 - target navigator list, */ \ + /* 1273 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Media Playback (server), little-endian */ \ - \ - /* 1121 - start time, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ - \ - /* 1129 - duration, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1137 - updated at, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1145 - posistion, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1153 - playback speed, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1161 - seek range end, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1169 - seek range start, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Media Input (server), little-endian */ \ \ - /* 1177 - media input list, */ \ + /* 1527 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Content Launch (server), little-endian */ \ \ - /* 1209 - accepts header list, */ \ + /* 1781 - acceptsHeaderList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2035 - supported streaming types, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Application Launcher (server), little-endian */ \ \ - /* 1241 - application launcher list, */ \ + /* 2289 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 1273 - audio output list, */ \ + /* 2543 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Media Playback (server), little-endian */ \ \ - /* 1305 - start time, */ \ + /* 2797 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1313 - duration, */ \ + /* 2805 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1321 - updated at, */ \ + /* 2813 - updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1329 - posistion, */ \ + /* 2821 - posistion, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1337 - playback speed, */ \ + /* 2829 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1345 - seek range end, */ \ + /* 2837 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1353 - seek range start, */ \ + /* 2845 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Application Basic (server), little-endian */ \ \ - /* 1361 - vendor name, */ \ + /* 2853 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1393 - application name, */ \ + /* 2885 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1425 - application id, */ \ + /* 2917 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Application Basic (server), little-endian */ \ \ - /* 1457 - vendor name, */ \ + /* 2949 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1489 - application name, */ \ + /* 2981 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1521 - application id, */ \ + /* 3013 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), little-endian */ \ \ - /* 1553 - vendor name, */ \ + /* 3045 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1585 - application name, */ \ + /* 3077 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1617 - application id, */ \ + /* 3109 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (76) +#define GENERATED_DEFAULTS_COUNT (68) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -693,7 +801,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 146 +#define GENERATED_ATTRIBUTE_COUNT 123 #define GENERATED_ATTRIBUTES \ { \ \ @@ -701,9 +809,6 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* on/off */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \ \ - /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(0) }, /* NetworkInterfaces */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ @@ -772,50 +877,22 @@ { 0x003E, ZAP_TYPE(ARRAY), 4, 0, ZAP_LONG_DEFAULTS_INDEX(951) }, /* ActiveNetworkFaultsList */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(955) }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 0, Cluster: Color Control (server) */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ - { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ - \ /* Endpoint: 0, Cluster: Wake on LAN (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(961) }, /* wake on lan mac address */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: TV Channel (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(993) }, /* tv channel list */ \ - { 0x0001, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1025) }, /* tv channel lineup */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1057) }, /* current tv channel */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(955) }, /* tv channel list */ \ + { 0x0001, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1209) }, /* tv channel lineup */ \ + { 0x0002, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1241) }, /* current tv channel */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1089) }, /* target navigator list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 0, Cluster: Media Playback (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* playback state */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1121) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1129) }, /* duration */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1137) }, /* updated at */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1145) }, /* posistion */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1153) }, /* playback speed */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1161) }, /* seek range end */ \ - { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1169) }, /* seek range start */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1273) }, /* target navigator list */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1177) }, /* media input list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1527) }, /* media input list */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Low Power (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -824,14 +901,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Content Launch (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1209) }, /* accepts header list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1781) }, /* acceptsHeaderList */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2035) }, /* supported streaming types */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1241) }, /* application launcher list */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* catalog vendor id */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* application id */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2289) }, /* application launcher list */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: On/off (server) */ \ { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* on/off */ \ @@ -841,29 +917,29 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1273) }, /* audio output list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2543) }, /* audio output list */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 2, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1305) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1313) }, /* duration */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1321) }, /* updated at */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1329) }, /* posistion */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1337) }, /* playback speed */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1345) }, /* seek range end */ \ - { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1353) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2797) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2805) }, /* duration */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2813) }, /* updated at */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2821) }, /* posistion */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2829) }, /* playback speed */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2837) }, /* seek range end */ \ + { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2845) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 2, Cluster: Content Launch (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 2, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1361) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2853) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1393) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2885) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1425) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2917) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -872,11 +948,11 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1457) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2949) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1489) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2981) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1521) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3013) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -885,11 +961,11 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1553) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3045) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1585) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3077) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(1617) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3109) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -903,15 +979,12 @@ const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \ (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \ }; \ - const EmberAfGenericClusterFunction chipFuncArrayColorControlServer[] = { \ - (EmberAfGenericClusterFunction) emberAfColorControlClusterServerInitCallback, \ - }; \ const EmberAfGenericClusterFunction chipFuncArrayLevelControlServer[] = { \ (EmberAfGenericClusterFunction) emberAfLevelControlClusterServerInitCallback, \ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 25 +#define GENERATED_CLUSTER_COUNT 21 #define GENERATED_CLUSTERS \ { \ { \ @@ -923,85 +996,70 @@ chipFuncArrayOnOffServer \ }, /* Endpoint: 0, Cluster: On/off (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(2), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(3), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(2), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(6), 61, 730, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(5), 61, 730, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(67), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(73), \ - 6, \ - 11, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ - chipFuncArrayColorControlServer }, /* Endpoint: 0, Cluster: Color Control (server) */ \ - { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(79), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(66), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(81), 4, 98, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(67), 4, 320, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(85), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(71), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(87), 8, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 0, Cluster: Media Playback (server) */ \ - { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(95), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(73), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(97), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(75), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(98), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(76), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(99), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(77), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Content Launch (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(101), 4, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(80), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Application Launcher (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(105), \ + ZAP_ATTRIBUTE_INDEX(82), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(107), \ + ZAP_ATTRIBUTE_INDEX(84), \ 1, \ 1, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(108), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(85), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(110), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(87), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(119), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(96), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Content Launch (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(120), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(97), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(128), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(105), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Account Login (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(129), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(106), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(137), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(114), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launch (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(138), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(115), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ } @@ -1010,8 +1068,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 15, 1348 }, { ZAP_CLUSTER_INDEX(15), 3, 38 }, { ZAP_CLUSTER_INDEX(18), 4, 168 }, \ - { ZAP_CLUSTER_INDEX(22), 1, 105 }, { ZAP_CLUSTER_INDEX(23), 2, 107 }, \ + { ZAP_CLUSTER_INDEX(0), 11, 2595 }, { ZAP_CLUSTER_INDEX(11), 3, 260 }, { ZAP_CLUSTER_INDEX(14), 4, 168 }, \ + { ZAP_CLUSTER_INDEX(18), 1, 105 }, { ZAP_CLUSTER_INDEX(19), 2, 107 }, \ } // Largest attribute size is needed for various buffers @@ -1021,7 +1079,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (0) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1766) +#define ATTRIBUTE_MAX_SIZE (3235) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (5) @@ -1065,7 +1123,7 @@ // Array of EmberAfCommandMetadata structs. #define ZAP_COMMAND_MASK(mask) COMMAND_MASK_##mask -#define EMBER_AF_GENERATED_COMMAND_COUNT (99) +#define EMBER_AF_GENERATED_COMMAND_COUNT (68) #define GENERATED_COMMANDS \ { \ \ @@ -1074,19 +1132,6 @@ { 0x0006, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On */ \ { 0x0006, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Toggle */ \ \ - /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0030, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ArmFailSafe */ \ - { 0x0030, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ArmFailSafeResponse */ \ - { 0x0030, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* SetRegulatoryConfig */ \ - { 0x0030, 0x03, ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetRegulatoryConfigResponse */ \ - { 0x0030, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* CommissioningComplete */ \ - { 0x0030, 0x05, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* CommissioningCompleteResponse */ \ - \ - /* Endpoint: 0, Cluster: Color Control (server) */ \ - { 0x0300, 0x07, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MoveToColor */ \ - { 0x0300, 0x08, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MoveColor */ \ - { 0x0300, 0x09, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* StepColor */ \ - \ /* Endpoint: 0, Cluster: TV Channel (server) */ \ { 0x0504, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ChangeChannel */ \ { 0x0504, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ChangeChannelResponse */ \ @@ -1097,30 +1142,6 @@ { 0x0505, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* NavigateTarget */ \ { 0x0505, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* NavigateTargetResponse */ \ \ - /* Endpoint: 0, Cluster: Media Playback (server) */ \ - { 0x0506, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaPlay */ \ - { 0x0506, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaPlayResponse */ \ - { 0x0506, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaPause */ \ - { 0x0506, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaPauseResponse */ \ - { 0x0506, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaStop */ \ - { 0x0506, 0x02, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaStopResponse */ \ - { 0x0506, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaStartOver */ \ - { 0x0506, 0x03, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaStartOverResponse */ \ - { 0x0506, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaPrevious */ \ - { 0x0506, 0x04, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaPreviousResponse */ \ - { 0x0506, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaNext */ \ - { 0x0506, 0x05, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaNextResponse */ \ - { 0x0506, 0x06, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaRewind */ \ - { 0x0506, 0x06, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaRewindResponse */ \ - { 0x0506, 0x07, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaFastForward */ \ - { 0x0506, 0x07, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaFastForwardResponse */ \ - { 0x0506, 0x08, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipForward */ \ - { 0x0506, 0x08, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipForwardResponse */ \ - { 0x0506, 0x09, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipBackward */ \ - { 0x0506, 0x09, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipBackwardResponse */ \ - { 0x0506, 0x0A, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipSeek */ \ - { 0x0506, 0x0A, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipSeekResponse */ \ - \ /* Endpoint: 0, Cluster: Media Input (server) */ \ { 0x0507, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* SelectInput */ \ { 0x0507, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ShowInputStatus */ \ @@ -1237,10 +1258,10 @@ #define ZAP_REPORT_DIRECTION(x) ZRD(x) // User options for plugin Reporting -#define EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE (5) +#define EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE (3) #define EMBER_AF_PLUGIN_REPORTING_ENABLE_GROUP_BOUND_REPORTS -#define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (5) +#define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (3) #define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS \ { \ \ @@ -1249,14 +1270,6 @@ ZAP_REPORT_DIRECTION(REPORTED), 0x0000, 0x0006, 0x0000, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ }, /* on/off */ \ \ - /* Endpoint: 0, Cluster: Color Control (server) */ \ - { \ - ZAP_REPORT_DIRECTION(REPORTED), 0x0000, 0x0300, 0x0003, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ - }, /* current x */ \ - { \ - ZAP_REPORT_DIRECTION(REPORTED), 0x0000, 0x0300, 0x0004, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ - }, /* current y */ \ - \ /* Endpoint: 1, Cluster: On/off (server) */ \ { \ ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0006, 0x0000, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ diff --git a/examples/tv-app/tv-common/gen/gen_config.h b/examples/tv-app/tv-common/gen/gen_config.h index 65119227c498cf..39bb672a9f4321 100644 --- a/examples/tv-app/tv-common/gen/gen_config.h +++ b/examples/tv-app/tv-common/gen/gen_config.h @@ -33,21 +33,18 @@ #define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_APPLICATION_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_AUDIO_OUTPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (3) -#define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_TV_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_WAKE_ON_LAN_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ @@ -71,25 +68,11 @@ #define EMBER_AF_PLUGIN_AUDIO_OUTPUT_SERVER #define EMBER_AF_PLUGIN_AUDIO_OUTPUT -// Use this macro to check if the server side of the Color Control cluster is included -#define ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER -#define EMBER_AF_PLUGIN_COLOR_CONTROL -// User options for server plugin Color Control -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_XY -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP -#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV - // Use this macro to check if the server side of the Content Launch cluster is included #define ZCL_USING_CONTENT_LAUNCH_CLUSTER_SERVER #define EMBER_AF_PLUGIN_CONTENT_LAUNCH_SERVER #define EMBER_AF_PLUGIN_CONTENT_LAUNCH -// Use this macro to check if the server side of the General Commissioning cluster is included -#define ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER -#define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING - // Use this macro to check if the server side of the General Diagnostics cluster is included #define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER @@ -148,8 +131,3 @@ #define ZCL_USING_WAKE_ON_LAN_CLUSTER_SERVER #define EMBER_AF_PLUGIN_WAKE_ON_LAN_SERVER #define EMBER_AF_PLUGIN_WAKE_ON_LAN - -// Use this macro to check if the server side of the WiFi Network Diagnostics cluster is included -#define ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_WI_FI_NETWORK_DIAGNOSTICS_SERVER -#define EMBER_AF_PLUGIN_WI_FI_NETWORK_DIAGNOSTICS diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 4f1372905bf502..1b3d350d413ffd 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -37,257 +37,15 @@ "deviceTypeProfileId": 2457, "clusters": [ { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "IdentifyQuery", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "IdentifyQueryResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "identify time", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewGroupResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "name support", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, + "name": "On/off", + "code": 6, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "AddScene", + "name": "Off", "code": 0, "mfgCode": null, "source": "client", @@ -295,7 +53,7 @@ "outgoing": 1 }, { - "name": "ViewScene", + "name": "On", "code": 1, "mfgCode": null, "source": "client", @@ -303,1425 +61,203 @@ "outgoing": 1 }, { - "name": "RemoveScene", + "name": "Toggle", "code": 2, "mfgCode": null, "source": "client", "incoming": 0, "outgoing": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 } ], "attributes": [ { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "scene count", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current scene", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current group", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "scene valid", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "name support", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "on/off", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "current level", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfig", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ArmFailSafeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "CommissioningCompleteResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Diagnostics", - "code": 51, - "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Diagnostics", - "code": 51, - "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "NetworkInterfaces", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RebootCount", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "channel", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RoutingRole", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NetworkName", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PanId", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ExtendedPanId", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MeshLocalPrefix", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OverrunCount", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NeighborTableList", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RouteTableList", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartitionId", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "weighting", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DataVersion", - "code": 11, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StableDataVersion", - "code": 12, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LeaderRouterId", - "code": 13, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DetachedRoleCount", - "code": 14, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ChildRoleCount", - "code": 15, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RouterRoleCount", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LeaderRoleCount", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "AttachAttemptCount", - "code": 18, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartitionIdChangeCount", - "code": 19, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BetterPartitionAttachAttemptCount", - "code": 20, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ParentChangeCount", - "code": 21, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxTotalCount", - "code": 22, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxUnicastCount", - "code": 23, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBroadcastCount", - "code": 24, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxAckRequestedCount", - "code": 25, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxAckedCount", - "code": 26, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxNoAckRequestedCount", - "code": 27, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDataCount", - "code": 28, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDataPollCount", - "code": 29, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBeaconCount", - "code": 30, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBeaconRequestCount", - "code": 31, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxOtherCount", - "code": 32, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxRetryCount", - "code": 33, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDirectMaxRetryExpiryCount", - "code": 34, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxIndirectMaxRetryExpiryCount", - "code": 35, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrCcaCount", - "code": 36, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrAbortCount", - "code": 37, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrBusyChannelCount", - "code": 38, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxTotalCount", - "code": 39, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxUnicastCount", - "code": 40, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxBroadcastCount", - "code": 41, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDataCount", - "code": 42, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDataPollCount", - "code": 43, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxBeaconCount", - "code": 44, + "name": "cluster revision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "2", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "On/off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ { - "name": "RxBeaconRequestCount", - "code": 45, + "name": "on/off", + "code": 0, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, + "defaultValue": "0x00", + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxOtherCount", - "code": 46, + "name": "cluster revision", + "code": 65533, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "2", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Wake on LAN", + "code": 1283, + "mfgCode": null, + "define": "WAKE_ON_LAN_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ { - "name": "RxAddressFilteredCount", - "code": 47, + "name": "cluster revision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0001", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 + } + ] + }, + { + "name": "Wake on LAN", + "code": 1283, + "mfgCode": null, + "define": "WAKE_ON_LAN_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 }, { - "name": "RxDestAddrFilteredCount", - "code": 48, + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0001", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ { - "name": "RxDuplicatedCount", - "code": 49, + "name": "cluster revision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0001", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ { - "name": "RxErrNoFrameCount", - "code": 50, + "name": "NetworkInterfaces", + "code": 0, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrUnknownNeighborCount", - "code": 51, + "name": "RebootCount", + "code": 1, "mfgCode": null, "side": "server", "included": 1, @@ -1735,83 +271,105 @@ "reportableChange": 0 }, { - "name": "RxErrInvalidSrcAddrCount", - "code": 52, + "name": "cluster revision", + "code": 65533, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0001", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ { - "name": "RxErrSecCount", - "code": 53, + "name": "cluster revision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0001", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ { - "name": "RxErrFcsCount", - "code": 54, + "name": "channel", + "code": 0, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrOtherCount", - "code": 55, + "name": "RoutingRole", + "code": 1, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SecurityPolicy", - "code": 59, + "name": "NetworkName", + "code": 2, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChannelMask", - "code": 60, + "name": "PanId", + "code": 3, "mfgCode": null, "side": "server", "included": 1, @@ -1825,23 +383,23 @@ "reportableChange": 0 }, { - "name": "OperationalDatasetComponents", - "code": 61, + "name": "ExtendedPanId", + "code": 4, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ActiveNetworkFaultsList", - "code": 62, + "name": "MeshLocalPrefix", + "code": 5, "mfgCode": null, "side": "server", "included": 1, @@ -1855,60 +413,38 @@ "reportableChange": 0 }, { - "name": "cluster revision", - "code": 65533, + "name": "OverrunCount", + "code": 6, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "0x0000000000000000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ + }, { - "name": "cluster revision", - "code": 65533, + "name": "NeighborTableList", + "code": 7, "mfgCode": null, - "side": "client", + "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { - "name": "bssid", - "code": 0, + "name": "RouteTableList", + "code": 8, "mfgCode": null, "side": "server", "included": 1, @@ -1922,8 +458,8 @@ "reportableChange": 0 }, { - "name": "SecurityType", - "code": 1, + "name": "PartitionId", + "code": 9, "mfgCode": null, "side": "server", "included": 1, @@ -1937,8 +473,8 @@ "reportableChange": 0 }, { - "name": "WiFiVersion", - "code": 2, + "name": "weighting", + "code": 10, "mfgCode": null, "side": "server", "included": 1, @@ -1952,855 +488,713 @@ "reportableChange": 0 }, { - "name": "ChannelNumber", - "code": 3, + "name": "DataVersion", + "code": 11, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Rssi", - "code": 4, + "name": "StableDataVersion", + "code": 12, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "cluster revision", - "code": 65533, + "name": "LeaderRouterId", + "code": 13, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Door Lock", - "code": 257, - "mfgCode": null, - "define": "DOOR_LOCK_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "LockDoor", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 }, { - "name": "UnlockDoor", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, + "name": "DetachedRoleCount", + "code": 14, "mfgCode": null, - "side": "client", + "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Door Lock", - "code": 257, - "mfgCode": null, - "define": "DOOR_LOCK_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "LockDoorResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 }, { - "name": "UnlockDoorResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "lock state", - "code": 0, + "name": "ChildRoleCount", + "code": 15, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "lock type", - "code": 1, + "name": "RouterRoleCount", + "code": 16, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "actuator enabled", - "code": 2, + "name": "LeaderRoleCount", + "code": 17, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "door state", - "code": 3, + "name": "AttachAttemptCount", + "code": 18, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "enable logging", - "code": 32, + "name": "PartitionIdChangeCount", + "code": 19, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "language", - "code": 33, + "name": "BetterPartitionAttachAttemptCount", + "code": 20, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "led settings", - "code": 34, + "name": "ParentChangeCount", + "code": 21, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "auto relock time", - "code": 35, + "name": "TxTotalCount", + "code": 22, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "sound volume", - "code": 36, + "name": "TxUnicastCount", + "code": 23, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "operating mode", - "code": 37, + "name": "TxBroadcastCount", + "code": 24, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "default configuration register", - "code": 39, + "name": "TxAckRequestedCount", + "code": 25, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "enable local programming", - "code": 40, + "name": "TxAckedCount", + "code": 26, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "enable one touch locking", - "code": 41, + "name": "TxNoAckRequestedCount", + "code": 27, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "enable inside status led", - "code": 42, + "name": "TxDataCount", + "code": 28, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "enable privacy mode button", - "code": 43, + "name": "TxDataPollCount", + "code": 29, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "wrong code entry limit", - "code": 48, + "name": "TxBeaconCount", + "code": 30, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "user code temporary disable time", - "code": 49, + "name": "TxBeaconRequestCount", + "code": 31, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "send pin over the air", - "code": 50, + "name": "TxOtherCount", + "code": 32, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "require pin for rf operation", - "code": 51, + "name": "TxRetryCount", + "code": 33, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "zigbee security level", - "code": 52, + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "alarm mask", - "code": 64, + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "keypad operation event mask", - "code": 65, + "name": "TxErrCcaCount", + "code": 36, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RF operation event mask", - "code": 66, + "name": "TxErrAbortCount", + "code": 37, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "manual operation event mask", - "code": 67, + "name": "TxErrBusyChannelCount", + "code": 38, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "rfid operation event mask", - "code": 68, + "name": "RxTotalCount", + "code": 39, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "keypad programming event mask", - "code": 69, + "name": "RxUnicastCount", + "code": 40, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "rf programming event mask", - "code": 70, + "name": "RxBroadcastCount", + "code": 41, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "rfid programming event mask", - "code": 71, + "name": "RxDataCount", + "code": 42, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "cluster revision", - "code": 65533, + "name": "RxDataPollCount", + "code": 43, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Barrier Control", - "code": 259, - "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "BarrierControlGoToPercent", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 }, { - "name": "BarrierControlStop", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, + "name": "RxBeaconCount", + "code": 44, "mfgCode": null, - "side": "client", + "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Barrier Control", - "code": 259, - "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ + }, { - "name": "barrier moving state", - "code": 1, + "name": "RxBeaconRequestCount", + "code": 45, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "barrier safety status", - "code": 2, + "name": "RxOtherCount", + "code": 46, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "barrier capabilities", - "code": 3, + "name": "RxAddressFilteredCount", + "code": 47, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "barrier position", - "code": 10, + "name": "RxDestAddrFilteredCount", + "code": 48, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "cluster revision", - "code": 65533, + "name": "RxDuplicatedCount", + "code": 49, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToColor", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "MoveColor", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 }, { - "name": "StepColor", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, + "name": "RxErrNoFrameCount", + "code": 50, "mfgCode": null, - "side": "client", + "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ + }, { - "name": "current hue", - "code": 0, + "name": "RxErrUnknownNeighborCount", + "code": 51, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "current saturation", - "code": 1, + "name": "RxErrInvalidSrcAddrCount", + "code": 52, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "current x", - "code": 3, + "name": "RxErrSecCount", + "code": 53, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x616B", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "current y", - "code": 4, + "name": "RxErrFcsCount", + "code": 54, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x607D", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "color temperature", - "code": 7, + "name": "RxErrOtherCount", + "code": 55, "mfgCode": null, "side": "server", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00FA", - "reportable": 1, + "defaultValue": "0x0000", + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "color control options", - "code": 15, + "name": "SecurityPolicy", + "code": 59, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "couple color temp to level min-mireds", - "code": 16397, + "name": "ChannelMask", + "code": 60, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "start up color temperature mireds", - "code": 16400, + "name": "OperationalDatasetComponents", + "code": 61, "mfgCode": null, "side": "server", "included": 1, @@ -2814,36 +1208,25 @@ "reportableChange": 0 }, { - "name": "cluster revision", - "code": 65533, + "name": "ActiveNetworkFaultsList", + "code": 62, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Wake on LAN", - "code": 1283, - "mfgCode": null, - "define": "WAKE_ON_LAN_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ + }, { "name": "cluster revision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2857,12 +1240,12 @@ ] }, { - "name": "Wake on LAN", - "code": 1283, + "name": "WiFi Network Diagnostics", + "code": 54, "mfgCode": null, - "define": "WAKE_ON_LAN_CLUSTER", - "side": "server", - "enabled": 1, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, "commands": [], "attributes": [ { @@ -2910,27 +1293,43 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 }, { "name": "ChangeChannelByNumber", "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 }, { "name": "SkipChannel", "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 } ], - "attributes": [] + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] }, { "name": "TV Channel", @@ -2946,7 +1345,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 1 + "outgoing": 0 } ], "attributes": [ @@ -2959,7 +1358,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "o", + "defaultValue": "", "reportable": 0, "minInterval": 0, "maxInterval": 65344, @@ -3025,7 +1424,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 } ], @@ -3061,7 +1460,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 1 + "outgoing": 0 } ], "attributes": [ @@ -3110,7 +1509,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3118,7 +1517,7 @@ "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3126,7 +1525,7 @@ "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3134,7 +1533,7 @@ "code": 3, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3142,7 +1541,7 @@ "code": 4, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3150,7 +1549,7 @@ "code": 5, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3158,7 +1557,7 @@ "code": 6, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3166,7 +1565,7 @@ "code": 7, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3174,7 +1573,7 @@ "code": 8, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3182,7 +1581,7 @@ "code": 9, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3190,8 +1589,8 @@ "code": 10, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 } ], "attributes": [ @@ -3218,7 +1617,7 @@ "mfgCode": null, "define": "MEDIA_PLAYBACK_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "MediaPlayResponse", @@ -3226,205 +1625,100 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { "name": "MediaPauseResponse", "code": 1, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaStopResponse", "code": 2, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaStartOverResponse", "code": 3, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaPreviousResponse", "code": 4, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaNextResponse", "code": 5, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaRewindResponse", "code": 6, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaFastForwardResponse", "code": 7, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaSkipForwardResponse", "code": 8, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaSkipBackwardResponse", "code": 9, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 }, { "name": "MediaSkipSeekResponse", "code": 10, "mfgCode": null, "source": "server", - "incoming": 0, - "outgoing": 1 + "incoming": 1, + "outgoing": 0 } ], "attributes": [ { - "name": "playback state", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "start time", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFF", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "duration", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "updated at", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "posistion", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "playback speed", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "seek range end", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "seek range start", - "code": 7, + "name": "cluster revision", + "code": 65533, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0001", "reportable": 0, "minInterval": 0, "maxInterval": 65344, @@ -3445,7 +1739,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3453,24 +1747,24 @@ "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 }, { "name": "HideInputStatus", "code": 2, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 }, { "name": "RenameInput", "code": 3, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 0 + "incoming": 0, + "outgoing": 1 } ], "attributes": [ @@ -3545,7 +1839,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 } ], @@ -3606,7 +1900,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 } ], @@ -3642,7 +1936,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 1 + "outgoing": 0 } ], "attributes": [ @@ -3676,7 +1970,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { @@ -3684,7 +1978,7 @@ "code": 1, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 } ], @@ -3720,7 +2014,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { "name": "LaunchURLResponse", @@ -3728,7 +2022,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 1 + "outgoing": 0 } ], "attributes": [ @@ -3747,6 +2041,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "supported streaming types", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { "name": "cluster revision", "code": 65533, @@ -3777,7 +2086,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 } ], @@ -3813,7 +2122,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 1 + "outgoing": 0 } ], "attributes": [ @@ -3832,36 +2141,6 @@ "maxInterval": 65344, "reportableChange": 0 }, - { - "name": "catalog vendor id", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "application id", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "cluster revision", "code": 65533, @@ -7480,7 +5759,7 @@ "profileId": 2457, "endpointId": 0, "networkId": 0, - "endpointVersion": null, + "endpointVersion": 1, "deviceIdentifier": null }, { diff --git a/examples/window-app/common/gen/af-structs.h b/examples/window-app/common/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/examples/window-app/common/gen/af-structs.h +++ b/examples/window-app/common/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/src/app/chip-zcl-zpro-codec-api.h b/src/app/chip-zcl-zpro-codec-api.h index 43dbc2b89fa45e..1e7b85b0b66b24 100644 --- a/src/app/chip-zcl-zpro-codec-api.h +++ b/src/app/chip-zcl-zpro-codec-api.h @@ -1298,7 +1298,7 @@ chip::System::PacketBufferHandle encodeContentLaunchClusterDiscoverAttributes(ui /** * @brief - * Encode a Content Launch server read command for the accepts header list attribute into buffer including the APS frame + * Encode a Content Launch server read command for the acceptsHeaderList attribute into buffer including the APS frame */ chip::System::PacketBufferHandle encodeContentLaunchClusterReadAcceptsHeaderListAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); diff --git a/src/app/zap-templates/zcl/application-launcher-cluster.xml b/src/app/zap-templates/zcl/application-launcher-cluster.xml index c9fb0e4480a8d6..011455c4925de9 100644 --- a/src/app/zap-templates/zcl/application-launcher-cluster.xml +++ b/src/app/zap-templates/zcl/application-launcher-cluster.xml @@ -25,8 +25,7 @@ limitations under the License. true This cluster provides an interface for launching content on a media player device such as a TV or Speaker. - - application launcher list + application launcher list catalog vendor id application id diff --git a/src/app/zap-templates/zcl/audio-output-cluster.xml b/src/app/zap-templates/zcl/audio-output-cluster.xml index 4ec6a99eb7225a..2caa71c2278db7 100644 --- a/src/app/zap-templates/zcl/audio-output-cluster.xml +++ b/src/app/zap-templates/zcl/audio-output-cluster.xml @@ -25,8 +25,7 @@ limitations under the License. true This cluster provides an interface for controlling the Output on a media device such as a TV. - - audio output list + audio output list current audio output @@ -45,7 +44,7 @@ limitations under the License. - + // Change this to CHAR_STRING once it is supported #6112 diff --git a/src/app/zap-templates/zcl/content-launch-cluster.xml b/src/app/zap-templates/zcl/content-launch-cluster.xml index 752f6a288831ce..8f46f5c6ca5c18 100644 --- a/src/app/zap-templates/zcl/content-launch-cluster.xml +++ b/src/app/zap-templates/zcl/content-launch-cluster.xml @@ -26,11 +26,9 @@ limitations under the License. This cluster provides an interface for launching content on a media player device such as a TV or Speaker. - - accepts header list - supported streaming types + acceptsHeaderList + supported streaming types - Upon receipt, this SHALL launch the specified content with optional search criteria. diff --git a/src/app/zap-templates/zcl/media-input-cluster.xml b/src/app/zap-templates/zcl/media-input-cluster.xml index 98e3c0ebdacb2f..89f2a1c3d37666 100644 --- a/src/app/zap-templates/zcl/media-input-cluster.xml +++ b/src/app/zap-templates/zcl/media-input-cluster.xml @@ -25,8 +25,7 @@ limitations under the License. true This cluster provides an interface for controlling the Input Selector on a media device such as a TV. - - media input list + media input list current media input @@ -53,8 +52,8 @@ limitations under the License. - - + // Change this to CHAR_STRING once it is supported #6112 + // Change this to CHAR_STRING once it is supported #6112 diff --git a/src/app/zap-templates/zcl/target-navigator-cluster.xml b/src/app/zap-templates/zcl/target-navigator-cluster.xml index 5d702c1163cb90..da4b98e06ef27e 100644 --- a/src/app/zap-templates/zcl/target-navigator-cluster.xml +++ b/src/app/zap-templates/zcl/target-navigator-cluster.xml @@ -25,8 +25,7 @@ limitations under the License. true This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. - - target navigator list + target navigator list current navigator target @@ -50,6 +49,6 @@ limitations under the License. - + // Change this to CHAR_STRING once it is supported #6112 diff --git a/src/app/zap-templates/zcl/tv-channel-cluster.xml b/src/app/zap-templates/zcl/tv-channel-cluster.xml index d3aa69ba130fa2..55a15fbb32c055 100644 --- a/src/app/zap-templates/zcl/tv-channel-cluster.xml +++ b/src/app/zap-templates/zcl/tv-channel-cluster.xml @@ -25,8 +25,7 @@ limitations under the License. true This cluster provides an interface for controlling the current TV Channel on a device. - - tv channel list + tv channel list tv channel lineup @@ -59,9 +58,9 @@ limitations under the License. - - - + // Change this to CHAR_STRING once it is supported #6112 + // Change this to CHAR_STRING once it is supported #6112 + // Change this to CHAR_STRING once it is supported #6112 diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp index 8895866eee0713..71f51acb93e397 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -210,16 +210,6 @@ CHIP_ERROR chip_ime_AppendCommand_ApplicationLauncher_LaunchApp(chip::Controller chip::ByteSpan(applicationId, applicationId_Len)); } -CHIP_ERROR chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeApplicationLauncherList(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); -} - CHIP_ERROR chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) @@ -250,15 +240,6 @@ CHIP_ERROR chip_ime_AppendCommand_AudioOutput_SelectOutput(chip::Controller::Dev return cluster.SelectOutput(nullptr, nullptr, index); } -CHIP_ERROR chip_ime_ReadAttribute_AudioOutput_AudioOutputList(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - chip::Controller::AudioOutputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeAudioOutputList(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); -} - CHIP_ERROR chip_ime_ReadAttribute_AudioOutput_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1209,25 +1190,6 @@ CHIP_ERROR chip_ime_AppendCommand_ContentLaunch_LaunchURL(chip::Controller::Devi chip::ByteSpan(displayString, displayString_Len)); } -CHIP_ERROR chip_ime_ReadAttribute_ContentLaunch_AcceptsHeaderList(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - chip::Controller::ContentLaunchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeAcceptsHeaderList(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); -} - -CHIP_ERROR chip_ime_ReadAttribute_ContentLaunch_SupportedStreamingTypes(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - chip::Controller::ContentLaunchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSupportedStreamingTypes(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); -} - CHIP_ERROR chip_ime_ReadAttribute_ContentLaunch_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1870,15 +1832,6 @@ CHIP_ERROR chip_ime_AppendCommand_MediaInput_ShowInputStatus(chip::Controller::D return cluster.ShowInputStatus(nullptr, nullptr); } -CHIP_ERROR chip_ime_ReadAttribute_MediaInput_MediaInputList(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMediaInputList(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); -} - CHIP_ERROR chip_ime_ReadAttribute_MediaInput_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2500,15 +2453,6 @@ CHIP_ERROR chip_ime_AppendCommand_TvChannel_SkipChannel(chip::Controller::Device return cluster.SkipChannel(nullptr, nullptr, count); } -CHIP_ERROR chip_ime_ReadAttribute_TvChannel_TvChannelList(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTvChannelList(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); -} - CHIP_ERROR chip_ime_ReadAttribute_TvChannel_TvChannelLineup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2549,16 +2493,6 @@ CHIP_ERROR chip_ime_AppendCommand_TargetNavigator_NavigateTarget(chip::Controlle return cluster.NavigateTarget(nullptr, nullptr, target, chip::ByteSpan(data, data_Len)); } -CHIP_ERROR chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - chip::Controller::TargetNavigatorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTargetNavigatorList(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); -} - CHIP_ERROR chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 6c95844386c74f..cfb3e2e19c7233 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -641,11 +641,9 @@ def ListClusterAttributes(self): "ClusterRevision", ], "ApplicationLauncher": [ - "ApplicationLauncherList", "ClusterRevision", ], "AudioOutput": [ - "AudioOutputList", "ClusterRevision", ], "BarrierControl": [ @@ -732,8 +730,6 @@ def ListClusterAttributes(self): "ClusterRevision", ], "ContentLaunch": [ - "AcceptsHeaderList", - "SupportedStreamingTypes", "ClusterRevision", ], "Descriptor": [ @@ -776,7 +772,6 @@ def ListClusterAttributes(self): "ClusterRevision", ], "MediaInput": [ - "MediaInputList", "ClusterRevision", ], "MediaPlayback": [ @@ -816,13 +811,11 @@ def ListClusterAttributes(self): "ClusterRevision", ], "TvChannel": [ - "TvChannelList", "TvChannelLineup", "CurrentTvChannel", "ClusterRevision", ], "TargetNavigator": [ - "TargetNavigatorList", "ClusterRevision", ], "TemperatureMeasurement": [ @@ -1469,12 +1462,8 @@ def ClusterApplicationBasic_ReadAttributeApplicationSatus(self, device: ctypes.c return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationSatus(device, ZCLendpoint, ZCLgroupid) def ClusterApplicationBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - def ClusterApplicationLauncher_ReadAttributeApplicationLauncherList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(device, ZCLendpoint, ZCLgroupid) def ClusterApplicationLauncher_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - def ClusterAudioOutput_ReadAttributeAudioOutputList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList(device, ZCLendpoint, ZCLgroupid) def ClusterAudioOutput_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision(device, ZCLendpoint, ZCLgroupid) def ClusterBarrierControl_ReadAttributeBarrierMovingState(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): @@ -1637,10 +1626,6 @@ def ClusterColorControl_ReadAttributeStartUpColorTemperatureMireds(self, device: return self._chipLib.chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(device, ZCLendpoint, ZCLgroupid) def ClusterColorControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_ColorControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - def ClusterContentLaunch_ReadAttributeAcceptsHeaderList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ContentLaunch_AcceptsHeaderList(device, ZCLendpoint, ZCLgroupid) - def ClusterContentLaunch_ReadAttributeSupportedStreamingTypes(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ContentLaunch_SupportedStreamingTypes(device, ZCLendpoint, ZCLgroupid) def ClusterContentLaunch_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_ContentLaunch_ClusterRevision(device, ZCLendpoint, ZCLgroupid) def ClusterDescriptor_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): @@ -1685,8 +1670,6 @@ def ClusterLevelControl_ReadAttributeClusterRevision(self, device: ctypes.c_void return self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid) def ClusterLowPower_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_LowPower_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - def ClusterMediaInput_ReadAttributeMediaInputList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList(device, ZCLendpoint, ZCLgroupid) def ClusterMediaInput_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision(device, ZCLendpoint, ZCLgroupid) def ClusterMediaPlayback_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): @@ -1739,16 +1722,12 @@ def ClusterSwitch_ConfigureAttributeCurrentPosition(self, device: ctypes.c_void_ return self._chipLib.chip_ime_ConfigureAttribute_Switch_CurrentPosition(device, ZCLendpoint, minInterval, maxInterval, change) def ClusterSwitch_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_Switch_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - def ClusterTvChannel_ReadAttributeTvChannelList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList(device, ZCLendpoint, ZCLgroupid) def ClusterTvChannel_ReadAttributeTvChannelLineup(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup(device, ZCLendpoint, ZCLgroupid) def ClusterTvChannel_ReadAttributeCurrentTvChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(device, ZCLendpoint, ZCLgroupid) def ClusterTvChannel_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_TvChannel_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - def ClusterTargetNavigator_ReadAttributeTargetNavigatorList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(device, ZCLendpoint, ZCLgroupid) def ClusterTargetNavigator_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(device, ZCLendpoint, ZCLgroupid) def ClusterTemperatureMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): @@ -1892,9 +1871,6 @@ def InitLib(self, chipLib): # Cluster ApplicationLauncher Command LaunchApp self._chipLib.chip_ime_AppendCommand_ApplicationLauncher_LaunchApp.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32] self._chipLib.chip_ime_AppendCommand_ApplicationLauncher_LaunchApp.restype = ctypes.c_uint32 - # Cluster ApplicationLauncher ReadAttribute ApplicationLauncherList - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList.restype = ctypes.c_uint32 # Cluster ApplicationLauncher ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision.restype = ctypes.c_uint32 @@ -1905,9 +1881,6 @@ def InitLib(self, chipLib): # Cluster AudioOutput Command SelectOutput self._chipLib.chip_ime_AppendCommand_AudioOutput_SelectOutput.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8] self._chipLib.chip_ime_AppendCommand_AudioOutput_SelectOutput.restype = ctypes.c_uint32 - # Cluster AudioOutput ReadAttribute AudioOutputList - self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList.restype = ctypes.c_uint32 # Cluster AudioOutput ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision.restype = ctypes.c_uint32 @@ -2219,12 +2192,6 @@ def InitLib(self, chipLib): # Cluster ContentLaunch Command LaunchURL self._chipLib.chip_ime_AppendCommand_ContentLaunch_LaunchURL.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32] self._chipLib.chip_ime_AppendCommand_ContentLaunch_LaunchURL.restype = ctypes.c_uint32 - # Cluster ContentLaunch ReadAttribute AcceptsHeaderList - self._chipLib.chip_ime_ReadAttribute_ContentLaunch_AcceptsHeaderList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ContentLaunch_AcceptsHeaderList.restype = ctypes.c_uint32 - # Cluster ContentLaunch ReadAttribute SupportedStreamingTypes - self._chipLib.chip_ime_ReadAttribute_ContentLaunch_SupportedStreamingTypes.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ContentLaunch_SupportedStreamingTypes.restype = ctypes.c_uint32 # Cluster ContentLaunch ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_ContentLaunch_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_ContentLaunch_ClusterRevision.restype = ctypes.c_uint32 @@ -2446,9 +2413,6 @@ def InitLib(self, chipLib): # Cluster MediaInput Command ShowInputStatus self._chipLib.chip_ime_AppendCommand_MediaInput_ShowInputStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_AppendCommand_MediaInput_ShowInputStatus.restype = ctypes.c_uint32 - # Cluster MediaInput ReadAttribute MediaInputList - self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList.restype = ctypes.c_uint32 # Cluster MediaInput ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision.restype = ctypes.c_uint32 @@ -2652,9 +2616,6 @@ def InitLib(self, chipLib): # Cluster TvChannel Command SkipChannel self._chipLib.chip_ime_AppendCommand_TvChannel_SkipChannel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] self._chipLib.chip_ime_AppendCommand_TvChannel_SkipChannel.restype = ctypes.c_uint32 - # Cluster TvChannel ReadAttribute TvChannelList - self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList.restype = ctypes.c_uint32 # Cluster TvChannel ReadAttribute TvChannelLineup self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup.restype = ctypes.c_uint32 @@ -2668,9 +2629,6 @@ def InitLib(self, chipLib): # Cluster TargetNavigator Command NavigateTarget self._chipLib.chip_ime_AppendCommand_TargetNavigator_NavigateTarget.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32] self._chipLib.chip_ime_AppendCommand_TargetNavigator_NavigateTarget.restype = ctypes.c_uint32 - # Cluster TargetNavigator ReadAttribute TargetNavigatorList - self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList.restype = ctypes.c_uint32 # Cluster TargetNavigator ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision.restype = ctypes.c_uint32 diff --git a/src/controller/python/gen/CHIPClientCallbacks.cpp b/src/controller/python/gen/CHIPClientCallbacks.cpp index 4f8690aac49846..cc5bd5b5184f17 100644 --- a/src/controller/python/gen/CHIPClientCallbacks.cpp +++ b/src/controller/python/gen/CHIPClientCallbacks.cpp @@ -419,6 +419,91 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * messag switch (clusterId) { + case 0x050C: + switch (attributeId) + { + case 0x0000: // INT16U + { + uint16_t data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(2); + data[i] = emberAfGetInt16u(message, 0, 2); + message += 2; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; + case 0x050B: + switch (attributeId) + { + case 0x0000: // AudioOutputInfo + { + _AudioOutputInfo data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(1); + data[i].index = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_MESSAGE_LENGTH(1); + data[i].outputType = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].name)); + messageLen -= 34; + message += 34; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; + case 0x050A: + switch (attributeId) + { + case 0x0000: // OCTET_STRING + { + chip::ByteSpan data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_STATUS(ReadByteSpan(message, messageLen, &data[i])); + uint16_t entryLength = static_cast(data[i].size() + kByteSpanSizeLengthInBytes); + messageLen -= entryLength; + message += entryLength; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + case 0x0001: // ContentLaunchStreamingType + { + uint8_t data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(1); + data[i] = emberAfGetInt8u(message, 0, 1); + message += 1; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; case 0x001D: switch (attributeId) { @@ -576,6 +661,35 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * messag } } break; + case 0x0507: + switch (attributeId) + { + case 0x0000: // MediaInputInfo + { + _MediaInputInfo data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(1); + data[i].index = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_MESSAGE_LENGTH(1); + data[i].inputType = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].name)); + messageLen -= 34; + message += 34; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].description)); + messageLen -= 34; + message += 34; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; case 0x003E: switch (attributeId) { @@ -603,6 +717,62 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * messag } } break; + case 0x0504: + switch (attributeId) + { + case 0x0000: // TvChannelInfo + { + _TvChannelInfo data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(2); + data[i].majorNumber = emberAfGetInt16u(message, 0, 2); + message += 2; + CHECK_MESSAGE_LENGTH(2); + data[i].minorNumber = emberAfGetInt16u(message, 0, 2); + message += 2; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].name)); + messageLen -= 34; + message += 34; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].callSign)); + messageLen -= 34; + message += 34; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].affiliateCallSign)); + messageLen -= 34; + message += 34; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; + case 0x0505: + switch (attributeId) + { + case 0x0000: // NavigateTargetTargetInfo + { + _NavigateTargetTargetInfo data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_MESSAGE_LENGTH(1); + data[i].identifier = emberAfGetInt8u(message, 0, 1); + message += 1; + CHECK_STATUS(ReadByteSpan(message, 34, &data[i].name)); + messageLen -= 34; + message += 34; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; case 0x050F: switch (attributeId) { diff --git a/src/controller/python/gen/CHIPClientCallbacks.h b/src/controller/python/gen/CHIPClientCallbacks.h index 7b6830133fa63e..4f5e3fdfd861dd 100644 --- a/src/controller/python/gen/CHIPClientCallbacks.h +++ b/src/controller/python/gen/CHIPClientCallbacks.h @@ -140,6 +140,10 @@ typedef void (*TargetNavigatorClusterNavigateTargetResponseCallback)(void * cont typedef void (*TestClusterClusterTestSpecificResponseCallback)(void * context, uint8_t returnValue); // List specific responses +typedef void (*ApplicationLauncherApplicationLauncherListListAttributeCallback)(void * context, uint16_t count, uint16_t * entries); +typedef void (*AudioOutputAudioOutputListListAttributeCallback)(void * context, uint16_t count, _AudioOutputInfo * entries); +typedef void (*ContentLaunchAcceptsHeaderListListAttributeCallback)(void * context, uint16_t count, chip::ByteSpan * entries); +typedef void (*ContentLaunchSupportedStreamingTypesListAttributeCallback)(void * context, uint16_t count, uint8_t * entries); typedef void (*DescriptorDeviceListListAttributeCallback)(void * context, uint16_t count, _DeviceType * entries); typedef void (*DescriptorServerListListAttributeCallback)(void * context, uint16_t count, chip::ClusterId * entries); typedef void (*DescriptorClientListListAttributeCallback)(void * context, uint16_t count, chip::ClusterId * entries); @@ -148,7 +152,11 @@ typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)(void * _NetworkInterfaceType * entries); typedef void (*GroupKeyManagementGroupsListAttributeCallback)(void * context, uint16_t count, _GroupState * entries); typedef void (*GroupKeyManagementGroupKeysListAttributeCallback)(void * context, uint16_t count, _GroupKey * entries); +typedef void (*MediaInputMediaInputListListAttributeCallback)(void * context, uint16_t count, _MediaInputInfo * entries); typedef void (*OperationalCredentialsFabricsListListAttributeCallback)(void * context, uint16_t count, _FabricDescriptor * entries); +typedef void (*TvChannelTvChannelListListAttributeCallback)(void * context, uint16_t count, _TvChannelInfo * entries); +typedef void (*TargetNavigatorTargetNavigatorListListAttributeCallback)(void * context, uint16_t count, + _NavigateTargetTargetInfo * entries); typedef void (*TestClusterListInt8uListAttributeCallback)(void * context, uint16_t count, uint8_t * entries); typedef void (*TestClusterListOctetStringListAttributeCallback)(void * context, uint16_t count, chip::ByteSpan * entries); typedef void (*TestClusterListStructOctetStringListAttributeCallback)(void * context, uint16_t count, diff --git a/src/controller/python/gen/CHIPClustersObjc.mm b/src/controller/python/gen/CHIPClustersObjc.mm index fd265e43dd18ca..ffd01e88d8ed7b 100644 --- a/src/controller/python/gen/CHIPClustersObjc.mm +++ b/src/controller/python/gen/CHIPClustersObjc.mm @@ -2587,6 +2587,153 @@ static void CallbackFn(void * context, uint8_t returnValue) dispatch_queue_t mQueue; }; +class CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, uint16_t * entries) + { + CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [NSNumber numberWithUnsignedShort:entries[i]]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + +class CHIPAudioOutputAudioOutputListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPAudioOutputAudioOutputListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPAudioOutputAudioOutputListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _AudioOutputInfo * entries) + { + CHIPAudioOutputAudioOutputListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].index], + @"index", [NSNumber numberWithUnsignedChar:entries[i].outputType], @"outputType", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], + @"name", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + +class CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, chip::ByteSpan * entries) + { + CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [NSData dataWithBytes:entries[i].data() length:entries[i].size()]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + +class CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, uint8_t * entries) + { + CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [NSNumber numberWithUnsignedChar:entries[i]]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + class CHIPDescriptorDeviceListAttributeCallbackBridge : public Callback::Callback { public: CHIPDescriptorDeviceListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) @@ -2851,6 +2998,46 @@ static void CallbackFn(void * context, uint16_t count, _GroupKey * entries) dispatch_queue_t mQueue; }; +class CHIPMediaInputMediaInputListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPMediaInputMediaInputListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPMediaInputMediaInputListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _MediaInputInfo * entries) + { + CHIPMediaInputMediaInputListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] + initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].index], @"index", + [NSNumber numberWithUnsignedChar:entries[i].inputType], @"inputType", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", + [NSData dataWithBytes:entries[i].description.data() length:entries[i].description.size()], @"description", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + class CHIPOperationalCredentialsFabricsListAttributeCallbackBridge : public Callback::Callback { public: @@ -2889,6 +3076,85 @@ static void CallbackFn(void * context, uint16_t count, _FabricDescriptor * entri dispatch_queue_t mQueue; }; +class CHIPTvChannelTvChannelListAttributeCallbackBridge : public Callback::Callback { +public: + CHIPTvChannelTvChannelListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPTvChannelTvChannelListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _TvChannelInfo * entries) + { + CHIPTvChannelTvChannelListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] + initWithObjectsAndKeys:[NSNumber numberWithUnsignedShort:entries[i].majorNumber], @"majorNumber", + [NSNumber numberWithUnsignedShort:entries[i].minorNumber], @"minorNumber", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", + [NSData dataWithBytes:entries[i].callSign.data() length:entries[i].callSign.size()], @"callSign", + [NSData dataWithBytes:entries[i].affiliateCallSign.data() length:entries[i].affiliateCallSign.size()], + @"affiliateCallSign", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + +class CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge + : public Callback::Callback { +public: + CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _NavigateTargetTargetInfo * entries) + { + CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] + initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].identifier], @"identifier", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + class CHIPTestClusterListInt8uAttributeCallbackBridge : public Callback::Callback { public: CHIPTestClusterListInt8uAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) @@ -3420,8 +3686,8 @@ - (void)launchApp:(NSString *)data - (void)readAttributeApplicationLauncherListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge * onSuccess + = new CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -3543,8 +3809,8 @@ - (void)selectOutput:(uint8_t)index responseHandler:(ResponseHandler)responseHan - (void)readAttributeAudioOutputListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPAudioOutputAudioOutputListAttributeCallbackBridge * onSuccess + = new CHIPAudioOutputAudioOutputListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -7027,8 +7293,8 @@ - (void)launchURL:(NSString *)contentURL displayString:(NSString *)displayString - (void)readAttributeAcceptsHeaderListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge * onSuccess + = new CHIPContentLaunchAcceptsHeaderListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -7055,8 +7321,8 @@ - (void)readAttributeAcceptsHeaderListWithResponseHandler:(ResponseHandler)respo - (void)readAttributeSupportedStreamingTypesWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge * onSuccess + = new CHIPContentLaunchSupportedStreamingTypesAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -9473,8 +9739,8 @@ - (void)showInputStatus:(ResponseHandler)responseHandler - (void)readAttributeMediaInputListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPMediaInputMediaInputListAttributeCallbackBridge * onSuccess + = new CHIPMediaInputMediaInputListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -11544,8 +11810,8 @@ - (void)skipChannel:(uint16_t)count responseHandler:(ResponseHandler)responseHan - (void)readAttributeTvChannelListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPTvChannelTvChannelListAttributeCallbackBridge * onSuccess + = new CHIPTvChannelTvChannelListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -11698,8 +11964,8 @@ - (void)navigateTarget:(uint8_t)target data:(NSString *)data responseHandler:(Re - (void)readAttributeTargetNavigatorListWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], true); + CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge * onSuccess + = new CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; diff --git a/src/controller/python/gen/af-structs.h b/src/controller/python/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/src/controller/python/gen/af-structs.h +++ b/src/controller/python/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo diff --git a/src/darwin/Framework/CHIP/gen/af-structs.h b/src/darwin/Framework/CHIP/gen/af-structs.h index 47f6ad8067c1ac..566b1bc6e668c5 100644 --- a/src/darwin/Framework/CHIP/gen/af-structs.h +++ b/src/darwin/Framework/CHIP/gen/af-structs.h @@ -37,7 +37,7 @@ typedef struct _AudioOutputInfo { uint8_t index; uint8_t outputType; - uint8_t * name; + chip::ByteSpan name; } EmberAfAudioOutputInfo; // Struct for BasicCommissioningInfoType @@ -282,8 +282,8 @@ typedef struct _MediaInputInfo { uint8_t index; uint8_t inputType; - uint8_t * name; - uint8_t * description; + chip::ByteSpan name; + chip::ByteSpan description; } EmberAfMediaInputInfo; // Struct for MediaPlaybackPosition @@ -297,7 +297,7 @@ typedef struct _MediaPlaybackPosition typedef struct _NavigateTargetTargetInfo { uint8_t identifier; - uint8_t * name; + chip::ByteSpan name; } EmberAfNavigateTargetTargetInfo; // Struct for NeighborInfo @@ -597,9 +597,9 @@ typedef struct _TvChannelInfo { uint16_t majorNumber; uint16_t minorNumber; - uint8_t * name; - uint8_t * callSign; - uint8_t * affiliateCallSign; + chip::ByteSpan name; + chip::ByteSpan callSign; + chip::ByteSpan affiliateCallSign; } EmberAfTvChannelInfo; // Struct for TvChannelLineupInfo