diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 135c7c567aaf16..b5438fc91ed915 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -13496,7 +13496,7 @@ ], "attributes": [ { - "name": "tv channel list", + "name": "channel list", "code": 0, "mfgCode": null, "side": "server", @@ -13511,12 +13511,12 @@ "reportableChange": 0 }, { - "name": "tv channel lineup", + "name": "channel lineup", "code": 1, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13526,12 +13526,12 @@ "reportableChange": 0 }, { - "name": "current tv channel", + "name": "current channel", "code": 2, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13625,6 +13625,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "current navigator target", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -13900,28 +13915,13 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "position updated at", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "position", - "code": 4, + "code": 3, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13932,7 +13932,7 @@ }, { "name": "playback speed", - "code": 5, + "code": 4, "mfgCode": null, "side": "server", "included": 1, @@ -13947,7 +13947,7 @@ }, { "name": "seek range end", - "code": 6, + "code": 5, "mfgCode": null, "side": "server", "included": 1, @@ -13962,7 +13962,7 @@ }, { "name": "seek range start", - "code": 7, + "code": 6, "mfgCode": null, "side": "server", "included": 1, @@ -14323,7 +14323,7 @@ "reportableChange": 0 }, { - "name": "supported streaming types", + "name": "supported streaming protocols", "code": 1, "mfgCode": null, "side": "server", @@ -14522,27 +14522,12 @@ "reportableChange": 0 }, { - "name": "catalog vendor id", + "name": "application launcher app", "code": 1, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "application id", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -14664,7 +14649,7 @@ "reportableChange": 0 }, { - "name": "application id", + "name": "application status", "code": 5, "mfgCode": null, "side": "server", @@ -14679,7 +14664,7 @@ "reportableChange": 0 }, { - "name": "catalog vendor id", + "name": "application version", "code": 6, "mfgCode": null, "side": "server", @@ -14693,21 +14678,6 @@ "maxInterval": 65344, "reportableChange": 0 }, - { - "name": "application status", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -19458,5 +19428,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] -} + ], + "log": [] +} \ No newline at end of file diff --git a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp index 76975580ebc747..ed816f72f3648d 100644 --- a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp +++ b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp @@ -67,11 +67,22 @@ string AccountLoginManager::proxySetupPinRequest(string requestTempAccountIdenti return "tempPin123"; } +bool AccountLoginManager::proxyLogout() +{ + // TODO: Insert your code here to send logout request + return true; +} + bool accountLoginClusterIsUserLoggedIn(std::string requestTempAccountIdentifier, std::string requestSetupPin) { return AccountLoginManager().GetInstance().isUserLoggedIn(requestTempAccountIdentifier, requestSetupPin); } +bool accountLoginClusterLogout() +{ + return AccountLoginManager().GetInstance().proxyLogout(); +} + std::string accountLoginClusterGetSetupPin(std::string requestTempAccountIdentifier, chip::EndpointId endpoint) { string responseSetupPin = AccountLoginManager().proxySetupPinRequest(requestTempAccountIdentifier, endpoint); diff --git a/examples/tv-app/android/include/account-login/AccountLoginManager.h b/examples/tv-app/android/include/account-login/AccountLoginManager.h index 7e1be63107c061..7377d95b18e0bf 100644 --- a/examples/tv-app/android/include/account-login/AccountLoginManager.h +++ b/examples/tv-app/android/include/account-login/AccountLoginManager.h @@ -27,6 +27,7 @@ class AccountLoginManager { public: bool isUserLoggedIn(std::string requestTempAccountIdentifier, std::string requestSetupPin); + bool proxyLogout(); std::string proxySetupPinRequest(std::string requestTempAccountIdentifier, chip::EndpointId endpoint); void setTempAccountIdentifierForPin(std::string requestTempAccountIdentifier, std::string requestSetupPin); diff --git a/examples/tv-app/android/include/application-basic/Application.h b/examples/tv-app/android/include/application-basic/Application.h index 11ef8bf72e4618..5de748b900ff38 100644 --- a/examples/tv-app/android/include/application-basic/Application.h +++ b/examples/tv-app/android/include/application-basic/Application.h @@ -22,12 +22,14 @@ struct Application { - using ApplicationBasicStatus = chip::app::Clusters::ApplicationBasic::ApplicationBasicStatus; - char vendorName[32] = ""; - char name[32] = ""; - char id[32] = ""; - uint16_t vendorId = 0; - uint16_t productId = 0; - uint16_t catalogVendorId = 0; - ApplicationBasicStatus status = ApplicationBasicStatus::kStopped; + using ApplicationBasicStatus = chip::app::Clusters::ApplicationBasic::ApplicationBasicStatus; + char vendorName[32] = ""; + char name[32] = ""; + char id[32] = ""; + char version[32] = ""; + uint16_t vendorId = 0; + uint16_t productId = 0; + uint16_t catalogVendorId = 0; + uint16_t allowedVendorList[32] = { 123, 456 }; + ApplicationBasicStatus status = ApplicationBasicStatus::kStopped; }; diff --git a/examples/tv-app/android/include/application-basic/ApplicationBasicManager.cpp b/examples/tv-app/android/include/application-basic/ApplicationBasicManager.cpp index 5a1c21e4074268..26b87d55ddb3b1 100644 --- a/examples/tv-app/android/include/application-basic/ApplicationBasicManager.cpp +++ b/examples/tv-app/android/include/application-basic/ApplicationBasicManager.cpp @@ -74,6 +74,15 @@ void ApplicationBasicManager::store(chip::EndpointId endpoint, Application * app ChipLogError(Zcl, "Failed to store name attribute."); } + MakeZclCharString(zclString, application->version); + EmberAfStatus versionStatus = + emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_VERSION_ATTRIBUTE_ID, + zclString.data(), ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (versionStatus != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogError(Zcl, "Failed to store version attribute."); + } + EmberAfStatus productIdStatus = emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_PRODUCT_ID_ATTRIBUTE_ID, (uint8_t *) &application->productId, ZCL_INT16U_ATTRIBUTE_TYPE); @@ -82,23 +91,6 @@ void ApplicationBasicManager::store(chip::EndpointId endpoint, Application * app ChipLogError(Zcl, "Failed to store product id attribute."); } - MakeZclCharString(zclString, application->id); - EmberAfStatus idStatus = - emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_ID_ATTRIBUTE_ID, zclString.data(), - ZCL_CHAR_STRING_ATTRIBUTE_TYPE); - if (idStatus != EMBER_ZCL_STATUS_SUCCESS) - { - ChipLogError(Zcl, "Failed to store id attribute."); - } - - EmberAfStatus catalogVendorIdStatus = - emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_CATALOG_VENDOR_ID_ATTRIBUTE_ID, - (uint8_t *) &application->catalogVendorId, ZCL_INT16U_ATTRIBUTE_TYPE); - if (catalogVendorIdStatus != EMBER_ZCL_STATUS_SUCCESS) - { - ChipLogError(Zcl, "Failed to store catalog vendor id attribute."); - } - EmberAfStatus applicationStatus = emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_STATUS_ATTRIBUTE_ID, (uint8_t *) &application->status, ZCL_ENUM8_ATTRIBUTE_TYPE); diff --git a/examples/tv-app/android/include/endpoint-configuration/chip_tv_config.ini b/examples/tv-app/android/include/endpoint-configuration/chip_tv_config.ini index 7cca7457aa40f6..501f26a1b30c04 100644 --- a/examples/tv-app/android/include/endpoint-configuration/chip_tv_config.ini +++ b/examples/tv-app/android/include/endpoint-configuration/chip_tv_config.ini @@ -13,6 +13,7 @@ name=exampleName1 productId=1 id=1 catalogVendorId=1 +version=exampleVersion [endpoint4] type=app @@ -22,6 +23,7 @@ name=exampleName2 productId=2 id=2 catalogVendorId=2 +version=exampleVersion [endpoint5] type=app @@ -31,6 +33,7 @@ name=exampleName3 productId=3 id= 3 catalogVendorId=3 +version=exampleVersion [endpoint6] type=app @@ -39,4 +42,5 @@ vendorId=4 name=exampleName4 productId=4 id=4 -catalogVendorId=4 \ No newline at end of file +catalogVendorId=4 +version=exampleVersion \ No newline at end of file diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index c84cbcc6a6fc75..2af253f32f0f98 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -59,7 +59,7 @@ class ContentLauncherAttrAccess : public app::AttributeAccessInterface { return ContentLauncherMgr().GetAcceptsHeader(aEncoder); } - else if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::SupportedStreamingTypes::Id) + else if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id) { return ContentLauncherMgr().GetSupportedStreamingTypes(aEncoder); } diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 61f272c0806082..df6ff8e878f34a 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -50,10 +50,6 @@ class MediaPlayBackAttrAccess : public app::AttributeAccessInterface attrId = ZCL_MEDIA_PLAYBACK_DURATION_ATTRIBUTE_ID; break; } - case app::Clusters::MediaPlayback::Attributes::PositionUpdatedAt::Id: { - attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_UPDATED_AT_ATTRIBUTE_ID; - break; - } case app::Clusters::MediaPlayback::Attributes::Position::Id: { attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_ATTRIBUTE_ID; break; diff --git a/examples/tv-app/android/java/TvChannelManager.cpp b/examples/tv-app/android/java/TvChannelManager.cpp index afd0ba0a040a13..2115716518b5c5 100644 --- a/examples/tv-app/android/java/TvChannelManager.cpp +++ b/examples/tv-app/android/java/TvChannelManager.cpp @@ -42,15 +42,15 @@ class ChannelInfoAttrAccess : public app::AttributeAccessInterface ChannelInfoAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), app::Clusters::TvChannel::Id) {} CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override { - if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::TvChannelList::Id) + if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::ChannelList::Id) { return TvChannelMgr().getTvChannelList(aEncoder); } - else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::TvChannelLineup::Id) + else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::ChannelLineup::Id) { return TvChannelMgr().getTvChannelLineup(aEncoder); } - else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::CurrentTvChannel::Id) + else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::CurrentChannel::Id) { return TvChannelMgr().getCurrentTvChannel(aEncoder); } diff --git a/examples/tv-app/linux/AppImpl.cpp b/examples/tv-app/linux/AppImpl.cpp index 6faf926dd77b17..25a4696960f8c3 100644 --- a/examples/tv-app/linux/AppImpl.cpp +++ b/examples/tv-app/linux/AppImpl.cpp @@ -105,7 +105,7 @@ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(contentLauncherAttrs) DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CONTENT_LAUNCHER_ACCEPTS_HEADER_ATTRIBUTE_ID, ARRAY, kDescriptorAttributeArraySize, 0), /* accept header list */ - DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_TYPES_ATTRIBUTE_ID, BITMAP32, 1, + DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID, BITMAP32, 1, 0), /* streaming protocols */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); diff --git a/examples/tv-app/linux/include/account-login/AccountLoginManager.cpp b/examples/tv-app/linux/include/account-login/AccountLoginManager.cpp index 76975580ebc747..ed816f72f3648d 100644 --- a/examples/tv-app/linux/include/account-login/AccountLoginManager.cpp +++ b/examples/tv-app/linux/include/account-login/AccountLoginManager.cpp @@ -67,11 +67,22 @@ string AccountLoginManager::proxySetupPinRequest(string requestTempAccountIdenti return "tempPin123"; } +bool AccountLoginManager::proxyLogout() +{ + // TODO: Insert your code here to send logout request + return true; +} + bool accountLoginClusterIsUserLoggedIn(std::string requestTempAccountIdentifier, std::string requestSetupPin) { return AccountLoginManager().GetInstance().isUserLoggedIn(requestTempAccountIdentifier, requestSetupPin); } +bool accountLoginClusterLogout() +{ + return AccountLoginManager().GetInstance().proxyLogout(); +} + std::string accountLoginClusterGetSetupPin(std::string requestTempAccountIdentifier, chip::EndpointId endpoint) { string responseSetupPin = AccountLoginManager().proxySetupPinRequest(requestTempAccountIdentifier, endpoint); diff --git a/examples/tv-app/linux/include/account-login/AccountLoginManager.h b/examples/tv-app/linux/include/account-login/AccountLoginManager.h index 7e1be63107c061..7377d95b18e0bf 100644 --- a/examples/tv-app/linux/include/account-login/AccountLoginManager.h +++ b/examples/tv-app/linux/include/account-login/AccountLoginManager.h @@ -27,6 +27,7 @@ class AccountLoginManager { public: bool isUserLoggedIn(std::string requestTempAccountIdentifier, std::string requestSetupPin); + bool proxyLogout(); std::string proxySetupPinRequest(std::string requestTempAccountIdentifier, chip::EndpointId endpoint); void setTempAccountIdentifierForPin(std::string requestTempAccountIdentifier, std::string requestSetupPin); diff --git a/examples/tv-app/linux/include/application-basic/Application.h b/examples/tv-app/linux/include/application-basic/Application.h index dae0e236c90c61..5de748b900ff38 100644 --- a/examples/tv-app/linux/include/application-basic/Application.h +++ b/examples/tv-app/linux/include/application-basic/Application.h @@ -22,13 +22,14 @@ struct Application { - using ApplicationBasicStatus = chip::app::Clusters::ApplicationBasic::ApplicationBasicStatus; - - char vendorName[32] = ""; - char name[32] = ""; - char id[32] = ""; - uint16_t vendorId = 0; - uint16_t productId = 0; - uint16_t catalogVendorId = 0; - ApplicationBasicStatus status = ApplicationBasicStatus::kStopped; + using ApplicationBasicStatus = chip::app::Clusters::ApplicationBasic::ApplicationBasicStatus; + char vendorName[32] = ""; + char name[32] = ""; + char id[32] = ""; + char version[32] = ""; + uint16_t vendorId = 0; + uint16_t productId = 0; + uint16_t catalogVendorId = 0; + uint16_t allowedVendorList[32] = { 123, 456 }; + ApplicationBasicStatus status = ApplicationBasicStatus::kStopped; }; diff --git a/examples/tv-app/linux/include/application-basic/ApplicationBasicManager.cpp b/examples/tv-app/linux/include/application-basic/ApplicationBasicManager.cpp index 0bdcc220c5dc84..b746d4de5b8ebd 100644 --- a/examples/tv-app/linux/include/application-basic/ApplicationBasicManager.cpp +++ b/examples/tv-app/linux/include/application-basic/ApplicationBasicManager.cpp @@ -76,6 +76,15 @@ void ApplicationBasicManager::store(chip::EndpointId endpoint, Application * app ChipLogError(Zcl, "Failed to store name attribute."); } + MakeZclCharString(zclString, application->version); + EmberAfStatus versionStatus = + emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_VERSION_ATTRIBUTE_ID, + zclString.data(), ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (versionStatus != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogError(Zcl, "Failed to store version attribute."); + } + EmberAfStatus productIdStatus = emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_PRODUCT_ID_ATTRIBUTE_ID, (uint8_t *) &application->productId, ZCL_INT16U_ATTRIBUTE_TYPE); @@ -84,23 +93,6 @@ void ApplicationBasicManager::store(chip::EndpointId endpoint, Application * app ChipLogError(Zcl, "Failed to store product id attribute."); } - MakeZclCharString(zclString, application->id); - EmberAfStatus idStatus = - emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_ID_ATTRIBUTE_ID, zclString.data(), - ZCL_CHAR_STRING_ATTRIBUTE_TYPE); - if (idStatus != EMBER_ZCL_STATUS_SUCCESS) - { - ChipLogError(Zcl, "Failed to store id attribute."); - } - - EmberAfStatus catalogVendorIdStatus = - emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_CATALOG_VENDOR_ID_ATTRIBUTE_ID, - (uint8_t *) &application->catalogVendorId, ZCL_INT16U_ATTRIBUTE_TYPE); - if (catalogVendorIdStatus != EMBER_ZCL_STATUS_SUCCESS) - { - ChipLogError(Zcl, "Failed to store catalog vendor id attribute."); - } - EmberAfStatus applicationStatus = emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_STATUS_ATTRIBUTE_ID, (uint8_t *) &application->status, ZCL_ENUM8_ATTRIBUTE_TYPE); @@ -129,6 +121,12 @@ Application ApplicationBasicManager::getApplicationForEndpoint(chip::EndpointId ChipLogError(Zcl, "Failed to get app vendor name. Error:%s", chip::ErrorStr(err)); } + err = es->get(section, "version", app.version, size); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Failed to get application version. Error:%s", chip::ErrorStr(err)); + } + err = es->get(section, "id", app.id, size); if (err != CHIP_NO_ERROR) { diff --git a/examples/tv-app/linux/include/cluster-init.cpp b/examples/tv-app/linux/include/cluster-init.cpp index aba5cafad51f2e..01a4deca945262 100644 --- a/examples/tv-app/linux/include/cluster-init.cpp +++ b/examples/tv-app/linux/include/cluster-init.cpp @@ -108,7 +108,7 @@ void emberAfWakeOnLanClusterInitCallback(chip::EndpointId endpoint) namespace { -TvAttrAccess gTvChannelAttrAccess; @@ -202,11 +202,6 @@ class ContentLauncherAttrAccess : public app::AttributeAccessInterface return ContentLauncherManager().proxyGetAcceptsHeader(aEncoder); } - if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::SupportedStreamingTypes::Id) - { - return ContentLauncherManager().proxyGetSupportedStreamingTypes(aEncoder); - } - return CHIP_NO_ERROR; } }; diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp index 87ffd6d9a97410..f451971ad3f2c7 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp @@ -65,16 +65,6 @@ CHIP_ERROR ContentLauncherManager::proxyGetAcceptsHeader(chip::app::AttributeVal }); } -CHIP_ERROR ContentLauncherManager::proxyGetSupportedStreamingTypes(chip::app::AttributeValueEncoder & aEncoder) -{ - return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { - // TODO: Insert code here - ReturnErrorOnFailure(encoder.Encode(EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_DASH)); - ReturnErrorOnFailure(encoder.Encode(EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_HLS)); - return CHIP_NO_ERROR; - }); -} - ContentLaunchResponse ContentLauncherManager::proxyLaunchContentRequest(list parameterList, bool autoplay, string data) { diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h index 174204c47028fb..80169efd5fc6b7 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h @@ -32,7 +32,6 @@ class ContentLauncherManager public: CHIP_ERROR Init(); CHIP_ERROR proxyGetAcceptsHeader(chip::app::AttributeValueEncoder & aEncoder); - CHIP_ERROR proxyGetSupportedStreamingTypes(chip::app::AttributeValueEncoder & aEncoder); 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/endpoint-configuration/chip_tv_config.ini b/examples/tv-app/linux/include/endpoint-configuration/chip_tv_config.ini index 7cca7457aa40f6..c381df80c6af86 100644 --- a/examples/tv-app/linux/include/endpoint-configuration/chip_tv_config.ini +++ b/examples/tv-app/linux/include/endpoint-configuration/chip_tv_config.ini @@ -8,6 +8,7 @@ type=speaker [endpoint3] type=app vendorName=exampleVendorName1 +version=exampleVersion vendorId=1 name=exampleName1 productId=1 @@ -17,6 +18,7 @@ catalogVendorId=1 [endpoint4] type=app vendorName=exampleVendorName2 +version=exampleVersion vendorId=2 name=exampleName2 productId=2 @@ -26,6 +28,7 @@ catalogVendorId=2 [endpoint5] type=app vendorName=exampleVendorName3 +version=exampleVersion vendorId=3 name=exampleName3 productId=3 @@ -35,6 +38,7 @@ catalogVendorId=3 [endpoint6] type=app vendorName=exampleVendorName4 +version=exampleVersion vendorId=4 name=exampleName4 productId=4 diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index bcd13ecfcf85ff..b5dc866e42c958 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -6843,7 +6843,7 @@ ], "attributes": [ { - "name": "tv channel list", + "name": "channel list", "code": 0, "mfgCode": null, "side": "server", @@ -6858,12 +6858,12 @@ "reportableChange": 0 }, { - "name": "tv channel lineup", + "name": "channel lineup", "code": 1, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6873,12 +6873,12 @@ "reportableChange": 0 }, { - "name": "current tv channel", + "name": "current channel", "code": 2, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6972,6 +6972,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "current navigator target", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -7320,7 +7335,7 @@ "reportableChange": 0 }, { - "name": "supported streaming types", + "name": "supported streaming protocols", "code": 1, "mfgCode": null, "side": "server", @@ -7366,6 +7381,22 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "name": "StopApp", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "HideApp", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ @@ -7420,27 +7451,12 @@ "reportableChange": 0 }, { - "name": "catalog vendor id", + "name": "application launcher app", "code": 1, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "application id", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -8875,28 +8891,13 @@ "maxInterval": 65344, "reportableChange": 0 }, - { - "name": "position updated at", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "position", - "code": 4, + "code": 3, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8907,7 +8908,7 @@ }, { "name": "playback speed", - "code": 5, + "code": 4, "mfgCode": null, "side": "server", "included": 1, @@ -8922,7 +8923,7 @@ }, { "name": "seek range end", - "code": 6, + "code": 5, "mfgCode": null, "side": "server", "included": 1, @@ -8937,7 +8938,7 @@ }, { "name": "seek range start", - "code": 7, + "code": 6, "mfgCode": null, "side": "server", "included": 1, @@ -9052,7 +9053,7 @@ "reportableChange": 0 }, { - "name": "supported streaming types", + "name": "supported streaming protocols", "code": 1, "mfgCode": null, "side": "server", @@ -9188,7 +9189,7 @@ "reportableChange": 0 }, { - "name": "application id", + "name": "application status", "code": 5, "mfgCode": null, "side": "server", @@ -9203,7 +9204,7 @@ "reportableChange": 0 }, { - "name": "catalog vendor id", + "name": "application version", "code": 6, "mfgCode": null, "side": "server", @@ -9218,7 +9219,7 @@ "reportableChange": 0 }, { - "name": "application status", + "name": "allowed vendor list", "code": 7, "mfgCode": null, "side": "server", @@ -9272,6 +9273,14 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "name": "Logout", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ @@ -9532,7 +9541,7 @@ "reportableChange": 0 }, { - "name": "supported streaming types", + "name": "supported streaming protocols", "code": 1, "mfgCode": null, "side": "server", @@ -9659,7 +9668,7 @@ "reportableChange": 0 }, { - "name": "application id", + "name": "application status", "code": 5, "mfgCode": null, "side": "server", @@ -9674,7 +9683,7 @@ "reportableChange": 0 }, { - "name": "catalog vendor id", + "name": "application version", "code": 6, "mfgCode": null, "side": "server", @@ -9689,7 +9698,7 @@ "reportableChange": 0 }, { - "name": "application status", + "name": "allowed vendor list", "code": 7, "mfgCode": null, "side": "server", @@ -9936,7 +9945,7 @@ "reportableChange": 0 }, { - "name": "application id", + "name": "application status", "code": 5, "mfgCode": null, "side": "server", @@ -9951,7 +9960,7 @@ "reportableChange": 0 }, { - "name": "catalog vendor id", + "name": "application version", "code": 6, "mfgCode": null, "side": "server", @@ -9966,7 +9975,7 @@ "reportableChange": 0 }, { - "name": "application status", + "name": "allowed vendor list", "code": 7, "mfgCode": null, "side": "server", diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index fe3ceab9363cad..4582a344e31bf1 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -11852,7 +11852,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11867,7 +11867,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/src/app/clusters/account-login-server/account-login-server.cpp b/src/app/clusters/account-login-server/account-login-server.cpp index 117cb464a68351..ac1d845f451126 100644 --- a/src/app/clusters/account-login-server/account-login-server.cpp +++ b/src/app/clusters/account-login-server/account-login-server.cpp @@ -32,6 +32,7 @@ using namespace chip::app::Clusters; using namespace chip::app::Clusters::AccountLogin; bool accountLoginClusterIsUserLoggedIn(std::string requestTempAccountIdentifier, std::string requestSetupPin); +bool accountLoginClusterLogout(); std::string accountLoginClusterGetSetupPin(std::string requestTempAccountIdentifier, EndpointId endpoint); void sendResponse(app::CommandHandler * command, const char * responseSetupPin) @@ -79,4 +80,17 @@ bool emberAfAccountLoginClusterLoginCallback(app::CommandHandler * command, cons return true; } +bool emberAfAccountLoginClusterLogoutCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, + const Commands::Logout::DecodableType & commandData) +{ + bool isLoggedOut = accountLoginClusterLogout(); + EmberAfStatus status = isLoggedOut ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_NOT_AUTHORIZED; + if (!isLoggedOut) + { + ChipLogError(Zcl, "User is not logged out."); + } + emberAfSendImmediateDefaultResponse(status); + return true; +} + void MatterAccountLoginPluginServerInitCallback() {} diff --git a/src/app/clusters/application-launcher-server/application-launcher-server.cpp b/src/app/clusters/application-launcher-server/application-launcher-server.cpp index 4f8da043335aa4..e3467c402a3409 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-server.cpp +++ b/src/app/clusters/application-launcher-server/application-launcher-server.cpp @@ -45,11 +45,10 @@ bool emberAfApplicationLauncherClusterLaunchAppCallback(app::CommandHandler * co return true; } -void sendResponse(app::CommandHandler * command, ApplicationLauncherResponse response) +void sendResponse(app::CommandHandler * command, app::ConcreteCommandPath path, ApplicationLauncherResponse response) { - CHIP_ERROR err = CHIP_NO_ERROR; - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ApplicationLauncher::Id, Commands::LaunchAppResponse::Id }; - TLV::TLVWriter * writer = nullptr; + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = command->PrepareCommand(path)); VerifyOrExit((writer = command->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), response.status)); @@ -75,13 +74,49 @@ bool emberAfApplicationLauncherClusterLaunchAppCallback(app::CommandHandler * co const Commands::LaunchApp::DecodableType & commandData) { auto & requestData = commandData.data; - auto & requestApplicationCatalogVendorId = commandData.catalogVendorId; - auto & requestApplicationId = commandData.applicationId; + auto & requestApplicationCatalogVendorId = commandData.application.catalogVendorId; + auto & requestApplicationId = commandData.application.applicationId; + + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ApplicationLauncher::Id, Commands::LaunchAppResponse::Id }; ::ApplicationLauncherApp application = getApplicationFromCommand(requestApplicationCatalogVendorId, requestApplicationId); std::string reqestDataString(requestData.data(), requestData.size()); ApplicationLauncherResponse response = applicationLauncherClusterLaunchApp(application, reqestDataString); - sendResponse(command, response); + sendResponse(command, path, response); + return true; +} + +/** + * @brief Application Launcher Cluster StopApp Command callback (from client) + */ +bool emberAfApplicationLauncherClusterStopAppCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, + const Commands::StopApp::DecodableType & commandData) +{ + auto & requestApplicationCatalogVendorId = commandData.application.catalogVendorId; + auto & requestApplicationId = commandData.application.applicationId; + + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ApplicationLauncher::Id, Commands::StopAppResponse::Id }; + + ::ApplicationLauncherApp application = getApplicationFromCommand(requestApplicationCatalogVendorId, requestApplicationId); + ApplicationLauncherResponse response = applicationLauncherClusterLaunchApp(application, "data"); + sendResponse(command, path, response); + return true; +} +/** + * @brief Application Launcher Cluster HideApp Command callback (from client) + */ +bool emberAfApplicationLauncherClusterHideAppCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, + const Commands::HideApp::DecodableType & commandData) +{ + + auto & requestApplicationCatalogVendorId = commandData.application.catalogVendorId; + auto & requestApplicationId = commandData.application.applicationId; + + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ApplicationLauncher::Id, Commands::HideAppResponse::Id }; + + ::ApplicationLauncherApp application = getApplicationFromCommand(requestApplicationCatalogVendorId, requestApplicationId); + ApplicationLauncherResponse response = applicationLauncherClusterLaunchApp(application, "data"); + sendResponse(command, path, response); return true; } diff --git a/src/app/clusters/tv-channel-server/tv-channel-server.cpp b/src/app/clusters/tv-channel-server/tv-channel-server.cpp index 5068015c072ff4..04674ba566095c 100644 --- a/src/app/clusters/tv-channel-server/tv-channel-server.cpp +++ b/src/app/clusters/tv-channel-server/tv-channel-server.cpp @@ -52,35 +52,22 @@ ::TvChannelInfo tvChannelClusterChangeChannel(std::string match); bool tvChannelClusterChangeChannelByNumber(uint16_t majorNumer, uint16_t minorNumber); bool tvChannelClusterSkipChannel(uint16_t count); -void sendResponse(app::CommandHandler * command, ::TvChannelInfo channelInfo) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), TvChannel::Id, Commands::ChangeChannelResponse::Id }; - TLV::TLVWriter * writer = nullptr; - SuccessOrExit(err = command->PrepareCommand(path)); - VerifyOrExit((writer = command->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // TODO: Enable this once struct as param is supported - // SuccessOrExit(err = writer->Put(TLV::ContextTag(0), channelInfo)); - // EmberAfTvChannelErrorType. errorType - // SuccessOrExit(err = writer->Put(TLV::ContextTag(1), errorType)); - SuccessOrExit(err = command->FinishCommand()); -exit: - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Failed to send ChangeChannel. Error:%s", ErrorStr(err)); - } -} - bool emberAfTvChannelClusterChangeChannelCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, const Commands::ChangeChannel::DecodableType & commandData) { - auto & match = commandData.match; + Commands::ChangeChannelResponse::Type response; + response.channelMatch.majorNumber = 1; + response.channelMatch.minorNumber = 0; + response.channelMatch.name = chip::CharSpan("name", strlen("name")); + response.channelMatch.callSign = chip::CharSpan("callSign", strlen("callSign")); + response.channelMatch.affiliateCallSign = chip::CharSpan("affiliateCallSign", strlen("affiliateCallSign")); + response.errorType = (TvChannelErrorType) 0; - std::string matchString(match.data(), match.size()); - // TODO: Enable this once struct as param is supported - // TvChannelInfo channelInfo = tvChannelClusterChangeChannel(matchString); - // sendResponse(command, channelInfo); - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); + CHIP_ERROR err = command->AddResponseData(commandPath, response); + if (err != CHIP_NO_ERROR) + { + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); + } return true; } diff --git a/src/app/tests/suites/TV_AccountLoginCluster.yaml b/src/app/tests/suites/TV_AccountLoginCluster.yaml index a4152e99c97402..eb7059c4be80c1 100644 --- a/src/app/tests/suites/TV_AccountLoginCluster.yaml +++ b/src/app/tests/suites/TV_AccountLoginCluster.yaml @@ -43,3 +43,6 @@ tests: value: "asdf" - name: "setupPIN" value: "tempPin123" + + - label: "Logout Command" + command: "Logout" diff --git a/src/app/tests/suites/TV_ApplicationBasicCluster.yaml b/src/app/tests/suites/TV_ApplicationBasicCluster.yaml index 3f1f3ec91ed178..aca78397852bcf 100644 --- a/src/app/tests/suites/TV_ApplicationBasicCluster.yaml +++ b/src/app/tests/suites/TV_ApplicationBasicCluster.yaml @@ -32,7 +32,6 @@ tests: # TODO: Support chars validation - label: "Read attribute vendor name" - disabled: true command: "readAttribute" attribute: "vendor name" response: @@ -45,8 +44,7 @@ tests: value: 1 # TODO: Support chars validation - - label: "Read attribute name" - disabled: true + - label: "Read attribute application name" command: "readAttribute" attribute: "application name" response: @@ -58,16 +56,29 @@ tests: response: value: 1 - # TODO: Support chars validation - - label: "Read attribute id" + - label: "Read attribute application status" + command: "readAttribute" + attribute: "application status" + response: + value: 0 + # TODO: Enable once attribute struct is supported + - label: "Read attribute application status" disabled: true command: "readAttribute" - attribute: "application id" + attribute: "application app" response: - value: "appId" + value: { catalogVendorId: 123, applicationId: "applicationId" } - - label: "Read attribute catalog vendor id" + # TODO: Support chars validation + - label: "Read attribute application version" command: "readAttribute" - attribute: "catalog vendor id" + attribute: "application version" response: - value: 1 + value: "exampleVersion" + + - label: "Read attribute application allowed vendor list" + disabled: true + command: "readAttribute" + attribute: "allowed vendor list" + response: + value: [123, 456] diff --git a/src/app/tests/suites/TV_ApplicationLauncherCluster.yaml b/src/app/tests/suites/TV_ApplicationLauncherCluster.yaml index 650110790d2c97..d91df598a4790a 100644 --- a/src/app/tests/suites/TV_ApplicationLauncherCluster.yaml +++ b/src/app/tests/suites/TV_ApplicationLauncherCluster.yaml @@ -29,34 +29,51 @@ tests: response: value: [123, 456] + # TODO: Enable once attribute struct is supported + - label: "Read attribute application launcher app" + disabled: true + command: "readAttribute" + attribute: "application launcher app" + response: + value: { catalogVendorId: 123, applicationId: "applicationId" } + - label: "Launch App Command" command: "LaunchApp" arguments: values: - name: "data" - value: "exampleData" - - name: "catalogVendorId" - value: 1 - - name: "applicationId" - value: "appId" - - # TODO: Enable this once struct as response type is supported - # response: - # values: - # - name: "status" - # value: 0 - # - name: "data" - # value: "data" - # TODO: Read attribute catalog vendor id and Read attribute catalog vendor id - # TODO: shoudl be one test, but currently struct as attribute is not supported - - label: "Read attribute catalog vendor id" - command: "readAttribute" - attribute: "catalog vendor id" + value: "data" + - name: "application" + value: { catalogVendorId: 123, applicationId: "applicationId" } response: - value: 0 + values: + - name: "data" + value: "data" + - name: "status" + value: 0 - - label: "Read attribute application id" - command: "readAttribute" - attribute: "application id" + - label: "Stop App Command" + command: "StopApp" + arguments: + values: + - name: "application" + value: { catalogVendorId: 123, applicationId: "applicationId" } response: - value: 0 + values: + - name: "data" + value: "data" + - name: "status" + value: 0 + + - label: "Hide App Command" + command: "HideApp" + arguments: + values: + - name: "application" + value: { catalogVendorId: 123, applicationId: "applicationId" } + response: + values: + - name: "data" + value: "data" + - name: "status" + value: 0 diff --git a/src/app/tests/suites/TV_AudioOutputCluster.yaml b/src/app/tests/suites/TV_AudioOutputCluster.yaml index 83a892eef632ab..668e8c38c66ef1 100644 --- a/src/app/tests/suites/TV_AudioOutputCluster.yaml +++ b/src/app/tests/suites/TV_AudioOutputCluster.yaml @@ -34,6 +34,12 @@ tests: { index: 3, outputType: 0, name: "exampleName" }, ] + - label: "Read attribute current audio output" + command: "readAttribute" + attribute: "current audio output" + response: + value: 0 + - label: "Select Output Command" command: "SelectOutput" arguments: diff --git a/src/app/tests/suites/TV_ContentLauncherCluster.yaml b/src/app/tests/suites/TV_ContentLauncherCluster.yaml new file mode 100644 index 00000000000000..4da7df542fdf81 --- /dev/null +++ b/src/app/tests/suites/TV_ContentLauncherCluster.yaml @@ -0,0 +1,108 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# 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. + +name: Content Launcher Cluster Tests + +config: + cluster: "Content Launcher" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + - label: "Read attribute accepts header list" + command: "readAttribute" + attribute: "accepts header list" + response: + value: ["example1", "example2"] + + - label: "Read attribute supported streaming protocols" + command: "readAttribute" + attribute: "supported streaming protocols" + response: + value: 0 + + - label: "Launch Content Command" + command: "LaunchContent" + arguments: + values: + - name: "autoPlay" + value: true + - name: "data" + value: "exampleData" + - name: "search" + value: + { + type: 1, + value: "exampleValue", + externalIDList: [{ name: "name", value: "value" }], + } + response: + values: + - name: "data" + value: "exampleData" + - name: "contentLaunchStatus" + value: 0 + + - label: "Launch URL Command" + command: "LaunchURL" + arguments: + values: + - name: "contentURL" + value: "exampleUrl" + - name: "displayString" + value: "exampleDisplayString" + - name: "brandingInformation" + value: + { + providerName: "exampleName", + background: + { + imageUrl: "exampleUrl", + color: "exampleColor", + size: { width: 0, height: 0, metric: 0 }, + }, + logo: + { + imageUrl: "exampleUrl", + color: "exampleColor", + size: { width: 0, height: 0, metric: 0 }, + }, + progressBar: + { + imageUrl: "exampleUrl", + color: "exampleColor", + size: { width: 0, height: 0, metric: 0 }, + }, + splash: + { + imageUrl: "exampleUrl", + color: "exampleColor", + size: { width: 0, height: 0, metric: 0 }, + }, + waterMark: + { + imageUrl: "exampleUrl", + color: "exampleColor", + size: { width: 0, height: 0, metric: 0 }, + }, + } + response: + values: + - name: "data" + value: "exampleData" + - name: "contentLaunchStatus" + value: 0 diff --git a/src/app/tests/suites/TV_KeypadInputCluster.yaml b/src/app/tests/suites/TV_KeypadInputCluster.yaml index 4cfa2ba3c7b489..dcd00ab0400b26 100644 --- a/src/app/tests/suites/TV_KeypadInputCluster.yaml +++ b/src/app/tests/suites/TV_KeypadInputCluster.yaml @@ -29,3 +29,7 @@ tests: values: - name: "keyCode" value: 3 + response: + values: + - name: "status" + value: 0 diff --git a/src/app/tests/suites/TV_MediaInputCluster.yaml b/src/app/tests/suites/TV_MediaInputCluster.yaml index c98a675c7bfda3..25f28811f6db0e 100644 --- a/src/app/tests/suites/TV_MediaInputCluster.yaml +++ b/src/app/tests/suites/TV_MediaInputCluster.yaml @@ -43,6 +43,12 @@ tests: }, ] + - label: "Read current media input" + command: "readAttribute" + attribute: "current media input" + response: + value: 0 + - label: "Select Input Command" command: "SelectInput" arguments: @@ -50,12 +56,6 @@ tests: - name: "index" value: 1 - - label: "Read current input list" - command: "readAttribute" - attribute: "current media input" - response: - value: 1 - - label: "Hide Input Status Command" command: "HideInputStatus" diff --git a/src/app/tests/suites/TV_MediaPlaybackCluster.yaml b/src/app/tests/suites/TV_MediaPlaybackCluster.yaml index 02353ed177354a..a324f2009a207d 100644 --- a/src/app/tests/suites/TV_MediaPlaybackCluster.yaml +++ b/src/app/tests/suites/TV_MediaPlaybackCluster.yaml @@ -23,6 +23,50 @@ tests: cluster: "DelayCommands" command: "WaitForCommissionee" + - label: "Read attribute playback state" + command: "readAttribute" + attribute: "playback state" + response: + value: 0 + + - label: "Read attribute start time" + command: "readAttribute" + attribute: "start time" + response: + value: 255 + + - label: "Read attribute duration" + command: "readAttribute" + attribute: "duration" + response: + value: 0 + + # TODO: Enable once attribute struct is supported + - label: "Read attribute position" + disabled: true + command: "readAttribute" + attribute: "position" + response: + value: { updatedAt: 0, position: 0 } + + - label: "Read attribute playback speed" + command: "readAttribute" + attribute: "playback speed" + response: + value: 0.0 + + - label: "Read attribute seek range end" + command: "readAttribute" + attribute: "seek range end" + response: + value: 0 + + - label: "Read attribute seek range start" + command: "readAttribute" + attribute: "seek range start" + response: + value: 0 + - label: "Media Playback Play Command" command: "MediaPlay" response: diff --git a/src/app/tests/suites/TV_TargetNavigatorCluster.yaml b/src/app/tests/suites/TV_TargetNavigatorCluster.yaml index 79e4665cc1df61..9b167032fe0bf8 100644 --- a/src/app/tests/suites/TV_TargetNavigatorCluster.yaml +++ b/src/app/tests/suites/TV_TargetNavigatorCluster.yaml @@ -33,6 +33,12 @@ tests: { identifier: 2, name: "exampleName" }, ] + - label: "Read attribute current navigator target" + command: "readAttribute" + attribute: "current navigator target" + response: + value: 0 + - label: "Navigate Target Command" command: "NavigateTarget" arguments: @@ -41,3 +47,9 @@ tests: value: 1 - name: "data" value: "1" + response: + values: + - name: "data" + value: "data response" + - name: "status" + value: 0 diff --git a/src/app/tests/suites/TV_TvChannelCluster.yaml b/src/app/tests/suites/TV_TvChannelCluster.yaml index 3caaae4ba93ad6..27e9af3bd4a813 100644 --- a/src/app/tests/suites/TV_TvChannelCluster.yaml +++ b/src/app/tests/suites/TV_TvChannelCluster.yaml @@ -25,7 +25,7 @@ tests: - label: "Read attribute TV Channel list" command: "readAttribute" - attribute: "TV Channel list" + attribute: "Channel list" response: value: [ @@ -44,13 +44,54 @@ tests: affiliateCallSign: "exampleASign", }, ] - # TODO: Enable the test once struct response is supported - # - label: "Change Channel Command" - # command: "ChangeChannel" - # arguments: - # values: - # - name: "match" - # value: "CNN" + # TODO: Enable once attribute struct is supported + - label: "Read attribute channel lineup" + disabled: true + command: "readAttribute" + attribute: "channel lineup" + response: + value: + { + operatorName: "operatorName", + lineupName: "lineupName", + postalCode: "postalCode", + lineupInfoType: 0, + } + + # TODO: Enable once attribute struct is supported + - label: "Read attribute current channel" + disabled: true + command: "readAttribute" + attribute: "current channel" + response: + value: + { + majorNumber: 1, + minorNumber: 0, + name: "name", + callSign: "callSign", + affiliateCallSign: "affiliateCallSign", + } + + - label: "Change Channel Command" + command: "ChangeChannel" + arguments: + values: + - name: "match" + value: "CNN" + response: + values: + - name: "errorType" + value: 0 + - name: "channelMatch" + value: + { + majorNumber: 1, + minorNumber: 0, + name: "name", + callSign: "callSign", + affiliateCallSign: "affiliateCallSign", + } - label: "Change Channel By Number Command" command: "ChangeChannelByNumber" diff --git a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml index 2e76525bb84737..5109dca5284f92 100644 --- a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml @@ -36,6 +36,10 @@ limitations under the License. + + The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. + + This message is sent in response to the GetSetupPIN Request, and contains the Setup PIN code, or null when the accounts identified in the request does not match the active account of the running Content App. diff --git a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml index 78445b3b779b16..ed1af1ffc2b694 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml @@ -28,9 +28,10 @@ limitations under the License. vendor id application name product id - application id - catalog vendor id - application status + application app + application status + application version + Upon receipt, this SHALL change the running status of the application. @@ -38,6 +39,12 @@ limitations under the License. + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml index e07a9cd6badfbb..772bd8a06be277 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml @@ -26,16 +26,22 @@ limitations under the License. This cluster provides an interface for launching content on a media player device such as a TV or Speaker. application launcher list - - catalog vendor id - application id + application launcher app Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns a Launch Response. - - - + + + + + Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. + + + + + Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. + @@ -44,7 +50,25 @@ limitations under the License. + + This command SHALL be generated in response to StopApp commands. + + + + + + This command SHALL be generated in response to HideApp commands. + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml index 51971de260449d..23a618b0002422 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml @@ -27,32 +27,32 @@ 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 + supported streaming protocols Upon receipt, this SHALL launch the specified content with optional search criteria. - + Upon receipt, this SHALL launch content from the specified URL. - + This command SHALL be generated in response to LaunchContent command. - + This command SHALL be generated in response to LaunchURL command. - + @@ -71,10 +71,8 @@ limitations under the License. - - - - + + @@ -82,58 +80,48 @@ limitations under the License. - - + - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - - + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml index 292ddc6d659a44..ca451e2f41dcb1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml @@ -29,12 +29,10 @@ limitations under the License. playback state start time duration - position updated at - position - - playback speed - seek range end - seek range start + position + playback speed + seek range end + seek range start diff --git a/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml index a149f35746ba31..8a19be92066061 100644 --- a/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml @@ -25,11 +25,9 @@ limitations under the License. true This cluster provides an interface for controlling the current TV Channel on a device. - tv channel list - - tv channel lineup - - current tv channel + channel list + channel lineup + current channel Change the channel on the TV to the channel case-insensitive exact matching the value passed as an argument. @@ -44,13 +42,13 @@ limitations under the License. This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. - + Upon receipt, this SHALL display the active status of the input list on screen. - - + + diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 985c4eb5824ec8..a7df038b4381ec 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1895,32 +1895,7 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "StartUp", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 0 - }, - { - "name": "ShutDown", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 0 - }, - { - "name": "Leave", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 0 - } - ], + "commands": [], "attributes": [ { "name": "InteractionModelVersion", @@ -10613,7 +10588,7 @@ ], "attributes": [ { - "name": "tv channel list", + "name": "channel list", "code": 0, "mfgCode": null, "side": "server", @@ -10628,11 +10603,11 @@ "reportableChange": 0 }, { - "name": "tv channel lineup", + "name": "channel lineup", "code": 1, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -10643,11 +10618,11 @@ "reportableChange": 0 }, { - "name": "current tv channel", + "name": "current channel", "code": 2, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -10757,6 +10732,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "current navigator target", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -11047,39 +11037,24 @@ "maxInterval": 65344, "reportableChange": 0 }, - { - "name": "position updated at", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "position", - "code": 4, + "code": 3, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { "name": "playback speed", - "code": 5, + "code": 4, "mfgCode": null, "side": "server", "included": 1, @@ -11087,14 +11062,14 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { "name": "seek range end", - "code": 6, + "code": 5, "mfgCode": null, "side": "server", "included": 1, @@ -11109,7 +11084,7 @@ }, { "name": "seek range start", - "code": 7, + "code": 6, "mfgCode": null, "side": "server", "included": 1, @@ -11530,7 +11505,7 @@ "reportableChange": 0 }, { - "name": "supported streaming types", + "name": "supported streaming protocols", "code": 1, "mfgCode": null, "side": "server", @@ -11705,6 +11680,22 @@ "source": "client", "incoming": 0, "outgoing": 1 + }, + { + "name": "StopApp", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "HideApp", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 } ], "attributes": [ @@ -11740,6 +11731,22 @@ "source": "server", "incoming": 1, "outgoing": 0 + }, + { + "name": "StopAppResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "HideAppResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ @@ -11759,33 +11766,18 @@ "reportableChange": 0 }, { - "name": "catalog vendor id", + "name": "application launcher app", "code": 1, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "application id", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -11925,8 +11917,8 @@ "reportableChange": 0 }, { - "name": "application id", - "code": 5, + "name": "application app", + "code": 4, "mfgCode": null, "side": "server", "included": 1, @@ -11934,14 +11926,14 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "catalog vendor id", - "code": 6, + "name": "application status", + "code": 5, "mfgCode": null, "side": "server", "included": 1, @@ -11955,15 +11947,15 @@ "reportableChange": 0 }, { - "name": "application status", - "code": 7, + "name": "application version", + "code": 6, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -12024,6 +12016,14 @@ "source": "client", "incoming": 0, "outgoing": 1 + }, + { + "name": "Logout", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 } ], "attributes": [ diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 7238f157b35ac7..3247fa7bb89ccf 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -58,25 +58,25 @@ typedef void (*CHIPApplicationBasicClusterApplicationNameAttributeCallbackType)( void *, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::TypeInfo::DecodableArgType); typedef void (*CHIPApplicationBasicClusterProductIdAttributeCallbackType)( void *, chip::app::Clusters::ApplicationBasic::Attributes::ProductId::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterApplicationIdAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationId::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterCatalogVendorIdAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::CatalogVendorId::TypeInfo::DecodableArgType); +typedef void (*CHIPApplicationBasicClusterApplicationAppAttributeCallbackType)( + void *, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationApp::TypeInfo::DecodableArgType); typedef void (*CHIPApplicationBasicClusterApplicationStatusAttributeCallbackType)( void *, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationStatus::TypeInfo::DecodableArgType); +typedef void (*CHIPApplicationBasicClusterApplicationVersionAttributeCallbackType)( + void *, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::TypeInfo::DecodableArgType); typedef void (*CHIPApplicationBasicClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPApplicationBasicClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); +typedef void (*CHIPApplicationLauncherClusterHideAppResponseCallbackType)( + void *, const chip::app::Clusters::ApplicationLauncher::Commands::HideAppResponse::DecodableType &); typedef void (*CHIPApplicationLauncherClusterLaunchAppResponseCallbackType)( void *, const chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppResponse::DecodableType &); +typedef void (*CHIPApplicationLauncherClusterStopAppResponseCallbackType)( + void *, const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType &); typedef void (*CHIPApplicationLauncherClusterApplicationLauncherListAttributeCallbackType)( void *, const chip::app::Clusters::ApplicationLauncher::Attributes::ApplicationLauncherList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationLauncherClusterCatalogVendorIdAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationLauncher::Attributes::CatalogVendorId::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationLauncherClusterApplicationIdAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationLauncher::Attributes::ApplicationId::TypeInfo::DecodableArgType); typedef void (*CHIPApplicationLauncherClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPApplicationLauncherClusterClusterRevisionAttributeCallbackType)( @@ -301,8 +301,8 @@ typedef void (*CHIPContentLauncherClusterLaunchURLResponseCallbackType)( typedef void (*CHIPContentLauncherClusterAcceptsHeaderListAttributeCallbackType)( void *, const chip::app::Clusters::ContentLauncher::Attributes::AcceptsHeaderList::TypeInfo::DecodableType &); -typedef void (*CHIPContentLauncherClusterSupportedStreamingTypesAttributeCallbackType)( - void *, const chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingTypes::TypeInfo::DecodableType &); +typedef void (*CHIPContentLauncherClusterSupportedStreamingProtocolsAttributeCallbackType)( + void *, chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo::DecodableArgType); typedef void (*CHIPContentLauncherClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::ContentLauncher::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPContentLauncherClusterClusterRevisionAttributeCallbackType)( @@ -613,10 +613,6 @@ typedef void (*CHIPMediaPlaybackClusterStartTimeAttributeCallbackType)( void *, chip::app::Clusters::MediaPlayback::Attributes::StartTime::TypeInfo::DecodableArgType); typedef void (*CHIPMediaPlaybackClusterDurationAttributeCallbackType)( void *, chip::app::Clusters::MediaPlayback::Attributes::Duration::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterPositionUpdatedAtAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::PositionUpdatedAt::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterPositionAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::Position::TypeInfo::DecodableArgType); typedef void (*CHIPMediaPlaybackClusterPlaybackSpeedAttributeCallbackType)( void *, chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::TypeInfo::DecodableArgType); typedef void (*CHIPMediaPlaybackClusterSeekRangeEndAttributeCallbackType)( @@ -912,12 +908,8 @@ typedef void (*CHIPSwitchClusterClusterRevisionAttributeCallbackType)( typedef void (*CHIPTvChannelClusterChangeChannelResponseCallbackType)( void *, const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType &); -typedef void (*CHIPTvChannelClusterTvChannelListAttributeCallbackType)( - void *, const chip::app::Clusters::TvChannel::Attributes::TvChannelList::TypeInfo::DecodableType &); -typedef void (*CHIPTvChannelClusterTvChannelLineupAttributeCallbackType)( - void *, chip::app::Clusters::TvChannel::Attributes::TvChannelLineup::TypeInfo::DecodableArgType); -typedef void (*CHIPTvChannelClusterCurrentTvChannelAttributeCallbackType)( - void *, chip::app::Clusters::TvChannel::Attributes::CurrentTvChannel::TypeInfo::DecodableArgType); +typedef void (*CHIPTvChannelClusterChannelListAttributeCallbackType)( + void *, const chip::app::Clusters::TvChannel::Attributes::ChannelList::TypeInfo::DecodableType &); typedef void (*CHIPTvChannelClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::TvChannel::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPTvChannelClusterClusterRevisionAttributeCallbackType)( @@ -927,6 +919,8 @@ typedef void (*CHIPTargetNavigatorClusterNavigateTargetResponseCallbackType)( typedef void (*CHIPTargetNavigatorClusterTargetNavigatorListAttributeCallbackType)( void *, const chip::app::Clusters::TargetNavigator::Attributes::TargetNavigatorList::TypeInfo::DecodableType &); +typedef void (*CHIPTargetNavigatorClusterCurrentNavigatorTargetAttributeCallbackType)( + void *, chip::app::Clusters::TargetNavigator::Attributes::CurrentNavigatorTarget::TypeInfo::DecodableArgType); typedef void (*CHIPTargetNavigatorClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::TargetNavigator::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPTargetNavigatorClusterClusterRevisionAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index befc08831299f8..d9d2eedbaee64b 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -147,6 +147,41 @@ JNI_METHOD(void, AccountLoginCluster, login) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, AccountLoginCluster, logout)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + AccountLoginCluster * cppCluster; + + chip::app::Clusters::AccountLogin::Commands::Logout::Type request; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, AccountLoginCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -652,62 +687,7 @@ JNI_METHOD(void, ApplicationBasicCluster, reportProductIdAttribute)(JNIEnv * env onReport.release(); } -JNI_METHOD(void, ApplicationBasicCluster, subscribeApplicationIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ApplicationBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeApplicationId(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ApplicationBasicCluster, reportApplicationIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ApplicationBasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeApplicationId(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, ApplicationBasicCluster, subscribeCatalogVendorIdAttribute) +JNI_METHOD(void, ApplicationBasicCluster, subscribeApplicationStatusAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -729,8 +709,8 @@ JNI_METHOD(void, ApplicationBasicCluster, subscribeCatalogVendorIdAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - err = cppCluster->SubscribeAttributeCatalogVendorId(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); + err = cppCluster->SubscribeAttributeApplicationStatus(onSuccess->Cancel(), onFailure->Cancel(), + static_cast(minInterval), static_cast(maxInterval)); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -739,12 +719,12 @@ JNI_METHOD(void, ApplicationBasicCluster, subscribeCatalogVendorIdAttribute) onFailure.release(); } -JNI_METHOD(void, ApplicationBasicCluster, reportCatalogVendorIdAttribute) +JNI_METHOD(void, ApplicationBasicCluster, reportApplicationStatusAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); + std::unique_ptr onReport( + Platform::New(callback, true), Platform::Delete); VerifyOrReturn(onReport.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); @@ -755,14 +735,14 @@ JNI_METHOD(void, ApplicationBasicCluster, reportCatalogVendorIdAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - err = cppCluster->ReportAttributeCatalogVendorId(onReport->Cancel()); + err = cppCluster->ReportAttributeApplicationStatus(onReport->Cancel()); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error registering for attribute reporting", err)); onReport.release(); } -JNI_METHOD(void, ApplicationBasicCluster, subscribeApplicationStatusAttribute) +JNI_METHOD(void, ApplicationBasicCluster, subscribeApplicationVersionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -784,8 +764,8 @@ JNI_METHOD(void, ApplicationBasicCluster, subscribeApplicationStatusAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - err = cppCluster->SubscribeAttributeApplicationStatus(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); + err = cppCluster->SubscribeAttributeApplicationVersion(onSuccess->Cancel(), onFailure->Cancel(), + static_cast(minInterval), static_cast(maxInterval)); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -794,12 +774,12 @@ JNI_METHOD(void, ApplicationBasicCluster, subscribeApplicationStatusAttribute) onFailure.release(); } -JNI_METHOD(void, ApplicationBasicCluster, reportApplicationStatusAttribute) +JNI_METHOD(void, ApplicationBasicCluster, reportApplicationVersionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); + std::unique_ptr onReport( + Platform::New(callback, true), Platform::Delete); VerifyOrReturn(onReport.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); @@ -810,7 +790,7 @@ JNI_METHOD(void, ApplicationBasicCluster, reportApplicationStatusAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - err = cppCluster->ReportAttributeApplicationStatus(onReport->Cancel()); + err = cppCluster->ReportAttributeApplicationVersion(onReport->Cancel()); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error registering for attribute reporting", err)); @@ -881,24 +861,21 @@ JNI_METHOD(jlong, ApplicationLauncherCluster, initWithDevice)(JNIEnv * env, jobj return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ApplicationLauncherCluster, launchApp) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring data, jobject catalogVendorId, jstring applicationId) +JNI_METHOD(void, ApplicationLauncherCluster, hideApp) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; ApplicationLauncherCluster * cppCluster; - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type request; + chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type request; - request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); - request.catalogVendorId = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(catalogVendorId)); - request.applicationId = chip::JniUtfString(env, static_cast(applicationId)).charSpan(); + request.application = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApp::Type(); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -914,7 +891,7 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchApp) env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); @@ -925,116 +902,89 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchApp) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ApplicationLauncherCluster, subscribeCatalogVendorIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ApplicationLauncherCluster, launchApp) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring data, jobject catalogVendorId, jstring applicationId) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + CHIP_ERROR err = CHIP_NO_ERROR; + ApplicationLauncherCluster * cppCluster; + chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type request; + + request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); + request.application = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApp::Type(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ApplicationLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - err = cppCluster->SubscribeAttributeCatalogVendorId(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ApplicationLauncherCluster, reportCatalogVendorIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, ApplicationLauncherCluster, stopApp) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); + CHIP_ERROR err = CHIP_NO_ERROR; + ApplicationLauncherCluster * cppCluster; - CHIP_ERROR err = CHIP_NO_ERROR; - ApplicationLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type request; - err = cppCluster->ReportAttributeCatalogVendorId(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, ApplicationLauncherCluster, subscribeApplicationIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + request.application = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApp::Type(); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ApplicationLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - err = cppCluster->SubscribeAttributeApplicationId(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ApplicationLauncherCluster, reportApplicationIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ApplicationLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeApplicationId(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} JNI_METHOD(void, ApplicationLauncherCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -8353,7 +8303,8 @@ JNI_METHOD(jlong, ContentLauncherCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, ContentLauncherCluster, launchContent) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject type, jstring value, + jobject externalIDList) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8363,6 +8314,8 @@ JNI_METHOD(void, ContentLauncherCluster, launchContent) request.autoPlay = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(autoPlay)); request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); + request.search = + chip::app::DataModel::List(); std::unique_ptr @@ -8395,7 +8348,8 @@ JNI_METHOD(void, ContentLauncherCluster, launchContent) onFailure.release(); } JNI_METHOD(void, ContentLauncherCluster, launchURL) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString, jstring providerName, + jobject background, jobject logo, jobject progressBar, jobject splash, jobject waterMark) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8405,6 +8359,8 @@ JNI_METHOD(void, ContentLauncherCluster, launchURL) request.contentURL = chip::JniUtfString(env, static_cast(contentURL)).charSpan(); request.displayString = chip::JniUtfString(env, static_cast(displayString)).charSpan(); + request.brandingInformation = + chip::app::DataModel::List(); std::unique_ptr @@ -8433,8 +8389,101 @@ JNI_METHOD(void, ContentLauncherCluster, launchURL) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - onSuccess.release(); - onFailure.release(); + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ContentLauncherCluster, subscribeSupportedStreamingProtocolsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->SubscribeAttributeSupportedStreamingProtocols( + onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), static_cast(maxInterval)); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ContentLauncherCluster, reportSupportedStreamingProtocolsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onReport( + Platform::New(callback, true), Platform::Delete); + VerifyOrReturn(onReport.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReportAttributeSupportedStreamingProtocols(onReport->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error registering for attribute reporting", err)); + + onReport.release(); } JNI_METHOD(void, ContentLauncherCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) @@ -15632,169 +15681,6 @@ JNI_METHOD(void, MediaPlaybackCluster, reportDurationAttribute)(JNIEnv * env, jo onReport.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribePositionUpdatedAtAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributePositionUpdatedAt(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, MediaPlaybackCluster, reportPositionUpdatedAtAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributePositionUpdatedAt(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, MediaPlaybackCluster, subscribePositionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributePosition(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, MediaPlaybackCluster, reportPositionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributePosition(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, MediaPlaybackCluster, subscribePlaybackSpeedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributePlaybackSpeed(onSuccess->Cancel(), onFailure->Cancel(), static_cast(minInterval), - static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, MediaPlaybackCluster, reportPlaybackSpeedAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributePlaybackSpeed(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -22978,114 +22864,6 @@ JNI_METHOD(void, TvChannelCluster, skipChannel)(JNIEnv * env, jobject self, jlon onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TvChannelCluster, subscribeTvChannelLineupAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeTvChannelLineup(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TvChannelCluster, reportTvChannelLineupAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeTvChannelLineup(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} -JNI_METHOD(void, TvChannelCluster, subscribeCurrentTvChannelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->SubscribeAttributeCurrentTvChannel(onSuccess->Cancel(), onFailure->Cancel(), - static_cast(minInterval), static_cast(maxInterval)); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TvChannelCluster, reportCurrentTvChannelAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onReport( - Platform::New(callback, true), Platform::Delete); - VerifyOrReturn(onReport.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native report callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - err = cppCluster->ReportAttributeCurrentTvChannel(onReport->Cancel()); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error registering for attribute reporting", err)); - - onReport.release(); -} JNI_METHOD(void, TvChannelCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index fea7c85ce194ee..f442648d3a9f64 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -570,50 +570,13 @@ JNI_METHOD(void, ApplicationBasicCluster, readProductIdAttribute)(JNIEnv * env, onFailure.release(); } -JNI_METHOD(void, ApplicationBasicCluster, readApplicationIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationId::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ApplicationBasicCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ApplicationBasicCluster, readCatalogVendorIdAttribute) +JNI_METHOD(void, ApplicationBasicCluster, readApplicationStatusAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ApplicationBasic::Attributes::CatalogVendorId::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationStatus::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -631,7 +594,7 @@ JNI_METHOD(void, ApplicationBasicCluster, readCatalogVendorIdAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); @@ -643,13 +606,14 @@ JNI_METHOD(void, ApplicationBasicCluster, readCatalogVendorIdAttribute) onFailure.release(); } -JNI_METHOD(void, ApplicationBasicCluster, readApplicationStatusAttribute) +JNI_METHOD(void, ApplicationBasicCluster, readApplicationVersionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationStatus::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -667,7 +631,7 @@ JNI_METHOD(void, ApplicationBasicCluster, readApplicationStatusAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); @@ -792,78 +756,6 @@ JNI_METHOD(void, ApplicationLauncherCluster, readApplicationLauncherListAttribut onFailure.release(); } -JNI_METHOD(void, ApplicationLauncherCluster, readCatalogVendorIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogVendorId::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ApplicationLauncherCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, ApplicationLauncherCluster, readApplicationIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ApplicationLauncher::Attributes::ApplicationId::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ApplicationLauncherCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, ApplicationLauncherCluster, readAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -4508,15 +4400,13 @@ JNI_METHOD(void, ContentLauncherCluster, readAcceptsHeaderListAttribute) onFailure.release(); } -JNI_METHOD(void, ContentLauncherCluster, readSupportedStreamingTypesAttribute) +JNI_METHOD(void, ContentLauncherCluster, readSupportedStreamingProtocolsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingTypes::TypeInfo; - std::unique_ptr - onSuccess(chip::Platform::New(callback, false), - chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -4535,7 +4425,7 @@ JNI_METHOD(void, ContentLauncherCluster, readSupportedStreamingTypesAttribute) env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); @@ -8895,81 +8785,12 @@ JNI_METHOD(void, MediaPlaybackCluster, readDurationAttribute)(JNIEnv * env, jobj onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, readPositionUpdatedAtAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::PositionUpdatedAt::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, MediaPlaybackCluster, readPositionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::Position::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, MediaPlaybackCluster, readPlaybackSpeedAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13215,48 +13036,13 @@ JNI_METHOD(void, SwitchCluster, readClusterRevisionAttribute)(JNIEnv * env, jobj onFailure.release(); } -JNI_METHOD(void, TvChannelCluster, readTvChannelListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::TvChannelList::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TvChannelCluster, readTvChannelLineupAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TvChannelCluster, readChannelListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::TvChannelLineup::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::TvChannel::Attributes::ChannelList::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13274,7 +13060,7 @@ JNI_METHOD(void, TvChannelCluster, readTvChannelLineupAttribute)(JNIEnv * env, j env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -13285,13 +13071,13 @@ JNI_METHOD(void, TvChannelCluster, readTvChannelLineupAttribute)(JNIEnv * env, j onFailure.release(); } -JNI_METHOD(void, TvChannelCluster, readCurrentTvChannelAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TvChannelCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::CurrentTvChannel::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::TvChannel::Attributes::AttributeList::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13309,7 +13095,7 @@ JNI_METHOD(void, TvChannelCluster, readCurrentTvChannelAttribute)(JNIEnv * env, env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -13320,13 +13106,12 @@ JNI_METHOD(void, TvChannelCluster, readCurrentTvChannelAttribute)(JNIEnv * env, onFailure.release(); } -JNI_METHOD(void, TvChannelCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TvChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::AttributeList::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::TvChannel::Attributes::ClusterRevision::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13344,7 +13129,7 @@ JNI_METHOD(void, TvChannelCluster, readAttributeListAttribute)(JNIEnv * env, job env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -13355,12 +13140,15 @@ JNI_METHOD(void, TvChannelCluster, readAttributeListAttribute)(JNIEnv * env, job onFailure.release(); } -JNI_METHOD(void, TvChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TargetNavigatorCluster, readTargetNavigatorListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::ClusterRevision::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::TargetNavigatorList::TypeInfo; + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13371,14 +13159,15 @@ JNI_METHOD(void, TvChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, j chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::TargetNavigatorCluster * cppCluster = + reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -13389,15 +13178,13 @@ JNI_METHOD(void, TvChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, j onFailure.release(); } -JNI_METHOD(void, TargetNavigatorCluster, readTargetNavigatorListAttribute) +JNI_METHOD(void, TargetNavigatorCluster, readCurrentNavigatorTargetAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::TargetNavigatorList::TypeInfo; - std::unique_ptr - onSuccess(chip::Platform::New(callback, false), - chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::CurrentNavigatorTarget::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -13415,8 +13202,9 @@ JNI_METHOD(void, TargetNavigatorCluster, readTargetNavigatorListAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index ca3a8fa7688ec4..4cdcd9770a2b8c 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -88,6 +88,72 @@ void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, setupPIN); } +CHIPApplicationLauncherClusterHideAppResponseCallback::CHIPApplicationLauncherClusterHideAppResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPApplicationLauncherClusterHideAppResponseCallback::~CHIPApplicationLauncherClusterHideAppResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPApplicationLauncherClusterHideAppResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ApplicationLauncher::Commands::HideAppResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject status; + + std::string statusClassName = "java/lang/Integer"; + std::string statusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + jobject data; + + chip::UtfString dataUtfString(env, dataResponse.data); + data = dataUtfString.jniValue(); + + env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); +} CHIPApplicationLauncherClusterLaunchAppResponseCallback::CHIPApplicationLauncherClusterLaunchAppResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -155,6 +221,72 @@ void CHIPApplicationLauncherClusterLaunchAppResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } +CHIPApplicationLauncherClusterStopAppResponseCallback::CHIPApplicationLauncherClusterStopAppResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPApplicationLauncherClusterStopAppResponseCallback::~CHIPApplicationLauncherClusterStopAppResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPApplicationLauncherClusterStopAppResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject status; + + std::string statusClassName = "java/lang/Integer"; + std::string statusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + jobject data; + + chip::UtfString dataUtfString(env, dataResponse.data); + data = dataUtfString.jniValue(); + + env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); +} CHIPContentLauncherClusterLaunchContentResponseCallback::CHIPContentLauncherClusterLaunchContentResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -205,14 +337,10 @@ void CHIPContentLauncherClusterLaunchContentResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;Ljava/lang/Integer;)V", + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject data; - - chip::UtfString dataUtfString(env, dataResponse.data); - data = dataUtfString.jniValue(); jobject contentLaunchStatus; std::string contentLaunchStatusClassName = "java/lang/Integer"; @@ -220,8 +348,12 @@ void CHIPContentLauncherClusterLaunchContentResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject( contentLaunchStatusClassName.c_str(), contentLaunchStatusCtorSignature.c_str(), dataResponse.contentLaunchStatus, contentLaunchStatus); + jobject data; - env->CallVoidMethod(javaCallbackRef, javaMethod, data, contentLaunchStatus); + chip::UtfString dataUtfString(env, dataResponse.data); + data = dataUtfString.jniValue(); + + env->CallVoidMethod(javaCallbackRef, javaMethod, contentLaunchStatus, data); } CHIPContentLauncherClusterLaunchURLResponseCallback::CHIPContentLauncherClusterLaunchURLResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -272,14 +404,10 @@ void CHIPContentLauncherClusterLaunchURLResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;Ljava/lang/Integer;)V", + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject data; - - chip::UtfString dataUtfString(env, dataResponse.data); - data = dataUtfString.jniValue(); jobject contentLaunchStatus; std::string contentLaunchStatusClassName = "java/lang/Integer"; @@ -287,8 +415,12 @@ void CHIPContentLauncherClusterLaunchURLResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject( contentLaunchStatusClassName.c_str(), contentLaunchStatusCtorSignature.c_str(), dataResponse.contentLaunchStatus, contentLaunchStatus); + jobject data; + + chip::UtfString dataUtfString(env, dataResponse.data); + data = dataUtfString.jniValue(); - env->CallVoidMethod(javaCallbackRef, javaMethod, data, contentLaunchStatus); + env->CallVoidMethod(javaCallbackRef, javaMethod, contentLaunchStatus, data); } CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -3464,17 +3596,17 @@ void CHIPTvChannelClusterChangeChannelResponseCallback::CallbackFn( err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject ChannelMatch; + jobject channelMatch; - ChannelMatch = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ - jobject ErrorType; + channelMatch = nullptr; /* Struct - conversion from this type to Java is not properly implemented yet */ + jobject errorType; - std::string ErrorTypeClassName = "java/lang/Integer"; - std::string ErrorTypeCtorSignature = "(I)V"; + std::string errorTypeClassName = "java/lang/Integer"; + std::string errorTypeCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( - ErrorTypeClassName.c_str(), ErrorTypeCtorSignature.c_str(), dataResponse.errorType, ErrorType); + errorTypeClassName.c_str(), errorTypeCtorSignature.c_str(), dataResponse.errorType, errorType); - env->CallVoidMethod(javaCallbackRef, javaMethod, ChannelMatch, ErrorType); + env->CallVoidMethod(javaCallbackRef, javaMethod, channelMatch, errorType); } CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClusterNavigateTargetResponseCallback( jobject javaCallback) : diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 8c8d71a39ff2b9..1d7f32b55d25a2 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -39,6 +39,21 @@ class CHIPAccountLoginClusterGetSetupPINResponseCallback jobject javaCallbackRef; }; +class CHIPApplicationLauncherClusterHideAppResponseCallback + : public Callback::Callback +{ +public: + CHIPApplicationLauncherClusterHideAppResponseCallback(jobject javaCallback); + + ~CHIPApplicationLauncherClusterHideAppResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ApplicationLauncher::Commands::HideAppResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPApplicationLauncherClusterLaunchAppResponseCallback : public Callback::Callback { @@ -54,6 +69,21 @@ class CHIPApplicationLauncherClusterLaunchAppResponseCallback jobject javaCallbackRef; }; +class CHIPApplicationLauncherClusterStopAppResponseCallback + : public Callback::Callback +{ +public: + CHIPApplicationLauncherClusterStopAppResponseCallback(jobject javaCallback); + + ~CHIPApplicationLauncherClusterStopAppResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPContentLauncherClusterLaunchContentResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 3e8a8a4cc36fde..0a8fe97af2e5a0 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -2863,97 +2863,6 @@ void CHIPContentLauncherAcceptsHeaderListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CHIPContentLauncherSupportedStreamingTypesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPContentLauncherSupportedStreamingTypesAttributeCallback::~CHIPContentLauncherSupportedStreamingTypesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::app::Clusters::ContentLauncher::ContentLaunchStreamingType entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); - } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SupportedStreamingTypesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -9124,8 +9033,8 @@ void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTvChannelTvChannelListAttributeCallback::CHIPTvChannelTvChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTvChannelChannelListAttributeCallback::CHIPTvChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9141,7 +9050,7 @@ CHIPTvChannelTvChannelListAttributeCallback::CHIPTvChannelTvChannelListAttribute } } -CHIPTvChannelTvChannelListAttributeCallback::~CHIPTvChannelTvChannelListAttributeCallback() +CHIPTvChannelChannelListAttributeCallback::~CHIPTvChannelChannelListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9152,7 +9061,7 @@ CHIPTvChannelTvChannelListAttributeCallback::~CHIPTvChannelTvChannelListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTvChannelTvChannelListAttributeCallback::CallbackFn( +void CHIPTvChannelChannelListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { @@ -9163,8 +9072,8 @@ void CHIPTvChannelTvChannelListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -9188,15 +9097,15 @@ void CHIPTvChannelTvChannelListAttributeCallback::CallbackFn( jclass attributeClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TvChannelCluster$TvChannelListAttribute", attributeClass); + env, "chip/devicecontroller/ChipClusters$TvChannelCluster$ChannelListAttribute", attributeClass); VerifyOrReturn( err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$TvChannelCluster$TvChannelListAttribute")); + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$TvChannelCluster$ChannelListAttribute")); chip::JniClass attributeJniClass(attributeClass); jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find TvChannelListAttribute constructor")); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ChannelListAttribute constructor")); auto iter = list.begin(); while (iter.Next()) @@ -9271,13 +9180,12 @@ void CHIPTvChannelTvChannelListAttributeCallback::CallbackFn( jobject attributeObj = env->NewObject(attributeClass, attributeCtor, majorNumber, minorNumber, name, callSign, affiliateCallSign); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create TvChannelListAttribute object")); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ChannelListAttribute object")); env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding TvChannelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ChannelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index d7b42b03534c6f..7fc2f663106dc2 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -849,32 +849,6 @@ class CHIPContentLauncherAcceptsHeaderListAttributeCallback bool keepAlive; }; -class CHIPContentLauncherSupportedStreamingTypesAttributeCallback - : public chip::Callback::Callback -{ -public: - CHIPContentLauncherSupportedStreamingTypesAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPContentLauncherSupportedStreamingTypesAttributeCallback(); - - static void maybeDestroy(CHIPContentLauncherSupportedStreamingTypesAttributeCallback * callback) - { - if (!callback->keepAlive) - { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void - CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list); - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - class CHIPContentLauncherAttributeListAttributeCallback : public chip::Callback::Callback { @@ -2507,20 +2481,20 @@ class CHIPSwitchAttributeListAttributeCallback bool keepAlive; }; -class CHIPTvChannelTvChannelListAttributeCallback - : public chip::Callback::Callback +class CHIPTvChannelChannelListAttributeCallback + : public chip::Callback::Callback { public: - CHIPTvChannelTvChannelListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPTvChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPTvChannelTvChannelListAttributeCallback(); + ~CHIPTvChannelChannelListAttributeCallback(); - static void maybeDestroy(CHIPTvChannelTvChannelListAttributeCallback * callback) + static void maybeDestroy(CHIPTvChannelChannelListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index c8dddf10013d3f..8db05defdccf0b 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -231,6 +231,10 @@ public void login( login(chipClusterPtr, callback, tempAccountIdentifier, setupPIN); } + public void logout(DefaultClusterCallback callback) { + logout(chipClusterPtr, callback); + } + private native void getSetupPIN( long chipClusterPtr, GetSetupPINResponseCallback Callback, String tempAccountIdentifier); @@ -240,6 +244,8 @@ private native void login( String tempAccountIdentifier, String setupPIN); + private native void logout(long chipClusterPtr, DefaultClusterCallback Callback); + public interface GetSetupPINResponseCallback { void onSuccess(String setupPIN); @@ -477,43 +483,30 @@ public void reportProductIdAttribute(IntegerAttributeCallback callback) { reportProductIdAttribute(chipClusterPtr, callback); } - public void readApplicationIdAttribute(CharStringAttributeCallback callback) { - readApplicationIdAttribute(chipClusterPtr, callback); - } - - public void subscribeApplicationIdAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeApplicationIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportApplicationIdAttribute(CharStringAttributeCallback callback) { - reportApplicationIdAttribute(chipClusterPtr, callback); - } - - public void readCatalogVendorIdAttribute(IntegerAttributeCallback callback) { - readCatalogVendorIdAttribute(chipClusterPtr, callback); + public void readApplicationStatusAttribute(IntegerAttributeCallback callback) { + readApplicationStatusAttribute(chipClusterPtr, callback); } - public void subscribeCatalogVendorIdAttribute( + public void subscribeApplicationStatusAttribute( DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeCatalogVendorIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeApplicationStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void reportCatalogVendorIdAttribute(IntegerAttributeCallback callback) { - reportCatalogVendorIdAttribute(chipClusterPtr, callback); + public void reportApplicationStatusAttribute(IntegerAttributeCallback callback) { + reportApplicationStatusAttribute(chipClusterPtr, callback); } - public void readApplicationStatusAttribute(IntegerAttributeCallback callback) { - readApplicationStatusAttribute(chipClusterPtr, callback); + public void readApplicationVersionAttribute(CharStringAttributeCallback callback) { + readApplicationVersionAttribute(chipClusterPtr, callback); } - public void subscribeApplicationStatusAttribute( + public void subscribeApplicationVersionAttribute( DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeApplicationStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeApplicationVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void reportApplicationStatusAttribute(IntegerAttributeCallback callback) { - reportApplicationStatusAttribute(chipClusterPtr, callback); + public void reportApplicationVersionAttribute(CharStringAttributeCallback callback) { + reportApplicationVersionAttribute(chipClusterPtr, callback); } public void readAttributeListAttribute(AttributeListAttributeCallback callback) { @@ -569,32 +562,23 @@ private native void subscribeProductIdAttribute( private native void reportProductIdAttribute( long chipClusterPtr, IntegerAttributeCallback callback); - private native void readApplicationIdAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void subscribeApplicationIdAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportApplicationIdAttribute( - long chipClusterPtr, CharStringAttributeCallback callback); - - private native void readCatalogVendorIdAttribute( + private native void readApplicationStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); - private native void subscribeCatalogVendorIdAttribute( + private native void subscribeApplicationStatusAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - private native void reportCatalogVendorIdAttribute( + private native void reportApplicationStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); - private native void readApplicationStatusAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + private native void readApplicationVersionAttribute( + long chipClusterPtr, CharStringAttributeCallback callback); - private native void subscribeApplicationStatusAttribute( + private native void subscribeApplicationVersionAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - private native void reportApplicationStatusAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + private native void reportApplicationVersionAttribute( + long chipClusterPtr, CharStringAttributeCallback callback); private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); @@ -621,6 +605,11 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public void hideApp( + HideAppResponseCallback callback, Integer catalogVendorId, String applicationId) { + hideApp(chipClusterPtr, callback, catalogVendorId, applicationId); + } + public void launchApp( LaunchAppResponseCallback callback, String data, @@ -629,6 +618,17 @@ public void launchApp( launchApp(chipClusterPtr, callback, data, catalogVendorId, applicationId); } + public void stopApp( + StopAppResponseCallback callback, Integer catalogVendorId, String applicationId) { + stopApp(chipClusterPtr, callback, catalogVendorId, applicationId); + } + + private native void hideApp( + long chipClusterPtr, + HideAppResponseCallback Callback, + Integer catalogVendorId, + String applicationId); + private native void launchApp( long chipClusterPtr, LaunchAppResponseCallback Callback, @@ -636,12 +636,30 @@ private native void launchApp( Integer catalogVendorId, String applicationId); + private native void stopApp( + long chipClusterPtr, + StopAppResponseCallback Callback, + Integer catalogVendorId, + String applicationId); + + public interface HideAppResponseCallback { + void onSuccess(Integer status, String data); + + void onError(Exception error); + } + public interface LaunchAppResponseCallback { void onSuccess(Integer status, String data); void onError(Exception error); } + public interface StopAppResponseCallback { + void onSuccess(Integer status, String data); + + void onError(Exception error); + } + public interface ApplicationLauncherListAttributeCallback { void onSuccess(List valueList); @@ -659,32 +677,6 @@ public void readApplicationLauncherListAttribute( readApplicationLauncherListAttribute(chipClusterPtr, callback); } - public void readCatalogVendorIdAttribute(IntegerAttributeCallback callback) { - readCatalogVendorIdAttribute(chipClusterPtr, callback); - } - - public void subscribeCatalogVendorIdAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeCatalogVendorIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportCatalogVendorIdAttribute(IntegerAttributeCallback callback) { - reportCatalogVendorIdAttribute(chipClusterPtr, callback); - } - - public void readApplicationIdAttribute(IntegerAttributeCallback callback) { - readApplicationIdAttribute(chipClusterPtr, callback); - } - - public void subscribeApplicationIdAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeApplicationIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportApplicationIdAttribute(IntegerAttributeCallback callback) { - reportApplicationIdAttribute(chipClusterPtr, callback); - } - public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } @@ -705,24 +697,6 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { private native void readApplicationLauncherListAttribute( long chipClusterPtr, ApplicationLauncherListAttributeCallback callback); - private native void readCatalogVendorIdAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void subscribeCatalogVendorIdAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportCatalogVendorIdAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void readApplicationIdAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void subscribeApplicationIdAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportApplicationIdAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); @@ -3857,32 +3831,45 @@ public static long clusterId() { public native long initWithDevice(long devicePtr, int endpointId); public void launchContent( - LaunchContentResponseCallback callback, Boolean autoPlay, String data) { - launchContent(chipClusterPtr, callback, autoPlay, data); + LaunchContentResponseCallback callback, + Boolean autoPlay, + String data, + Integer type, + String value) { + launchContent(chipClusterPtr, callback, autoPlay, data, type, value); } public void launchURL( - LaunchURLResponseCallback callback, String contentURL, String displayString) { - launchURL(chipClusterPtr, callback, contentURL, displayString); + LaunchURLResponseCallback callback, + String contentURL, + String displayString, + String providerName) { + launchURL(chipClusterPtr, callback, contentURL, displayString, providerName); } private native void launchContent( - long chipClusterPtr, LaunchContentResponseCallback Callback, Boolean autoPlay, String data); + long chipClusterPtr, + LaunchContentResponseCallback Callback, + Boolean autoPlay, + String data, + Integer type, + String value); private native void launchURL( long chipClusterPtr, LaunchURLResponseCallback Callback, String contentURL, - String displayString); + String displayString, + String providerName); public interface LaunchContentResponseCallback { - void onSuccess(String data, Integer contentLaunchStatus); + void onSuccess(Integer contentLaunchStatus, String data); void onError(Exception error); } public interface LaunchURLResponseCallback { - void onSuccess(String data, Integer contentLaunchStatus); + void onSuccess(Integer contentLaunchStatus, String data); void onError(Exception error); } @@ -3893,12 +3880,6 @@ public interface AcceptsHeaderListAttributeCallback { void onError(Exception ex); } - public interface SupportedStreamingTypesAttributeCallback { - void onSuccess(List valueList); - - void onError(Exception ex); - } - public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -3909,9 +3890,23 @@ public void readAcceptsHeaderListAttribute(AcceptsHeaderListAttributeCallback ca readAcceptsHeaderListAttribute(chipClusterPtr, callback); } - public void readSupportedStreamingTypesAttribute( - SupportedStreamingTypesAttributeCallback callback) { - readSupportedStreamingTypesAttribute(chipClusterPtr, callback); + public void readSupportedStreamingProtocolsAttribute(LongAttributeCallback callback) { + readSupportedStreamingProtocolsAttribute(chipClusterPtr, callback); + } + + public void writeSupportedStreamingProtocolsAttribute( + DefaultClusterCallback callback, Long value) { + writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value); + } + + public void subscribeSupportedStreamingProtocolsAttribute( + DefaultClusterCallback callback, int minInterval, int maxInterval) { + subscribeSupportedStreamingProtocolsAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + + public void reportSupportedStreamingProtocolsAttribute(LongAttributeCallback callback) { + reportSupportedStreamingProtocolsAttribute(chipClusterPtr, callback); } public void readAttributeListAttribute(AttributeListAttributeCallback callback) { @@ -3934,8 +3929,17 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { private native void readAcceptsHeaderListAttribute( long chipClusterPtr, AcceptsHeaderListAttributeCallback callback); - private native void readSupportedStreamingTypesAttribute( - long chipClusterPtr, SupportedStreamingTypesAttributeCallback callback); + private native void readSupportedStreamingProtocolsAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void writeSupportedStreamingProtocolsAttribute( + long chipClusterPtr, DefaultClusterCallback callback, Long value); + + private native void subscribeSupportedStreamingProtocolsAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); + + private native void reportSupportedStreamingProtocolsAttribute( + long chipClusterPtr, LongAttributeCallback callback); private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); @@ -7442,45 +7446,10 @@ public void reportDurationAttribute(LongAttributeCallback callback) { reportDurationAttribute(chipClusterPtr, callback); } - public void readPositionUpdatedAtAttribute(LongAttributeCallback callback) { - readPositionUpdatedAtAttribute(chipClusterPtr, callback); - } - - public void subscribePositionUpdatedAtAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribePositionUpdatedAtAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportPositionUpdatedAtAttribute(LongAttributeCallback callback) { - reportPositionUpdatedAtAttribute(chipClusterPtr, callback); - } - - public void readPositionAttribute(LongAttributeCallback callback) { - readPositionAttribute(chipClusterPtr, callback); - } - - public void subscribePositionAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribePositionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportPositionAttribute(LongAttributeCallback callback) { - reportPositionAttribute(chipClusterPtr, callback); - } - - public void readPlaybackSpeedAttribute(LongAttributeCallback callback) { + public void readPlaybackSpeedAttribute(FloatAttributeCallback callback) { readPlaybackSpeedAttribute(chipClusterPtr, callback); } - public void subscribePlaybackSpeedAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribePlaybackSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportPlaybackSpeedAttribute(LongAttributeCallback callback) { - reportPlaybackSpeedAttribute(chipClusterPtr, callback); - } - public void readSeekRangeEndAttribute(LongAttributeCallback callback) { readSeekRangeEndAttribute(chipClusterPtr, callback); } @@ -7549,31 +7518,8 @@ private native void subscribeDurationAttribute( private native void reportDurationAttribute( long chipClusterPtr, LongAttributeCallback callback); - private native void readPositionUpdatedAtAttribute( - long chipClusterPtr, LongAttributeCallback callback); - - private native void subscribePositionUpdatedAtAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportPositionUpdatedAtAttribute( - long chipClusterPtr, LongAttributeCallback callback); - - private native void readPositionAttribute(long chipClusterPtr, LongAttributeCallback callback); - - private native void subscribePositionAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportPositionAttribute( - long chipClusterPtr, LongAttributeCallback callback); - private native void readPlaybackSpeedAttribute( - long chipClusterPtr, LongAttributeCallback callback); - - private native void subscribePlaybackSpeedAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportPlaybackSpeedAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, FloatAttributeCallback callback); private native void readSeekRangeEndAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -10886,21 +10832,21 @@ private native void skipChannel( long chipClusterPtr, DefaultClusterCallback Callback, Integer count); public interface ChangeChannelResponseCallback { - void onSuccess( // ChannelMatch: /* TYPE WARNING: array array defaults to */ uint8_t * + void onSuccess( // channelMatch: Struct TvChannelInfo // Conversion from this type to Java is not properly implemented yet - Integer ErrorType); + Integer errorType); void onError(Exception error); } - public static class TvChannelListAttribute { + public static class ChannelListAttribute { public Integer majorNumber; public Integer minorNumber; public String name; public String callSign; public String affiliateCallSign; - public TvChannelListAttribute( + public ChannelListAttribute( Integer majorNumber, Integer minorNumber, String name, @@ -10940,8 +10886,8 @@ public String toString() { } } - public interface TvChannelListAttributeCallback { - void onSuccess(List valueList); + public interface ChannelListAttributeCallback { + void onSuccess(List valueList); void onError(Exception ex); } @@ -10952,34 +10898,8 @@ public interface AttributeListAttributeCallback { void onError(Exception ex); } - public void readTvChannelListAttribute(TvChannelListAttributeCallback callback) { - readTvChannelListAttribute(chipClusterPtr, callback); - } - - public void readTvChannelLineupAttribute(OctetStringAttributeCallback callback) { - readTvChannelLineupAttribute(chipClusterPtr, callback); - } - - public void subscribeTvChannelLineupAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeTvChannelLineupAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportTvChannelLineupAttribute(OctetStringAttributeCallback callback) { - reportTvChannelLineupAttribute(chipClusterPtr, callback); - } - - public void readCurrentTvChannelAttribute(OctetStringAttributeCallback callback) { - readCurrentTvChannelAttribute(chipClusterPtr, callback); - } - - public void subscribeCurrentTvChannelAttribute( - DefaultClusterCallback callback, int minInterval, int maxInterval) { - subscribeCurrentTvChannelAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void reportCurrentTvChannelAttribute(OctetStringAttributeCallback callback) { - reportCurrentTvChannelAttribute(chipClusterPtr, callback); + public void readChannelListAttribute(ChannelListAttributeCallback callback) { + readChannelListAttribute(chipClusterPtr, callback); } public void readAttributeListAttribute(AttributeListAttributeCallback callback) { @@ -10999,26 +10919,8 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } - private native void readTvChannelListAttribute( - long chipClusterPtr, TvChannelListAttributeCallback callback); - - private native void readTvChannelLineupAttribute( - long chipClusterPtr, OctetStringAttributeCallback callback); - - private native void subscribeTvChannelLineupAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportTvChannelLineupAttribute( - long chipClusterPtr, OctetStringAttributeCallback callback); - - private native void readCurrentTvChannelAttribute( - long chipClusterPtr, OctetStringAttributeCallback callback); - - private native void subscribeCurrentTvChannelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); - - private native void reportCurrentTvChannelAttribute( - long chipClusterPtr, OctetStringAttributeCallback callback); + private native void readChannelListAttribute( + long chipClusterPtr, ChannelListAttributeCallback callback); private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); @@ -11099,6 +11001,10 @@ public void readTargetNavigatorListAttribute(TargetNavigatorListAttributeCallbac readTargetNavigatorListAttribute(chipClusterPtr, callback); } + public void readCurrentNavigatorTargetAttribute(IntegerAttributeCallback callback) { + readCurrentNavigatorTargetAttribute(chipClusterPtr, callback); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } @@ -11119,6 +11025,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { private native void readTargetNavigatorListAttribute( long chipClusterPtr, TargetNavigatorListAttributeCallback callback); + private native void readCurrentNavigatorTargetAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 9ae47ab15e6db8..4ec43fc15a6404 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -398,6 +398,32 @@ public void onError(Exception ex) { } } + public static class DelegatedHideAppResponseCallback + implements ChipClusters.ApplicationLauncherCluster.HideAppResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, String data) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); + responseValues.put(dataResponseValue, data); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedLaunchAppResponseCallback implements ChipClusters.ApplicationLauncherCluster.LaunchAppResponseCallback, DelegatedClusterCallback { @@ -424,6 +450,32 @@ public void onError(Exception error) { } } + public static class DelegatedStopAppResponseCallback + implements ChipClusters.ApplicationLauncherCluster.StopAppResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, String data) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); + responseValues.put(dataResponseValue, data); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedApplicationLauncherClusterApplicationLauncherListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.ApplicationLauncherListAttributeCallback, DelegatedClusterCallback { @@ -794,13 +846,13 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(String data, Integer contentLaunchStatus) { + public void onSuccess(Integer contentLaunchStatus, String data) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); - responseValues.put(dataResponseValue, data); CommandResponseInfo contentLaunchStatusResponseValue = new CommandResponseInfo("contentLaunchStatus", "int"); responseValues.put(contentLaunchStatusResponseValue, contentLaunchStatus); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); + responseValues.put(dataResponseValue, data); callback.onSuccess(responseValues); } @@ -821,13 +873,13 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(String data, Integer contentLaunchStatus) { + public void onSuccess(Integer contentLaunchStatus, String data) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); - responseValues.put(dataResponseValue, data); CommandResponseInfo contentLaunchStatusResponseValue = new CommandResponseInfo("contentLaunchStatus", "int"); responseValues.put(contentLaunchStatusResponseValue, contentLaunchStatus); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); + responseValues.put(dataResponseValue, data); callback.onSuccess(responseValues); } @@ -863,32 +915,6 @@ public void onError(Exception ex) { } } - public static class DelegatedContentLauncherClusterSupportedStreamingTypesAttributeCallback - implements ChipClusters.ContentLauncherCluster.SupportedStreamingTypesAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = - new CommandResponseInfo("valueList", "List"); - - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedContentLauncherClusterAttributeListAttributeCallback implements ChipClusters.ContentLauncherCluster.AttributeListAttributeCallback, DelegatedClusterCallback { @@ -3529,14 +3555,14 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( // ChannelMatch: /* TYPE WARNING: array array defaults to */ uint8_t * + public void onSuccess( // channelMatch: Struct TvChannelInfo // Conversion from this type to Java is not properly implemented yet - Integer ErrorType) { + Integer errorType) { Map responseValues = new LinkedHashMap<>(); - // ChannelMatch: /* TYPE WARNING: array array defaults to */ uint8_t * + // channelMatch: Struct TvChannelInfo // Conversion from this type to Java is not properly implemented yet - CommandResponseInfo ErrorTypeResponseValue = new CommandResponseInfo("ErrorType", "int"); - responseValues.put(ErrorTypeResponseValue, ErrorType); + CommandResponseInfo errorTypeResponseValue = new CommandResponseInfo("errorType", "int"); + responseValues.put(errorTypeResponseValue, errorType); callback.onSuccess(responseValues); } @@ -3546,8 +3572,8 @@ public void onError(Exception error) { } } - public static class DelegatedTvChannelClusterTvChannelListAttributeCallback - implements ChipClusters.TvChannelCluster.TvChannelListAttributeCallback, + public static class DelegatedTvChannelClusterChannelListAttributeCallback + implements ChipClusters.TvChannelCluster.ChannelListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -3557,11 +3583,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); @@ -4794,6 +4820,18 @@ public Map> getCommandMap() { () -> new DelegatedDefaultClusterCallback(), accountLoginloginCommandParams); accountLoginClusterInteractionInfoMap.put("login", accountLoginloginInteractionInfo); + Map accountLoginlogoutCommandParams = + new LinkedHashMap(); + // Populate commands + InteractionInfo accountLoginlogoutInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.AccountLoginCluster) cluster) + .logout((DefaultClusterCallback) callback); + }, + () -> new DelegatedDefaultClusterCallback(), + accountLoginlogoutCommandParams); + accountLoginClusterInteractionInfoMap.put("logout", accountLoginlogoutInteractionInfo); commandMap.put("accountLogin", accountLoginClusterInteractionInfoMap); Map administratorCommissioningClusterInteractionInfoMap = new LinkedHashMap<>(); @@ -4921,6 +4959,32 @@ public Map> getCommandMap() { commandMap.put("applicationBasic", applicationBasicClusterInteractionInfoMap); Map applicationLauncherClusterInteractionInfoMap = new LinkedHashMap<>(); + Map applicationLauncherhideAppCommandParams = + new LinkedHashMap(); + CommandParameterInfo applicationLauncherhideAppcatalogVendorIdCommandParameterInfo = + new CommandParameterInfo("catalogVendorId", int.class); + applicationLauncherhideAppCommandParams.put( + "catalogVendorId", applicationLauncherhideAppcatalogVendorIdCommandParameterInfo); + + CommandParameterInfo applicationLauncherhideAppapplicationIdCommandParameterInfo = + new CommandParameterInfo("applicationId", String.class); + applicationLauncherhideAppCommandParams.put( + "applicationId", applicationLauncherhideAppapplicationIdCommandParameterInfo); + + // Populate commands + InteractionInfo applicationLauncherhideAppInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ApplicationLauncherCluster) cluster) + .hideApp( + (ChipClusters.ApplicationLauncherCluster.HideAppResponseCallback) callback, + (Integer) commandArguments.get("catalogVendorId"), + (String) commandArguments.get("applicationId")); + }, + () -> new DelegatedHideAppResponseCallback(), + applicationLauncherhideAppCommandParams); + applicationLauncherClusterInteractionInfoMap.put( + "hideApp", applicationLauncherhideAppInteractionInfo); Map applicationLauncherlaunchAppCommandParams = new LinkedHashMap(); CommandParameterInfo applicationLauncherlaunchAppdataCommandParameterInfo = @@ -4953,6 +5017,32 @@ public Map> getCommandMap() { applicationLauncherlaunchAppCommandParams); applicationLauncherClusterInteractionInfoMap.put( "launchApp", applicationLauncherlaunchAppInteractionInfo); + Map applicationLauncherstopAppCommandParams = + new LinkedHashMap(); + CommandParameterInfo applicationLauncherstopAppcatalogVendorIdCommandParameterInfo = + new CommandParameterInfo("catalogVendorId", int.class); + applicationLauncherstopAppCommandParams.put( + "catalogVendorId", applicationLauncherstopAppcatalogVendorIdCommandParameterInfo); + + CommandParameterInfo applicationLauncherstopAppapplicationIdCommandParameterInfo = + new CommandParameterInfo("applicationId", String.class); + applicationLauncherstopAppCommandParams.put( + "applicationId", applicationLauncherstopAppapplicationIdCommandParameterInfo); + + // Populate commands + InteractionInfo applicationLauncherstopAppInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ApplicationLauncherCluster) cluster) + .stopApp( + (ChipClusters.ApplicationLauncherCluster.StopAppResponseCallback) callback, + (Integer) commandArguments.get("catalogVendorId"), + (String) commandArguments.get("applicationId")); + }, + () -> new DelegatedStopAppResponseCallback(), + applicationLauncherstopAppCommandParams); + applicationLauncherClusterInteractionInfoMap.put( + "stopApp", applicationLauncherstopAppInteractionInfo); commandMap.put("applicationLauncher", applicationLauncherClusterInteractionInfoMap); Map audioOutputClusterInteractionInfoMap = new LinkedHashMap<>(); Map audioOutputrenameOutputCommandParams = @@ -6300,6 +6390,16 @@ public Map> getCommandMap() { contentLauncherlaunchContentCommandParams.put( "data", contentLauncherlaunchContentdataCommandParameterInfo); + CommandParameterInfo contentLauncherlaunchContenttypeCommandParameterInfo = + new CommandParameterInfo("type", int.class); + contentLauncherlaunchContentCommandParams.put( + "type", contentLauncherlaunchContenttypeCommandParameterInfo); + + CommandParameterInfo contentLauncherlaunchContentvalueCommandParameterInfo = + new CommandParameterInfo("value", String.class); + contentLauncherlaunchContentCommandParams.put( + "value", contentLauncherlaunchContentvalueCommandParameterInfo); + // Populate commands InteractionInfo contentLauncherlaunchContentInteractionInfo = new InteractionInfo( @@ -6308,7 +6408,9 @@ public Map> getCommandMap() { .launchContent( (ChipClusters.ContentLauncherCluster.LaunchContentResponseCallback) callback, (Boolean) commandArguments.get("autoPlay"), - (String) commandArguments.get("data")); + (String) commandArguments.get("data"), + (Integer) commandArguments.get("type"), + (String) commandArguments.get("value")); }, () -> new DelegatedLaunchContentResponseCallback(), contentLauncherlaunchContentCommandParams); @@ -6326,6 +6428,11 @@ public Map> getCommandMap() { contentLauncherlaunchURLCommandParams.put( "displayString", contentLauncherlaunchURLdisplayStringCommandParameterInfo); + CommandParameterInfo contentLauncherlaunchURLproviderNameCommandParameterInfo = + new CommandParameterInfo("providerName", String.class); + contentLauncherlaunchURLCommandParams.put( + "providerName", contentLauncherlaunchURLproviderNameCommandParameterInfo); + // Populate commands InteractionInfo contentLauncherlaunchURLInteractionInfo = new InteractionInfo( @@ -6334,7 +6441,8 @@ public Map> getCommandMap() { .launchURL( (ChipClusters.ContentLauncherCluster.LaunchURLResponseCallback) callback, (String) commandArguments.get("contentURL"), - (String) commandArguments.get("displayString")); + (String) commandArguments.get("displayString"), + (String) commandArguments.get("providerName")); }, () -> new DelegatedLaunchURLResponseCallback(), contentLauncherlaunchURLCommandParams); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 27edfa0cf6e4af..937c4a281b0d62 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -240,31 +240,6 @@ public Map> getReadAttributeMap() { readApplicationBasicProductIdCommandParams); readApplicationBasicInteractionInfo.put( "readProductIdAttribute", readApplicationBasicProductIdAttributeInteractionInfo); - Map readApplicationBasicApplicationIdCommandParams = - new LinkedHashMap(); - InteractionInfo readApplicationBasicApplicationIdAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ApplicationBasicCluster) cluster) - .readApplicationIdAttribute((ChipClusters.CharStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readApplicationBasicApplicationIdCommandParams); - readApplicationBasicInteractionInfo.put( - "readApplicationIdAttribute", readApplicationBasicApplicationIdAttributeInteractionInfo); - Map readApplicationBasicCatalogVendorIdCommandParams = - new LinkedHashMap(); - InteractionInfo readApplicationBasicCatalogVendorIdAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ApplicationBasicCluster) cluster) - .readCatalogVendorIdAttribute((ChipClusters.IntegerAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readApplicationBasicCatalogVendorIdCommandParams); - readApplicationBasicInteractionInfo.put( - "readCatalogVendorIdAttribute", - readApplicationBasicCatalogVendorIdAttributeInteractionInfo); Map readApplicationBasicApplicationStatusCommandParams = new LinkedHashMap(); InteractionInfo readApplicationBasicApplicationStatusAttributeInteractionInfo = @@ -278,6 +253,20 @@ public Map> getReadAttributeMap() { readApplicationBasicInteractionInfo.put( "readApplicationStatusAttribute", readApplicationBasicApplicationStatusAttributeInteractionInfo); + Map readApplicationBasicApplicationVersionCommandParams = + new LinkedHashMap(); + InteractionInfo readApplicationBasicApplicationVersionAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ApplicationBasicCluster) cluster) + .readApplicationVersionAttribute( + (ChipClusters.CharStringAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readApplicationBasicApplicationVersionCommandParams); + readApplicationBasicInteractionInfo.put( + "readApplicationVersionAttribute", + readApplicationBasicApplicationVersionAttributeInteractionInfo); Map readApplicationBasicAttributeListCommandParams = new LinkedHashMap(); InteractionInfo readApplicationBasicAttributeListAttributeInteractionInfo = @@ -327,31 +316,6 @@ public Map> getReadAttributeMap() { readApplicationLauncherInteractionInfo.put( "readApplicationLauncherListAttribute", readApplicationLauncherApplicationLauncherListAttributeInteractionInfo); - Map readApplicationLauncherCatalogVendorIdCommandParams = - new LinkedHashMap(); - InteractionInfo readApplicationLauncherCatalogVendorIdAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ApplicationLauncherCluster) cluster) - .readCatalogVendorIdAttribute((ChipClusters.IntegerAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readApplicationLauncherCatalogVendorIdCommandParams); - readApplicationLauncherInteractionInfo.put( - "readCatalogVendorIdAttribute", - readApplicationLauncherCatalogVendorIdAttributeInteractionInfo); - Map readApplicationLauncherApplicationIdCommandParams = - new LinkedHashMap(); - InteractionInfo readApplicationLauncherApplicationIdAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ApplicationLauncherCluster) cluster) - .readApplicationIdAttribute((ChipClusters.IntegerAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readApplicationLauncherApplicationIdCommandParams); - readApplicationLauncherInteractionInfo.put( - "readApplicationIdAttribute", readApplicationLauncherApplicationIdAttributeInteractionInfo); Map readApplicationLauncherAttributeListCommandParams = new LinkedHashMap(); InteractionInfo readApplicationLauncherAttributeListAttributeInteractionInfo = @@ -1726,23 +1690,20 @@ public Map> getReadAttributeMap() { readContentLauncherInteractionInfo.put( "readAcceptsHeaderListAttribute", readContentLauncherAcceptsHeaderListAttributeInteractionInfo); - Map readContentLauncherSupportedStreamingTypesCommandParams = + Map readContentLauncherSupportedStreamingProtocolsCommandParams = new LinkedHashMap(); - InteractionInfo readContentLauncherSupportedStreamingTypesAttributeInteractionInfo = + InteractionInfo readContentLauncherSupportedStreamingProtocolsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ContentLauncherCluster) cluster) - .readSupportedStreamingTypesAttribute( - (ChipClusters.ContentLauncherCluster.SupportedStreamingTypesAttributeCallback) - callback); + .readSupportedStreamingProtocolsAttribute( + (ChipClusters.LongAttributeCallback) callback); }, - () -> - new ClusterInfoMapping - .DelegatedContentLauncherClusterSupportedStreamingTypesAttributeCallback(), - readContentLauncherSupportedStreamingTypesCommandParams); + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readContentLauncherSupportedStreamingProtocolsCommandParams); readContentLauncherInteractionInfo.put( - "readSupportedStreamingTypesAttribute", - readContentLauncherSupportedStreamingTypesAttributeInteractionInfo); + "readSupportedStreamingProtocolsAttribute", + readContentLauncherSupportedStreamingProtocolsAttributeInteractionInfo); Map readContentLauncherAttributeListCommandParams = new LinkedHashMap(); InteractionInfo readContentLauncherAttributeListAttributeInteractionInfo = @@ -3402,40 +3363,15 @@ public Map> getReadAttributeMap() { readMediaPlaybackDurationCommandParams); readMediaPlaybackInteractionInfo.put( "readDurationAttribute", readMediaPlaybackDurationAttributeInteractionInfo); - Map readMediaPlaybackPositionUpdatedAtCommandParams = - new LinkedHashMap(); - InteractionInfo readMediaPlaybackPositionUpdatedAtAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .readPositionUpdatedAtAttribute((ChipClusters.LongAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readMediaPlaybackPositionUpdatedAtCommandParams); - readMediaPlaybackInteractionInfo.put( - "readPositionUpdatedAtAttribute", - readMediaPlaybackPositionUpdatedAtAttributeInteractionInfo); - Map readMediaPlaybackPositionCommandParams = - new LinkedHashMap(); - InteractionInfo readMediaPlaybackPositionAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .readPositionAttribute((ChipClusters.LongAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readMediaPlaybackPositionCommandParams); - readMediaPlaybackInteractionInfo.put( - "readPositionAttribute", readMediaPlaybackPositionAttributeInteractionInfo); Map readMediaPlaybackPlaybackSpeedCommandParams = new LinkedHashMap(); InteractionInfo readMediaPlaybackPlaybackSpeedAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MediaPlaybackCluster) cluster) - .readPlaybackSpeedAttribute((ChipClusters.LongAttributeCallback) callback); + .readPlaybackSpeedAttribute((ChipClusters.FloatAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedFloatAttributeCallback(), readMediaPlaybackPlaybackSpeedCommandParams); readMediaPlaybackInteractionInfo.put( "readPlaybackSpeedAttribute", readMediaPlaybackPlaybackSpeedAttributeInteractionInfo); @@ -5049,45 +4985,19 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readSwitchClusterRevisionAttributeInteractionInfo); readAttributeMap.put("switch", readSwitchInteractionInfo); Map readTvChannelInteractionInfo = new LinkedHashMap<>(); - Map readTvChannelTvChannelListCommandParams = - new LinkedHashMap(); - InteractionInfo readTvChannelTvChannelListAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.TvChannelCluster) cluster) - .readTvChannelListAttribute( - (ChipClusters.TvChannelCluster.TvChannelListAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedTvChannelClusterTvChannelListAttributeCallback(), - readTvChannelTvChannelListCommandParams); - readTvChannelInteractionInfo.put( - "readTvChannelListAttribute", readTvChannelTvChannelListAttributeInteractionInfo); - Map readTvChannelTvChannelLineupCommandParams = - new LinkedHashMap(); - InteractionInfo readTvChannelTvChannelLineupAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.TvChannelCluster) cluster) - .readTvChannelLineupAttribute( - (ChipClusters.OctetStringAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedOctetStringAttributeCallback(), - readTvChannelTvChannelLineupCommandParams); - readTvChannelInteractionInfo.put( - "readTvChannelLineupAttribute", readTvChannelTvChannelLineupAttributeInteractionInfo); - Map readTvChannelCurrentTvChannelCommandParams = + Map readTvChannelChannelListCommandParams = new LinkedHashMap(); - InteractionInfo readTvChannelCurrentTvChannelAttributeInteractionInfo = + InteractionInfo readTvChannelChannelListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TvChannelCluster) cluster) - .readCurrentTvChannelAttribute( - (ChipClusters.OctetStringAttributeCallback) callback); + .readChannelListAttribute( + (ChipClusters.TvChannelCluster.ChannelListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedOctetStringAttributeCallback(), - readTvChannelCurrentTvChannelCommandParams); + () -> new ClusterInfoMapping.DelegatedTvChannelClusterChannelListAttributeCallback(), + readTvChannelChannelListCommandParams); readTvChannelInteractionInfo.put( - "readCurrentTvChannelAttribute", readTvChannelCurrentTvChannelAttributeInteractionInfo); + "readChannelListAttribute", readTvChannelChannelListAttributeInteractionInfo); Map readTvChannelAttributeListCommandParams = new LinkedHashMap(); InteractionInfo readTvChannelAttributeListAttributeInteractionInfo = @@ -5132,6 +5042,20 @@ public Map> getReadAttributeMap() { readTargetNavigatorInteractionInfo.put( "readTargetNavigatorListAttribute", readTargetNavigatorTargetNavigatorListAttributeInteractionInfo); + Map readTargetNavigatorCurrentNavigatorTargetCommandParams = + new LinkedHashMap(); + InteractionInfo readTargetNavigatorCurrentNavigatorTargetAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TargetNavigatorCluster) cluster) + .readCurrentNavigatorTargetAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTargetNavigatorCurrentNavigatorTargetCommandParams); + readTargetNavigatorInteractionInfo.put( + "readCurrentNavigatorTargetAttribute", + readTargetNavigatorCurrentNavigatorTargetAttributeInteractionInfo); Map readTargetNavigatorAttributeListCommandParams = new LinkedHashMap(); InteractionInfo readTargetNavigatorAttributeListAttributeInteractionInfo = diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index f70164037b7d29..c0967eb316f815 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -369,6 +369,24 @@ public Map> getWriteAttributeMap() { writeColorControlStartUpColorTemperatureMiredsAttributeInteractionInfo); writeAttributeMap.put("colorControl", writeColorControlInteractionInfo); Map writeContentLauncherInteractionInfo = new LinkedHashMap<>(); + Map writeContentLauncherSupportedStreamingProtocolsCommandParams = + new LinkedHashMap(); + CommandParameterInfo contentLaunchersupportedStreamingProtocolsCommandParameterInfo = + new CommandParameterInfo("value", long.class); + writeContentLauncherSupportedStreamingProtocolsCommandParams.put( + "value", contentLaunchersupportedStreamingProtocolsCommandParameterInfo); + InteractionInfo writeContentLauncherSupportedStreamingProtocolsAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentLauncherCluster) cluster) + .writeSupportedStreamingProtocolsAttribute( + (DefaultClusterCallback) callback, (Long) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeContentLauncherSupportedStreamingProtocolsCommandParams); + writeContentLauncherInteractionInfo.put( + "writeSupportedStreamingProtocolsAttribute", + writeContentLauncherSupportedStreamingProtocolsAttributeInteractionInfo); writeAttributeMap.put("contentLauncher", writeContentLauncherInteractionInfo); Map writeDescriptorInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("descriptor", writeDescriptorInteractionInfo); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 80e7da25542e16..e9700d87abf3e3 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -80,6 +80,12 @@ class ChipClusters: "setupPIN": "str", }, }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "Logout", + "args": { + }, + }, }, "attributes": { 0x0000FFFB: { @@ -191,22 +197,22 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000004: { + "attributeName": "ApplicationApp", + "attributeId": 0x00000004, + "type": "", + "writable": True, + }, 0x00000005: { - "attributeName": "ApplicationId", + "attributeName": "ApplicationStatus", "attributeId": 0x00000005, - "type": "str", + "type": "int", "reportable": True, }, 0x00000006: { - "attributeName": "CatalogVendorId", + "attributeName": "ApplicationVersion", "attributeId": 0x00000006, - "type": "int", - "reportable": True, - }, - 0x00000007: { - "attributeName": "ApplicationStatus", - "attributeId": 0x00000007, - "type": "int", + "type": "str", "reportable": True, }, 0x0000FFFB: { @@ -226,6 +232,14 @@ class ChipClusters: "clusterName": "ApplicationLauncher", "clusterId": 0x0000050C, "commands": { + 0x00000002: { + "commandId": 0x00000002, + "commandName": "HideApp", + "args": { + "catalogVendorId": "int", + "applicationId": "str", + }, + }, 0x00000000: { "commandId": 0x00000000, "commandName": "LaunchApp", @@ -235,6 +249,14 @@ class ChipClusters: "applicationId": "str", }, }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "StopApp", + "args": { + "catalogVendorId": "int", + "applicationId": "str", + }, + }, }, "attributes": { 0x00000000: { @@ -243,18 +265,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000001: { - "attributeName": "CatalogVendorId", - "attributeId": 0x00000001, - "type": "int", - "reportable": True, - }, - 0x00000002: { - "attributeName": "ApplicationId", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1330,6 +1340,9 @@ class ChipClusters: "args": { "autoPlay": "bool", "data": "str", + "type": "int", + "value": "str", + "externalIDList": "", }, }, 0x00000001: { @@ -1338,6 +1351,12 @@ class ChipClusters: "args": { "contentURL": "str", "displayString": "str", + "providerName": "str", + "background": "", + "logo": "", + "progressBar": "", + "splash": "", + "waterMark": "", }, }, }, @@ -1349,10 +1368,11 @@ class ChipClusters: "reportable": True, }, 0x00000001: { - "attributeName": "SupportedStreamingTypes", + "attributeName": "SupportedStreamingProtocols", "attributeId": 0x00000001, "type": "int", "reportable": True, + "writable": True, }, 0x0000FFFB: { "attributeName": "AttributeList", @@ -2572,33 +2592,20 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000003: { - "attributeName": "PositionUpdatedAt", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - }, 0x00000004: { - "attributeName": "Position", + "attributeName": "PlaybackSpeed", "attributeId": 0x00000004, - "type": "int", - "reportable": True, + "type": "", }, 0x00000005: { - "attributeName": "PlaybackSpeed", + "attributeName": "SeekRangeEnd", "attributeId": 0x00000005, "type": "int", "reportable": True, }, 0x00000006: { - "attributeName": "SeekRangeEnd", - "attributeId": 0x00000006, - "type": "int", - "reportable": True, - }, - 0x00000007: { "attributeName": "SeekRangeStart", - "attributeId": 0x00000007, + "attributeId": 0x00000006, "type": "int", "reportable": True, }, @@ -3737,23 +3744,11 @@ class ChipClusters: }, "attributes": { 0x00000000: { - "attributeName": "TvChannelList", + "attributeName": "ChannelList", "attributeId": 0x00000000, "type": "", "reportable": True, }, - 0x00000001: { - "attributeName": "TvChannelLineup", - "attributeId": 0x00000001, - "type": "bytes", - "reportable": True, - }, - 0x00000002: { - "attributeName": "CurrentTvChannel", - "attributeId": 0x00000002, - "type": "bytes", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3787,6 +3782,11 @@ class ChipClusters: "type": "", "reportable": True, }, + 0x00000001: { + "attributeName": "CurrentNavigatorTarget", + "attributeId": 0x00000001, + "type": "int", + }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 29ef29ffd9cd15..6468b2e8d3507e 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -27197,17 +27197,17 @@ class TvChannel(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="tvChannelList", Tag=0x00000000, Type=typing.List[TvChannel.Structs.TvChannelInfo]), - ClusterObjectFieldDescriptor(Label="tvChannelLineup", Tag=0x00000001, Type=bytes), - ClusterObjectFieldDescriptor(Label="currentTvChannel", Tag=0x00000002, Type=bytes), + ClusterObjectFieldDescriptor(Label="channelList", Tag=0x00000000, Type=typing.List[TvChannel.Structs.TvChannelInfo]), + ClusterObjectFieldDescriptor(Label="channelLineup", Tag=0x00000001, Type=TvChannel.Structs.TvChannelLineupInfo), + ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=TvChannel.Structs.TvChannelInfo), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - tvChannelList: 'typing.List[TvChannel.Structs.TvChannelInfo]' = None - tvChannelLineup: 'bytes' = None - currentTvChannel: 'bytes' = None + channelList: 'typing.List[TvChannel.Structs.TvChannelInfo]' = None + channelLineup: 'TvChannel.Structs.TvChannelLineupInfo' = None + currentChannel: 'TvChannel.Structs.TvChannelInfo' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None @@ -27286,11 +27286,11 @@ class ChangeChannelResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="channelMatch", Tag=0, Type=typing.List[TvChannel.Structs.TvChannelInfo]), + ClusterObjectFieldDescriptor(Label="channelMatch", Tag=0, Type=TvChannel.Structs.TvChannelInfo), ClusterObjectFieldDescriptor(Label="errorType", Tag=1, Type=TvChannel.Enums.TvChannelErrorType), ]) - channelMatch: 'typing.List[TvChannel.Structs.TvChannelInfo]' = field(default_factory=lambda: []) + channelMatch: 'TvChannel.Structs.TvChannelInfo' = field(default_factory=lambda: TvChannel.Structs.TvChannelInfo()) errorType: 'TvChannel.Enums.TvChannelErrorType' = 0 @dataclass @@ -27328,7 +27328,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: @dataclass - class TvChannelList(ClusterAttributeDescriptor): + class ChannelList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0504 @@ -27344,7 +27344,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[TvChannel.Structs.TvChannelInfo]' = field(default_factory=lambda: []) @dataclass - class TvChannelLineup(ClusterAttributeDescriptor): + class ChannelLineup(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0504 @@ -27355,12 +27355,12 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bytes) + return ClusterObjectFieldDescriptor(Type=TvChannel.Structs.TvChannelLineupInfo) - value: 'bytes' = b"" + value: 'TvChannel.Structs.TvChannelLineupInfo' = field(default_factory=lambda: TvChannel.Structs.TvChannelLineupInfo()) @dataclass - class CurrentTvChannel(ClusterAttributeDescriptor): + class CurrentChannel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0504 @@ -27371,9 +27371,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bytes) + return ClusterObjectFieldDescriptor(Type=TvChannel.Structs.TvChannelInfo) - value: 'bytes' = b"" + value: 'TvChannel.Structs.TvChannelInfo' = field(default_factory=lambda: TvChannel.Structs.TvChannelInfo()) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -27599,11 +27599,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="playbackState", Tag=0x00000000, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="startTime", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="duration", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="positionUpdatedAt", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="position", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=0x00000005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=0x00000007, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="position", Tag=0x00000003, Type=MediaPlayback.Structs.MediaPlaybackPosition), + ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=0x00000004, Type=typing.Optional[float]), + ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), @@ -27612,9 +27611,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: playbackState: 'typing.Optional[uint]' = None startTime: 'typing.Optional[uint]' = None duration: 'typing.Optional[uint]' = None - positionUpdatedAt: 'typing.Optional[uint]' = None - position: 'typing.Optional[uint]' = None - playbackSpeed: 'typing.Optional[uint]' = None + position: 'MediaPlayback.Structs.MediaPlaybackPosition' = None + playbackSpeed: 'typing.Optional[float]' = None seekRangeEnd: 'typing.Optional[uint]' = None seekRangeStart: 'typing.Optional[uint]' = None attributeList: 'typing.List[uint]' = None @@ -28018,22 +28016,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None - @dataclass - class PositionUpdatedAt(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - @dataclass class Position(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -28042,13 +28024,13 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=MediaPlayback.Structs.MediaPlaybackPosition) - value: 'typing.Optional[uint]' = None + value: 'MediaPlayback.Structs.MediaPlaybackPosition' = field(default_factory=lambda: MediaPlayback.Structs.MediaPlaybackPosition()) @dataclass class PlaybackSpeed(ClusterAttributeDescriptor): @@ -28058,13 +28040,13 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[float]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[float]' = None @dataclass class SeekRangeEnd(ClusterAttributeDescriptor): @@ -28074,7 +28056,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -28090,7 +28072,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -28638,14 +28620,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="acceptsHeaderList", Tag=0x00000000, Type=typing.List[bytes]), - ClusterObjectFieldDescriptor(Label="supportedStreamingTypes", Tag=0x00000001, Type=typing.List[ContentLauncher.Enums.ContentLaunchStreamingType]), + ClusterObjectFieldDescriptor(Label="supportedStreamingProtocols", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) acceptsHeaderList: 'typing.List[bytes]' = None - supportedStreamingTypes: 'typing.List[ContentLauncher.Enums.ContentLaunchStreamingType]' = None + supportedStreamingProtocols: 'uint' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None @@ -28659,26 +28641,39 @@ class ContentLaunchParameterEnum(IntEnum): kActor = 0x00 kChannel = 0x01 kCharacter = 0x02 - kEvent = 0x03 - kFranchise = 0x04 - kGenre = 0x05 - kLeague = 0x06 - kPopularity = 0x07 - kSport = 0x08 - kSportsTeam = 0x09 - kVideo = 0x0A + kDirector = 0x03 + kEvent = 0x04 + kFranchise = 0x05 + kGenre = 0x06 + kLeague = 0x07 + kPopularity = 0x08 + kProvider = 0x09 + kSport = 0x0A + kSportsTeam = 0x0B + kType = 0x0C class ContentLaunchStatus(IntEnum): kSuccess = 0x00 kUrlNotAvailable = 0x01 kAuthFailed = 0x02 - class ContentLaunchStreamingType(IntEnum): - kDash = 0x00 - kHls = 0x01 - class Structs: + @dataclass + class ContentLaunchDimension(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="width", Tag=1, Type=float), + ClusterObjectFieldDescriptor(Label="height", Tag=2, Type=float), + ClusterObjectFieldDescriptor(Label="metric", Tag=3, Type=ContentLauncher.Enums.ContentLaunchMetricType), + ]) + + width: 'float' = 0.0 + height: 'float' = 0.0 + metric: 'ContentLauncher.Enums.ContentLaunchMetricType' = 0 + @dataclass class ContentLaunchAdditionalInfo(ClusterObject): @ChipUtility.classproperty @@ -28708,55 +28703,40 @@ def descriptor(cls) -> ClusterObjectDescriptor: externalIDList: 'typing.List[ContentLauncher.Structs.ContentLaunchAdditionalInfo]' = field(default_factory=lambda: []) @dataclass - class ContentLaunchBrandingInformation(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields = [ - ClusterObjectFieldDescriptor(Label="providerName", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="background", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="logo", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="progressBar", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="splash", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="waterMark", Tag=6, Type=uint), - ]) - - providerName: 'str' = "" - background: 'uint' = 0 - logo: 'uint' = 0 - progressBar: 'uint' = 0 - splash: 'uint' = 0 - waterMark: 'uint' = 0 - - @dataclass - class ContentLaunchDimension(ClusterObject): + class ContentLaunchStyleInformation(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="width", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="height", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="metric", Tag=3, Type=ContentLauncher.Enums.ContentLaunchMetricType), + ClusterObjectFieldDescriptor(Label="imageUrl", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="color", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="size", Tag=3, Type=ContentLauncher.Structs.ContentLaunchDimension), ]) - width: 'str' = "" - height: 'str' = "" - metric: 'ContentLauncher.Enums.ContentLaunchMetricType' = 0 + imageUrl: 'str' = "" + color: 'str' = "" + size: 'ContentLauncher.Structs.ContentLaunchDimension' = field(default_factory=lambda: ContentLauncher.Structs.ContentLaunchDimension()) @dataclass - class ContentLaunchStyleInformation(ClusterObject): + class ContentLaunchBrandingInformation(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="imageUrl", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="color", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="size", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="providerName", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="background", Tag=2, Type=ContentLauncher.Structs.ContentLaunchStyleInformation), + ClusterObjectFieldDescriptor(Label="logo", Tag=3, Type=ContentLauncher.Structs.ContentLaunchStyleInformation), + ClusterObjectFieldDescriptor(Label="progressBar", Tag=4, Type=ContentLauncher.Structs.ContentLaunchStyleInformation), + ClusterObjectFieldDescriptor(Label="splash", Tag=5, Type=ContentLauncher.Structs.ContentLaunchStyleInformation), + ClusterObjectFieldDescriptor(Label="waterMark", Tag=6, Type=ContentLauncher.Structs.ContentLaunchStyleInformation), ]) - imageUrl: 'str' = "" - color: 'str' = "" - size: 'uint' = 0 + providerName: 'str' = "" + background: 'ContentLauncher.Structs.ContentLaunchStyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.ContentLaunchStyleInformation()) + logo: 'ContentLauncher.Structs.ContentLaunchStyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.ContentLaunchStyleInformation()) + progressBar: 'ContentLauncher.Structs.ContentLaunchStyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.ContentLaunchStyleInformation()) + splash: 'ContentLauncher.Structs.ContentLaunchStyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.ContentLaunchStyleInformation()) + waterMark: 'ContentLauncher.Structs.ContentLaunchStyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.ContentLaunchStyleInformation()) @@ -28773,10 +28753,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="autoPlay", Tag=0, Type=bool), ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="search", Tag=2, Type=typing.List[ContentLauncher.Structs.ContentLaunchParamater]), ]) autoPlay: 'bool' = False data: 'str' = "" + search: 'typing.List[ContentLauncher.Structs.ContentLaunchParamater]' = field(default_factory=lambda: []) @dataclass class LaunchContentResponse(ClusterCommand): @@ -28788,12 +28770,12 @@ class LaunchContentResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="data", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="contentLaunchStatus", Tag=1, Type=ContentLauncher.Enums.ContentLaunchStatus), + ClusterObjectFieldDescriptor(Label="contentLaunchStatus", Tag=0, Type=ContentLauncher.Enums.ContentLaunchStatus), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), ]) - data: 'str' = "" contentLaunchStatus: 'ContentLauncher.Enums.ContentLaunchStatus' = 0 + data: 'str' = "" @dataclass class LaunchURL(ClusterCommand): @@ -28807,10 +28789,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="contentURL", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="displayString", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="brandingInformation", Tag=2, Type=typing.List[ContentLauncher.Structs.ContentLaunchBrandingInformation]), ]) contentURL: 'str' = "" displayString: 'str' = "" + brandingInformation: 'typing.List[ContentLauncher.Structs.ContentLaunchBrandingInformation]' = field(default_factory=lambda: []) @dataclass class LaunchURLResponse(ClusterCommand): @@ -28822,12 +28806,12 @@ class LaunchURLResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="data", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="contentLaunchStatus", Tag=1, Type=ContentLauncher.Enums.ContentLaunchStatus), + ClusterObjectFieldDescriptor(Label="contentLaunchStatus", Tag=0, Type=ContentLauncher.Enums.ContentLaunchStatus), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), ]) - data: 'str' = "" contentLaunchStatus: 'ContentLauncher.Enums.ContentLaunchStatus' = 0 + data: 'str' = "" class Attributes: @@ -28848,7 +28832,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[bytes]' = field(default_factory=lambda: []) @dataclass - class SupportedStreamingTypes(ClusterAttributeDescriptor): + class SupportedStreamingProtocols(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x050A @@ -28859,9 +28843,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[ContentLauncher.Enums.ContentLaunchStreamingType]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.List[ContentLauncher.Enums.ContentLaunchStreamingType]' = field(default_factory=lambda: []) + value: 'uint' = 0 @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -29088,16 +29072,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="applicationLauncherList", Tag=0x00000000, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=0x00000001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="applicationId", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="applicationLauncherApp", Tag=0x00000001, Type=ApplicationLauncher.Structs.ApplicationLauncherEndpoint), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) applicationLauncherList: 'typing.List[uint]' = None - catalogVendorId: 'typing.Optional[uint]' = None - applicationId: 'typing.Optional[uint]' = None + applicationLauncherApp: 'ApplicationLauncher.Structs.ApplicationLauncherEndpoint' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None @@ -29123,6 +29105,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: catalogVendorId: 'uint' = 0 applicationId: 'str' = "" + @dataclass + class ApplicationLauncherEndpoint(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="application", Tag=1, Type=ApplicationLauncher.Structs.ApplicationLauncherApp), + ClusterObjectFieldDescriptor(Label="endpoint", Tag=2, Type=str), + ]) + + application: 'ApplicationLauncher.Structs.ApplicationLauncherApp' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationLauncherApp()) + endpoint: 'str' = "" + class Commands: @@ -29137,13 +29132,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="data", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationId", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="application", Tag=1, Type=ApplicationLauncher.Structs.ApplicationLauncherApp), ]) data: 'str' = "" - catalogVendorId: 'uint' = 0 - applicationId: 'str' = "" + application: 'ApplicationLauncher.Structs.ApplicationLauncherApp' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationLauncherApp()) @dataclass class LaunchAppResponse(ClusterCommand): @@ -29162,55 +29155,103 @@ def descriptor(cls) -> ClusterObjectDescriptor: status: 'ApplicationLauncher.Enums.ApplicationLauncherStatus' = 0 data: 'str' = "" + @dataclass + class StopApp(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x050C + command_id: typing.ClassVar[int] = 0x0001 + is_client: typing.ClassVar[bool] = True + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=ApplicationLauncher.Structs.ApplicationLauncherApp), + ]) + + application: 'ApplicationLauncher.Structs.ApplicationLauncherApp' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationLauncherApp()) - class Attributes: @dataclass - class ApplicationLauncherList(ClusterAttributeDescriptor): + class StopAppResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x050C + command_id: typing.ClassVar[int] = 0x0001 + is_client: typing.ClassVar[bool] = False + @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x050C + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ApplicationLauncher.Enums.ApplicationLauncherStatus), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), + ]) + + status: 'ApplicationLauncher.Enums.ApplicationLauncherStatus' = 0 + data: 'str' = "" + + @dataclass + class HideApp(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x050C + command_id: typing.ClassVar[int] = 0x0002 + is_client: typing.ClassVar[bool] = True @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=ApplicationLauncher.Structs.ApplicationLauncherApp), + ]) + + application: 'ApplicationLauncher.Structs.ApplicationLauncherApp' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationLauncherApp()) + + @dataclass + class HideAppResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x050C + command_id: typing.ClassVar[int] = 0x0002 + is_client: typing.ClassVar[bool] = False @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ApplicationLauncher.Enums.ApplicationLauncherStatus), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + status: 'ApplicationLauncher.Enums.ApplicationLauncherStatus' = 0 + data: 'str' = "" + + class Attributes: @dataclass - class CatalogVendorId(ClusterAttributeDescriptor): + class ApplicationLauncherList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x050C @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ApplicationId(ClusterAttributeDescriptor): + class ApplicationLauncherApp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x050C @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=ApplicationLauncher.Structs.ApplicationLauncherEndpoint) - value: 'typing.Optional[uint]' = None + value: 'ApplicationLauncher.Structs.ApplicationLauncherEndpoint' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationLauncherEndpoint()) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -29274,9 +29315,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="vendorId", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="applicationName", Tag=0x00000002, Type=str), ClusterObjectFieldDescriptor(Label="productId", Tag=0x00000003, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationId", Tag=0x00000005, Type=str), - ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=0x00000006, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationStatus", Tag=0x00000007, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationApp", Tag=0x00000004, Type=ApplicationBasic.Structs.ApplicationBasicApp), + ClusterObjectFieldDescriptor(Label="applicationStatus", Tag=0x00000005, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationVersion", Tag=0x00000006, Type=str), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), @@ -29286,9 +29327,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: vendorId: 'uint' = None applicationName: 'str' = None productId: 'uint' = None - applicationId: 'str' = None - catalogVendorId: 'uint' = None + applicationApp: 'ApplicationBasic.Structs.ApplicationBasicApp' = None applicationStatus: 'uint' = None + applicationVersion: 'str' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None @@ -29301,6 +29342,21 @@ class ApplicationBasicStatus(IntEnum): kActiveVisibleNotFocus = 0x03 + class Structs: + @dataclass + class ApplicationBasicApp(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationId", Tag=2, Type=str), + ]) + + catalogVendorId: 'uint' = 0 + applicationId: 'str' = "" + + class Commands: @dataclass @@ -29385,30 +29441,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class ApplicationId(ClusterAttributeDescriptor): + class ApplicationApp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x050D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Structs.ApplicationBasicApp) - value: 'str' = "" + value: 'ApplicationBasic.Structs.ApplicationBasicApp' = field(default_factory=lambda: ApplicationBasic.Structs.ApplicationBasicApp()) @dataclass - class CatalogVendorId(ClusterAttributeDescriptor): + class ApplicationStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x050D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -29417,20 +29473,20 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class ApplicationStatus(ClusterAttributeDescriptor): + class ApplicationVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x050D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=str) - value: 'uint' = 0 + value: 'str' = "" @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -29549,6 +29605,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: tempAccountIdentifier: 'str' = "" setupPIN: 'str' = "" + @dataclass + class Logout(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x050E + command_id: typing.ClassVar[int] = 0x0002 + is_client: typing.ClassVar[bool] = True + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ]) + + class Attributes: @dataclass diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 4ba1c652ee06cc..13e08569d532e1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -364,37 +364,41 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ApplicationId::Id: { - using TypeInfo = Attributes::ApplicationId::TypeInfo; + case Attributes::ApplicationApp::Id: { + using TypeInfo = Attributes::ApplicationApp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + CHIPApplicationBasicClusterApplicationBasicApp * _Nonnull value; + value = [CHIPApplicationBasicClusterApplicationBasicApp new]; + value.catalogVendorId = [NSNumber numberWithUnsignedShort:cppValue.catalogVendorId]; + value.applicationId = [[NSString alloc] initWithBytes:cppValue.applicationId.data() + length:cppValue.applicationId.size() + encoding:NSUTF8StringEncoding]; return value; } - case Attributes::CatalogVendorId::Id: { - using TypeInfo = Attributes::CatalogVendorId::TypeInfo; + case Attributes::ApplicationStatus::Id: { + using TypeInfo = Attributes::ApplicationStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ApplicationStatus::Id: { - using TypeInfo = Attributes::ApplicationStatus::TypeInfo; + case Attributes::ApplicationVersion::Id: { + using TypeInfo = Attributes::ApplicationVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; return value; } case Attributes::AttributeList::Id: { @@ -469,28 +473,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = array_0; return value; } - case Attributes::CatalogVendorId::Id: { - using TypeInfo = Attributes::CatalogVendorId::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::ApplicationId::Id: { - using TypeInfo = Attributes::ApplicationId::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1980,30 +1962,15 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = array_0; return value; } - case Attributes::SupportedStreamingTypes::Id: { - using TypeInfo = Attributes::SupportedStreamingTypes::TypeInfo; + case Attributes::SupportedStreamingProtocols::Id: { + using TypeInfo = Attributes::SupportedStreamingProtocols::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } case Attributes::AttributeList::Id: { @@ -4056,28 +4023,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } - case Attributes::PositionUpdatedAt::Id: { - using TypeInfo = Attributes::PositionUpdatedAt::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::Position::Id: { - using TypeInfo = Attributes::Position::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } case Attributes::PlaybackSpeed::Id: { using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; TypeInfo::DecodableType cppValue; @@ -4086,7 +4031,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithFloat:cppValue]; return value; } case Attributes::SeekRangeEnd::Id: { @@ -5903,8 +5848,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader case Clusters::TvChannel::Id: { using namespace Clusters::TvChannel; switch (aPath.mAttributeId) { - case Attributes::TvChannelList::Id: { - using TypeInfo = Attributes::TvChannelList::TypeInfo; + case Attributes::ChannelList::Id: { + using TypeInfo = Attributes::ChannelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -5940,28 +5885,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = array_0; return value; } - case Attributes::TvChannelLineup::Id: { - using TypeInfo = Attributes::TvChannelLineup::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSData * _Nonnull value; - value = [NSData dataWithBytes:cppValue.data() length:cppValue.size()]; - return value; - } - case Attributes::CurrentTvChannel::Id: { - using TypeInfo = Attributes::CurrentTvChannel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSData * _Nonnull value; - value = [NSData dataWithBytes:cppValue.data() length:cppValue.size()]; - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6038,6 +5961,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = array_0; return value; } + case Attributes::CurrentNavigatorTarget::Id: { + using TypeInfo = Attributes::CurrentNavigatorTarget::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 009cd678f00cd4..46bdaabebd4f18 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -1649,45 +1649,6 @@ } } -void CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); - return; - } - } - objCValue = array_0; - DispatchSuccess(context, objCValue); -}; - -void CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) -{ - auto * self = static_cast(context); - if (!self->mQueue) { - return; - } - - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - self->mEstablishedHandler = nil; - } -} - void CHIPContentLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -3859,7 +3820,7 @@ } } -void CHIPTvChannelTvChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, +void CHIPTvChannelChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3893,9 +3854,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPTvChannelTvChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -4965,6 +4926,19 @@ DispatchSuccess(context, response); }; +void CHIPApplicationLauncherClusterHideAppResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::ApplicationLauncher::Commands::HideAppResponse::DecodableType & data) +{ + auto * response = [CHIPApplicationLauncherClusterHideAppResponseParams new]; + { + response.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; + } + { + response.data = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + } + DispatchSuccess(context, response); +}; + void CHIPApplicationLauncherClusterLaunchAppResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppResponse::DecodableType & data) { @@ -4978,15 +4952,28 @@ DispatchSuccess(context, response); }; +void CHIPApplicationLauncherClusterStopAppResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType & data) +{ + auto * response = [CHIPApplicationLauncherClusterStopAppResponseParams new]; + { + response.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; + } + { + response.data = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + } + DispatchSuccess(context, response); +}; + void CHIPContentLauncherClusterLaunchContentResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::ContentLauncher::Commands::LaunchContentResponse::DecodableType & data) { auto * response = [CHIPContentLauncherClusterLaunchContentResponseParams new]; { - response.data = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + response.contentLaunchStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.contentLaunchStatus)]; } { - response.contentLaunchStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.contentLaunchStatus)]; + response.data = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; } DispatchSuccess(context, response); }; @@ -4996,10 +4983,10 @@ { auto * response = [CHIPContentLauncherClusterLaunchURLResponseParams new]; { - response.data = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + response.contentLaunchStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.contentLaunchStatus)]; } { - response.contentLaunchStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.contentLaunchStatus)]; + response.data = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; } DispatchSuccess(context, response); }; @@ -5850,33 +5837,18 @@ { auto * response = [CHIPTvChannelClusterChangeChannelResponseParams new]; { - auto * array_0 = [NSMutableArray new]; - auto iter_0 = data.channelMatch.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPTvChannelClusterTvChannelInfo * newElement_0; - newElement_0 = [CHIPTvChannelClusterTvChannelInfo new]; - newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; - newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.data() - length:entry_0.callSign.size() - encoding:NSUTF8StringEncoding]; - newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.data() - length:entry_0.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); - return; - } - } - response.channelMatch = array_0; + response.channelMatch = [CHIPTvChannelClusterTvChannelInfo new]; + response.channelMatch.majorNumber = [NSNumber numberWithUnsignedShort:data.channelMatch.majorNumber]; + response.channelMatch.minorNumber = [NSNumber numberWithUnsignedShort:data.channelMatch.minorNumber]; + response.channelMatch.name = [[NSString alloc] initWithBytes:data.channelMatch.name.data() + length:data.channelMatch.name.size() + encoding:NSUTF8StringEncoding]; + response.channelMatch.callSign = [[NSString alloc] initWithBytes:data.channelMatch.callSign.data() + length:data.channelMatch.callSign.size() + encoding:NSUTF8StringEncoding]; + response.channelMatch.affiliateCallSign = [[NSString alloc] initWithBytes:data.channelMatch.affiliateCallSign.data() + length:data.channelMatch.affiliateCallSign.size() + encoding:NSUTF8StringEncoding]; } { response.errorType = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorType)]; @@ -11278,61 +11250,6 @@ } } -void CHIPContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::ContentLauncher::ContentLaunchStreamingType value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; - DispatchSuccess(context, objCValue); -}; - -void CHIPContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) -{ - auto * self = static_cast(context); - if (!self->mQueue) { - return; - } - - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - self->mEstablishedHandler = nil; - } -} - -void CHIPNullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - NSNumber * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; - } - DispatchSuccess(context, objCValue); -}; - -void CHIPNullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) -{ - auto * self - = static_cast(context); - if (!self->mQueue) { - return; - } - - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - self->mEstablishedHandler = nil; - } -} - void CHIPAudioOutputClusterAudioOutputTypeAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::AudioOutput::AudioOutputType value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index cac1cf624e0a1a..144587c74eeceb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -33,8 +33,12 @@ typedef void (*NullableVendorIdAttributeCallback)(void *, const chip::app::DataM typedef void (*CHIPAccountLoginClusterGetSetupPINResponseCallbackType)( void *, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType &); +typedef void (*CHIPApplicationLauncherClusterHideAppResponseCallbackType)( + void *, const chip::app::Clusters::ApplicationLauncher::Commands::HideAppResponse::DecodableType &); typedef void (*CHIPApplicationLauncherClusterLaunchAppResponseCallbackType)( void *, const chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppResponse::DecodableType &); +typedef void (*CHIPApplicationLauncherClusterStopAppResponseCallbackType)( + void *, const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType &); typedef void (*CHIPContentLauncherClusterLaunchContentResponseCallbackType)( void *, const chip::app::Clusters::ContentLauncher::Commands::LaunchContentResponse::DecodableType &); typedef void (*CHIPContentLauncherClusterLaunchURLResponseCallbackType)( @@ -494,10 +498,6 @@ typedef void (*ContentLauncherClusterContentLaunchStatusAttributeCallback)( void *, chip::app::Clusters::ContentLauncher::ContentLaunchStatus); typedef void (*NullableContentLauncherClusterContentLaunchStatusAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*ContentLauncherClusterContentLaunchStreamingTypeAttributeCallback)( - void *, chip::app::Clusters::ContentLauncher::ContentLaunchStreamingType); -typedef void (*NullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); typedef void (*AudioOutputClusterAudioOutputTypeAttributeCallback)(void *, chip::app::Clusters::AudioOutput::AudioOutputType); typedef void (*NullableAudioOutputClusterAudioOutputTypeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -1856,37 +1856,6 @@ class CHIPContentLauncherAcceptsHeaderListListAttributeCallbackSubscriptionBridg SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::DecodableList & value); -}; - -class CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackSubscriptionBridge - : public CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge -{ -public: - CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge(queue, handler, action, true), - mEstablishedHandler(establishedHandler) - {} - - static void OnSubscriptionEstablished(void * context); - -private: - SubscriptionEstablishedHandler mEstablishedHandler; -}; - class CHIPContentLauncherAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -3419,26 +3388,25 @@ class CHIPSwitchAttributeListListAttributeCallbackSubscriptionBridge : public CH SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPTvChannelTvChannelListListAttributeCallbackBridge : public CHIPCallbackBridge +class CHIPTvChannelChannelListListAttributeCallbackBridge : public CHIPCallbackBridge { public: - CHIPTvChannelTvChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPTvChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value); }; -class CHIPTvChannelTvChannelListListAttributeCallbackSubscriptionBridge - : public CHIPTvChannelTvChannelListListAttributeCallbackBridge +class CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge : public CHIPTvChannelChannelListListAttributeCallbackBridge { public: - CHIPTvChannelTvChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPTvChannelTvChannelListListAttributeCallbackBridge(queue, handler, action, true), + CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTvChannelChannelListListAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4078,6 +4046,19 @@ class CHIPAccountLoginClusterGetSetupPINResponseCallbackBridge const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data); }; +class CHIPApplicationLauncherClusterHideAppResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPApplicationLauncherClusterHideAppResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::ApplicationLauncher::Commands::HideAppResponse::DecodableType & data); +}; + class CHIPApplicationLauncherClusterLaunchAppResponseCallbackBridge : public CHIPCallbackBridge { @@ -4091,6 +4072,19 @@ class CHIPApplicationLauncherClusterLaunchAppResponseCallbackBridge const chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppResponse::DecodableType & data); }; +class CHIPApplicationLauncherClusterStopAppResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPApplicationLauncherClusterStopAppResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType & data); +}; + class CHIPContentLauncherClusterLaunchContentResponseCallbackBridge : public CHIPCallbackBridge { @@ -10636,68 +10630,6 @@ class CHIPNullableContentLauncherClusterContentLaunchStatusAttributeCallbackSubs SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; - - static void OnSuccessFn(void * context, chip::app::Clusters::ContentLauncher::ContentLaunchStreamingType value); -}; - -class CHIPContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackSubscriptionBridge - : public CHIPContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge -{ -public: - CHIPContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge(queue, handler, action, true), - mEstablishedHandler(establishedHandler) - {} - - static void OnSubscriptionEstablished(void * context); - -private: - SubscriptionEstablishedHandler mEstablishedHandler; -}; - -class CHIPNullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPNullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; - - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); -}; - -class CHIPNullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackSubscriptionBridge - : public CHIPNullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge -{ -public: - CHIPNullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPNullableContentLauncherClusterContentLaunchStreamingTypeAttributeCallbackBridge(queue, handler, action, true), - mEstablishedHandler(establishedHandler) - {} - - static void OnSubscriptionEstablished(void * context); - -private: - SubscriptionEstablishedHandler mEstablishedHandler; -}; - class CHIPAudioOutputClusterAudioOutputTypeAttributeCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 16e602e17958a6..b012e426c44dd3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -70,6 +70,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(void (^)(CHIPAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)loginWithParams:(CHIPAccountLoginClusterLoginParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)logoutWithCompletionHandler:(StatusCompletion)completionHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -156,22 +157,6 @@ NS_ASSUME_NONNULL_BEGIN subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -- (void)readAttributeApplicationIdWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeApplicationIdWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; - -- (void)readAttributeCatalogVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeCatalogVendorIdWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - - (void)readAttributeApplicationStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeApplicationStatusWithMinInterval:(uint16_t)minInterval @@ -180,6 +165,14 @@ NS_ASSUME_NONNULL_BEGIN reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeApplicationVersionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -199,9 +192,15 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPApplicationLauncher : CHIPCluster +- (void)hideAppWithParams:(CHIPApplicationLauncherClusterHideAppParams *)params + completionHandler:(void (^)(CHIPApplicationLauncherClusterHideAppResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)launchAppWithParams:(CHIPApplicationLauncherClusterLaunchAppParams *)params completionHandler:(void (^)(CHIPApplicationLauncherClusterLaunchAppResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)stopAppWithParams:(CHIPApplicationLauncherClusterStopAppParams *)params + completionHandler:(void (^)(CHIPApplicationLauncherClusterStopAppResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)readAttributeApplicationLauncherListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -212,22 +211,6 @@ NS_ASSUME_NONNULL_BEGIN reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -- (void)readAttributeCatalogVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeCatalogVendorIdWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - -- (void)readAttributeApplicationIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeApplicationIdWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1179,14 +1162,16 @@ NS_ASSUME_NONNULL_BEGIN reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -- (void)readAttributeSupportedStreamingTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeSupportedStreamingTypesWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2280,28 +2265,8 @@ NS_ASSUME_NONNULL_BEGIN subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -- (void)readAttributePositionUpdatedAtWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributePositionUpdatedAtWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - -- (void)readAttributePositionWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributePositionWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - - (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3364,29 +3329,12 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)skipChannelWithParams:(CHIPTvChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeTvChannelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeTvChannelListWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - -- (void)readAttributeTvChannelLineupWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeTvChannelLineupWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; - -- (void)readAttributeCurrentTvChannelWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeCurrentTvChannelWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)readAttributeChannelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeChannelListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3420,6 +3368,9 @@ NS_ASSUME_NONNULL_BEGIN reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)readAttributeCurrentNavigatorTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 4a3221d340cc4c..9166e882a02ab9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -322,6 +322,23 @@ new CHIPCommandSuccessCallbackBridge( }); } +- (void)logoutWithCompletionHandler:(StatusCompletion)completionHandler +{ + ListFreer listFreer; + AccountLogin::Commands::Logout::Type request; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -647,89 +664,60 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -- (void)readAttributeApplicationIdWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::ApplicationId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeApplicationIdWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::ApplicationId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - -- (void)readAttributeCatalogVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeApplicationStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::CatalogVendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::ApplicationStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCatalogVendorIdWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationStatusWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::CatalogVendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ApplicationBasic::Attributes::ApplicationStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } -- (void)readAttributeApplicationStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::ApplicationStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeApplicationStatusWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationVersionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::ApplicationStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -784,6 +772,23 @@ @implementation CHIPApplicationLauncher return &_cppCluster; } +- (void)hideAppWithParams:(CHIPApplicationLauncherClusterHideAppParams *)params + completionHandler:(void (^)(CHIPApplicationLauncherClusterHideAppResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + ListFreer listFreer; + ApplicationLauncher::Commands::HideApp::Type request; + request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; + request.application.applicationId = [self asCharSpan:params.application.applicationId]; + + new CHIPApplicationLauncherClusterHideAppResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)launchAppWithParams:(CHIPApplicationLauncherClusterLaunchAppParams *)params completionHandler:(void (^)(CHIPApplicationLauncherClusterLaunchAppResponseParams * _Nullable data, NSError * _Nullable error))completionHandler @@ -791,8 +796,8 @@ - (void)launchAppWithParams:(CHIPApplicationLauncherClusterLaunchAppParams *)par ListFreer listFreer; ApplicationLauncher::Commands::LaunchApp::Type request; request.data = [self asCharSpan:params.data]; - request.catalogVendorId = params.catalogVendorId.unsignedShortValue; - request.applicationId = [self asCharSpan:params.applicationId]; + request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; + request.application.applicationId = [self asCharSpan:params.application.applicationId]; new CHIPApplicationLauncherClusterLaunchAppResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { @@ -802,6 +807,23 @@ new CHIPApplicationLauncherClusterLaunchAppResponseCallbackBridge( }); } +- (void)stopAppWithParams:(CHIPApplicationLauncherClusterStopAppParams *)params + completionHandler:(void (^)(CHIPApplicationLauncherClusterStopAppResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + ListFreer listFreer; + ApplicationLauncher::Commands::StopApp::Type request; + request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; + request.application.applicationId = [self asCharSpan:params.application.applicationId]; + + new CHIPApplicationLauncherClusterStopAppResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeApplicationLauncherListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -834,64 +856,6 @@ new CHIPApplicationLauncherApplicationLauncherListListAttributeCallbackSubscript subscriptionEstablishedHandler); } -- (void)readAttributeCatalogVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::CatalogVendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeCatalogVendorIdWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::CatalogVendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - -- (void)readAttributeApplicationIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::ApplicationId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeApplicationIdWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::ApplicationId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -4966,6 +4930,55 @@ - (void)launchContentWithParams:(CHIPContentLauncherClusterLaunchContentParams * ContentLauncher::Commands::LaunchContent::Type request; request.autoPlay = params.autoPlay.boolValue; request.data = [self asCharSpan:params.data]; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.search.count != 0) { + auto * listHolder_0 = new ListHolder(params.search.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.search.count; ++i_0) { + if (![params.search[i_0] isKindOfClass:[CHIPContentLauncherClusterContentLaunchParamater class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPContentLauncherClusterContentLaunchParamater *) params.search[i_0]; + listHolder_0->mList[i_0].type = static_castmList[i_0].type)>>( + element_0.type.unsignedCharValue); + listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; + { + using ListType_2 = std::remove_reference_tmList[i_0].externalIDList)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.externalIDList.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.externalIDList.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.externalIDList.count; ++i_2) { + if (![element_0.externalIDList[i_2] + isKindOfClass:[CHIPContentLauncherClusterContentLaunchAdditionalInfo class]]) { + // Wrong kind of value. + return; + } + auto element_2 + = (CHIPContentLauncherClusterContentLaunchAdditionalInfo *) element_0.externalIDList[i_2]; + listHolder_2->mList[i_2].name = [self asCharSpan:element_2.name]; + listHolder_2->mList[i_2].value = [self asCharSpan:element_2.value]; + } + listHolder_0->mList[i_0].externalIDList = ListType_2(listHolder_2->mList, element_0.externalIDList.count); + } else { + listHolder_0->mList[i_0].externalIDList = ListType_2(); + } + } + } + request.search = ListType_0(listHolder_0->mList, params.search.count); + } else { + request.search = ListType_0(); + } + } new CHIPContentLauncherClusterLaunchContentResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { @@ -4983,6 +4996,64 @@ - (void)launchURLWithParams:(CHIPContentLauncherClusterLaunchURLParams *)params ContentLauncher::Commands::LaunchURL::Type request; request.contentURL = [self asCharSpan:params.contentURL]; request.displayString = [self asCharSpan:params.displayString]; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.brandingInformation.count != 0) { + auto * listHolder_0 = new ListHolder(params.brandingInformation.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.brandingInformation.count; ++i_0) { + if (![params.brandingInformation[i_0] + isKindOfClass:[CHIPContentLauncherClusterContentLaunchBrandingInformation class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPContentLauncherClusterContentLaunchBrandingInformation *) params.brandingInformation[i_0]; + listHolder_0->mList[i_0].providerName = [self asCharSpan:element_0.providerName]; + listHolder_0->mList[i_0].background.imageUrl = [self asCharSpan:element_0.background.imageUrl]; + listHolder_0->mList[i_0].background.color = [self asCharSpan:element_0.background.color]; + listHolder_0->mList[i_0].background.size.width = element_0.background.size.width.doubleValue; + listHolder_0->mList[i_0].background.size.height = element_0.background.size.height.doubleValue; + listHolder_0->mList[i_0].background.size.metric + = static_castmList[i_0].background.size.metric)>>( + element_0.background.size.metric.unsignedCharValue); + listHolder_0->mList[i_0].logo.imageUrl = [self asCharSpan:element_0.logo.imageUrl]; + listHolder_0->mList[i_0].logo.color = [self asCharSpan:element_0.logo.color]; + listHolder_0->mList[i_0].logo.size.width = element_0.logo.size.width.doubleValue; + listHolder_0->mList[i_0].logo.size.height = element_0.logo.size.height.doubleValue; + listHolder_0->mList[i_0].logo.size.metric + = static_castmList[i_0].logo.size.metric)>>( + element_0.logo.size.metric.unsignedCharValue); + listHolder_0->mList[i_0].progressBar.imageUrl = [self asCharSpan:element_0.progressBar.imageUrl]; + listHolder_0->mList[i_0].progressBar.color = [self asCharSpan:element_0.progressBar.color]; + listHolder_0->mList[i_0].progressBar.size.width = element_0.progressBar.size.width.doubleValue; + listHolder_0->mList[i_0].progressBar.size.height = element_0.progressBar.size.height.doubleValue; + listHolder_0->mList[i_0].progressBar.size.metric + = static_castmList[i_0].progressBar.size.metric)>>( + element_0.progressBar.size.metric.unsignedCharValue); + listHolder_0->mList[i_0].splash.imageUrl = [self asCharSpan:element_0.splash.imageUrl]; + listHolder_0->mList[i_0].splash.color = [self asCharSpan:element_0.splash.color]; + listHolder_0->mList[i_0].splash.size.width = element_0.splash.size.width.doubleValue; + listHolder_0->mList[i_0].splash.size.height = element_0.splash.size.height.doubleValue; + listHolder_0->mList[i_0].splash.size.metric + = static_castmList[i_0].splash.size.metric)>>( + element_0.splash.size.metric.unsignedCharValue); + listHolder_0->mList[i_0].waterMark.imageUrl = [self asCharSpan:element_0.waterMark.imageUrl]; + listHolder_0->mList[i_0].waterMark.color = [self asCharSpan:element_0.waterMark.color]; + listHolder_0->mList[i_0].waterMark.size.width = element_0.waterMark.size.width.doubleValue; + listHolder_0->mList[i_0].waterMark.size.height = element_0.waterMark.size.height.doubleValue; + listHolder_0->mList[i_0].waterMark.size.metric + = static_castmList[i_0].waterMark.size.metric)>>( + element_0.waterMark.size.metric.unsignedCharValue); + } + request.brandingInformation = ListType_0(listHolder_0->mList, params.brandingInformation.count); + } else { + request.brandingInformation = ListType_0(); + } + } new CHIPContentLauncherClusterLaunchURLResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { @@ -5023,34 +5094,51 @@ new CHIPContentLauncherAcceptsHeaderListListAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -- (void)readAttributeSupportedStreamingTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingTypes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSupportedStreamingTypesWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingTypes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, - CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -9498,92 +9586,17 @@ new CHIPInt64uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -- (void)readAttributePositionUpdatedAtWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::PositionUpdatedAt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributePositionUpdatedAtWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::PositionUpdatedAt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - -- (void)readAttributePositionWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::Position::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributePositionWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::Position::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - - (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - - (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13734,92 +13747,32 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)readAttributeTvChannelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeChannelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTvChannelTvChannelListListAttributeCallbackBridge( + new CHIPTvChannelChannelListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::TvChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TvChannel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTvChannelListWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTvChannelTvChannelListListAttributeCallbackSubscriptionBridge( + new CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::TvChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TvChannel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, minInterval, maxInterval, - CHIPTvChannelTvChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - -- (void)readAttributeTvChannelLineupWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::TvChannelLineup::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeTvChannelLineupWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::TvChannelLineup::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - -- (void)readAttributeCurrentTvChannelWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::CurrentTvChannel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeCurrentTvChannelWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::CurrentTvChannel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -13923,6 +13876,17 @@ new CHIPTargetNavigatorTargetNavigatorListListAttributeCallbackSubscriptionBridg subscriptionEstablishedHandler); } +- (void)readAttributeCurrentNavigatorTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::CurrentNavigatorTarget::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h index 78b4ee53428e6c..8165255c8b9f56 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -1558,7 +1558,7 @@ NS_ASSUME_NONNULL_BEGIN @end @interface CHIPTvChannelClusterChangeChannelResponseParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull channelMatch; +@property (strong, nonatomic) CHIPTvChannelClusterTvChannelInfo * _Nonnull channelMatch; @property (strong, nonatomic) NSNumber * _Nonnull errorType; - (instancetype)init; @end @@ -1680,24 +1680,26 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPContentLauncherClusterLaunchContentParams : NSObject @property (strong, nonatomic) NSNumber * _Nonnull autoPlay; @property (strong, nonatomic) NSString * _Nonnull data; +@property (strong, nonatomic) NSArray * _Nonnull search; - (instancetype)init; @end @interface CHIPContentLauncherClusterLaunchContentResponseParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull data; @property (strong, nonatomic) NSNumber * _Nonnull contentLaunchStatus; +@property (strong, nonatomic) NSString * _Nonnull data; - (instancetype)init; @end @interface CHIPContentLauncherClusterLaunchURLParams : NSObject @property (strong, nonatomic) NSString * _Nonnull contentURL; @property (strong, nonatomic) NSString * _Nonnull displayString; +@property (strong, nonatomic) NSArray * _Nonnull brandingInformation; - (instancetype)init; @end @interface CHIPContentLauncherClusterLaunchURLResponseParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull data; @property (strong, nonatomic) NSNumber * _Nonnull contentLaunchStatus; +@property (strong, nonatomic) NSString * _Nonnull data; - (instancetype)init; @end @@ -1714,8 +1716,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPApplicationLauncherClusterLaunchAppParams : NSObject @property (strong, nonatomic) NSString * _Nonnull data; -@property (strong, nonatomic) NSNumber * _Nonnull catalogVendorId; -@property (strong, nonatomic) NSString * _Nonnull applicationId; +@property (strong, nonatomic) CHIPApplicationLauncherClusterApplicationLauncherApp * _Nonnull application; - (instancetype)init; @end @@ -1725,6 +1726,28 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end +@interface CHIPApplicationLauncherClusterStopAppParams : NSObject +@property (strong, nonatomic) CHIPApplicationLauncherClusterApplicationLauncherApp * _Nonnull application; +- (instancetype)init; +@end + +@interface CHIPApplicationLauncherClusterStopAppResponseParams : NSObject +@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (strong, nonatomic) NSString * _Nonnull data; +- (instancetype)init; +@end + +@interface CHIPApplicationLauncherClusterHideAppParams : NSObject +@property (strong, nonatomic) CHIPApplicationLauncherClusterApplicationLauncherApp * _Nonnull application; +- (instancetype)init; +@end + +@interface CHIPApplicationLauncherClusterHideAppResponseParams : NSObject +@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (strong, nonatomic) NSString * _Nonnull data; +- (instancetype)init; +@end + @interface CHIPApplicationBasicClusterChangeStatusParams : NSObject @property (strong, nonatomic) NSNumber * _Nonnull status; - (instancetype)init; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm index 1ddf3c6006e5af..bc919c37cdf4b8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -3310,7 +3310,7 @@ - (instancetype)init { if (self = [super init]) { - _channelMatch = [NSArray array]; + _channelMatch = [CHIPTvChannelClusterTvChannelInfo new]; _errorType = @(0); } @@ -3576,6 +3576,8 @@ - (instancetype)init _autoPlay = @(0); _data = @""; + + _search = [NSArray array]; } return self; } @@ -3586,9 +3588,9 @@ - (instancetype)init { if (self = [super init]) { - _data = @""; - _contentLaunchStatus = @(0); + + _data = @""; } return self; } @@ -3602,6 +3604,8 @@ - (instancetype)init _contentURL = @""; _displayString = @""; + + _brandingInformation = [NSArray array]; } return self; } @@ -3612,9 +3616,9 @@ - (instancetype)init { if (self = [super init]) { - _data = @""; - _contentLaunchStatus = @(0); + + _data = @""; } return self; } @@ -3651,9 +3655,7 @@ - (instancetype)init _data = @""; - _catalogVendorId = @(0); - - _applicationId = @""; + _application = [CHIPApplicationLauncherClusterApplicationLauncherApp new]; } return self; } @@ -3672,6 +3674,54 @@ - (instancetype)init } @end +@implementation CHIPApplicationLauncherClusterStopAppParams +- (instancetype)init +{ + if (self = [super init]) { + + _application = [CHIPApplicationLauncherClusterApplicationLauncherApp new]; + } + return self; +} +@end + +@implementation CHIPApplicationLauncherClusterStopAppResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = @(0); + + _data = @""; + } + return self; +} +@end + +@implementation CHIPApplicationLauncherClusterHideAppParams +- (instancetype)init +{ + if (self = [super init]) { + + _application = [CHIPApplicationLauncherClusterApplicationLauncherApp new]; + } + return self; +} +@end + +@implementation CHIPApplicationLauncherClusterHideAppResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = @(0); + + _data = @""; + } + return self; +} +@end + @implementation CHIPApplicationBasicClusterChangeStatusParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h index c63bdb6f45bbbd..63eaf38ef20510 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h @@ -306,6 +306,13 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end +@interface CHIPContentLauncherClusterContentLaunchDimension : NSObject +@property (strong, nonatomic) NSNumber * _Nonnull width; +@property (strong, nonatomic) NSNumber * _Nonnull height; +@property (strong, nonatomic) NSNumber * _Nonnull metric; +- (instancetype)init; +@end + @interface CHIPContentLauncherClusterContentLaunchAdditionalInfo : NSObject @property (strong, nonatomic) NSString * _Nonnull name; @property (strong, nonatomic) NSString * _Nonnull value; @@ -319,27 +326,20 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end -@interface CHIPContentLauncherClusterContentLaunchBrandingInformation : NSObject -@property (strong, nonatomic) NSString * _Nonnull providerName; -@property (strong, nonatomic) NSNumber * _Nonnull background; -@property (strong, nonatomic) NSNumber * _Nonnull logo; -@property (strong, nonatomic) NSNumber * _Nonnull progressBar; -@property (strong, nonatomic) NSNumber * _Nonnull splash; -@property (strong, nonatomic) NSNumber * _Nonnull waterMark; -- (instancetype)init; -@end - -@interface CHIPContentLauncherClusterContentLaunchDimension : NSObject -@property (strong, nonatomic) NSString * _Nonnull width; -@property (strong, nonatomic) NSString * _Nonnull height; -@property (strong, nonatomic) NSNumber * _Nonnull metric; -- (instancetype)init; -@end - @interface CHIPContentLauncherClusterContentLaunchStyleInformation : NSObject @property (strong, nonatomic) NSString * _Nonnull imageUrl; @property (strong, nonatomic) NSString * _Nonnull color; -@property (strong, nonatomic) NSNumber * _Nonnull size; +@property (strong, nonatomic) CHIPContentLauncherClusterContentLaunchDimension * _Nonnull size; +- (instancetype)init; +@end + +@interface CHIPContentLauncherClusterContentLaunchBrandingInformation : NSObject +@property (strong, nonatomic) NSString * _Nonnull providerName; +@property (strong, nonatomic) CHIPContentLauncherClusterContentLaunchStyleInformation * _Nonnull background; +@property (strong, nonatomic) CHIPContentLauncherClusterContentLaunchStyleInformation * _Nonnull logo; +@property (strong, nonatomic) CHIPContentLauncherClusterContentLaunchStyleInformation * _Nonnull progressBar; +@property (strong, nonatomic) CHIPContentLauncherClusterContentLaunchStyleInformation * _Nonnull splash; +@property (strong, nonatomic) CHIPContentLauncherClusterContentLaunchStyleInformation * _Nonnull waterMark; - (instancetype)init; @end @@ -356,6 +356,18 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end +@interface CHIPApplicationLauncherClusterApplicationLauncherEndpoint : NSObject +@property (strong, nonatomic) CHIPApplicationLauncherClusterApplicationLauncherApp * _Nonnull application; +@property (strong, nonatomic) NSString * _Nonnull endpoint; +- (instancetype)init; +@end + +@interface CHIPApplicationBasicClusterApplicationBasicApp : NSObject +@property (strong, nonatomic) NSNumber * _Nonnull catalogVendorId; +@property (strong, nonatomic) NSString * _Nonnull applicationId; +- (instancetype)init; +@end + @interface CHIPTestClusterClusterSimpleStruct : NSObject @property (strong, nonatomic) NSNumber * _Nonnull a; @property (strong, nonatomic) NSNumber * _Nonnull b; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm index 6f59d246c6bdcd..e8acadb7d5d2ad 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm @@ -620,6 +620,21 @@ - (instancetype)init } @end +@implementation CHIPContentLauncherClusterContentLaunchDimension +- (instancetype)init +{ + if (self = [super init]) { + + _width = @(0); + + _height = @(0); + + _metric = @(0); + } + return self; +} +@end + @implementation CHIPContentLauncherClusterContentLaunchAdditionalInfo - (instancetype)init { @@ -648,6 +663,21 @@ - (instancetype)init } @end +@implementation CHIPContentLauncherClusterContentLaunchStyleInformation +- (instancetype)init +{ + if (self = [super init]) { + + _imageUrl = @""; + + _color = @""; + + _size = [CHIPContentLauncherClusterContentLaunchDimension new]; + } + return self; +} +@end + @implementation CHIPContentLauncherClusterContentLaunchBrandingInformation - (instancetype)init { @@ -655,66 +685,62 @@ - (instancetype)init _providerName = @""; - _background = @(0); + _background = [CHIPContentLauncherClusterContentLaunchStyleInformation new]; - _logo = @(0); + _logo = [CHIPContentLauncherClusterContentLaunchStyleInformation new]; - _progressBar = @(0); + _progressBar = [CHIPContentLauncherClusterContentLaunchStyleInformation new]; - _splash = @(0); + _splash = [CHIPContentLauncherClusterContentLaunchStyleInformation new]; - _waterMark = @(0); + _waterMark = [CHIPContentLauncherClusterContentLaunchStyleInformation new]; } return self; } @end -@implementation CHIPContentLauncherClusterContentLaunchDimension +@implementation CHIPAudioOutputClusterAudioOutputInfo - (instancetype)init { if (self = [super init]) { - _width = @""; + _index = @(0); - _height = @""; + _outputType = @(0); - _metric = @(0); + _name = @""; } return self; } @end -@implementation CHIPContentLauncherClusterContentLaunchStyleInformation +@implementation CHIPApplicationLauncherClusterApplicationLauncherApp - (instancetype)init { if (self = [super init]) { - _imageUrl = @""; - - _color = @""; + _catalogVendorId = @(0); - _size = @(0); + _applicationId = @""; } return self; } @end -@implementation CHIPAudioOutputClusterAudioOutputInfo +@implementation CHIPApplicationLauncherClusterApplicationLauncherEndpoint - (instancetype)init { if (self = [super init]) { - _index = @(0); - - _outputType = @(0); + _application = [CHIPApplicationLauncherClusterApplicationLauncherApp new]; - _name = @""; + _endpoint = @""; } return self; } @end -@implementation CHIPApplicationLauncherClusterApplicationLauncherApp +@implementation CHIPApplicationBasicClusterApplicationBasicApp - (instancetype)init { if (self = [super init]) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 48e14bd490fd47..fdb4de558a9f42 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -69,9 +69,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeApplicationNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeProductIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeApplicationIdWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCatalogVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeApplicationStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeApplicationVersionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -85,8 +84,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeApplicationLauncherListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCatalogVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeApplicationIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -272,8 +269,6 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestContentLauncher : CHIPContentLauncher - (void)writeAttributeAcceptsHeaderListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSupportedStreamingTypesWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -547,8 +542,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributePlaybackStateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeStartTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeDurationWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributePositionUpdatedAtWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributePositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributePlaybackSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSeekRangeEndWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSeekRangeStartWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -817,9 +810,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestTvChannel : CHIPTvChannel -- (void)writeAttributeTvChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeTvChannelLineupWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCurrentTvChannelWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -832,6 +823,8 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestTargetNavigator : CHIPTargetNavigator - (void)writeAttributeTargetNavigatorListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCurrentNavigatorTargetWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 00b5b71b5be4f9..54efa5b24b0fe4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -380,25 +380,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeApplicationIdWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::ApplicationId::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeCatalogVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeApplicationStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -407,16 +389,16 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::CatalogVendorId::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::ApplicationStatus::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeApplicationStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeApplicationVersionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -425,9 +407,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::ApplicationStatus::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -544,42 +526,6 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeCatalogVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::CatalogVendorId::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeApplicationIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::ApplicationId::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -2615,47 +2561,6 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeSupportedStreamingTypesWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingTypes::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] - = static_castmList[i_0])>>(element_0.unsignedCharValue); - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5510,42 +5415,6 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributePositionUpdatedAtWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::PositionUpdatedAt::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributePositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::Position::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)writeAttributePlaybackSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5557,7 +5426,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + cppValue = value.floatValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -8210,7 +8079,7 @@ @implementation CHIPTestTvChannel return &_cppCluster; } -- (void)writeAttributeTvChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -8219,7 +8088,7 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TvChannel::Attributes::TvChannelList::TypeInfo; + using TypeInfo = TvChannel::Attributes::ChannelList::TypeInfo; TypeInfo::Type cppValue; { using ListType_0 = std::remove_reference_t; @@ -8253,42 +8122,6 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeTvChannelLineupWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TvChannel::Attributes::TvChannelLineup::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asByteSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeCurrentTvChannelWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TvChannel::Attributes::CurrentTvChannel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asByteSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -8399,6 +8232,25 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeCurrentNavigatorTargetWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::CurrentNavigatorTarget::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index a0a1ab827dc85f..62ec4926b37231 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -31804,32 +31804,7 @@ - (void)testSendClusterApplicationBasicReadAttributeProductIdWithCompletionHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationBasicReadAttributeApplicationIdWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationIdWithCompletionHandler"]; - - [cluster readAttributeApplicationIdWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"ApplicationBasic ApplicationId Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterApplicationBasicReadAttributeCatalogVendorIdWithCompletionHandler +- (void)testSendClusterApplicationBasicReadAttributeApplicationStatusWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -31843,10 +31818,10 @@ - (void)testSendClusterApplicationBasicReadAttributeCatalogVendorIdWithCompletio XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeCatalogVendorIdWithCompletionHandler"]; + [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationStatusWithCompletionHandler"]; - [cluster readAttributeCatalogVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"ApplicationBasic CatalogVendorId Error: %@", err); + [cluster readAttributeApplicationStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"ApplicationBasic ApplicationStatus Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -31854,7 +31829,7 @@ - (void)testSendClusterApplicationBasicReadAttributeCatalogVendorIdWithCompletio [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationBasicReadAttributeApplicationStatusWithCompletionHandler +- (void)testSendClusterApplicationBasicReadAttributeApplicationVersionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -31868,10 +31843,10 @@ - (void)testSendClusterApplicationBasicReadAttributeApplicationStatusWithComplet XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationStatusWithCompletionHandler"]; + [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationVersionWithCompletionHandler"]; - [cluster readAttributeApplicationStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"ApplicationBasic ApplicationStatus Error: %@", err); + [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"ApplicationBasic ApplicationVersion Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -31954,56 +31929,6 @@ - (void)testSendClusterApplicationLauncherReadAttributeApplicationLauncherListWi [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationLauncherReadAttributeCatalogVendorIdWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationLauncherReadAttributeCatalogVendorIdWithCompletionHandler"]; - - [cluster readAttributeCatalogVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"ApplicationLauncher CatalogVendorId Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterApplicationLauncherReadAttributeApplicationIdWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationLauncherReadAttributeApplicationIdWithCompletionHandler"]; - - [cluster readAttributeApplicationIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"ApplicationLauncher ApplicationId Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - - (void)testSendClusterApplicationLauncherReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34462,7 +34387,7 @@ - (void)testSendClusterContentLauncherReadAttributeAcceptsHeaderListWithCompleti [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterContentLauncherReadAttributeSupportedStreamingTypesWithCompletionHandler +- (void)testSendClusterContentLauncherReadAttributeSupportedStreamingProtocolsWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34476,10 +34401,10 @@ - (void)testSendClusterContentLauncherReadAttributeSupportedStreamingTypesWithCo XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"ContentLauncherReadAttributeSupportedStreamingTypesWithCompletionHandler"]; + [self expectationWithDescription:@"ContentLauncherReadAttributeSupportedStreamingProtocolsWithCompletionHandler"]; - [cluster readAttributeSupportedStreamingTypesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"ContentLauncher SupportedStreamingTypes Error: %@", err); + [cluster readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"ContentLauncher SupportedStreamingProtocols Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -34487,6 +34412,32 @@ - (void)testSendClusterContentLauncherReadAttributeSupportedStreamingTypesWithCo [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterContentLauncherWriteAttributeSupportedStreamingProtocolsWithValue +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"ContentLauncherWriteAttributeSupportedStreamingProtocolsWithValue"]; + + NSNumber * _Nonnull value = @(0); + [cluster writeAttributeSupportedStreamingProtocolsWithValue:value + completionHandler:^(NSError * _Nullable err) { + NSLog(@"ContentLauncher SupportedStreamingProtocols Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterContentLauncherReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -37935,55 +37886,6 @@ - (void)testSendClusterMediaPlaybackReadAttributeDurationWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterMediaPlaybackReadAttributePositionUpdatedAtWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPMediaPlayback * cluster = [[CHIPMediaPlayback alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"MediaPlaybackReadAttributePositionUpdatedAtWithCompletionHandler"]; - - [cluster readAttributePositionUpdatedAtWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"MediaPlayback PositionUpdatedAt Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterMediaPlaybackReadAttributePositionWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPMediaPlayback * cluster = [[CHIPMediaPlayback alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = [self expectationWithDescription:@"MediaPlaybackReadAttributePositionWithCompletionHandler"]; - - [cluster readAttributePositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"MediaPlayback Position Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - - (void)testSendClusterMediaPlaybackReadAttributePlaybackSpeedWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41247,7 +41149,7 @@ - (void)testSendClusterSwitchReadAttributeClusterRevisionWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTvChannelReadAttributeTvChannelListWithCompletionHandler +- (void)testSendClusterTvChannelReadAttributeChannelListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41260,10 +41162,10 @@ - (void)testSendClusterTvChannelReadAttributeTvChannelListWithCompletionHandler CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeTvChannelListWithCompletionHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeChannelListWithCompletionHandler"]; - [cluster readAttributeTvChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TvChannel TvChannelList Error: %@", err); + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TvChannel ChannelList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -41271,7 +41173,7 @@ - (void)testSendClusterTvChannelReadAttributeTvChannelListWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTvChannelReadAttributeTvChannelLineupWithCompletionHandler +- (void)testSendClusterTvChannelReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41284,11 +41186,10 @@ - (void)testSendClusterTvChannelReadAttributeTvChannelLineupWithCompletionHandle CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - XCTestExpectation * expectation = - [self expectationWithDescription:@"TvChannelReadAttributeTvChannelLineupWithCompletionHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeAttributeListWithCompletionHandler"]; - [cluster readAttributeTvChannelLineupWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { - NSLog(@"TvChannel TvChannelLineup Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TvChannel AttributeList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -41296,7 +41197,7 @@ - (void)testSendClusterTvChannelReadAttributeTvChannelLineupWithCompletionHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTvChannelReadAttributeCurrentTvChannelWithCompletionHandler +- (void)testSendClusterTvChannelReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41310,34 +41211,10 @@ - (void)testSendClusterTvChannelReadAttributeCurrentTvChannelWithCompletionHandl XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"TvChannelReadAttributeCurrentTvChannelWithCompletionHandler"]; - - [cluster readAttributeCurrentTvChannelWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { - NSLog(@"TvChannel CurrentTvChannel Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterTvChannelReadAttributeAttributeListWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeAttributeListWithCompletionHandler"]; + [self expectationWithDescription:@"TvChannelReadAttributeClusterRevisionWithCompletionHandler"]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TvChannel AttributeList Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TvChannel ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -41345,7 +41222,7 @@ - (void)testSendClusterTvChannelReadAttributeAttributeListWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTvChannelReadAttributeClusterRevisionWithCompletionHandler +- (void)testSendClusterTargetNavigatorReadAttributeTargetNavigatorListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41355,14 +41232,14 @@ - (void)testSendClusterTvChannelReadAttributeClusterRevisionWithCompletionHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; CHIPDevice * device = GetConnectedDevice(); - CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTargetNavigator * cluster = [[CHIPTargetNavigator alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"TvChannelReadAttributeClusterRevisionWithCompletionHandler"]; + [self expectationWithDescription:@"TargetNavigatorReadAttributeTargetNavigatorListWithCompletionHandler"]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TvChannel ClusterRevision Error: %@", err); + [cluster readAttributeTargetNavigatorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TargetNavigator TargetNavigatorList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -41370,7 +41247,7 @@ - (void)testSendClusterTvChannelReadAttributeClusterRevisionWithCompletionHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTargetNavigatorReadAttributeTargetNavigatorListWithCompletionHandler +- (void)testSendClusterTargetNavigatorReadAttributeCurrentNavigatorTargetWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41384,10 +41261,10 @@ - (void)testSendClusterTargetNavigatorReadAttributeTargetNavigatorListWithComple XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"TargetNavigatorReadAttributeTargetNavigatorListWithCompletionHandler"]; + [self expectationWithDescription:@"TargetNavigatorReadAttributeCurrentNavigatorTargetWithCompletionHandler"]; - [cluster readAttributeTargetNavigatorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TargetNavigator TargetNavigatorList Error: %@", err); + [cluster readAttributeCurrentNavigatorTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TargetNavigator CurrentNavigatorTarget Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 64216aa972230e..2fb8585460a5db 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -389,7 +389,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ \ - /* 1450 - tv channel list, */ \ + /* 1450 - 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, \ @@ -431,24 +431,18 @@ /* 1966 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1974 - position updated at, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1982 - position, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1990 - playback speed, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 1974 - playback speed, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ - /* 1998 - seek range end, */ \ + /* 1978 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2006 - seek range start, */ \ + /* 1986 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 2014 - media input list, */ \ + /* 1994 - 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, \ @@ -466,7 +460,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2268 - accepts header list, */ \ + /* 2248 - accepts header 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, \ @@ -482,25 +476,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2522 - 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, \ + /* 2502 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2776 - audio output list, */ \ + /* 2506 - 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, \ @@ -518,7 +499,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 3030 - application launcher list, */ \ + /* 2760 - 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, \ @@ -536,61 +517,61 @@ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 3284 - bitmap32, */ \ + /* 3014 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3288 - bitmap64, */ \ + /* 3018 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3296 - int24u, */ \ + /* 3026 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3299 - int32u, */ \ + /* 3029 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3303 - int40u, */ \ + /* 3033 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3308 - int48u, */ \ + /* 3038 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3314 - int56u, */ \ + /* 3044 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3321 - int64u, */ \ + /* 3051 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3329 - int24s, */ \ + /* 3059 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3332 - int32s, */ \ + /* 3062 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3336 - int40s, */ \ + /* 3066 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3341 - int48s, */ \ + /* 3071 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3347 - int56s, */ \ + /* 3077 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3354 - int64s, */ \ + /* 3084 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3362 - float_single, */ \ + /* 3092 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3366 - float_double, */ \ + /* 3096 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3374 - epoch_us, */ \ + /* 3104 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3382 - epoch_s, */ \ + /* 3112 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3386 - list_long_octet_string, */ \ + /* 3116 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -645,65 +626,65 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4386 - nullable_bitmap32, */ \ + /* 4116 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4390 - nullable_bitmap64, */ \ + /* 4120 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4398 - nullable_int24u, */ \ + /* 4128 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 4401 - nullable_int32u, */ \ + /* 4131 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4405 - nullable_int40u, */ \ + /* 4135 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4410 - nullable_int48u, */ \ + /* 4140 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4416 - nullable_int56u, */ \ + /* 4146 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4423 - nullable_int64u, */ \ + /* 4153 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4431 - nullable_int24s, */ \ + /* 4161 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 4434 - nullable_int32s, */ \ + /* 4164 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4438 - nullable_int40s, */ \ + /* 4168 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4443 - nullable_int48s, */ \ + /* 4173 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4449 - nullable_int56s, */ \ + /* 4179 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4456 - nullable_int64s, */ \ + /* 4186 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4464 - nullable_float_single, */ \ + /* 4194 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4468 - nullable_float_double, */ \ + /* 4198 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 4476 - measurement type, */ \ + /* 4206 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4480 - total active power, */ \ + /* 4210 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 4484 - FeatureMap, */ \ + /* 4214 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -1073,7 +1054,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ \ - /* 1450 - tv channel list, */ \ + /* 1450 - 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, \ @@ -1115,24 +1096,18 @@ /* 1966 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1974 - position updated at, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1982 - position, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1990 - playback speed, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 1974 - playback speed, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ - /* 1998 - seek range end, */ \ + /* 1978 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2006 - seek range start, */ \ + /* 1986 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 2014 - media input list, */ \ + /* 1994 - 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, \ @@ -1150,7 +1125,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2268 - accepts header list, */ \ + /* 2248 - accepts header 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, \ @@ -1166,25 +1141,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2522 - 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, \ + /* 2502 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2776 - audio output list, */ \ + /* 2506 - 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, \ @@ -1202,7 +1164,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 3030 - application launcher list, */ \ + /* 2760 - 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, \ @@ -1220,61 +1182,61 @@ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 3284 - bitmap32, */ \ + /* 3014 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3288 - bitmap64, */ \ + /* 3018 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3296 - int24u, */ \ + /* 3026 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3299 - int32u, */ \ + /* 3029 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3303 - int40u, */ \ + /* 3033 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3308 - int48u, */ \ + /* 3038 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3314 - int56u, */ \ + /* 3044 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3321 - int64u, */ \ + /* 3051 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3329 - int24s, */ \ + /* 3059 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3332 - int32s, */ \ + /* 3062 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3336 - int40s, */ \ + /* 3066 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3341 - int48s, */ \ + /* 3071 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3347 - int56s, */ \ + /* 3077 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3354 - int64s, */ \ + /* 3084 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3362 - float_single, */ \ + /* 3092 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3366 - float_double, */ \ + /* 3096 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3374 - epoch_us, */ \ + /* 3104 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3382 - epoch_s, */ \ + /* 3112 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3386 - list_long_octet_string, */ \ + /* 3116 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1329,71 +1291,71 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4386 - nullable_bitmap32, */ \ + /* 4116 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4390 - nullable_bitmap64, */ \ + /* 4120 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4398 - nullable_int24u, */ \ + /* 4128 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 4401 - nullable_int32u, */ \ + /* 4131 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4405 - nullable_int40u, */ \ + /* 4135 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4410 - nullable_int48u, */ \ + /* 4140 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4416 - nullable_int56u, */ \ + /* 4146 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4423 - nullable_int64u, */ \ + /* 4153 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4431 - nullable_int24s, */ \ + /* 4161 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 4434 - nullable_int32s, */ \ + /* 4164 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4438 - nullable_int40s, */ \ + /* 4168 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4443 - nullable_int48s, */ \ + /* 4173 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4449 - nullable_int56s, */ \ + /* 4179 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4456 - nullable_int64s, */ \ + /* 4186 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4464 - nullable_float_single, */ \ + /* 4194 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4468 - nullable_float_double, */ \ + /* 4198 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 4476 - measurement type, */ \ + /* 4206 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4480 - total active power, */ \ + /* 4210 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 4484 - FeatureMap, */ \ + /* 4214 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (142) +#define GENERATED_DEFAULTS_COUNT (140) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1486,7 +1448,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 578 +#define GENERATED_ATTRIBUTE_COUNT 572 #define GENERATED_ATTRIBUTES \ { \ \ @@ -2078,28 +2040,25 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1450) }, /* tv channel list */ \ - { 0x0001, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* tv channel lineup */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* current tv channel */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1450) }, /* channel list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1704) }, /* target navigator list */ \ + { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, 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(1958) }, /* start time */ \ { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1966) }, /* duration */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1974) }, /* position updated at */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1982) }, /* position */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1990) }, /* playback speed */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1998) }, /* seek range end */ \ - { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2006) }, /* seek range start */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1974) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1978) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1986) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2014) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1994) }, /* media input list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2110,19 +2069,18 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2268) }, /* accepts header list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2522) }, /* supported streaming types */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2248) }, /* accepts header list */ \ + { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(2502) }, /* supported streaming protocols */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2776) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2506) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3030) }, /* 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 */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2760) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -2130,9 +2088,8 @@ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* 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 status */ \ + { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ @@ -2142,28 +2099,28 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3284) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3288) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3014) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3018) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3296) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3299) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3303) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3308) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3314) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3321) }, /* int64u */ \ + { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3026) }, /* int24u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3029) }, /* int32u */ \ + { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3033) }, /* int40u */ \ + { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3038) }, /* int48u */ \ + { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3044) }, /* int56u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3051) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3329) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3332) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3336) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3341) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3347) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3354) }, /* int64s */ \ + { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3059) }, /* int24s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3062) }, /* int32s */ \ + { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3066) }, /* int40s */ \ + { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3071) }, /* int48s */ \ + { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3077) }, /* int56s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3084) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3362) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3366) }, /* float_double */ \ + { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3092) }, /* float_single */ \ + { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3096) }, /* float_double */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ { 0x001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ @@ -2176,8 +2133,8 @@ { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ { 0x001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3374) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3382) }, /* epoch_s */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3104) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3112) }, /* epoch_s */ \ { 0x0022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ { 0x0023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2192,7 +2149,7 @@ ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* range_restricted_int16u */ \ { 0x0029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16s */ \ - { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(3386) }, /* list_long_octet_string */ \ + { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(3116) }, /* list_long_octet_string */ \ { 0x0030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ ZAP_EMPTY_DEFAULT() }, /* timed_write_boolean */ \ { 0x8000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2202,49 +2159,49 @@ { 0x8002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ { 0x8003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4386) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(4116) }, /* nullable_bitmap32 */ \ { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4390) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(4120) }, /* nullable_bitmap64 */ \ { 0x8005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ { 0x8006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ { 0x8007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4398) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(4128) }, /* nullable_int24u */ \ { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4401) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(4131) }, /* nullable_int32u */ \ { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4405) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(4135) }, /* nullable_int40u */ \ { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4410) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(4140) }, /* nullable_int48u */ \ { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4416) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(4146) }, /* nullable_int56u */ \ { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4423) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(4153) }, /* nullable_int64u */ \ { 0x800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ { 0x800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ { 0x800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4431) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(4161) }, /* nullable_int24s */ \ { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4434) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(4164) }, /* nullable_int32s */ \ { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4438) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(4168) }, /* nullable_int40s */ \ { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4443) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(4173) }, /* nullable_int48s */ \ { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4449) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(4179) }, /* nullable_int56s */ \ { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4456) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(4186) }, /* nullable_int64s */ \ { 0x8015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ { 0x8016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ { 0x8017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4464) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(4194) }, /* nullable_float_single */ \ { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4468) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(4198) }, /* nullable_float_double */ \ { 0x8019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ { 0x801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2269,8 +2226,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4476) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4480) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4206) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4210) }, /* total active power */ \ { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ @@ -2292,7 +2249,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4484) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4214) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2563,61 +2520,61 @@ 0x0503, ZAP_ATTRIBUTE_INDEX(429), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(431), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(431), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(435), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(433), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(437), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(436), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(446), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(443), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(449), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(446), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(450), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(447), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(451), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(448), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(454), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(451), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(457), 4, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(454), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(461), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(456), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(469), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(463), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(470), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(464), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(548), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(542), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(560), \ + ZAP_ATTRIBUTE_INDEX(554), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(562), \ + ZAP_ATTRIBUTE_INDEX(556), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(569), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(563), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(574), \ + ZAP_ATTRIBUTE_INDEX(568), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2629,7 +2586,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 21, 1930 }, { ZAP_CLUSTER_INDEX(21), 44, 6415 }, { ZAP_CLUSTER_INDEX(65), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 21, 1930 }, { ZAP_CLUSTER_INDEX(21), 44, 6076 }, { ZAP_CLUSTER_INDEX(65), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2639,7 +2596,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (8366) +#define ATTRIBUTE_MAX_SIZE (8027) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 44cc3aa0840b0d..a70e81e66f10e7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -84,6 +84,14 @@ typedef struct _DoubleNestedStructList /* TYPE WARNING: array array defaults to */ uint8_t * a; } DoubleNestedStructList; +// Struct for ContentLaunchDimension +typedef struct _ContentLaunchDimension +{ + double width; + double height; + uint8_t metric; +} ContentLaunchDimension; + // Struct for ContentLaunchAdditionalInfo typedef struct _ContentLaunchAdditionalInfo { @@ -94,11 +102,44 @@ typedef struct _ContentLaunchAdditionalInfo // Struct for ContentLaunchParamater typedef struct _ContentLaunchParamater { - uint8_t Type; - chip::CharSpan Value; - /* TYPE WARNING: array array defaults to */ uint8_t * ExternalIDList; + uint8_t type; + chip::CharSpan value; + /* TYPE WARNING: array array defaults to */ uint8_t * externalIDList; } ContentLaunchParamater; +// Struct for ContentLaunchStyleInformation +typedef struct _ContentLaunchStyleInformation +{ + chip::CharSpan imageUrl; + chip::CharSpan color; + ContentLaunchDimension size; +} ContentLaunchStyleInformation; + +// Struct for ContentLaunchBrandingInformation +typedef struct _ContentLaunchBrandingInformation +{ + chip::CharSpan providerName; + ContentLaunchStyleInformation background; + ContentLaunchStyleInformation logo; + ContentLaunchStyleInformation progressBar; + ContentLaunchStyleInformation splash; + ContentLaunchStyleInformation waterMark; +} ContentLaunchBrandingInformation; + +// Struct for ApplicationLauncherApp +typedef struct _ApplicationLauncherApp +{ + uint16_t catalogVendorId; + chip::CharSpan applicationId; +} ApplicationLauncherApp; + +// Struct for ApplicationLauncherEndpoint +typedef struct _ApplicationLauncherEndpoint +{ + ApplicationLauncherApp application; + chip::CharSpan endpoint; +} ApplicationLauncherEndpoint; + // Struct for Target typedef struct _Target { @@ -128,12 +169,12 @@ typedef struct _ActionStruct uint8_t Status; } ActionStruct; -// Struct for ApplicationLauncherApp -typedef struct _ApplicationLauncherApp +// Struct for ApplicationBasicApp +typedef struct _ApplicationBasicApp { uint16_t catalogVendorId; chip::CharSpan applicationId; -} ApplicationLauncherApp; +} ApplicationBasicApp; // Struct for AudioOutputInfo typedef struct _AudioOutputInfo @@ -163,33 +204,6 @@ typedef struct _BatFaultChangeType /* TYPE WARNING: array array defaults to */ uint8_t * previous; } BatFaultChangeType; -// Struct for ContentLaunchBrandingInformation -typedef struct _ContentLaunchBrandingInformation -{ - chip::CharSpan providerName; - uint8_t background; - uint8_t logo; - uint8_t progressBar; - uint8_t splash; - uint8_t waterMark; -} ContentLaunchBrandingInformation; - -// Struct for ContentLaunchDimension -typedef struct _ContentLaunchDimension -{ - chip::CharSpan width; - chip::CharSpan height; - uint8_t metric; -} ContentLaunchDimension; - -// Struct for ContentLaunchStyleInformation -typedef struct _ContentLaunchStyleInformation -{ - chip::CharSpan imageUrl; - chip::CharSpan color; - uint8_t size; -} ContentLaunchStyleInformation; - // Struct for DeviceType typedef struct _DeviceType { diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 4290eb296f5e09..5d277559ed65cd 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -1378,11 +1378,10 @@ #define ZCL_MEDIA_PLAYBACK_STATE_ATTRIBUTE_ID (0x0000) #define ZCL_MEDIA_PLAYBACK_START_TIME_ATTRIBUTE_ID (0x0001) #define ZCL_MEDIA_PLAYBACK_DURATION_ATTRIBUTE_ID (0x0002) -#define ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_UPDATED_AT_ATTRIBUTE_ID (0x0003) -#define ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_ATTRIBUTE_ID (0x0004) -#define ZCL_MEDIA_PLAYBACK_PLAYBACK_SPEED_ATTRIBUTE_ID (0x0005) -#define ZCL_MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_END_ATTRIBUTE_ID (0x0006) -#define ZCL_MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_START_ATTRIBUTE_ID (0x0007) +#define ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_ATTRIBUTE_ID (0x0003) +#define ZCL_MEDIA_PLAYBACK_PLAYBACK_SPEED_ATTRIBUTE_ID (0x0004) +#define ZCL_MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_END_ATTRIBUTE_ID (0x0005) +#define ZCL_MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_START_ATTRIBUTE_ID (0x0006) // Attribute ids for cluster: Media Input @@ -1410,7 +1409,7 @@ // Server attributes #define ZCL_CONTENT_LAUNCHER_ACCEPTS_HEADER_ATTRIBUTE_ID (0x0000) -#define ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_TYPES_ATTRIBUTE_ID (0x0001) +#define ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID (0x0001) // Attribute ids for cluster: Audio Output @@ -1426,8 +1425,7 @@ // Server attributes #define ZCL_APPLICATION_LAUNCHER_LIST_ATTRIBUTE_ID (0x0000) -#define ZCL_APPLICATION_LAUNCHER_CURRENT_APP_CATALOG_VENDOR_ID_ATTRIBUTE_ID (0x0001) -#define ZCL_APPLICATION_LAUNCHER_CURRENT_APP_APPLICATION_ID_ATTRIBUTE_ID (0x0002) +#define ZCL_APPLICATION_LAUNCHER_CURRENT_APP_ATTRIBUTE_ID (0x0001) // Attribute ids for cluster: Application Basic @@ -1438,9 +1436,9 @@ #define ZCL_APPLICATION_VENDOR_ID_ATTRIBUTE_ID (0x0001) #define ZCL_APPLICATION_NAME_ATTRIBUTE_ID (0x0002) #define ZCL_APPLICATION_PRODUCT_ID_ATTRIBUTE_ID (0x0003) -#define ZCL_APPLICATION_ID_ATTRIBUTE_ID (0x0005) -#define ZCL_CATALOG_VENDOR_ID_ATTRIBUTE_ID (0x0006) -#define ZCL_APPLICATION_STATUS_ATTRIBUTE_ID (0x0007) +#define ZCL_APPLICATION_APP_ATTRIBUTE_ID (0x0004) +#define ZCL_APPLICATION_STATUS_ATTRIBUTE_ID (0x0005) +#define ZCL_APPLICATION_VERSION_ATTRIBUTE_ID (0x0006) // Attribute ids for cluster: Account Login diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 91704ad7829f3c..0a8332d14e4090 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -27530,66 +27530,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace TvChannel { namespace Attributes { -namespace TvChannelLineup { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) -{ - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) -{ - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); -} - -} // namespace TvChannelLineup - -namespace CurrentTvChannel { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) -{ - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) -{ - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); -} - -} // namespace CurrentTvChannel - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) @@ -27834,89 +27774,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) } // namespace Duration -namespace PositionUpdatedAt { - -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); -} - -} // namespace PositionUpdatedAt - -namespace Position { - -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); -} - -} // namespace Position - namespace PlaybackSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace PlaybackSpeed @@ -28264,6 +28146,35 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace ContentLauncher { namespace Attributes { +namespace SupportedStreamingProtocols { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace SupportedStreamingProtocols + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) @@ -28421,64 +28332,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace ApplicationLauncher { namespace Attributes { -namespace CatalogVendorId { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace CatalogVendorId - -namespace ApplicationId { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace ApplicationId - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) @@ -28661,65 +28514,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace ProductId -namespace ApplicationId { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) -{ - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace ApplicationId - -namespace CatalogVendorId { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace CatalogVendorId - namespace ApplicationStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) @@ -28749,6 +28543,36 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace ApplicationStatus +namespace ApplicationVersion { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace ApplicationVersion + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 902fe19491b618..d0ec6997bea67a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -5153,16 +5153,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace TvChannel { namespace Attributes { -namespace TvChannelLineup { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // octet_string -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); -} // namespace TvChannelLineup - -namespace CurrentTvChannel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // octet_string -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); -} // namespace CurrentTvChannel - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -5215,19 +5205,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // int64u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); } // namespace Duration -namespace PositionUpdatedAt { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // int64u -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); -} // namespace PositionUpdatedAt - -namespace Position { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // int64u -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); -} // namespace Position - namespace PlaybackSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // int64u -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single +EmberAfStatus Set(chip::EndpointId endpoint, float value); } // namespace PlaybackSpeed namespace SeekRangeEnd { @@ -5309,6 +5289,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace ContentLauncher { namespace Attributes { +namespace SupportedStreamingProtocols { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace SupportedStreamingProtocols + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -5346,16 +5331,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace ApplicationLauncher { namespace Attributes { -namespace CatalogVendorId { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace CatalogVendorId - -namespace ApplicationId { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace ApplicationId - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -5392,21 +5367,16 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ProductId -namespace ApplicationId { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); -} // namespace ApplicationId - -namespace CatalogVendorId { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -} // namespace CatalogVendorId - namespace ApplicationStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace ApplicationStatus +namespace ApplicationVersion { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace ApplicationVersion + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 1f11cfb9ce36ed..8497ba36e404cf 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -14817,9 +14817,9 @@ bool emberAfTvChannelClusterChangeChannelCallback( /** * @brief TV Channel Cluster ChangeChannelResponse Command callback (from server) */ -bool emberAfTvChannelClusterChangeChannelResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - /* TYPE WARNING: array array defaults to */ uint8_t * ChannelMatch, - uint8_t ErrorType); +bool emberAfTvChannelClusterChangeChannelResponseCallback( + chip::EndpointId endpoint, chip::app::CommandSender * commandObj, + chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType channelMatch, uint8_t errorType); /** * @brief TV Channel Cluster ChangeChannelByNumber Command callback (from client) */ @@ -15014,7 +15014,7 @@ bool emberAfContentLauncherClusterLaunchContentCallback( * @brief Content Launcher Cluster LaunchContentResponse Command callback (from server) */ bool emberAfContentLauncherClusterLaunchContentResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - chip::CharSpan data, uint8_t contentLaunchStatus); + uint8_t contentLaunchStatus, chip::CharSpan data); /** * @brief Content Launcher Cluster LaunchURL Command callback (from client) */ @@ -15025,7 +15025,7 @@ bool emberAfContentLauncherClusterLaunchURLCallback( * @brief Content Launcher Cluster LaunchURLResponse Command callback (from server) */ bool emberAfContentLauncherClusterLaunchURLResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - chip::CharSpan data, uint8_t contentLaunchStatus); + uint8_t contentLaunchStatus, chip::CharSpan data); /** * @brief Audio Output Cluster SelectOutput Command callback (from client) */ @@ -15049,6 +15049,28 @@ bool emberAfApplicationLauncherClusterLaunchAppCallback( */ bool emberAfApplicationLauncherClusterLaunchAppResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t status, chip::CharSpan data); +/** + * @brief Application Launcher Cluster StopApp Command callback (from client) + */ +bool emberAfApplicationLauncherClusterStopAppCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ApplicationLauncher::Commands::StopApp::DecodableType & commandData); +/** + * @brief Application Launcher Cluster StopAppResponse Command callback (from server) + */ +bool emberAfApplicationLauncherClusterStopAppResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, + uint8_t status, chip::CharSpan data); +/** + * @brief Application Launcher Cluster HideApp Command callback (from client) + */ +bool emberAfApplicationLauncherClusterHideAppCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ApplicationLauncher::Commands::HideApp::DecodableType & commandData); +/** + * @brief Application Launcher Cluster HideAppResponse Command callback (from server) + */ +bool emberAfApplicationLauncherClusterHideAppResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, + uint8_t status, chip::CharSpan data); /** * @brief Application Basic Cluster ChangeStatus Command callback (from client) */ @@ -15072,6 +15094,12 @@ bool emberAfAccountLoginClusterGetSetupPINResponseCallback(chip::EndpointId endp bool emberAfAccountLoginClusterLoginCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::AccountLogin::Commands::Login::DecodableType & commandData); +/** + * @brief Account Login Cluster Logout Command callback (from client) + */ +bool emberAfAccountLoginClusterLogoutCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::AccountLogin::Commands::Logout::DecodableType & commandData); /** * @brief Test Cluster Cluster Test Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 86c94c23b1b72e..d0a42c9de65d0d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -16180,13 +16180,14 @@ namespace Events { } // namespace KeypadInput namespace ContentLauncher { namespace Structs { -namespace ContentLaunchAdditionalInfo { +namespace ContentLaunchDimension { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWidth)), width)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kHeight)), height)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMetric)), metric)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16203,11 +16204,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kName): - ReturnErrorOnFailure(DataModel::Decode(reader, name)); + case to_underlying(Fields::kWidth): + ReturnErrorOnFailure(DataModel::Decode(reader, width)); break; - case to_underlying(Fields::kValue): - ReturnErrorOnFailure(DataModel::Decode(reader, value)); + case to_underlying(Fields::kHeight): + ReturnErrorOnFailure(DataModel::Decode(reader, height)); + break; + case to_underlying(Fields::kMetric): + ReturnErrorOnFailure(DataModel::Decode(reader, metric)); break; default: break; @@ -16219,15 +16223,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace ContentLaunchAdditionalInfo -namespace ContentLaunchParamater { +} // namespace ContentLaunchDimension +namespace ContentLaunchAdditionalInfo { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExternalIDList)), externalIDList)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16244,15 +16247,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kType): - ReturnErrorOnFailure(DataModel::Decode(reader, type)); + case to_underlying(Fields::kName): + ReturnErrorOnFailure(DataModel::Decode(reader, name)); break; case to_underlying(Fields::kValue): ReturnErrorOnFailure(DataModel::Decode(reader, value)); break; - case to_underlying(Fields::kExternalIDList): - ReturnErrorOnFailure(DataModel::Decode(reader, externalIDList)); - break; default: break; } @@ -16263,18 +16263,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace ContentLaunchParamater -namespace ContentLaunchBrandingInformation { +} // namespace ContentLaunchAdditionalInfo +namespace ContentLaunchParamater { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProviderName)), providerName)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBackground)), background)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogo)), logo)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProgressBar)), progressBar)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSplash)), splash)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWaterMark)), waterMark)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kValue)), value)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kExternalIDList)), externalIDList)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16291,23 +16288,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kProviderName): - ReturnErrorOnFailure(DataModel::Decode(reader, providerName)); - break; - case to_underlying(Fields::kBackground): - ReturnErrorOnFailure(DataModel::Decode(reader, background)); - break; - case to_underlying(Fields::kLogo): - ReturnErrorOnFailure(DataModel::Decode(reader, logo)); - break; - case to_underlying(Fields::kProgressBar): - ReturnErrorOnFailure(DataModel::Decode(reader, progressBar)); + case to_underlying(Fields::kType): + ReturnErrorOnFailure(DataModel::Decode(reader, type)); break; - case to_underlying(Fields::kSplash): - ReturnErrorOnFailure(DataModel::Decode(reader, splash)); + case to_underlying(Fields::kValue): + ReturnErrorOnFailure(DataModel::Decode(reader, value)); break; - case to_underlying(Fields::kWaterMark): - ReturnErrorOnFailure(DataModel::Decode(reader, waterMark)); + case to_underlying(Fields::kExternalIDList): + ReturnErrorOnFailure(DataModel::Decode(reader, externalIDList)); break; default: break; @@ -16319,15 +16307,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace ContentLaunchBrandingInformation -namespace ContentLaunchDimension { +} // namespace ContentLaunchParamater +namespace ContentLaunchStyleInformation { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWidth)), width)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kHeight)), height)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMetric)), metric)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kImageUrl)), imageUrl)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColor)), color)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSize)), size)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16344,14 +16332,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kWidth): - ReturnErrorOnFailure(DataModel::Decode(reader, width)); + case to_underlying(Fields::kImageUrl): + ReturnErrorOnFailure(DataModel::Decode(reader, imageUrl)); break; - case to_underlying(Fields::kHeight): - ReturnErrorOnFailure(DataModel::Decode(reader, height)); + case to_underlying(Fields::kColor): + ReturnErrorOnFailure(DataModel::Decode(reader, color)); break; - case to_underlying(Fields::kMetric): - ReturnErrorOnFailure(DataModel::Decode(reader, metric)); + case to_underlying(Fields::kSize): + ReturnErrorOnFailure(DataModel::Decode(reader, size)); break; default: break; @@ -16363,15 +16351,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace ContentLaunchDimension -namespace ContentLaunchStyleInformation { +} // namespace ContentLaunchStyleInformation +namespace ContentLaunchBrandingInformation { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kImageUrl)), imageUrl)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColor)), color)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSize)), size)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProviderName)), providerName)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBackground)), background)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLogo)), logo)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kProgressBar)), progressBar)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSplash)), splash)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kWaterMark)), waterMark)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16388,14 +16379,23 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kImageUrl): - ReturnErrorOnFailure(DataModel::Decode(reader, imageUrl)); + case to_underlying(Fields::kProviderName): + ReturnErrorOnFailure(DataModel::Decode(reader, providerName)); break; - case to_underlying(Fields::kColor): - ReturnErrorOnFailure(DataModel::Decode(reader, color)); + case to_underlying(Fields::kBackground): + ReturnErrorOnFailure(DataModel::Decode(reader, background)); break; - case to_underlying(Fields::kSize): - ReturnErrorOnFailure(DataModel::Decode(reader, size)); + case to_underlying(Fields::kLogo): + ReturnErrorOnFailure(DataModel::Decode(reader, logo)); + break; + case to_underlying(Fields::kProgressBar): + ReturnErrorOnFailure(DataModel::Decode(reader, progressBar)); + break; + case to_underlying(Fields::kSplash): + ReturnErrorOnFailure(DataModel::Decode(reader, splash)); + break; + case to_underlying(Fields::kWaterMark): + ReturnErrorOnFailure(DataModel::Decode(reader, waterMark)); break; default: break; @@ -16407,7 +16407,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace ContentLaunchStyleInformation +} // namespace ContentLaunchBrandingInformation } // namespace Structs namespace Commands { @@ -16418,6 +16418,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAutoPlay)), autoPlay)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSearch)), search)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16439,6 +16440,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kData): ReturnErrorOnFailure(DataModel::Decode(reader, data)); break; + case to_underlying(Fields::kSearch): + ReturnErrorOnFailure(DataModel::Decode(reader, search)); + break; default: break; } @@ -16454,9 +16458,9 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); ReturnErrorOnFailure( DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kContentLaunchStatus)), contentLaunchStatus)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16472,12 +16476,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kData): - ReturnErrorOnFailure(DataModel::Decode(reader, data)); - break; case to_underlying(Fields::kContentLaunchStatus): ReturnErrorOnFailure(DataModel::Decode(reader, contentLaunchStatus)); break; + case to_underlying(Fields::kData): + ReturnErrorOnFailure(DataModel::Decode(reader, data)); + break; default: break; } @@ -16495,6 +16499,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kContentURL)), contentURL)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDisplayString)), displayString)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kBrandingInformation)), brandingInformation)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16516,6 +16522,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kDisplayString): ReturnErrorOnFailure(DataModel::Decode(reader, displayString)); break; + case to_underlying(Fields::kBrandingInformation): + ReturnErrorOnFailure(DataModel::Decode(reader, brandingInformation)); + break; default: break; } @@ -16531,9 +16540,9 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); ReturnErrorOnFailure( DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kContentLaunchStatus)), contentLaunchStatus)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16549,12 +16558,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kData): - ReturnErrorOnFailure(DataModel::Decode(reader, data)); - break; case to_underlying(Fields::kContentLaunchStatus): ReturnErrorOnFailure(DataModel::Decode(reader, contentLaunchStatus)); break; + case to_underlying(Fields::kData): + ReturnErrorOnFailure(DataModel::Decode(reader, data)); + break; default: break; } @@ -16740,6 +16749,46 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ApplicationLauncherApp +namespace ApplicationLauncherEndpoint { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplication)), application)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndpoint)), endpoint)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kApplication): + ReturnErrorOnFailure(DataModel::Decode(reader, application)); + break; + case to_underlying(Fields::kEndpoint): + ReturnErrorOnFailure(DataModel::Decode(reader, endpoint)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace ApplicationLauncherEndpoint } // namespace Structs namespace Commands { @@ -16749,8 +16798,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCatalogVendorId)), catalogVendorId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplicationId)), applicationId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplication)), application)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16769,11 +16817,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kData): ReturnErrorOnFailure(DataModel::Decode(reader, data)); break; - case to_underlying(Fields::kCatalogVendorId): - ReturnErrorOnFailure(DataModel::Decode(reader, catalogVendorId)); - break; - case to_underlying(Fields::kApplicationId): - ReturnErrorOnFailure(DataModel::Decode(reader, applicationId)); + case to_underlying(Fields::kApplication): + ReturnErrorOnFailure(DataModel::Decode(reader, application)); break; default: break; @@ -16823,6 +16868,150 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } } // namespace LaunchAppResponse. +namespace StopApp { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplication)), application)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kApplication): + ReturnErrorOnFailure(DataModel::Decode(reader, application)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace StopApp. +namespace StopAppResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); + break; + case to_underlying(Fields::kData): + ReturnErrorOnFailure(DataModel::Decode(reader, data)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace StopAppResponse. +namespace HideApp { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplication)), application)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kApplication): + ReturnErrorOnFailure(DataModel::Decode(reader, application)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace HideApp. +namespace HideAppResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); + break; + case to_underlying(Fields::kData): + ReturnErrorOnFailure(DataModel::Decode(reader, data)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace HideAppResponse. } // namespace Commands namespace Events { @@ -16830,6 +17019,48 @@ namespace Events { } // namespace ApplicationLauncher namespace ApplicationBasic { +namespace Structs { +namespace ApplicationBasicApp { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCatalogVendorId)), catalogVendorId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplicationId)), applicationId)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kCatalogVendorId): + ReturnErrorOnFailure(DataModel::Decode(reader, catalogVendorId)); + break; + case to_underlying(Fields::kApplicationId): + ReturnErrorOnFailure(DataModel::Decode(reader, applicationId)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace ApplicationBasicApp +} // namespace Structs namespace Commands { namespace ChangeStatus { @@ -16983,6 +17214,36 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } } // namespace Login. +namespace Logout { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace Logout. } // namespace Commands namespace Events { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 14bd6205e9f414..b306c6e01a51db 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -28003,7 +28003,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ChangeChannelResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } - DataModel::List channelMatch; + Structs::TvChannelInfo::Type channelMatch; TvChannelErrorType errorType; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -28019,7 +28019,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ChangeChannelResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } - DataModel::DecodableList channelMatch; + Structs::TvChannelInfo::DecodableType channelMatch; TvChannelErrorType errorType; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -28094,7 +28094,7 @@ struct DecodableType } // namespace Commands namespace Attributes { -namespace TvChannelList { +namespace ChannelList { struct TypeInfo { using Type = DataModel::List; @@ -28102,34 +28102,34 @@ struct TypeInfo using DecodableArgType = const DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TvChannelList::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ChannelList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TvChannelList -namespace TvChannelLineup { +} // namespace ChannelList +namespace ChannelLineup { struct TypeInfo { - using Type = chip::ByteSpan; - using DecodableType = chip::ByteSpan; - using DecodableArgType = chip::ByteSpan; + using Type = Structs::TvChannelLineupInfo::Type; + using DecodableType = Structs::TvChannelLineupInfo::DecodableType; + using DecodableArgType = const Structs::TvChannelLineupInfo::DecodableType &; static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TvChannelLineup::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ChannelLineup::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TvChannelLineup -namespace CurrentTvChannel { +} // namespace ChannelLineup +namespace CurrentChannel { struct TypeInfo { - using Type = chip::ByteSpan; - using DecodableType = chip::ByteSpan; - using DecodableArgType = chip::ByteSpan; + using Type = Structs::TvChannelInfo::Type; + using DecodableType = Structs::TvChannelInfo::DecodableType; + using DecodableArgType = const Structs::TvChannelInfo::DecodableType &; static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentTvChannel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentChannel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentTvChannel +} // namespace CurrentChannel namespace AttributeList { struct TypeInfo { @@ -29233,24 +29233,12 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Duration -namespace PositionUpdatedAt { -struct TypeInfo -{ - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; - - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PositionUpdatedAt::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PositionUpdatedAt namespace Position { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = Structs::MediaPlaybackPosition::Type; + using DecodableType = Structs::MediaPlaybackPosition::DecodableType; + using DecodableArgType = const Structs::MediaPlaybackPosition::DecodableType &; static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Position::Id; } @@ -29260,9 +29248,9 @@ struct TypeInfo namespace PlaybackSpeed { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = float; + using DecodableType = float; + using DecodableArgType = float; static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::PlaybackSpeed::Id; } @@ -29923,14 +29911,16 @@ enum class ContentLaunchParameterEnum : uint8_t kActor = 0x00, kChannel = 0x01, kCharacter = 0x02, - kEvent = 0x03, - kFranchise = 0x04, - kGenre = 0x05, - kLeague = 0x06, - kPopularity = 0x07, - kSport = 0x08, - kSportsTeam = 0x09, - kVideo = 0x0A, + kDirector = 0x03, + kEvent = 0x04, + kFranchise = 0x05, + kGenre = 0x06, + kLeague = 0x07, + kPopularity = 0x08, + kProvider = 0x09, + kSport = 0x0A, + kSportsTeam = 0x0B, + kType = 0x0C, }; // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -29945,20 +29935,30 @@ enum class ContentLaunchStatus : uint8_t #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM using ContentLaunchStatus = EmberAfContentLaunchStatus; #endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Enum for ContentLaunchStreamingType -enum class ContentLaunchStreamingType : uint8_t + +namespace Structs { +namespace ContentLaunchDimension { +enum class Fields { - kDash = 0x00, - kHls = 0x01, + kWidth = 1, + kHeight = 2, + kMetric = 3, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchStreamingType = EmberAfContentLaunchStreamingType; -#endif -namespace Structs { +struct Type +{ +public: + double width; + double height; + ContentLaunchMetricType metric; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; + +using DecodableType = Type; + +} // namespace ContentLaunchDimension namespace ContentLaunchAdditionalInfo { enum class Fields { @@ -30007,48 +30007,20 @@ struct DecodableType }; } // namespace ContentLaunchParamater -namespace ContentLaunchBrandingInformation { -enum class Fields -{ - kProviderName = 1, - kBackground = 2, - kLogo = 3, - kProgressBar = 4, - kSplash = 5, - kWaterMark = 6, -}; - -struct Type -{ -public: - chip::CharSpan providerName; - uint8_t background; - uint8_t logo; - uint8_t progressBar; - uint8_t splash; - uint8_t waterMark; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; - -using DecodableType = Type; - -} // namespace ContentLaunchBrandingInformation -namespace ContentLaunchDimension { +namespace ContentLaunchStyleInformation { enum class Fields { - kWidth = 1, - kHeight = 2, - kMetric = 3, + kImageUrl = 1, + kColor = 2, + kSize = 3, }; struct Type { public: - chip::CharSpan width; - chip::CharSpan height; - ContentLaunchMetricType metric; + chip::CharSpan imageUrl; + chip::CharSpan color; + Structs::ContentLaunchDimension::Type size; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -30056,21 +30028,27 @@ struct Type using DecodableType = Type; -} // namespace ContentLaunchDimension -namespace ContentLaunchStyleInformation { +} // namespace ContentLaunchStyleInformation +namespace ContentLaunchBrandingInformation { enum class Fields { - kImageUrl = 1, - kColor = 2, - kSize = 3, + kProviderName = 1, + kBackground = 2, + kLogo = 3, + kProgressBar = 4, + kSplash = 5, + kWaterMark = 6, }; struct Type { public: - chip::CharSpan imageUrl; - chip::CharSpan color; - uint8_t size; + chip::CharSpan providerName; + Structs::ContentLaunchStyleInformation::Type background; + Structs::ContentLaunchStyleInformation::Type logo; + Structs::ContentLaunchStyleInformation::Type progressBar; + Structs::ContentLaunchStyleInformation::Type splash; + Structs::ContentLaunchStyleInformation::Type waterMark; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -30078,7 +30056,7 @@ struct Type using DecodableType = Type; -} // namespace ContentLaunchStyleInformation +} // namespace ContentLaunchBrandingInformation } // namespace Structs namespace Commands { @@ -30112,6 +30090,7 @@ enum class Fields { kAutoPlay = 0, kData = 1, + kSearch = 2, }; struct Type @@ -30123,6 +30102,7 @@ struct Type bool autoPlay; chip::CharSpan data; + DataModel::List search; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30139,14 +30119,15 @@ struct DecodableType bool autoPlay; chip::CharSpan data; + DataModel::DecodableList search; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchContent namespace LaunchContentResponse { enum class Fields { - kData = 0, - kContentLaunchStatus = 1, + kContentLaunchStatus = 0, + kData = 1, }; struct Type @@ -30156,8 +30137,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LaunchContentResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - chip::CharSpan data; ContentLaunchStatus contentLaunchStatus; + chip::CharSpan data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30172,16 +30153,17 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LaunchContentResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - chip::CharSpan data; ContentLaunchStatus contentLaunchStatus; + chip::CharSpan data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchContentResponse namespace LaunchURL { enum class Fields { - kContentURL = 0, - kDisplayString = 1, + kContentURL = 0, + kDisplayString = 1, + kBrandingInformation = 2, }; struct Type @@ -30193,6 +30175,7 @@ struct Type chip::CharSpan contentURL; chip::CharSpan displayString; + DataModel::List brandingInformation; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30209,14 +30192,15 @@ struct DecodableType chip::CharSpan contentURL; chip::CharSpan displayString; + DataModel::DecodableList brandingInformation; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchURL namespace LaunchURLResponse { enum class Fields { - kData = 0, - kContentLaunchStatus = 1, + kContentLaunchStatus = 0, + kData = 1, }; struct Type @@ -30226,8 +30210,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LaunchURLResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - chip::CharSpan data; ContentLaunchStatus contentLaunchStatus; + chip::CharSpan data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30242,8 +30226,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LaunchURLResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - chip::CharSpan data; ContentLaunchStatus contentLaunchStatus; + chip::CharSpan data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchURLResponse @@ -30262,18 +30246,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace AcceptsHeaderList -namespace SupportedStreamingTypes { +namespace SupportedStreamingProtocols { struct TypeInfo { - using Type = DataModel::List; - using DecodableType = DataModel::DecodableList; - using DecodableArgType = const DataModel::DecodableList &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedStreamingTypes::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedStreamingProtocols::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedStreamingTypes +} // namespace SupportedStreamingProtocols namespace AttributeList { struct TypeInfo { @@ -30539,6 +30523,26 @@ struct Type using DecodableType = Type; } // namespace ApplicationLauncherApp +namespace ApplicationLauncherEndpoint { +enum class Fields +{ + kApplication = 1, + kEndpoint = 2, +}; + +struct Type +{ +public: + Structs::ApplicationLauncherApp::Type application; + chip::CharSpan endpoint; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; + +using DecodableType = Type; + +} // namespace ApplicationLauncherEndpoint } // namespace Structs namespace Commands { @@ -30554,15 +30558,34 @@ struct Type; struct DecodableType; } // namespace LaunchAppResponse +namespace StopApp { +struct Type; +struct DecodableType; +} // namespace StopApp + +namespace StopAppResponse { +struct Type; +struct DecodableType; +} // namespace StopAppResponse + +namespace HideApp { +struct Type; +struct DecodableType; +} // namespace HideApp + +namespace HideAppResponse { +struct Type; +struct DecodableType; +} // namespace HideAppResponse + } // namespace Commands namespace Commands { namespace LaunchApp { enum class Fields { - kData = 0, - kCatalogVendorId = 1, - kApplicationId = 2, + kData = 0, + kApplication = 1, }; struct Type @@ -30573,8 +30596,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } chip::CharSpan data; - uint16_t catalogVendorId; - chip::CharSpan applicationId; + Structs::ApplicationLauncherApp::Type application; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30590,8 +30612,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } chip::CharSpan data; - uint16_t catalogVendorId; - chip::CharSpan applicationId; + Structs::ApplicationLauncherApp::DecodableType application; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchApp @@ -30630,6 +30651,140 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchAppResponse +namespace StopApp { +enum class Fields +{ + kApplication = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StopApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + Structs::ApplicationLauncherApp::Type application; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::StopApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + Structs::ApplicationLauncherApp::DecodableType application; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StopApp +namespace StopAppResponse { +enum class Fields +{ + kStatus = 0, + kData = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StopAppResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + ApplicationLauncherStatus status; + chip::CharSpan data; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::StopAppResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + ApplicationLauncherStatus status; + chip::CharSpan data; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StopAppResponse +namespace HideApp { +enum class Fields +{ + kApplication = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::HideApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + Structs::ApplicationLauncherApp::Type application; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = Clusters::ApplicationLauncher::Commands::HideAppResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::HideApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + Structs::ApplicationLauncherApp::DecodableType application; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace HideApp +namespace HideAppResponse { +enum class Fields +{ + kStatus = 0, + kData = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::HideAppResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + ApplicationLauncherStatus status; + chip::CharSpan data; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::HideAppResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + ApplicationLauncherStatus status; + chip::CharSpan data; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace HideAppResponse } // namespace Commands namespace Attributes { @@ -30645,30 +30800,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ApplicationLauncherList -namespace CatalogVendorId { +namespace ApplicationLauncherApp { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = Structs::ApplicationLauncherEndpoint::Type; + using DecodableType = Structs::ApplicationLauncherEndpoint::DecodableType; + using DecodableArgType = const Structs::ApplicationLauncherEndpoint::DecodableType &; static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CatalogVendorId::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationLauncherApp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CatalogVendorId -namespace ApplicationId { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationId::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ApplicationId +} // namespace ApplicationLauncherApp namespace AttributeList { struct TypeInfo { @@ -30717,6 +30860,29 @@ enum class ApplicationBasicStatus : uint8_t kActiveVisibleNotFocus = 0x03, }; +namespace Structs { +namespace ApplicationBasicApp { +enum class Fields +{ + kCatalogVendorId = 1, + kApplicationId = 2, +}; + +struct Type +{ +public: + uint16_t catalogVendorId; + chip::CharSpan applicationId; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; + +using DecodableType = Type; + +} // namespace ApplicationBasicApp +} // namespace Structs + namespace Commands { // Forward-declarations so we can reference these later. @@ -30811,30 +30977,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ProductId -namespace ApplicationId { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationId::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ApplicationId -namespace CatalogVendorId { +namespace ApplicationApp { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = Structs::ApplicationBasicApp::Type; + using DecodableType = Structs::ApplicationBasicApp::DecodableType; + using DecodableArgType = const Structs::ApplicationBasicApp::DecodableType &; static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CatalogVendorId::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationApp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CatalogVendorId +} // namespace ApplicationApp namespace ApplicationStatus { struct TypeInfo { @@ -30847,6 +31001,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ApplicationStatus +namespace ApplicationVersion { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ApplicationVersion namespace AttributeList { struct TypeInfo { @@ -30905,6 +31071,11 @@ struct Type; struct DecodableType; } // namespace Login +namespace Logout { +struct Type; +struct DecodableType; +} // namespace Logout + } // namespace Commands namespace Commands { @@ -31007,6 +31178,34 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Login +namespace Logout { +enum class Fields +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Logout } // namespace Commands namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index a2fc620ceb0e97..ddc5cdfeddddf4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -422,6 +422,10 @@ // Commands for cluster: Application Launcher #define ZCL_LAUNCH_APP_COMMAND_ID (0x00) #define ZCL_LAUNCH_APP_RESPONSE_COMMAND_ID (0x00) +#define ZCL_STOP_APP_COMMAND_ID (0x01) +#define ZCL_STOP_APP_RESPONSE_COMMAND_ID (0x01) +#define ZCL_HIDE_APP_COMMAND_ID (0x02) +#define ZCL_HIDE_APP_RESPONSE_COMMAND_ID (0x02) // Commands for cluster: Application Basic #define ZCL_CHANGE_STATUS_COMMAND_ID (0x00) @@ -430,6 +434,7 @@ #define ZCL_GET_SETUP_PIN_COMMAND_ID (0x00) #define ZCL_GET_SETUP_PIN_RESPONSE_COMMAND_ID (0x00) #define ZCL_LOGIN_COMMAND_ID (0x01) +#define ZCL_LOGOUT_COMMAND_ID (0x02) // Commands for cluster: Test Cluster #define ZCL_TEST_COMMAND_ID (0x00) diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 87f04547bd3a96..12c6daeb6c74ce 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -130,13 +130,6 @@ enum EmberAfContentLaunchStatus : uint8_t EMBER_ZCL_CONTENT_LAUNCH_STATUS_AUTH_FAILED = 2, }; -// Enum for ContentLaunchStreamingType -enum EmberAfContentLaunchStreamingType : uint8_t -{ - EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_DASH = 0, - EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_HLS = 1, -}; - // Enum for DoorLockEventSource enum EmberAfDoorLockEventSource : uint8_t { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 4578f8d98ffb69..62ea80977f6ad0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4756,17 +4756,17 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace TvChannel { namespace Attributes { -namespace TvChannelList { +namespace ChannelList { static constexpr AttributeId Id = 0x00000000; -} // namespace TvChannelList +} // namespace ChannelList -namespace TvChannelLineup { +namespace ChannelLineup { static constexpr AttributeId Id = 0x00000001; -} // namespace TvChannelLineup +} // namespace ChannelLineup -namespace CurrentTvChannel { +namespace CurrentChannel { static constexpr AttributeId Id = 0x00000002; -} // namespace CurrentTvChannel +} // namespace CurrentChannel namespace AttributeList { static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; @@ -4824,24 +4824,20 @@ namespace Duration { static constexpr AttributeId Id = 0x00000002; } // namespace Duration -namespace PositionUpdatedAt { -static constexpr AttributeId Id = 0x00000003; -} // namespace PositionUpdatedAt - namespace Position { -static constexpr AttributeId Id = 0x00000004; +static constexpr AttributeId Id = 0x00000003; } // namespace Position namespace PlaybackSpeed { -static constexpr AttributeId Id = 0x00000005; +static constexpr AttributeId Id = 0x00000004; } // namespace PlaybackSpeed namespace SeekRangeEnd { -static constexpr AttributeId Id = 0x00000006; +static constexpr AttributeId Id = 0x00000005; } // namespace SeekRangeEnd namespace SeekRangeStart { -static constexpr AttributeId Id = 0x00000007; +static constexpr AttributeId Id = 0x00000006; } // namespace SeekRangeStart namespace AttributeList { @@ -4928,9 +4924,9 @@ namespace AcceptsHeaderList { static constexpr AttributeId Id = 0x00000000; } // namespace AcceptsHeaderList -namespace SupportedStreamingTypes { +namespace SupportedStreamingProtocols { static constexpr AttributeId Id = 0x00000001; -} // namespace SupportedStreamingTypes +} // namespace SupportedStreamingProtocols namespace AttributeList { static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; @@ -4980,13 +4976,9 @@ namespace ApplicationLauncherList { static constexpr AttributeId Id = 0x00000000; } // namespace ApplicationLauncherList -namespace CatalogVendorId { +namespace ApplicationLauncherApp { static constexpr AttributeId Id = 0x00000001; -} // namespace CatalogVendorId - -namespace ApplicationId { -static constexpr AttributeId Id = 0x00000002; -} // namespace ApplicationId +} // namespace ApplicationLauncherApp namespace AttributeList { static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; @@ -5022,18 +5014,18 @@ namespace ProductId { static constexpr AttributeId Id = 0x00000003; } // namespace ProductId -namespace ApplicationId { -static constexpr AttributeId Id = 0x00000005; -} // namespace ApplicationId - -namespace CatalogVendorId { -static constexpr AttributeId Id = 0x00000006; -} // namespace CatalogVendorId +namespace ApplicationApp { +static constexpr AttributeId Id = 0x00000004; +} // namespace ApplicationApp namespace ApplicationStatus { -static constexpr AttributeId Id = 0x00000007; +static constexpr AttributeId Id = 0x00000005; } // namespace ApplicationStatus +namespace ApplicationVersion { +static constexpr AttributeId Id = 0x00000006; +} // namespace ApplicationVersion + namespace AttributeList { static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; } // namespace AttributeList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 6685c458c8cea8..d74ce0eebdb937 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1504,6 +1504,22 @@ namespace LaunchAppResponse { static constexpr CommandId Id = 0x00000000; } // namespace LaunchAppResponse +namespace StopApp { +static constexpr CommandId Id = 0x00000001; +} // namespace StopApp + +namespace StopAppResponse { +static constexpr CommandId Id = 0x00000001; +} // namespace StopAppResponse + +namespace HideApp { +static constexpr CommandId Id = 0x00000002; +} // namespace HideApp + +namespace HideAppResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace HideAppResponse + } // namespace Commands } // namespace ApplicationLauncher @@ -1532,6 +1548,10 @@ namespace Login { static constexpr CommandId Id = 0x00000001; } // namespace Login +namespace Logout { +static constexpr CommandId Id = 0x00000002; +} // namespace Logout + } // namespace Commands } // namespace AccountLogin diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 5373428feef618..92dd9848e9d263 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -110,20 +110,24 @@ CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::MediaPlayback::Structs::MediaPlaybackPosition::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::MediaInput::Structs::MediaInputInfo::DecodableType & value); +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchDimension::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchAdditionalInfo::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchParamater::DecodableType & value); -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchBrandingInformation::DecodableType & value); -CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchDimension::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchStyleInformation::DecodableType & value); +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchBrandingInformation::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::AudioOutput::Structs::AudioOutputInfo::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApp::DecodableType & value); +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherEndpoint::DecodableType & value); +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApp::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, @@ -1678,6 +1682,37 @@ CHIP_ERROR LogValue(const char * label, size_t indent, ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); return CHIP_NO_ERROR; } +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchDimension::DecodableType & value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); + { + CHIP_ERROR err = LogValue("Width", indent + 1, value.width); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Width'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("Height", indent + 1, value.height); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Height'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("Metric", indent + 1, value.metric); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Metric'", IndentStr(indent + 1).c_str()); + return err; + } + } + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchAdditionalInfo::DecodableType & value) { @@ -1733,6 +1768,37 @@ CHIP_ERROR LogValue(const char * label, size_t indent, ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); return CHIP_NO_ERROR; } +CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchStyleInformation::DecodableType & value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); + { + CHIP_ERROR err = LogValue("ImageUrl", indent + 1, value.imageUrl); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'ImageUrl'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("Color", indent + 1, value.color); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Color'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("Size", indent + 1, value.size); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Size'", IndentStr(indent + 1).c_str()); + return err; + } + } + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchBrandingInformation::DecodableType & value) { @@ -1789,30 +1855,30 @@ CHIP_ERROR LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchDimension::DecodableType & value) + const chip::app::Clusters::AudioOutput::Structs::AudioOutputInfo::DecodableType & value) { ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); { - CHIP_ERROR err = LogValue("Width", indent + 1, value.width); + CHIP_ERROR err = LogValue("Index", indent + 1, value.index); if (err != CHIP_NO_ERROR) { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Width'", IndentStr(indent + 1).c_str()); + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Index'", IndentStr(indent + 1).c_str()); return err; } } { - CHIP_ERROR err = LogValue("Height", indent + 1, value.height); + CHIP_ERROR err = LogValue("OutputType", indent + 1, value.outputType); if (err != CHIP_NO_ERROR) { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Height'", IndentStr(indent + 1).c_str()); + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'OutputType'", IndentStr(indent + 1).c_str()); return err; } } { - CHIP_ERROR err = LogValue("Metric", indent + 1, value.metric); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Metric'", IndentStr(indent + 1).c_str()); + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Name'", IndentStr(indent + 1).c_str()); return err; } } @@ -1820,30 +1886,23 @@ CHIP_ERROR LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::ContentLaunchStyleInformation::DecodableType & value) + const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApp::DecodableType & value) { ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); { - CHIP_ERROR err = LogValue("ImageUrl", indent + 1, value.imageUrl); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'ImageUrl'", IndentStr(indent + 1).c_str()); - return err; - } - } - { - CHIP_ERROR err = LogValue("Color", indent + 1, value.color); + CHIP_ERROR err = LogValue("CatalogVendorId", indent + 1, value.catalogVendorId); if (err != CHIP_NO_ERROR) { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Color'", IndentStr(indent + 1).c_str()); + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'CatalogVendorId'", + IndentStr(indent + 1).c_str()); return err; } } { - CHIP_ERROR err = LogValue("Size", indent + 1, value.size); + CHIP_ERROR err = LogValue("ApplicationId", indent + 1, value.applicationId); if (err != CHIP_NO_ERROR) { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Size'", IndentStr(indent + 1).c_str()); + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'ApplicationId'", IndentStr(indent + 1).c_str()); return err; } } @@ -1851,30 +1910,22 @@ CHIP_ERROR LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::AudioOutput::Structs::AudioOutputInfo::DecodableType & value) + const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherEndpoint::DecodableType & value) { ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); { - CHIP_ERROR err = LogValue("Index", indent + 1, value.index); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Index'", IndentStr(indent + 1).c_str()); - return err; - } - } - { - CHIP_ERROR err = LogValue("OutputType", indent + 1, value.outputType); + CHIP_ERROR err = LogValue("Application", indent + 1, value.application); if (err != CHIP_NO_ERROR) { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'OutputType'", IndentStr(indent + 1).c_str()); + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Application'", IndentStr(indent + 1).c_str()); return err; } } { - CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + CHIP_ERROR err = LogValue("Endpoint", indent + 1, value.endpoint); if (err != CHIP_NO_ERROR) { - ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Name'", IndentStr(indent + 1).c_str()); + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Endpoint'", IndentStr(indent + 1).c_str()); return err; } } @@ -1882,7 +1933,7 @@ CHIP_ERROR LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApp::DecodableType & value) + const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApp::DecodableType & value) { ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); { @@ -2273,6 +2324,24 @@ static void OnAccountLoginGetSetupPINResponseSuccess( command->SetCommandExitStatus(err); }; +static void OnApplicationLauncherHideAppResponseSuccess( + void * context, const chip::app::Clusters::ApplicationLauncher::Commands::HideAppResponse::DecodableType & data) +{ + ChipLogProgress(Zcl, "Received HideAppResponse:"); + CHIP_ERROR err = CHIP_NO_ERROR; + if (err == CHIP_NO_ERROR) + { + err = LogValue("status", 1, data.status); + } + if (err == CHIP_NO_ERROR) + { + err = LogValue("data", 1, data.data); + } + + ModelCommand * command = static_cast(context); + command->SetCommandExitStatus(err); +}; + static void OnApplicationLauncherLaunchAppResponseSuccess( void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppResponse::DecodableType & data) { @@ -2291,6 +2360,24 @@ static void OnApplicationLauncherLaunchAppResponseSuccess( command->SetCommandExitStatus(err); }; +static void OnApplicationLauncherStopAppResponseSuccess( + void * context, const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType & data) +{ + ChipLogProgress(Zcl, "Received StopAppResponse:"); + CHIP_ERROR err = CHIP_NO_ERROR; + if (err == CHIP_NO_ERROR) + { + err = LogValue("status", 1, data.status); + } + if (err == CHIP_NO_ERROR) + { + err = LogValue("data", 1, data.data); + } + + ModelCommand * command = static_cast(context); + command->SetCommandExitStatus(err); +}; + static void OnContentLauncherLaunchContentResponseSuccess( void * context, const chip::app::Clusters::ContentLauncher::Commands::LaunchContentResponse::DecodableType & data) { @@ -2298,11 +2385,11 @@ static void OnContentLauncherLaunchContentResponseSuccess( CHIP_ERROR err = CHIP_NO_ERROR; if (err == CHIP_NO_ERROR) { - err = LogValue("data", 1, data.data); + err = LogValue("contentLaunchStatus", 1, data.contentLaunchStatus); } if (err == CHIP_NO_ERROR) { - err = LogValue("contentLaunchStatus", 1, data.contentLaunchStatus); + err = LogValue("data", 1, data.data); } ModelCommand * command = static_cast(context); @@ -2316,11 +2403,11 @@ static void OnContentLauncherLaunchURLResponseSuccess( CHIP_ERROR err = CHIP_NO_ERROR; if (err == CHIP_NO_ERROR) { - err = LogValue("data", 1, data.data); + err = LogValue("contentLaunchStatus", 1, data.contentLaunchStatus); } if (err == CHIP_NO_ERROR) { - err = LogValue("contentLaunchStatus", 1, data.contentLaunchStatus); + err = LogValue("data", 1, data.data); } ModelCommand * command = static_cast(context); @@ -3652,6 +3739,7 @@ class ReadAccessControlClusterRevision : public ModelCommand | Commands: | | | * GetSetupPIN | 0x00 | | * Login | 0x01 | +| * Logout | 0x02 | |------------------------------------------------------------------------------| | Attributes: | | | * AttributeList | 0xFFFB | @@ -3707,6 +3795,26 @@ class AccountLoginLogin : public ModelCommand chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; }; +/* + * Command Logout + */ +class AccountLoginLogout : public ModelCommand +{ +public: + AccountLoginLogout() : ModelCommand("logout") { ModelCommand::AddArguments(); } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); + } + +private: + chip::app::Clusters::AccountLogin::Commands::Logout::Type mRequest; +}; + /* * Attribute AttributeList */ @@ -4098,9 +4206,9 @@ class ReportAdministratorCommissioningClusterRevision : public ModelCommand | * VendorId | 0x0001 | | * ApplicationName | 0x0002 | | * ProductId | 0x0003 | -| * ApplicationId | 0x0005 | -| * CatalogVendorId | 0x0006 | -| * ApplicationStatus | 0x0007 | +| * ApplicationApp | 0x0004 | +| * ApplicationStatus | 0x0005 | +| * ApplicationVersion | 0x0006 | | * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -4410,18 +4518,18 @@ class ReportApplicationBasicProductId : public ModelCommand }; /* - * Attribute ApplicationId + * Attribute ApplicationStatus */ -class ReadApplicationBasicApplicationId : public ModelCommand +class ReadApplicationBasicApplicationStatus : public ModelCommand { public: - ReadApplicationBasicApplicationId() : ModelCommand("read") + ReadApplicationBasicApplicationStatus() : ModelCommand("read") { - AddArgument("attr-name", "application-id"); + AddArgument("attr-name", "application-status"); ModelCommand::AddArguments(); } - ~ReadApplicationBasicApplicationId() {} + ~ReadApplicationBasicApplicationStatus() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -4429,29 +4537,29 @@ class ReadApplicationBasicApplicationId : public ModelCommand chip::Controller::ApplicationBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttribute( + return cluster.ReadAttribute( this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, chip::CharSpan value) + static void OnAttributeResponse(void * context, uint8_t value) { - OnGeneralAttributeResponse(context, "ApplicationBasic.ApplicationId response", value); + OnGeneralAttributeResponse(context, "ApplicationBasic.ApplicationStatus response", value); } }; -class ReportApplicationBasicApplicationId : public ModelCommand +class ReportApplicationBasicApplicationStatus : public ModelCommand { public: - ReportApplicationBasicApplicationId() : ModelCommand("report") + ReportApplicationBasicApplicationStatus() : ModelCommand("report") { - AddArgument("attr-name", "application-id"); + AddArgument("attr-name", "application-status"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportApplicationBasicApplicationId() {} + ~ReportApplicationBasicApplicationStatus() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -4461,7 +4569,7 @@ class ReportApplicationBasicApplicationId : public ModelCommand cluster.Associate(device, endpointId); auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( + return cluster.SubscribeAttribute( this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); } @@ -4470,7 +4578,7 @@ class ReportApplicationBasicApplicationId : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, chip::CharSpan value) { LogValue("ApplicationBasic.ApplicationId report", 0, value); } + static void OnValueReport(void * context, uint8_t value) { LogValue("ApplicationBasic.ApplicationStatus report", 0, value); } private: uint16_t mMinInterval; @@ -4479,18 +4587,18 @@ class ReportApplicationBasicApplicationId : public ModelCommand }; /* - * Attribute CatalogVendorId + * Attribute ApplicationVersion */ -class ReadApplicationBasicCatalogVendorId : public ModelCommand +class ReadApplicationBasicApplicationVersion : public ModelCommand { public: - ReadApplicationBasicCatalogVendorId() : ModelCommand("read") + ReadApplicationBasicApplicationVersion() : ModelCommand("read") { - AddArgument("attr-name", "catalog-vendor-id"); + AddArgument("attr-name", "application-version"); ModelCommand::AddArguments(); } - ~ReadApplicationBasicCatalogVendorId() {} + ~ReadApplicationBasicApplicationVersion() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -4498,29 +4606,29 @@ class ReadApplicationBasicCatalogVendorId : public ModelCommand chip::Controller::ApplicationBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttribute( + return cluster.ReadAttribute( this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint16_t value) + static void OnAttributeResponse(void * context, chip::CharSpan value) { - OnGeneralAttributeResponse(context, "ApplicationBasic.CatalogVendorId response", value); + OnGeneralAttributeResponse(context, "ApplicationBasic.ApplicationVersion response", value); } }; -class ReportApplicationBasicCatalogVendorId : public ModelCommand +class ReportApplicationBasicApplicationVersion : public ModelCommand { public: - ReportApplicationBasicCatalogVendorId() : ModelCommand("report") + ReportApplicationBasicApplicationVersion() : ModelCommand("report") { - AddArgument("attr-name", "catalog-vendor-id"); + AddArgument("attr-name", "application-version"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportApplicationBasicCatalogVendorId() {} + ~ReportApplicationBasicApplicationVersion() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -4530,7 +4638,7 @@ class ReportApplicationBasicCatalogVendorId : public ModelCommand cluster.Associate(device, endpointId); auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( + return cluster.SubscribeAttribute( this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); } @@ -4539,77 +4647,11 @@ class ReportApplicationBasicCatalogVendorId : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint16_t value) { LogValue("ApplicationBasic.CatalogVendorId report", 0, value); } - -private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute ApplicationStatus - */ -class ReadApplicationBasicApplicationStatus : public ModelCommand -{ -public: - ReadApplicationBasicApplicationStatus() : ModelCommand("read") - { - AddArgument("attr-name", "application-status"); - ModelCommand::AddArguments(); - } - - ~ReadApplicationBasicApplicationStatus() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x050D) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute( - this, OnAttributeResponse, OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, uint8_t value) - { - OnGeneralAttributeResponse(context, "ApplicationBasic.ApplicationStatus response", value); - } -}; - -class ReportApplicationBasicApplicationStatus : public ModelCommand -{ -public: - ReportApplicationBasicApplicationStatus() : ModelCommand("report") - { - AddArgument("attr-name", "application-status"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportApplicationBasicApplicationStatus() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x050D) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override + static void OnValueReport(void * context, chip::CharSpan value) { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + LogValue("ApplicationBasic.ApplicationVersion report", 0, value); } - static void OnValueReport(void * context, uint8_t value) { LogValue("ApplicationBasic.ApplicationStatus report", 0, value); } - private: uint16_t mMinInterval; uint16_t mMaxInterval; @@ -4719,196 +4761,102 @@ class ReportApplicationBasicClusterRevision : public ModelCommand | Cluster ApplicationLauncher | 0x050C | |------------------------------------------------------------------------------| | Commands: | | +| * HideApp | 0x02 | | * LaunchApp | 0x00 | +| * StopApp | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | | * ApplicationLauncherList | 0x0000 | -| * CatalogVendorId | 0x0001 | -| * ApplicationId | 0x0002 | | * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ /* - * Command LaunchApp + * Command HideApp */ -class ApplicationLauncherLaunchApp : public ModelCommand +class ApplicationLauncherHideApp : public ModelCommand { public: - ApplicationLauncherLaunchApp() : ModelCommand("launch-app") + ApplicationLauncherHideApp() : ModelCommand("hide-app") { - AddArgument("Data", &mRequest.data); - AddArgument("CatalogVendorId", 0, UINT16_MAX, &mRequest.catalogVendorId); - AddArgument("ApplicationId", &mRequest.applicationId); + // application Struct parsing is not supported yet ModelCommand::AddArguments(); } CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %" PRIu8, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on endpoint %" PRIu8, endpointId); - return chip::Controller::InvokeCommand(device, this, OnApplicationLauncherLaunchAppResponseSuccess, OnDefaultFailure, + return chip::Controller::InvokeCommand(device, this, OnApplicationLauncherHideAppResponseSuccess, OnDefaultFailure, endpointId, mRequest, mTimedInteractionTimeoutMs); } private: - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; + chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type mRequest; }; /* - * Attribute ApplicationLauncherList + * Command LaunchApp */ -class ReadApplicationLauncherApplicationLauncherList : public ModelCommand -{ -public: - ReadApplicationLauncherApplicationLauncherList() : ModelCommand("read") - { - AddArgument("attr-name", "application-launcher-list"); - ModelCommand::AddArguments(); - } - - ~ReadApplicationLauncherApplicationLauncherList() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x050C) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute( - this, OnAttributeResponse, OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) - { - OnGeneralAttributeResponse(context, "ApplicationLauncher.ApplicationLauncherList response", value); - } -}; - -class ReportApplicationLauncherApplicationLauncherList : public ModelCommand +class ApplicationLauncherLaunchApp : public ModelCommand { public: - ReportApplicationLauncherApplicationLauncherList() : ModelCommand("report") + ApplicationLauncherLaunchApp() : ModelCommand("launch-app") { - AddArgument("attr-name", "application-launcher-list"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); + AddArgument("Data", &mRequest.data); + // application Struct parsing is not supported yet ModelCommand::AddArguments(); } - ~ReportApplicationLauncherApplicationLauncherList() {} - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x050C) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %" PRIu8, endpointId); - static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) - { - LogValue("ApplicationLauncher.ApplicationLauncherList report", 0, value); + return chip::Controller::InvokeCommand(device, this, OnApplicationLauncherLaunchAppResponseSuccess, OnDefaultFailure, + endpointId, mRequest, mTimedInteractionTimeoutMs); } private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; + chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; }; /* - * Attribute CatalogVendorId + * Command StopApp */ -class ReadApplicationLauncherCatalogVendorId : public ModelCommand +class ApplicationLauncherStopApp : public ModelCommand { public: - ReadApplicationLauncherCatalogVendorId() : ModelCommand("read") + ApplicationLauncherStopApp() : ModelCommand("stop-app") { - AddArgument("attr-name", "catalog-vendor-id"); + // application Struct parsing is not supported yet ModelCommand::AddArguments(); } - ~ReadApplicationLauncherCatalogVendorId() {} - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x050C) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute( - this, OnAttributeResponse, OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, uint8_t value) - { - OnGeneralAttributeResponse(context, "ApplicationLauncher.CatalogVendorId response", value); - } -}; + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on endpoint %" PRIu8, endpointId); -class ReportApplicationLauncherCatalogVendorId : public ModelCommand -{ -public: - ReportApplicationLauncherCatalogVendorId() : ModelCommand("report") - { - AddArgument("attr-name", "catalog-vendor-id"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportApplicationLauncherCatalogVendorId() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x050C) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + return chip::Controller::InvokeCommand(device, this, OnApplicationLauncherStopAppResponseSuccess, OnDefaultFailure, + endpointId, mRequest, mTimedInteractionTimeoutMs); } - static void OnValueReport(void * context, uint8_t value) { LogValue("ApplicationLauncher.CatalogVendorId report", 0, value); } - private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; + chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type mRequest; }; /* - * Attribute ApplicationId + * Attribute ApplicationLauncherList */ -class ReadApplicationLauncherApplicationId : public ModelCommand +class ReadApplicationLauncherApplicationLauncherList : public ModelCommand { public: - ReadApplicationLauncherApplicationId() : ModelCommand("read") + ReadApplicationLauncherApplicationLauncherList() : ModelCommand("read") { - AddArgument("attr-name", "application-id"); + AddArgument("attr-name", "application-launcher-list"); ModelCommand::AddArguments(); } - ~ReadApplicationLauncherApplicationId() {} + ~ReadApplicationLauncherApplicationLauncherList() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -4916,29 +4864,29 @@ class ReadApplicationLauncherApplicationId : public ModelCommand chip::Controller::ApplicationLauncherCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttribute( + return cluster.ReadAttribute( this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint8_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) { - OnGeneralAttributeResponse(context, "ApplicationLauncher.ApplicationId response", value); + OnGeneralAttributeResponse(context, "ApplicationLauncher.ApplicationLauncherList response", value); } }; -class ReportApplicationLauncherApplicationId : public ModelCommand +class ReportApplicationLauncherApplicationLauncherList : public ModelCommand { public: - ReportApplicationLauncherApplicationId() : ModelCommand("report") + ReportApplicationLauncherApplicationLauncherList() : ModelCommand("report") { - AddArgument("attr-name", "application-id"); + AddArgument("attr-name", "application-launcher-list"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportApplicationLauncherApplicationId() {} + ~ReportApplicationLauncherApplicationLauncherList() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -4948,7 +4896,7 @@ class ReportApplicationLauncherApplicationId : public ModelCommand cluster.Associate(device, endpointId); auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( + return cluster.SubscribeAttribute( this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); } @@ -4957,7 +4905,10 @@ class ReportApplicationLauncherApplicationId : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint8_t value) { LogValue("ApplicationLauncher.ApplicationId report", 0, value); } + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ApplicationLauncher.ApplicationLauncherList report", 0, value); + } private: uint16_t mMinInterval; @@ -13454,7 +13405,7 @@ class ReportColorControlClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * AcceptsHeaderList | 0x0000 | -| * SupportedStreamingTypes | 0x0001 | +| * SupportedStreamingProtocols | 0x0001 | | * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -13469,6 +13420,7 @@ class ContentLauncherLaunchContent : public ModelCommand { AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); AddArgument("Data", &mRequest.data); + // search Array parsing is not supported yet ModelCommand::AddArguments(); } @@ -13494,6 +13446,7 @@ class ContentLauncherLaunchURL : public ModelCommand { AddArgument("ContentURL", &mRequest.contentURL); AddArgument("DisplayString", &mRequest.displayString); + // brandingInformation Array parsing is not supported yet ModelCommand::AddArguments(); } @@ -13582,18 +13535,18 @@ class ReportContentLauncherAcceptsHeaderList : public ModelCommand }; /* - * Attribute SupportedStreamingTypes + * Attribute SupportedStreamingProtocols */ -class ReadContentLauncherSupportedStreamingTypes : public ModelCommand +class ReadContentLauncherSupportedStreamingProtocols : public ModelCommand { public: - ReadContentLauncherSupportedStreamingTypes() : ModelCommand("read") + ReadContentLauncherSupportedStreamingProtocols() : ModelCommand("read") { - AddArgument("attr-name", "supported-streaming-types"); + AddArgument("attr-name", "supported-streaming-protocols"); ModelCommand::AddArguments(); } - ~ReadContentLauncherSupportedStreamingTypes() {} + ~ReadContentLauncherSupportedStreamingProtocols() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -13601,31 +13554,55 @@ class ReadContentLauncherSupportedStreamingTypes : public ModelCommand chip::Controller::ContentLauncherCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttribute( + return cluster.ReadAttribute( this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & value) + static void OnAttributeResponse(void * context, uint32_t value) { - OnGeneralAttributeResponse(context, "ContentLauncher.SupportedStreamingTypes response", value); + OnGeneralAttributeResponse(context, "ContentLauncher.SupportedStreamingProtocols response", value); } }; -class ReportContentLauncherSupportedStreamingTypes : public ModelCommand +class WriteContentLauncherSupportedStreamingProtocols : public ModelCommand { public: - ReportContentLauncherSupportedStreamingTypes() : ModelCommand("report") + WriteContentLauncherSupportedStreamingProtocols() : ModelCommand("write") { - AddArgument("attr-name", "supported-streaming-types"); + AddArgument("attr-name", "supported-streaming-protocols"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteContentLauncherSupportedStreamingProtocols() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050A) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::ContentLauncherCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttribute( + mValue, this, OnDefaultSuccessResponse, OnDefaultFailure, mTimedInteractionTimeoutMs); + } + +private: + uint32_t mValue; +}; + +class ReportContentLauncherSupportedStreamingProtocols : public ModelCommand +{ +public: + ReportContentLauncherSupportedStreamingProtocols() : ModelCommand("report") + { + AddArgument("attr-name", "supported-streaming-protocols"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportContentLauncherSupportedStreamingTypes() {} + ~ReportContentLauncherSupportedStreamingProtocols() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -13635,7 +13612,7 @@ class ReportContentLauncherSupportedStreamingTypes : public ModelCommand cluster.Associate(device, endpointId); auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( + return cluster.SubscribeAttribute( this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); } @@ -13644,11 +13621,9 @@ class ReportContentLauncherSupportedStreamingTypes : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport( - void * context, - const chip::app::DataModel::DecodableList & value) + static void OnValueReport(void * context, uint32_t value) { - LogValue("ContentLauncher.SupportedStreamingTypes report", 0, value); + LogValue("ContentLauncher.SupportedStreamingProtocols report", 0, value); } private: @@ -22614,11 +22589,9 @@ class ReportMediaInputClusterRevision : public ModelCommand | * PlaybackState | 0x0000 | | * StartTime | 0x0001 | | * Duration | 0x0002 | -| * PositionUpdatedAt | 0x0003 | -| * Position | 0x0004 | -| * PlaybackSpeed | 0x0005 | -| * SeekRangeEnd | 0x0006 | -| * SeekRangeStart | 0x0007 | +| * PlaybackSpeed | 0x0004 | +| * SeekRangeEnd | 0x0005 | +| * SeekRangeStart | 0x0006 | | * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -23062,144 +23035,6 @@ class ReportMediaPlaybackDuration : public ModelCommand bool mWait; }; -/* - * Attribute PositionUpdatedAt - */ -class ReadMediaPlaybackPositionUpdatedAt : public ModelCommand -{ -public: - ReadMediaPlaybackPositionUpdatedAt() : ModelCommand("read") - { - AddArgument("attr-name", "position-updated-at"); - ModelCommand::AddArguments(); - } - - ~ReadMediaPlaybackPositionUpdatedAt() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0506) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute( - this, OnAttributeResponse, OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, uint64_t value) - { - OnGeneralAttributeResponse(context, "MediaPlayback.PositionUpdatedAt response", value); - } -}; - -class ReportMediaPlaybackPositionUpdatedAt : public ModelCommand -{ -public: - ReportMediaPlaybackPositionUpdatedAt() : ModelCommand("report") - { - AddArgument("attr-name", "position-updated-at"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportMediaPlaybackPositionUpdatedAt() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0506) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - - static void OnValueReport(void * context, uint64_t value) { LogValue("MediaPlayback.PositionUpdatedAt report", 0, value); } - -private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute Position - */ -class ReadMediaPlaybackPosition : public ModelCommand -{ -public: - ReadMediaPlaybackPosition() : ModelCommand("read") - { - AddArgument("attr-name", "position"); - ModelCommand::AddArguments(); - } - - ~ReadMediaPlaybackPosition() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0506) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute(this, OnAttributeResponse, - OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, uint64_t value) - { - OnGeneralAttributeResponse(context, "MediaPlayback.Position response", value); - } -}; - -class ReportMediaPlaybackPosition : public ModelCommand -{ -public: - ReportMediaPlaybackPosition() : ModelCommand("report") - { - AddArgument("attr-name", "position"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportMediaPlaybackPosition() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0506) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - - static void OnValueReport(void * context, uint64_t value) { LogValue("MediaPlayback.Position report", 0, value); } - -private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - /* * Attribute PlaybackSpeed */ @@ -23224,51 +23059,12 @@ class ReadMediaPlaybackPlaybackSpeed : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint64_t value) + static void OnAttributeResponse(void * context, float value) { OnGeneralAttributeResponse(context, "MediaPlayback.PlaybackSpeed response", value); } }; -class ReportMediaPlaybackPlaybackSpeed : public ModelCommand -{ -public: - ReportMediaPlaybackPlaybackSpeed() : ModelCommand("report") - { - AddArgument("attr-name", "playback-speed"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportMediaPlaybackPlaybackSpeed() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0506) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - - static void OnValueReport(void * context, uint64_t value) { LogValue("MediaPlayback.PlaybackSpeed report", 0, value); } - -private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - /* * Attribute SeekRangeEnd */ @@ -32159,9 +31955,7 @@ class ReportSwitchClusterRevision : public ModelCommand | * SkipChannel | 0x02 | |------------------------------------------------------------------------------| | Attributes: | | -| * TvChannelList | 0x0000 | -| * TvChannelLineup | 0x0001 | -| * CurrentTvChannel | 0x0002 | +| * ChannelList | 0x0000 | | * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -32240,18 +32034,18 @@ class TvChannelSkipChannel : public ModelCommand }; /* - * Attribute TvChannelList + * Attribute ChannelList */ -class ReadTvChannelTvChannelList : public ModelCommand +class ReadTvChannelChannelList : public ModelCommand { public: - ReadTvChannelTvChannelList() : ModelCommand("read") + ReadTvChannelChannelList() : ModelCommand("read") { - AddArgument("attr-name", "tv-channel-list"); + AddArgument("attr-name", "channel-list"); ModelCommand::AddArguments(); } - ~ReadTvChannelTvChannelList() {} + ~ReadTvChannelChannelList() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -32259,31 +32053,31 @@ class ReadTvChannelTvChannelList : public ModelCommand chip::Controller::TvChannelCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttribute(this, OnAttributeResponse, - OnDefaultFailure); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); } static void OnAttributeResponse( void * context, const chip::app::DataModel::DecodableList & value) { - OnGeneralAttributeResponse(context, "TvChannel.TvChannelList response", value); + OnGeneralAttributeResponse(context, "TvChannel.ChannelList response", value); } }; -class ReportTvChannelTvChannelList : public ModelCommand +class ReportTvChannelChannelList : public ModelCommand { public: - ReportTvChannelTvChannelList() : ModelCommand("report") + ReportTvChannelChannelList() : ModelCommand("report") { - AddArgument("attr-name", "tv-channel-list"); + AddArgument("attr-name", "channel-list"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportTvChannelTvChannelList() {} + ~ReportTvChannelChannelList() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -32293,7 +32087,7 @@ class ReportTvChannelTvChannelList : public ModelCommand cluster.Associate(device, endpointId); auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( + return cluster.SubscribeAttribute( this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); } @@ -32306,147 +32100,9 @@ class ReportTvChannelTvChannelList : public ModelCommand void * context, const chip::app::DataModel::DecodableList & value) { - LogValue("TvChannel.TvChannelList report", 0, value); - } - -private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute TvChannelLineup - */ -class ReadTvChannelTvChannelLineup : public ModelCommand -{ -public: - ReadTvChannelTvChannelLineup() : ModelCommand("read") - { - AddArgument("attr-name", "tv-channel-lineup"); - ModelCommand::AddArguments(); - } - - ~ReadTvChannelTvChannelLineup() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute( - this, OnAttributeResponse, OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, chip::ByteSpan value) - { - OnGeneralAttributeResponse(context, "TvChannel.TvChannelLineup response", value); - } -}; - -class ReportTvChannelTvChannelLineup : public ModelCommand -{ -public: - ReportTvChannelTvChannelLineup() : ModelCommand("report") - { - AddArgument("attr-name", "tv-channel-lineup"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportTvChannelTvChannelLineup() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - - static void OnValueReport(void * context, chip::ByteSpan value) { LogValue("TvChannel.TvChannelLineup report", 0, value); } - -private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute CurrentTvChannel - */ -class ReadTvChannelCurrentTvChannel : public ModelCommand -{ -public: - ReadTvChannelCurrentTvChannel() : ModelCommand("read") - { - AddArgument("attr-name", "current-tv-channel"); - ModelCommand::AddArguments(); - } - - ~ReadTvChannelCurrentTvChannel() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute( - this, OnAttributeResponse, OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, chip::ByteSpan value) - { - OnGeneralAttributeResponse(context, "TvChannel.CurrentTvChannel response", value); - } -}; - -class ReportTvChannelCurrentTvChannel : public ModelCommand -{ -public: - ReportTvChannelCurrentTvChannel() : ModelCommand("report") - { - AddArgument("attr-name", "current-tv-channel"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportTvChannelCurrentTvChannel() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + LogValue("TvChannel.ChannelList report", 0, value); } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - - static void OnValueReport(void * context, chip::ByteSpan value) { LogValue("TvChannel.CurrentTvChannel report", 0, value); } - private: uint16_t mMinInterval; uint16_t mMaxInterval; @@ -32560,6 +32216,7 @@ class ReportTvChannelClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * TargetNavigatorList | 0x0000 | +| * CurrentNavigatorTarget | 0x0001 | | * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -32666,6 +32323,36 @@ class ReportTargetNavigatorTargetNavigatorList : public ModelCommand bool mWait; }; +/* + * Attribute CurrentNavigatorTarget + */ +class ReadTargetNavigatorCurrentNavigatorTarget : public ModelCommand +{ +public: + ReadTargetNavigatorCurrentNavigatorTarget() : ModelCommand("read") + { + AddArgument("attr-name", "current-navigator-target"); + ModelCommand::AddArguments(); + } + + ~ReadTargetNavigatorCurrentNavigatorTarget() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0505) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TargetNavigatorCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, uint8_t value) + { + OnGeneralAttributeResponse(context, "TargetNavigator.CurrentNavigatorTarget response", value); + } +}; + /* * Attribute AttributeList */ @@ -50785,6 +50472,7 @@ void registerClusterAccountLogin(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -50815,24 +50503,22 @@ void registerClusterApplicationBasic(Commands & commands) const char * clusterName = "ApplicationBasic"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -50842,12 +50528,10 @@ void registerClusterApplicationLauncher(Commands & commands) const char * clusterName = "ApplicationLauncher"; commands_list clusterCommands = { + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -51188,13 +50872,15 @@ void registerClusterContentLauncher(Commands & commands) const char * clusterName = "ContentLauncher"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -51605,36 +51291,31 @@ void registerClusterMediaPlayback(Commands & commands) const char * clusterName = "MediaPlayback"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -52036,17 +51717,13 @@ void registerClusterTvChannel(Commands & commands) const char * clusterName = "TvChannel"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -52056,11 +51733,12 @@ void registerClusterTargetNavigator(Commands & commands) const char * clusterName = "TargetNavigator"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); diff --git a/zzz_generated/chip-tool/zap-generated/reporting/Commands.h b/zzz_generated/chip-tool/zap-generated/reporting/Commands.h index beed4441f9a1f8..5077ca0a7c98e5 100644 --- a/zzz_generated/chip-tool/zap-generated/reporting/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/reporting/Commands.h @@ -37,12 +37,9 @@ class Listen : public ReportingCommand delete onReportApplicationBasicVendorIdCallback; delete onReportApplicationBasicApplicationNameCallback; delete onReportApplicationBasicProductIdCallback; - delete onReportApplicationBasicApplicationIdCallback; - delete onReportApplicationBasicCatalogVendorIdCallback; delete onReportApplicationBasicApplicationStatusCallback; + delete onReportApplicationBasicApplicationVersionCallback; delete onReportApplicationBasicClusterRevisionCallback; - delete onReportApplicationLauncherCatalogVendorIdCallback; - delete onReportApplicationLauncherApplicationIdCallback; delete onReportApplicationLauncherClusterRevisionCallback; delete onReportAudioOutputCurrentAudioOutputCallback; delete onReportAudioOutputClusterRevisionCallback; @@ -133,6 +130,7 @@ class Listen : public ReportingCommand delete onReportColorControlCoupleColorTempToLevelMinMiredsCallback; delete onReportColorControlStartUpColorTemperatureMiredsCallback; delete onReportColorControlClusterRevisionCallback; + delete onReportContentLauncherSupportedStreamingProtocolsCallback; delete onReportContentLauncherClusterRevisionCallback; delete onReportDescriptorClusterRevisionCallback; delete onReportDoorLockLockStateCallback; @@ -216,9 +214,6 @@ class Listen : public ReportingCommand delete onReportMediaPlaybackPlaybackStateCallback; delete onReportMediaPlaybackStartTimeCallback; delete onReportMediaPlaybackDurationCallback; - delete onReportMediaPlaybackPositionUpdatedAtCallback; - delete onReportMediaPlaybackPositionCallback; - delete onReportMediaPlaybackPlaybackSpeedCallback; delete onReportMediaPlaybackSeekRangeEndCallback; delete onReportMediaPlaybackSeekRangeStartCallback; delete onReportMediaPlaybackClusterRevisionCallback; @@ -311,8 +306,6 @@ class Listen : public ReportingCommand delete onReportSwitchMultiPressMaxCallback; delete onReportSwitchFeatureMapCallback; delete onReportSwitchClusterRevisionCallback; - delete onReportTvChannelTvChannelLineupCallback; - delete onReportTvChannelCurrentTvChannelCallback; delete onReportTvChannelClusterRevisionCallback; delete onReportTargetNavigatorClusterRevisionCallback; delete onReportTemperatureMeasurementMeasuredValueCallback; @@ -529,23 +522,14 @@ class Listen : public ReportingCommand callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0003, onReportApplicationBasicProductIdCallback->Cancel(), BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0005, - onReportApplicationBasicApplicationIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0006, - onReportApplicationBasicCatalogVendorIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0007, onReportApplicationBasicApplicationStatusCallback->Cancel(), BasicAttributeFilter); + callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0006, + onReportApplicationBasicApplicationVersionCallback->Cancel(), + BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0xFFFD, onReportApplicationBasicClusterRevisionCallback->Cancel(), BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050C, 0x0001, - onReportApplicationLauncherCatalogVendorIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050C, 0x0002, - onReportApplicationLauncherApplicationIdCallback->Cancel(), - BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050C, 0xFFFD, onReportApplicationLauncherClusterRevisionCallback->Cancel(), BasicAttributeFilter); @@ -759,6 +743,9 @@ class Listen : public ReportingCommand BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0xFFFD, onReportColorControlClusterRevisionCallback->Cancel(), BasicAttributeFilter); + callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050A, 0x0001, + onReportContentLauncherSupportedStreamingProtocolsCallback->Cancel(), + BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050A, 0xFFFD, onReportContentLauncherClusterRevisionCallback->Cancel(), BasicAttributeFilter); @@ -969,16 +956,9 @@ class Listen : public ReportingCommand BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0002, onReportMediaPlaybackDurationCallback->Cancel(), BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0003, - onReportMediaPlaybackPositionUpdatedAtCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0004, onReportMediaPlaybackPositionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0005, onReportMediaPlaybackPlaybackSpeedCallback->Cancel(), + callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0005, onReportMediaPlaybackSeekRangeEndCallback->Cancel(), BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0006, onReportMediaPlaybackSeekRangeEndCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0007, onReportMediaPlaybackSeekRangeStartCallback->Cancel(), + callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0006, onReportMediaPlaybackSeekRangeStartCallback->Cancel(), BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0xFFFD, onReportMediaPlaybackClusterRevisionCallback->Cancel(), BasicAttributeFilter); @@ -1219,10 +1199,6 @@ class Listen : public ReportingCommand BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0xFFFD, onReportSwitchClusterRevisionCallback->Cancel(), BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0504, 0x0001, onReportTvChannelTvChannelLineupCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0504, 0x0002, onReportTvChannelCurrentTvChannelCallback->Cancel(), - BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0504, 0xFFFD, onReportTvChannelClusterRevisionCallback->Cancel(), BasicAttributeFilter); callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0505, 0xFFFD, @@ -1763,30 +1739,18 @@ class Listen : public ReportingCommand onReportApplicationBasicProductIdCallback = new chip::Callback::Callback( ReadApplicationBasicProductId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicApplicationIdCallback = - new chip::Callback::Callback( - ReadApplicationBasicApplicationId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicCatalogVendorIdCallback = - new chip::Callback::Callback( - ReadApplicationBasicCatalogVendorId::OnAttributeResponse, this); chip::Callback::Callback * onReportApplicationBasicApplicationStatusCallback = new chip::Callback::Callback( ReadApplicationBasicApplicationStatus::OnAttributeResponse, this); + chip::Callback::Callback * + onReportApplicationBasicApplicationVersionCallback = + new chip::Callback::Callback( + ReadApplicationBasicApplicationVersion::OnAttributeResponse, this); chip::Callback::Callback * onReportApplicationBasicClusterRevisionCallback = new chip::Callback::Callback( ReadApplicationBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationLauncherCatalogVendorIdCallback = - new chip::Callback::Callback( - ReadApplicationLauncherCatalogVendorId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationLauncherApplicationIdCallback = - new chip::Callback::Callback( - ReadApplicationLauncherApplicationId::OnAttributeResponse, this); chip::Callback::Callback * onReportApplicationLauncherClusterRevisionCallback = new chip::Callback::Callback( @@ -2113,6 +2077,10 @@ class Listen : public ReportingCommand onReportColorControlClusterRevisionCallback = new chip::Callback::Callback( ReadColorControlClusterRevision::OnAttributeResponse, this); + chip::Callback::Callback * + onReportContentLauncherSupportedStreamingProtocolsCallback = + new chip::Callback::Callback( + ReadContentLauncherSupportedStreamingProtocols::OnAttributeResponse, this); chip::Callback::Callback * onReportContentLauncherClusterRevisionCallback = new chip::Callback::Callback( @@ -2428,17 +2396,6 @@ class Listen : public ReportingCommand chip::Callback::Callback * onReportMediaPlaybackDurationCallback = new chip::Callback::Callback( ReadMediaPlaybackDuration::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackPositionUpdatedAtCallback = - new chip::Callback::Callback( - ReadMediaPlaybackPositionUpdatedAt::OnAttributeResponse, this); - chip::Callback::Callback * onReportMediaPlaybackPositionCallback = - new chip::Callback::Callback( - ReadMediaPlaybackPosition::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackPlaybackSpeedCallback = - new chip::Callback::Callback( - ReadMediaPlaybackPlaybackSpeed::OnAttributeResponse, this); chip::Callback::Callback * onReportMediaPlaybackSeekRangeEndCallback = new chip::Callback::Callback( @@ -2781,14 +2738,6 @@ class Listen : public ReportingCommand chip::Callback::Callback * onReportSwitchClusterRevisionCallback = new chip::Callback::Callback( ReadSwitchClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTvChannelTvChannelLineupCallback = - new chip::Callback::Callback( - ReadTvChannelTvChannelLineup::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTvChannelCurrentTvChannelCallback = - new chip::Callback::Callback( - ReadTvChannelCurrentTvChannel::OnAttributeResponse, this); chip::Callback::Callback * onReportTvChannelClusterRevisionCallback = new chip::Callback::Callback( diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 4e32bc252c64a7..238f000c8248cd 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -31893,8 +31893,12 @@ class TV_TargetNavigatorCluster : public TestCommand err = TestReadAttributeTargetNavigatorList_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Navigate Target Command\n"); - err = TestNavigateTargetCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current navigator target\n"); + err = TestReadAttributeCurrentNavigatorTarget_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Navigate Target Command\n"); + err = TestNavigateTargetCommand_3(); break; } @@ -31907,7 +31911,7 @@ class TV_TargetNavigatorCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 4; static void OnFailureCallback_1(void * context, EmberAfStatus status) { @@ -31922,6 +31926,16 @@ class TV_TargetNavigatorCluster : public TestCommand (static_cast(context))->OnSuccessResponse_1(targetNavigatorList); } + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint8_t currentNavigatorTarget) + { + (static_cast(context))->OnSuccessResponse_2(currentNavigatorTarget); + } + // // Tests methods // @@ -31961,7 +31975,28 @@ class TV_TargetNavigatorCluster : public TestCommand NextTest(); } - CHIP_ERROR TestNavigateTargetCommand_2() + CHIP_ERROR TestReadAttributeCurrentNavigatorTarget_2() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TargetNavigatorClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint8_t currentNavigatorTarget) + { + VerifyOrReturn(CheckValue("currentNavigatorTarget", currentNavigatorTarget, 0)); + + NextTest(); + } + + CHIP_ERROR TestNavigateTargetCommand_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type; @@ -31971,20 +32006,27 @@ class TV_TargetNavigatorCluster : public TestCommand request.data = chip::Span("1garbage: not in length on purpose", 1); auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_2(data.status, data.data); + (static_cast(context))->OnSuccessResponse_3(data.status, data.data); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_3(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(chip::app::Clusters::TargetNavigator::NavigateTargetStatus status, chip::CharSpan data) + { + VerifyOrReturn(CheckValue("status", status, 0)); + + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data response", 13))); - void OnSuccessResponse_2(chip::app::Clusters::TargetNavigator::NavigateTargetStatus status, chip::CharSpan data) { NextTest(); } + NextTest(); + } }; class TV_AudioOutputCluster : public TestCommand @@ -32026,12 +32068,16 @@ class TV_AudioOutputCluster : public TestCommand err = TestReadAttributeAudioOutputList_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Select Output Command\n"); - err = TestSelectOutputCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute current audio output\n"); + err = TestReadAttributeCurrentAudioOutput_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Rename Output Command\n"); - err = TestRenameOutputCommand_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Select Output Command\n"); + err = TestSelectOutputCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Rename Output Command\n"); + err = TestRenameOutputCommand_4(); break; } @@ -32044,7 +32090,7 @@ class TV_AudioOutputCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; static void OnFailureCallback_1(void * context, EmberAfStatus status) { @@ -32059,6 +32105,16 @@ class TV_AudioOutputCluster : public TestCommand (static_cast(context))->OnSuccessResponse_1(audioOutputList); } + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint8_t currentAudioOutput) + { + (static_cast(context))->OnSuccessResponse_2(currentAudioOutput); + } + // // Tests methods // @@ -32104,7 +32160,27 @@ class TV_AudioOutputCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSelectOutputCommand_2() + CHIP_ERROR TestReadAttributeCurrentAudioOutput_2() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 2; + chip::Controller::AudioOutputClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint8_t currentAudioOutput) + { + VerifyOrReturn(CheckValue("currentAudioOutput", currentAudioOutput, 0)); + + NextTest(); + } + + CHIP_ERROR TestSelectOutputCommand_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 2; using RequestType = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type; @@ -32113,22 +32189,22 @@ class TV_AudioOutputCluster : public TestCommand request.index = 1; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_2(); + (static_cast(context))->OnSuccessResponse_3(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_3(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2() { NextTest(); } + void OnSuccessResponse_3() { NextTest(); } - CHIP_ERROR TestRenameOutputCommand_3() + CHIP_ERROR TestRenameOutputCommand_4() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 2; using RequestType = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type; @@ -32138,20 +32214,20 @@ class TV_AudioOutputCluster : public TestCommand request.name = chip::Span("exampleNamegarbage: not in length on purpose", 11); auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_3(); + (static_cast(context))->OnSuccessResponse_4(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); + (static_cast(context))->OnFailureResponse_4(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3() { NextTest(); } + void OnSuccessResponse_4() { NextTest(); } }; class TV_ApplicationLauncherCluster : public TestCommand @@ -32197,12 +32273,12 @@ class TV_ApplicationLauncherCluster : public TestCommand err = TestLaunchAppCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute catalog vendor id\n"); - err = TestReadAttributeCatalogVendorId_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Stop App Command\n"); + err = TestStopAppCommand_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute application id\n"); - err = TestReadAttributeApplicationId_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Hide App Command\n"); + err = TestHideAppCommand_4(); break; } @@ -32227,26 +32303,6 @@ class TV_ApplicationLauncherCluster : public TestCommand (static_cast(context))->OnSuccessResponse_1(applicationLauncherList); } - static void OnFailureCallback_3(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_3(status); - } - - static void OnSuccessCallback_3(void * context, uint8_t catalogVendorId) - { - (static_cast(context))->OnSuccessResponse_3(catalogVendorId); - } - - static void OnFailureCallback_4(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_4(status); - } - - static void OnSuccessCallback_4(void * context, uint8_t applicationId) - { - (static_cast(context))->OnSuccessResponse_4(applicationId); - } - // // Tests methods // @@ -32289,9 +32345,10 @@ class TV_ApplicationLauncherCluster : public TestCommand using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type; RequestType request; - request.data = chip::Span("exampleDatagarbage: not in length on purpose", 11); - request.catalogVendorId = 1U; - request.applicationId = chip::Span("appIdgarbage: not in length on purpose", 5); + request.data = chip::Span("datagarbage: not in length on purpose", 4); + + request.application.catalogVendorId = 123U; + request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(data.status, data.data); @@ -32309,46 +32366,75 @@ class TV_ApplicationLauncherCluster : public TestCommand void OnSuccessResponse_2(chip::app::Clusters::ApplicationLauncher::ApplicationLauncherStatus status, chip::CharSpan data) { + VerifyOrReturn(CheckValue("status", status, 0)); + + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data", 4))); NextTest(); } - CHIP_ERROR TestReadAttributeCatalogVendorId_3() + CHIP_ERROR TestStopAppCommand_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::ApplicationLauncherClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3)); + RequestType request; + + request.application.catalogVendorId = 123U; + request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_3(data.status, data.data); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_3(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(uint8_t catalogVendorId) + void OnSuccessResponse_3(chip::app::Clusters::ApplicationLauncher::ApplicationLauncherStatus status, chip::CharSpan data) { - VerifyOrReturn(CheckValue("catalogVendorId", catalogVendorId, 0)); + VerifyOrReturn(CheckValue("status", status, 0)); + + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data", 4))); NextTest(); } - CHIP_ERROR TestReadAttributeApplicationId_4() + CHIP_ERROR TestHideAppCommand_4() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::ApplicationLauncherClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4)); + RequestType request; + + request.application.catalogVendorId = 123U; + request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_4(data.status, data.data); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_4(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(uint8_t applicationId) + void OnSuccessResponse_4(chip::app::Clusters::ApplicationLauncher::ApplicationLauncherStatus status, chip::CharSpan data) { - VerifyOrReturn(CheckValue("applicationId", applicationId, 0)); + VerifyOrReturn(CheckValue("status", status, 0)); + + VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data", 4))); NextTest(); } @@ -32437,7 +32523,12 @@ class TV_KeypadInputCluster : public TestCommand void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1(chip::app::Clusters::KeypadInput::KeypadInputStatus status) { NextTest(); } + void OnSuccessResponse_1(chip::app::Clusters::KeypadInput::KeypadInputStatus status) + { + VerifyOrReturn(CheckValue("status", status, 0)); + + NextTest(); + } }; class TV_AccountLoginCluster : public TestCommand @@ -32482,6 +32573,10 @@ class TV_AccountLoginCluster : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 2 : Login Command\n"); err = TestLoginCommand_2(); break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Logout Command\n"); + err = TestLogoutCommand_3(); + break; } if (CHIP_NO_ERROR != err) @@ -32493,7 +32588,7 @@ class TV_AccountLoginCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 4; // // Tests methods @@ -32553,6 +32648,29 @@ class TV_AccountLoginCluster : public TestCommand void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } void OnSuccessResponse_2() { NextTest(); } + + CHIP_ERROR TestLogoutCommand_3() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + using RequestType = chip::app::Clusters::AccountLogin::Commands::Logout::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_3(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_3(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3() { NextTest(); } }; class TV_WakeOnLanCluster : public TestCommand @@ -32686,16 +32804,28 @@ class TV_ApplicationBasicCluster : public TestCommand err = TestChangeStatusCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute vendor id\n"); - err = TestReadAttributeVendorId_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute vendor name\n"); + err = TestReadAttributeVendorName_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute product id\n"); - err = TestReadAttributeProductId_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute vendor id\n"); + err = TestReadAttributeVendorId_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute catalog vendor id\n"); - err = TestReadAttributeCatalogVendorId_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute application name\n"); + err = TestReadAttributeApplicationName_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute product id\n"); + err = TestReadAttributeProductId_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute application status\n"); + err = TestReadAttributeApplicationStatus_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute application version\n"); + err = TestReadAttributeApplicationVersion_7(); break; } @@ -32708,16 +32838,16 @@ class TV_ApplicationBasicCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 8; static void OnFailureCallback_2(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context, uint16_t vendorId) + static void OnSuccessCallback_2(void * context, chip::CharSpan vendorName) { - (static_cast(context))->OnSuccessResponse_2(vendorId); + (static_cast(context))->OnSuccessResponse_2(vendorName); } static void OnFailureCallback_3(void * context, EmberAfStatus status) @@ -32725,9 +32855,9 @@ class TV_ApplicationBasicCluster : public TestCommand (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t productId) + static void OnSuccessCallback_3(void * context, uint16_t vendorId) { - (static_cast(context))->OnSuccessResponse_3(productId); + (static_cast(context))->OnSuccessResponse_3(vendorId); } static void OnFailureCallback_4(void * context, EmberAfStatus status) @@ -32735,9 +32865,39 @@ class TV_ApplicationBasicCluster : public TestCommand (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint16_t catalogVendorId) + static void OnSuccessCallback_4(void * context, chip::CharSpan applicationName) + { + (static_cast(context))->OnSuccessResponse_4(applicationName); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint16_t productId) + { + (static_cast(context))->OnSuccessResponse_5(productId); + } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context, uint8_t applicationStatus) + { + (static_cast(context))->OnSuccessResponse_6(applicationStatus); + } + + static void OnFailureCallback_7(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_7(status); + } + + static void OnSuccessCallback_7(void * context, chip::CharSpan applicationVersion) { - (static_cast(context))->OnSuccessResponse_4(catalogVendorId); + (static_cast(context))->OnSuccessResponse_7(applicationVersion); } // @@ -32774,62 +32934,122 @@ class TV_ApplicationBasicCluster : public TestCommand void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestReadAttributeVendorId_2() + CHIP_ERROR TestReadAttributeVendorName_2() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_2, OnFailureCallback_2)); return CHIP_NO_ERROR; } void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2(uint16_t vendorId) + void OnSuccessResponse_2(chip::CharSpan vendorName) { - VerifyOrReturn(CheckValue("vendorId", vendorId, 1U)); + VerifyOrReturn(CheckValueAsString("vendorName", vendorName, chip::CharSpan("exampleVendorName1", 18))); NextTest(); } - CHIP_ERROR TestReadAttributeProductId_3() + CHIP_ERROR TestReadAttributeVendorId_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(uint16_t productId) + void OnSuccessResponse_3(uint16_t vendorId) { - VerifyOrReturn(CheckValue("productId", productId, 1U)); + VerifyOrReturn(CheckValue("vendorId", vendorId, 1U)); NextTest(); } - CHIP_ERROR TestReadAttributeCatalogVendorId_4() + CHIP_ERROR TestReadAttributeApplicationName_4() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; chip::Controller::ApplicationBasicClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_4, OnFailureCallback_4)); return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(uint16_t catalogVendorId) + void OnSuccessResponse_4(chip::CharSpan applicationName) + { + VerifyOrReturn(CheckValueAsString("applicationName", applicationName, chip::CharSpan("exampleName1", 12))); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeProductId_5() { - VerifyOrReturn(CheckValue("catalogVendorId", catalogVendorId, 1U)); + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::ApplicationBasicClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint16_t productId) + { + VerifyOrReturn(CheckValue("productId", productId, 1U)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeApplicationStatus_6() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::ApplicationBasicClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(uint8_t applicationStatus) + { + VerifyOrReturn(CheckValue("applicationStatus", applicationStatus, 0)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeApplicationVersion_7() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::ApplicationBasicClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_7(chip::CharSpan applicationVersion) + { + VerifyOrReturn(CheckValueAsString("applicationVersion", applicationVersion, chip::CharSpan("exampleVersion", 14))); NextTest(); } @@ -32870,48 +33090,72 @@ class TV_MediaPlaybackCluster : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Media Playback Play Command\n"); - err = TestMediaPlaybackPlayCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute playback state\n"); + err = TestReadAttributePlaybackState_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Media Playback Pause Command\n"); - err = TestMediaPlaybackPauseCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute start time\n"); + err = TestReadAttributeStartTime_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Media Playback Stop Command\n"); - err = TestMediaPlaybackStopCommand_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute duration\n"); + err = TestReadAttributeDuration_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Media Playback Start Over Command\n"); - err = TestMediaPlaybackStartOverCommand_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute playback speed\n"); + err = TestReadAttributePlaybackSpeed_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Media Playback Previous Command\n"); - err = TestMediaPlaybackPreviousCommand_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute seek range end\n"); + err = TestReadAttributeSeekRangeEnd_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Media Playback Next Command\n"); - err = TestMediaPlaybackNextCommand_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute seek range start\n"); + err = TestReadAttributeSeekRangeStart_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Media Playback Rewind Command\n"); - err = TestMediaPlaybackRewindCommand_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Media Playback Play Command\n"); + err = TestMediaPlaybackPlayCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Media Playback Fast Forward Command\n"); - err = TestMediaPlaybackFastForwardCommand_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Media Playback Pause Command\n"); + err = TestMediaPlaybackPauseCommand_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Media Playback Skip Forward Command\n"); - err = TestMediaPlaybackSkipForwardCommand_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Media Playback Stop Command\n"); + err = TestMediaPlaybackStopCommand_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Media Playback Skip Backward Command\n"); - err = TestMediaPlaybackSkipBackwardCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Media Playback Start Over Command\n"); + err = TestMediaPlaybackStartOverCommand_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Media Playback Seek Command\n"); - err = TestMediaPlaybackSeekCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Media Playback Previous Command\n"); + err = TestMediaPlaybackPreviousCommand_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Media Playback Next Command\n"); + err = TestMediaPlaybackNextCommand_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Media Playback Rewind Command\n"); + err = TestMediaPlaybackRewindCommand_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Media Playback Fast Forward Command\n"); + err = TestMediaPlaybackFastForwardCommand_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Media Playback Skip Forward Command\n"); + err = TestMediaPlaybackSkipForwardCommand_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Media Playback Skip Backward Command\n"); + err = TestMediaPlaybackSkipBackwardCommand_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Media Playback Seek Command\n"); + err = TestMediaPlaybackSeekCommand_17(); break; } @@ -32924,19 +33168,199 @@ class TV_MediaPlaybackCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; - - // - // Tests methods - // + const uint16_t mTestCount = 18; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint8_t playbackState) + { + (static_cast(context))->OnSuccessResponse_1(playbackState); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint64_t startTime) + { + (static_cast(context))->OnSuccessResponse_2(startTime); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, uint64_t duration) + { + (static_cast(context))->OnSuccessResponse_3(duration); + } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, float playbackSpeed) + { + (static_cast(context))->OnSuccessResponse_4(playbackSpeed); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint64_t seekRangeEnd) + { + (static_cast(context))->OnSuccessResponse_5(seekRangeEnd); + } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context, uint64_t seekRangeStart) + { + (static_cast(context))->OnSuccessResponse_6(seekRangeStart); + } + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { SetIdentity(kIdentityAlpha); return WaitForCommissionee(); } - CHIP_ERROR TestMediaPlaybackPlayCommand_1() + CHIP_ERROR TestReadAttributePlaybackState_1() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::MediaPlaybackClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(uint8_t playbackState) + { + VerifyOrReturn(CheckValue("playbackState", playbackState, 0)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeStartTime_2() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::MediaPlaybackClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint64_t startTime) + { + VerifyOrReturn(CheckValue("startTime", startTime, 255ULL)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeDuration_3() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::MediaPlaybackClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(uint64_t duration) + { + VerifyOrReturn(CheckValue("duration", duration, 0ULL)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributePlaybackSpeed_4() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::MediaPlaybackClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(float playbackSpeed) + { + VerifyOrReturn(CheckValue("playbackSpeed", playbackSpeed, 0.0f)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeSeekRangeEnd_5() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::MediaPlaybackClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint64_t seekRangeEnd) + { + VerifyOrReturn(CheckValue("seekRangeEnd", seekRangeEnd, 0ULL)); + + NextTest(); + } + + CHIP_ERROR TestReadAttributeSeekRangeStart_6() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; + chip::Controller::MediaPlaybackClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(uint64_t seekRangeStart) + { + VerifyOrReturn(CheckValue("seekRangeStart", seekRangeStart, 0ULL)); + + NextTest(); + } + + CHIP_ERROR TestMediaPlaybackPlayCommand_7() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaPlay::Type; @@ -32944,27 +33368,27 @@ class TV_MediaPlaybackCluster : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_1(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_7(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); + (static_cast(context))->OnFailureResponse_7(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_1(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_7(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackPauseCommand_2() + CHIP_ERROR TestMediaPlaybackPauseCommand_8() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaPause::Type; @@ -32972,27 +33396,27 @@ class TV_MediaPlaybackCluster : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_2(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_8(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_8(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_8(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackStopCommand_3() + CHIP_ERROR TestMediaPlaybackStopCommand_9() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaStop::Type; @@ -33000,27 +33424,27 @@ class TV_MediaPlaybackCluster : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_3(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_9(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); + (static_cast(context))->OnFailureResponse_9(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_9(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackStartOverCommand_4() + CHIP_ERROR TestMediaPlaybackStartOverCommand_10() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaStartOver::Type; @@ -33028,27 +33452,27 @@ class TV_MediaPlaybackCluster : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_4(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_10(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); + (static_cast(context))->OnFailureResponse_10(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_10(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackPreviousCommand_5() + CHIP_ERROR TestMediaPlaybackPreviousCommand_11() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaPrevious::Type; @@ -33056,27 +33480,27 @@ class TV_MediaPlaybackCluster : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_5(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_11(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_5(status); + (static_cast(context))->OnFailureResponse_11(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_11(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackNextCommand_6() + CHIP_ERROR TestMediaPlaybackNextCommand_12() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaNext::Type; @@ -33084,27 +33508,27 @@ class TV_MediaPlaybackCluster : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_6(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_12(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_6(status); + (static_cast(context))->OnFailureResponse_12(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_12(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackRewindCommand_7() + CHIP_ERROR TestMediaPlaybackRewindCommand_13() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaRewind::Type; @@ -33112,27 +33536,27 @@ class TV_MediaPlaybackCluster : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_7(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_13(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_7(status); + (static_cast(context))->OnFailureResponse_13(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_13(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackFastForwardCommand_8() + CHIP_ERROR TestMediaPlaybackFastForwardCommand_14() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaFastForward::Type; @@ -33140,27 +33564,27 @@ class TV_MediaPlaybackCluster : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_8(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_14(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_8(status); + (static_cast(context))->OnFailureResponse_14(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_14(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackSkipForwardCommand_9() + CHIP_ERROR TestMediaPlaybackSkipForwardCommand_15() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaSkipForward::Type; @@ -33169,27 +33593,27 @@ class TV_MediaPlaybackCluster : public TestCommand request.deltaPositionMilliseconds = 100ULL; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_9(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_15(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_9(status); + (static_cast(context))->OnFailureResponse_15(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_15(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_10() + CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_16() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaSkipBackward::Type; @@ -33198,27 +33622,27 @@ class TV_MediaPlaybackCluster : public TestCommand request.deltaPositionMilliseconds = 100ULL; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_10(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_16(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_10(status); + (static_cast(context))->OnFailureResponse_16(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_16(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); NextTest(); } - CHIP_ERROR TestMediaPlaybackSeekCommand_11() + CHIP_ERROR TestMediaPlaybackSeekCommand_17() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 3; using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaSeek::Type; @@ -33227,20 +33651,20 @@ class TV_MediaPlaybackCluster : public TestCommand request.position = 100ULL; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_11(data.mediaPlaybackStatus); + (static_cast(context))->OnSuccessResponse_17(data.mediaPlaybackStatus); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_11(status); + (static_cast(context))->OnFailureResponse_17(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_17(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) + void OnSuccessResponse_17(chip::app::Clusters::MediaPlayback::MediaPlaybackStatus mediaPlaybackStatus) { VerifyOrReturn(CheckValue("mediaPlaybackStatus", mediaPlaybackStatus, 0)); @@ -33287,12 +33711,16 @@ class TV_TvChannelCluster : public TestCommand err = TestReadAttributeTvChannelList_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Change Channel By Number Command\n"); - err = TestChangeChannelByNumberCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Change Channel Command\n"); + err = TestChangeChannelCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Skip Channel Command\n"); - err = TestSkipChannelCommand_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Change Channel By Number Command\n"); + err = TestChangeChannelByNumberCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Skip Channel Command\n"); + err = TestSkipChannelCommand_4(); break; } @@ -33305,7 +33733,7 @@ class TV_TvChannelCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; static void OnFailureCallback_1(void * context, EmberAfStatus status) { @@ -33315,9 +33743,9 @@ class TV_TvChannelCluster : public TestCommand static void OnSuccessCallback_1( void * context, const chip::app::DataModel::DecodableList & - tvChannelList) + channelList) { - (static_cast(context))->OnSuccessResponse_1(tvChannelList); + (static_cast(context))->OnSuccessResponse_1(channelList); } // @@ -33336,7 +33764,7 @@ class TV_TvChannelCluster : public TestCommand chip::Controller::TvChannelClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_1, OnFailureCallback_1)); return CHIP_NO_ERROR; } @@ -33345,41 +33773,38 @@ class TV_TvChannelCluster : public TestCommand void OnSuccessResponse_1( const chip::app::DataModel::DecodableList & - tvChannelList) - { - auto iter = tvChannelList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("tvChannelList", iter, 0)); - VerifyOrReturn(CheckValue("tvChannelList[0].majorNumber", iter.GetValue().majorNumber, 1U)); - VerifyOrReturn(CheckValue("tvChannelList[0].minorNumber", iter.GetValue().minorNumber, 2U)); - VerifyOrReturn(CheckValueAsString("tvChannelList[0].name", iter.GetValue().name, chip::CharSpan("exampleName", 11))); - VerifyOrReturn( - CheckValueAsString("tvChannelList[0].callSign", iter.GetValue().callSign, chip::CharSpan("exampleCSign", 12))); - VerifyOrReturn(CheckValueAsString("tvChannelList[0].affiliateCallSign", iter.GetValue().affiliateCallSign, + channelList) + { + auto iter = channelList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("channelList", iter, 0)); + VerifyOrReturn(CheckValue("channelList[0].majorNumber", iter.GetValue().majorNumber, 1U)); + VerifyOrReturn(CheckValue("channelList[0].minorNumber", iter.GetValue().minorNumber, 2U)); + VerifyOrReturn(CheckValueAsString("channelList[0].name", iter.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckValueAsString("channelList[0].callSign", iter.GetValue().callSign, chip::CharSpan("exampleCSign", 12))); + VerifyOrReturn(CheckValueAsString("channelList[0].affiliateCallSign", iter.GetValue().affiliateCallSign, chip::CharSpan("exampleASign", 12))); - VerifyOrReturn(CheckNextListItemDecodes("tvChannelList", iter, 1)); - VerifyOrReturn(CheckValue("tvChannelList[1].majorNumber", iter.GetValue().majorNumber, 2U)); - VerifyOrReturn(CheckValue("tvChannelList[1].minorNumber", iter.GetValue().minorNumber, 3U)); - VerifyOrReturn(CheckValueAsString("tvChannelList[1].name", iter.GetValue().name, chip::CharSpan("exampleName", 11))); - VerifyOrReturn( - CheckValueAsString("tvChannelList[1].callSign", iter.GetValue().callSign, chip::CharSpan("exampleCSign", 12))); - VerifyOrReturn(CheckValueAsString("tvChannelList[1].affiliateCallSign", iter.GetValue().affiliateCallSign, + VerifyOrReturn(CheckNextListItemDecodes("channelList", iter, 1)); + VerifyOrReturn(CheckValue("channelList[1].majorNumber", iter.GetValue().majorNumber, 2U)); + VerifyOrReturn(CheckValue("channelList[1].minorNumber", iter.GetValue().minorNumber, 3U)); + VerifyOrReturn(CheckValueAsString("channelList[1].name", iter.GetValue().name, chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckValueAsString("channelList[1].callSign", iter.GetValue().callSign, chip::CharSpan("exampleCSign", 12))); + VerifyOrReturn(CheckValueAsString("channelList[1].affiliateCallSign", iter.GetValue().affiliateCallSign, chip::CharSpan("exampleASign", 12))); - VerifyOrReturn(CheckNoMoreListItems("tvChannelList", iter, 2)); + VerifyOrReturn(CheckNoMoreListItems("channelList", iter, 2)); NextTest(); } - CHIP_ERROR TestChangeChannelByNumberCommand_2() + CHIP_ERROR TestChangeChannelCommand_2() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TvChannel::Commands::ChangeChannelByNumber::Type; + using RequestType = chip::app::Clusters::TvChannel::Commands::ChangeChannel::Type; RequestType request; - request.majorNumber = 1U; - request.minorNumber = 2U; + request.match = chip::Span("CNNgarbage: not in length on purpose", 3); auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_2(); + (static_cast(context))->OnSuccessResponse_2(data.channelMatch, data.errorType); }; auto failure = [](void * context, EmberAfStatus status) { @@ -33392,15 +33817,29 @@ class TV_TvChannelCluster : public TestCommand void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2() { NextTest(); } + void OnSuccessResponse_2(const chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType & channelMatch, + chip::app::Clusters::TvChannel::TvChannelErrorType errorType) + { + VerifyOrReturn(CheckValue("channelMatch.majorNumber", channelMatch.majorNumber, 1U)); + VerifyOrReturn(CheckValue("channelMatch.minorNumber", channelMatch.minorNumber, 0U)); + VerifyOrReturn(CheckValueAsString("channelMatch.name", channelMatch.name, chip::CharSpan("name", 4))); + VerifyOrReturn(CheckValueAsString("channelMatch.callSign", channelMatch.callSign, chip::CharSpan("callSign", 8))); + VerifyOrReturn(CheckValueAsString("channelMatch.affiliateCallSign", channelMatch.affiliateCallSign, + chip::CharSpan("affiliateCallSign", 17))); + + VerifyOrReturn(CheckValue("errorType", errorType, 0)); - CHIP_ERROR TestSkipChannelCommand_3() + NextTest(); + } + + CHIP_ERROR TestChangeChannelByNumberCommand_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TvChannel::Commands::SkipChannel::Type; + using RequestType = chip::app::Clusters::TvChannel::Commands::ChangeChannelByNumber::Type; RequestType request; - request.count = 1U; + request.majorNumber = 1U; + request.minorNumber = 2U; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(); @@ -33417,6 +33856,30 @@ class TV_TvChannelCluster : public TestCommand void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } void OnSuccessResponse_3() { NextTest(); } + + CHIP_ERROR TestSkipChannelCommand_4() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TvChannel::Commands::SkipChannel::Type; + + RequestType request; + request.count = 1U; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_4(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_4(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4() { NextTest(); } }; class TV_LowPowerCluster : public TestCommand @@ -33543,12 +34006,12 @@ class TV_MediaInputCluster : public TestCommand err = TestReadAttributeMediaInputList_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Select Input Command\n"); - err = TestSelectInputCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read current media input\n"); + err = TestReadCurrentMediaInput_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current input list\n"); - err = TestReadCurrentInputList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Select Input Command\n"); + err = TestSelectInputCommand_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Hide Input Status Command\n"); @@ -33588,14 +34051,14 @@ class TV_MediaInputCluster : public TestCommand (static_cast(context))->OnSuccessResponse_1(mediaInputList); } - static void OnFailureCallback_3(void * context, EmberAfStatus status) + static void OnFailureCallback_2(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); + (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_3(void * context, uint8_t currentMediaInput) + static void OnSuccessCallback_2(void * context, uint8_t currentMediaInput) { - (static_cast(context))->OnSuccessResponse_3(currentMediaInput); + (static_cast(context))->OnSuccessResponse_2(currentMediaInput); } // @@ -33643,7 +34106,27 @@ class TV_MediaInputCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSelectInputCommand_2() + CHIP_ERROR TestReadCurrentMediaInput_2() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::MediaInputClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint8_t currentMediaInput) + { + VerifyOrReturn(CheckValue("currentMediaInput", currentMediaInput, 0)); + + NextTest(); + } + + CHIP_ERROR TestSelectInputCommand_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::MediaInput::Commands::SelectInput::Type; @@ -33652,40 +34135,20 @@ class TV_MediaInputCluster : public TestCommand request.index = 1; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_2(); + (static_cast(context))->OnSuccessResponse_3(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_3(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_2() { NextTest(); } - - CHIP_ERROR TestReadCurrentInputList_3() - { - const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::MediaInputClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(uint8_t currentMediaInput) - { - VerifyOrReturn(CheckValue("currentMediaInput", currentMediaInput, 1)); - - NextTest(); - } + void OnSuccessResponse_3() { NextTest(); } CHIP_ERROR TestHideInputStatusCommand_4() { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index a7b656948e1d6a..6f30ab4df16f5a 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -574,28 +574,6 @@ void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(TLV::TLVReader * cb->mCall(cb->mContext, list); } -void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - chip::app::DataModel::DecodableList list; - CHIP_ERROR err = Decode(*tlvData, list); - if (err != CHIP_NO_ERROR) - { - if (onFailureCallback != nullptr) - { - Callback::Callback * cb = - Callback::Callback::FromCancelable(onFailureCallback); - cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); - } - return; - } - - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, list); -} - void ContentLauncherClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { @@ -1748,8 +1726,8 @@ void SwitchClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Cal cb->mCall(cb->mContext, list); } -void TvChannelClusterTvChannelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void TvChannelClusterChannelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); @@ -1764,8 +1742,8 @@ void TvChannelClusterTvChannelListListAttributeFilter(TLV::TLVReader * tlvData, return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } @@ -2240,6 +2218,21 @@ bool emberAfAccountLoginClusterGetSetupPINResponseCallback(EndpointId endpoint, return true; } +bool emberAfApplicationLauncherClusterHideAppResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, uint8_t status, + chip::CharSpan data) +{ + ChipLogProgress(Zcl, "HideAppResponse:"); + ChipLogProgress(Zcl, " status: %" PRIu8 "", status); + ChipLogProgress(Zcl, " data: %.*s", static_cast(data.size()), data.data()); + + GET_CLUSTER_RESPONSE_CALLBACKS("ApplicationLauncherClusterHideAppResponseCallback"); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, status, data); + return true; +} + bool emberAfApplicationLauncherClusterLaunchAppResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, uint8_t status, chip::CharSpan data) { @@ -2255,33 +2248,48 @@ bool emberAfApplicationLauncherClusterLaunchAppResponseCallback(EndpointId endpo return true; } +bool emberAfApplicationLauncherClusterStopAppResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, uint8_t status, + chip::CharSpan data) +{ + ChipLogProgress(Zcl, "StopAppResponse:"); + ChipLogProgress(Zcl, " status: %" PRIu8 "", status); + ChipLogProgress(Zcl, " data: %.*s", static_cast(data.size()), data.data()); + + GET_CLUSTER_RESPONSE_CALLBACKS("ApplicationLauncherClusterStopAppResponseCallback"); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, status, data); + return true; +} + bool emberAfContentLauncherClusterLaunchContentResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, - chip::CharSpan data, uint8_t contentLaunchStatus) + uint8_t contentLaunchStatus, chip::CharSpan data) { ChipLogProgress(Zcl, "LaunchContentResponse:"); - ChipLogProgress(Zcl, " data: %.*s", static_cast(data.size()), data.data()); ChipLogProgress(Zcl, " contentLaunchStatus: %" PRIu8 "", contentLaunchStatus); + ChipLogProgress(Zcl, " data: %.*s", static_cast(data.size()), data.data()); GET_CLUSTER_RESPONSE_CALLBACKS("ContentLauncherClusterLaunchContentResponseCallback"); Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, data, contentLaunchStatus); + cb->mCall(cb->mContext, contentLaunchStatus, data); return true; } bool emberAfContentLauncherClusterLaunchURLResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, - chip::CharSpan data, uint8_t contentLaunchStatus) + uint8_t contentLaunchStatus, chip::CharSpan data) { ChipLogProgress(Zcl, "LaunchURLResponse:"); - ChipLogProgress(Zcl, " data: %.*s", static_cast(data.size()), data.data()); ChipLogProgress(Zcl, " contentLaunchStatus: %" PRIu8 "", contentLaunchStatus); + ChipLogProgress(Zcl, " data: %.*s", static_cast(data.size()), data.data()); GET_CLUSTER_RESPONSE_CALLBACKS("ContentLauncherClusterLaunchURLResponseCallback"); Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, data, contentLaunchStatus); + cb->mCall(cb->mContext, contentLaunchStatus, data); return true; } @@ -2978,19 +2986,19 @@ bool emberAfScenesClusterViewSceneResponseCallback(EndpointId endpoint, app::Com return true; } -bool emberAfTvChannelClusterChangeChannelResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, - /* TYPE WARNING: array array defaults to */ uint8_t * ChannelMatch, - uint8_t ErrorType) +bool emberAfTvChannelClusterChangeChannelResponseCallback( + EndpointId endpoint, app::CommandSender * commandObj, + chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType channelMatch, uint8_t errorType) { ChipLogProgress(Zcl, "ChangeChannelResponse:"); - ChipLogProgress(Zcl, " ChannelMatch: %p", ChannelMatch); - ChipLogProgress(Zcl, " ErrorType: %" PRIu8 "", ErrorType); + ChipLogProgress(Zcl, " channelMatch: Not sure how to log struct TvChannelInfo"); + ChipLogProgress(Zcl, " errorType: %" PRIu8 "", errorType); GET_CLUSTER_RESPONSE_CALLBACKS("TvChannelClusterChangeChannelResponseCallback"); Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, ChannelMatch, ErrorType); + cb->mCall(cb->mContext, TvChannelInfo(), errorType); return true; } diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 4d6dfb811031b7..0fdab6c129bf45 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -36,10 +36,12 @@ // Cluster Specific Response Callbacks typedef void (*AccountLoginClusterGetSetupPINResponseCallback)(void * context, chip::CharSpan setupPIN); +typedef void (*ApplicationLauncherClusterHideAppResponseCallback)(void * context, uint8_t status, chip::CharSpan data); typedef void (*ApplicationLauncherClusterLaunchAppResponseCallback)(void * context, uint8_t status, chip::CharSpan data); -typedef void (*ContentLauncherClusterLaunchContentResponseCallback)(void * context, chip::CharSpan data, - uint8_t contentLaunchStatus); -typedef void (*ContentLauncherClusterLaunchURLResponseCallback)(void * context, chip::CharSpan data, uint8_t contentLaunchStatus); +typedef void (*ApplicationLauncherClusterStopAppResponseCallback)(void * context, uint8_t status, chip::CharSpan data); +typedef void (*ContentLauncherClusterLaunchContentResponseCallback)(void * context, uint8_t contentLaunchStatus, + chip::CharSpan data); +typedef void (*ContentLauncherClusterLaunchURLResponseCallback)(void * context, uint8_t contentLaunchStatus, chip::CharSpan data); typedef void (*DiagnosticLogsClusterRetrieveLogsResponseCallback)(void * context, uint8_t status, chip::ByteSpan content, uint32_t timeStamp, uint32_t timeSinceBoot); typedef void (*DoorLockClusterGetCredentialStatusResponseCallback)(void * context, bool credentialExists, uint16_t userIndex, @@ -115,9 +117,7 @@ typedef void (*ScenesClusterStoreSceneResponseCallback)(void * context, uint8_t typedef void (*ScenesClusterViewSceneResponseCallback)(void * context, uint8_t status, uint16_t groupId, uint8_t sceneId, uint16_t transitionTime, chip::CharSpan sceneName, /* TYPE WARNING: array array defaults to */ uint8_t * extensionFieldSets); -typedef void (*TvChannelClusterChangeChannelResponseCallback)(void * context, - /* TYPE WARNING: array array defaults to */ uint8_t * ChannelMatch, - uint8_t ErrorType); +typedef void (*TvChannelClusterChangeChannelResponseCallback)(void * context, TvChannelInfo channelMatch, uint8_t errorType); typedef void (*TargetNavigatorClusterNavigateTargetResponseCallback)(void * context, uint8_t status, chip::CharSpan data); typedef void (*TestClusterClusterBooleanResponseCallback)(void * context, bool value); typedef void (*TestClusterClusterSimpleStructResponseCallback)(void * context, SimpleStruct arg1); @@ -236,12 +236,6 @@ void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(chip::TLV::TLVRe chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptsHeaderListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); -typedef void (*ContentLauncherSupportedStreamingTypesListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); void ContentLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -505,9 +499,9 @@ void SwitchClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void TvChannelClusterTvChannelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); -typedef void (*TvChannelTvChannelListListAttributeCallback)( +void TvChannelClusterChannelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TvChannelChannelListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); void TvChannelClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 2d1ae64e16f6b3..0c74a113d9225f 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -122,6 +122,44 @@ CHIP_ERROR AccountLoginCluster::Login(Callback::Cancelable * onSuccessCallback, return err; } +CHIP_ERROR AccountLoginCluster::Logout(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, AccountLogin::Commands::Logout::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + // Command takes no arguments. + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + // AccountLogin Cluster Attributes CHIP_ERROR AccountLoginCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, @@ -408,55 +446,38 @@ CHIP_ERROR ApplicationBasicCluster::ReportAttributeProductId(Callback::Cancelabl BasicAttributeFilter); } -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeApplicationId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::ApplicationId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicCluster::ReportAttributeApplicationId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationBasic::Attributes::ApplicationId::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeCatalogVendorId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; attributePath.mEndpointId = mEndpoint; attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::CatalogVendorId::Id; + attributePath.mAttributeId = ApplicationBasic::Attributes::ApplicationStatus::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } -CHIP_ERROR ApplicationBasicCluster::ReportAttributeCatalogVendorId(Callback::Cancelable * onReportCallback) +CHIP_ERROR ApplicationBasicCluster::ReportAttributeApplicationStatus(Callback::Cancelable * onReportCallback) { - return RequestAttributeReporting(ApplicationBasic::Attributes::CatalogVendorId::Id, onReportCallback, - BasicAttributeFilter); + return RequestAttributeReporting(ApplicationBasic::Attributes::ApplicationStatus::Id, onReportCallback, + BasicAttributeFilter); } -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeApplicationVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; attributePath.mEndpointId = mEndpoint; attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::ApplicationStatus::Id; + attributePath.mAttributeId = ApplicationBasic::Attributes::ApplicationVersion::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } -CHIP_ERROR ApplicationBasicCluster::ReportAttributeApplicationStatus(Callback::Cancelable * onReportCallback) +CHIP_ERROR ApplicationBasicCluster::ReportAttributeApplicationVersion(Callback::Cancelable * onReportCallback) { - return RequestAttributeReporting(ApplicationBasic::Attributes::ApplicationStatus::Id, onReportCallback, - BasicAttributeFilter); + return RequestAttributeReporting(ApplicationBasic::Attributes::ApplicationVersion::Id, onReportCallback, + BasicAttributeFilter); } CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, @@ -477,6 +498,49 @@ CHIP_ERROR ApplicationBasicCluster::ReportAttributeClusterRevision(Callback::Can } // ApplicationLauncher Cluster Commands +CHIP_ERROR ApplicationLauncherCluster::HideApp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t catalogVendorId, chip::CharSpan applicationId) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, ApplicationLauncher::Commands::HideApp::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // catalogVendorId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), catalogVendorId)); + // applicationId: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), applicationId)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + CHIP_ERROR ApplicationLauncherCluster::LaunchApp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::CharSpan data, uint16_t catalogVendorId, chip::CharSpan applicationId) { @@ -522,41 +586,50 @@ CHIP_ERROR ApplicationLauncherCluster::LaunchApp(Callback::Cancelable * onSucces return err; } -// ApplicationLauncher Cluster Attributes -CHIP_ERROR ApplicationLauncherCluster::SubscribeAttributeCatalogVendorId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +CHIP_ERROR ApplicationLauncherCluster::StopApp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t catalogVendorId, chip::CharSpan applicationId) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationLauncher::Attributes::CatalogVendorId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR ApplicationLauncherCluster::ReportAttributeCatalogVendorId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationLauncher::Attributes::CatalogVendorId::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR ApplicationLauncherCluster::SubscribeAttributeApplicationId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationLauncher::Attributes::ApplicationId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR ApplicationLauncherCluster::ReportAttributeApplicationId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationLauncher::Attributes::ApplicationId::Id, onReportCallback, - BasicAttributeFilter); + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, ApplicationLauncher::Commands::StopApp::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // catalogVendorId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), catalogVendorId)); + // applicationId: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), applicationId)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } +// ApplicationLauncher Cluster Attributes CHIP_ERROR ApplicationLauncherCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) @@ -3884,7 +3957,7 @@ CHIP_ERROR ColorControlCluster::ReportAttributeClusterRevision(Callback::Cancela // ContentLauncher Cluster Commands CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - bool autoPlay, chip::CharSpan data) + bool autoPlay, chip::CharSpan data, uint8_t type, chip::CharSpan value) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -3911,6 +3984,10 @@ CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSucces SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), autoPlay)); // data: charString SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), data)); + // type: contentLaunchParameterEnum + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), type)); + // value: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), value)); SuccessOrExit(err = sender->FinishCommand()); @@ -3927,7 +4004,7 @@ CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSucces } CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan contentURL, chip::CharSpan displayString) + chip::CharSpan contentURL, chip::CharSpan displayString, chip::CharSpan providerName) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -3954,6 +4031,8 @@ CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCal SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), contentURL)); // displayString: charString SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), displayString)); + // providerName: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), providerName)); SuccessOrExit(err = sender->FinishCommand()); @@ -3970,6 +4049,23 @@ CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCal } // ContentLauncher Cluster Attributes +CHIP_ERROR ContentLauncherCluster::SubscribeAttributeSupportedStreamingProtocols(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t minInterval, uint16_t maxInterval) +{ + chip::app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = ContentLauncher::Attributes::SupportedStreamingProtocols::Id; + return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ContentLauncherCluster::ReportAttributeSupportedStreamingProtocols(Callback::Cancelable * onReportCallback) +{ + return RequestAttributeReporting(ContentLauncher::Attributes::SupportedStreamingProtocols::Id, onReportCallback, + BasicAttributeFilter); +} + CHIP_ERROR ContentLauncherCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) @@ -7388,57 +7484,6 @@ CHIP_ERROR MediaPlaybackCluster::ReportAttributeDuration(Callback::Cancelable * BasicAttributeFilter); } -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributePositionUpdatedAt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaPlayback::Attributes::PositionUpdatedAt::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributePositionUpdatedAt(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaPlayback::Attributes::PositionUpdatedAt::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributePosition(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaPlayback::Attributes::Position::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributePosition(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaPlayback::Attributes::Position::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributePlaybackSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaPlayback::Attributes::PlaybackSpeed::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributePlaybackSpeed(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaPlayback::Attributes::PlaybackSpeed::Id, onReportCallback, - BasicAttributeFilter); -} - CHIP_ERROR MediaPlaybackCluster::SubscribeAttributeSeekRangeEnd(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) @@ -10762,40 +10807,6 @@ CHIP_ERROR TvChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallbac } // TvChannel Cluster Attributes -CHIP_ERROR TvChannelCluster::SubscribeAttributeTvChannelLineup(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TvChannel::Attributes::TvChannelLineup::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TvChannelCluster::ReportAttributeTvChannelLineup(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TvChannel::Attributes::TvChannelLineup::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TvChannelCluster::SubscribeAttributeCurrentTvChannel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TvChannel::Attributes::CurrentTvChannel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TvChannelCluster::ReportAttributeCurrentTvChannel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TvChannel::Attributes::CurrentTvChannel::Id, onReportCallback, - BasicAttributeFilter); -} - CHIP_ERROR TvChannelCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index ea174d3c3578ec..a2667e3faeb04c 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -50,6 +50,7 @@ class DLL_EXPORT AccountLoginCluster : public ClusterBase chip::CharSpan tempAccountIdentifier); CHIP_ERROR Login(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::CharSpan tempAccountIdentifier, chip::CharSpan setupPIN); + CHIP_ERROR Logout(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); // Cluster Attributes CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, @@ -103,16 +104,14 @@ class DLL_EXPORT ApplicationBasicCluster : public ClusterBase CHIP_ERROR SubscribeAttributeProductId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeProductId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeApplicationId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeApplicationId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCatalogVendorId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCatalogVendorId(Callback::Cancelable * onReportCallback); CHIP_ERROR SubscribeAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeApplicationStatus(Callback::Cancelable * onReportCallback); + CHIP_ERROR SubscribeAttributeApplicationVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t minInterval, + uint16_t maxInterval); + CHIP_ERROR ReportAttributeApplicationVersion(Callback::Cancelable * onReportCallback); CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); @@ -127,16 +126,14 @@ class DLL_EXPORT ApplicationLauncherCluster : public ClusterBase ~ApplicationLauncherCluster() {} // Cluster Commands + CHIP_ERROR HideApp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t catalogVendorId, + chip::CharSpan applicationId); CHIP_ERROR LaunchApp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::CharSpan data, uint16_t catalogVendorId, chip::CharSpan applicationId); + CHIP_ERROR StopApp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t catalogVendorId, + chip::CharSpan applicationId); // Cluster Attributes - CHIP_ERROR SubscribeAttributeCatalogVendorId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCatalogVendorId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeApplicationId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeApplicationId(Callback::Cancelable * onReportCallback); CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); @@ -638,11 +635,15 @@ class DLL_EXPORT ContentLauncherCluster : public ClusterBase // Cluster Commands CHIP_ERROR LaunchContent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, bool autoPlay, - chip::CharSpan data); + chip::CharSpan data, uint8_t type, chip::CharSpan value); CHIP_ERROR LaunchURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan contentURL, chip::CharSpan displayString); + chip::CharSpan contentURL, chip::CharSpan displayString, chip::CharSpan providerName); // Cluster Attributes + CHIP_ERROR SubscribeAttributeSupportedStreamingProtocols(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t minInterval, + uint16_t maxInterval); + CHIP_ERROR ReportAttributeSupportedStreamingProtocols(Callback::Cancelable * onReportCallback); CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); @@ -1184,16 +1185,6 @@ class DLL_EXPORT MediaPlaybackCluster : public ClusterBase CHIP_ERROR SubscribeAttributeDuration(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeDuration(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePositionUpdatedAt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePositionUpdatedAt(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePosition(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePosition(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePlaybackSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePlaybackSpeed(Callback::Cancelable * onReportCallback); CHIP_ERROR SubscribeAttributeSeekRangeEnd(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeSeekRangeEnd(Callback::Cancelable * onReportCallback); @@ -1757,13 +1748,6 @@ class DLL_EXPORT TvChannelCluster : public ClusterBase CHIP_ERROR SkipChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t count); // Cluster Attributes - CHIP_ERROR SubscribeAttributeTvChannelLineup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTvChannelLineup(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentTvChannel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentTvChannel(Callback::Cancelable * onReportCallback); CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); diff --git a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp index 420591f224e09f..70a86fbd3a066a 100644 --- a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp @@ -155,6 +155,69 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa { switch (aCommandPath.mCommandId) { + case Commands::HideAppResponse::Id: { + expectArgumentCount = 2; + uint8_t status; + chip::CharSpan data; + 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(status); + break; + case 1: + TLVUnpackError = aDataTlv.Get(data); + 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) + { + wasHandled = + emberAfApplicationLauncherClusterHideAppResponseCallback(aCommandPath.mEndpointId, apCommandObj, status, data); + } + break; + } case Commands::LaunchAppResponse::Id: { expectArgumentCount = 2; uint8_t status; @@ -218,6 +281,69 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa } break; } + case Commands::StopAppResponse::Id: { + expectArgumentCount = 2; + uint8_t status; + chip::CharSpan data; + 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(status); + break; + case 1: + TLVUnpackError = aDataTlv.Get(data); + 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) + { + wasHandled = + emberAfApplicationLauncherClusterStopAppResponseCallback(aCommandPath.mEndpointId, apCommandObj, status, data); + } + break; + } default: { return; } @@ -258,8 +384,8 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa { case Commands::LaunchContentResponse::Id: { expectArgumentCount = 2; - chip::CharSpan data; uint8_t contentLaunchStatus; + chip::CharSpan data; bool argExists[2]; memset(argExists, 0, sizeof argExists); @@ -290,10 +416,10 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa switch (currentDecodeTagId) { case 0: - TLVUnpackError = aDataTlv.Get(data); + TLVUnpackError = aDataTlv.Get(contentLaunchStatus); break; case 1: - TLVUnpackError = aDataTlv.Get(contentLaunchStatus); + TLVUnpackError = aDataTlv.Get(data); break; default: // Unsupported tag, ignore it. @@ -315,14 +441,14 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { wasHandled = emberAfContentLauncherClusterLaunchContentResponseCallback(aCommandPath.mEndpointId, apCommandObj, - data, contentLaunchStatus); + contentLaunchStatus, data); } break; } case Commands::LaunchURLResponse::Id: { expectArgumentCount = 2; - chip::CharSpan data; uint8_t contentLaunchStatus; + chip::CharSpan data; bool argExists[2]; memset(argExists, 0, sizeof argExists); @@ -353,10 +479,10 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa switch (currentDecodeTagId) { case 0: - TLVUnpackError = aDataTlv.Get(data); + TLVUnpackError = aDataTlv.Get(contentLaunchStatus); break; case 1: - TLVUnpackError = aDataTlv.Get(contentLaunchStatus); + TLVUnpackError = aDataTlv.Get(data); break; default: // Unsupported tag, ignore it. @@ -377,8 +503,8 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { - wasHandled = emberAfContentLauncherClusterLaunchURLResponseCallback(aCommandPath.mEndpointId, apCommandObj, data, - contentLaunchStatus); + wasHandled = emberAfContentLauncherClusterLaunchURLResponseCallback(aCommandPath.mEndpointId, apCommandObj, + contentLaunchStatus, data); } break; } @@ -3689,8 +3815,8 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa { case Commands::ChangeChannelResponse::Id: { expectArgumentCount = 2; - /* TYPE WARNING: array array defaults to */ uint8_t * ChannelMatch; - uint8_t ErrorType; + chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType channelMatch; + uint8_t errorType; bool argExists[2]; memset(argExists, 0, sizeof argExists); @@ -3721,11 +3847,11 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa switch (currentDecodeTagId) { case 0: - // Just for compatibility, we will add array type support in IM later. - TLVUnpackError = aDataTlv.GetDataPtr(const_cast(ChannelMatch)); + // Not supported, just error out. + TLVUnpackError = CHIP_ERROR_UNEXPECTED_TLV_ELEMENT; break; case 1: - TLVUnpackError = aDataTlv.Get(ErrorType); + TLVUnpackError = aDataTlv.Get(errorType); break; default: // Unsupported tag, ignore it. @@ -3747,7 +3873,7 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { wasHandled = emberAfTvChannelClusterChangeChannelResponseCallback(aCommandPath.mEndpointId, apCommandObj, - ChannelMatch, ErrorType); + channelMatch, errorType); } break; } diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp new file mode 100644 index 00000000000000..4afc378c3cedd1 --- /dev/null +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp @@ -0,0 +1,3772 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * 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. + */ + +// THIS FILE IS GENERATED BY ZAP + +#include + +#include +#include + +#include +#include +#include + +using namespace chip::app::Clusters; +using namespace chip::System; +using namespace chip::Encoding::LittleEndian; + +namespace chip { +namespace Controller { + +CHIP_ERROR AccessControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, AccessControl::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR AccountLoginClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, AccountLogin::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR AdministratorCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, AdministratorCommissioning::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::VendorName::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeVendorId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::VendorId::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ApplicationName::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeProductId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ProductId::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ApplicationStatus::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ApplicationVersion::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ApplicationLauncherClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationLauncher::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR AudioOutputClusterTest::WriteAttributeCurrentAudioOutput(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, AudioOutput::Attributes::CurrentAudioOutput::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR AudioOutputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, AudioOutput::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierMovingState(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::BarrierMovingState::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierSafetyStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::BarrierSafetyStatus::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierCapabilities(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::BarrierCapabilities::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierPosition(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::BarrierPosition::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BarrierControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BasicClusterTest::WriteAttributeInteractionModelVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::InteractionModelVersion::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::VendorName::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeVendorID(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::VendorID::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeProductName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ProductName::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeProductID(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ProductID::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::HardwareVersion::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::HardwareVersionString::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::SoftwareVersion::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::SoftwareVersionString::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ManufacturingDate::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributePartNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::PartNumber::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeProductURL(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ProductURL::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeProductLabel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ProductLabel::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::SerialNumber::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeReachable(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::Reachable::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeUniqueID(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::UniqueID::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BinaryInputBasicClusterTest::WriteAttributeStatusFlags(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BinaryInputBasic::Attributes::StatusFlags::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BinaryInputBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BinaryInputBasic::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BindingClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Binding::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BooleanStateClusterTest::WriteAttributeStateValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BooleanState::Attributes::StateValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BooleanStateClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BooleanState::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedActionsClusterTest::WriteAttributeSetupUrl(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedActions::Attributes::SetupUrl::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BridgedActionsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedActions::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CurrentHue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentSaturation(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CurrentSaturation::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::RemainingTime::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentX(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CurrentX::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentY(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CurrentY::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeDriftCompensation(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::DriftCompensation::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeCompensationText(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CompensationText::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTemperature(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorTemperature::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorMode::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeNumberOfPrimaries(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::NumberOfPrimaries::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary1X::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary1Y::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary1Intensity::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary2X::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary2Y::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary2Intensity::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary3X::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary3Y::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary3Intensity::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary4X::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary4Y::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary4Intensity::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary5X::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary5Y::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary5Intensity::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6X(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary6X::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6Y(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary6Y::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6Intensity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary6Intensity::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeEnhancedCurrentHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::EnhancedCurrentHue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeEnhancedColorMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::EnhancedColorMode::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopActive(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopActive::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopDirection(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopDirection::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopTime::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopStartEnhancedHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopStoredEnhancedHue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorCapabilities(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorCapabilities::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTempPhysicalMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorTempPhysicalMin::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTempPhysicalMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorTempPhysicalMax::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeCoupleColorTempToLevelMinMireds(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ColorControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ContentLauncherClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ContentLauncher::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR DescriptorClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Descriptor::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR DoorLockClusterTest::WriteAttributeLockState(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, DoorLock::Attributes::LockState::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR DoorLockClusterTest::WriteAttributeLockType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, DoorLock::Attributes::LockType::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR DoorLockClusterTest::WriteAttributeActuatorEnabled(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, DoorLock::Attributes::ActuatorEnabled::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR DoorLockClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, DoorLock::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeMeasurementType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::MeasurementType::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeTotalActivePower(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::TotalActivePower::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsVoltage::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltageMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsVoltageMin::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltageMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsVoltageMax::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrent(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsCurrent::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrentMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsCurrentMin::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrentMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsCurrentMax::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePower(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::ActivePower::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePowerMin(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::ActivePowerMin::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePowerMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::ActivePowerMax::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributePHYRate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::PHYRate::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeFullDuplex(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::FullDuplex::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributePacketRxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributePacketTxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeTxErrCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::TxErrCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeCollisionCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::CollisionCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::OverrunCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeCarrierDetect(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeTimeSinceReset(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR FixedLabelClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, FixedLabel::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::MeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::MinMeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::MaxMeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeTolerance(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::Tolerance::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GeneralCommissioningClusterTest::WriteAttributeRegulatoryConfig(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralCommissioning::Attributes::RegulatoryConfig::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR GeneralCommissioningClusterTest::WriteAttributeLocationCapability(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralCommissioning::Attributes::LocationCapability::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR GeneralCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralCommissioning::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeRebootCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::RebootCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeUpTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::UpTime::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeTotalOperationalHours(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::TotalOperationalHours::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeBootReasons(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::BootReasons::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GroupKeyManagementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, GroupKeyManagement::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR GroupsClusterTest::WriteAttributeNameSupport(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Groups::Attributes::NameSupport::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR GroupsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Groups::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR IdentifyClusterTest::WriteAttributeIdentifyType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Identify::Attributes::IdentifyType::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR IdentifyClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Identify::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::MeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::MinMeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeTolerance(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::Tolerance::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeLightSensorType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::LightSensorType::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR KeypadInputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, KeypadInput::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlClusterTest::WriteAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::CurrentLevel::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR LevelControlClusterTest::WriteAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::RemainingTime::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR LevelControlClusterTest::WriteAttributeMinLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::MinLevel::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR LevelControlClusterTest::WriteAttributeMaxLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::MaxLevel::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR LevelControlClusterTest::WriteAttributeCurrentFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::CurrentFrequency::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR LevelControlClusterTest::WriteAttributeMinFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::MinFrequency::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR LevelControlClusterTest::WriteAttributeMaxFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::MaxFrequency::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR LevelControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LowPowerClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, LowPower::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR MediaInputClusterTest::WriteAttributeCurrentMediaInput(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaInput::Attributes::CurrentMediaInput::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR MediaInputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaInput::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR MediaPlaybackClusterTest::WriteAttributePlaybackState(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::PlaybackState::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeStartTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::StartTime::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeDuration(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::Duration::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR MediaPlaybackClusterTest::WriteAttributePlaybackSpeed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, float value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::PlaybackSpeed::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeSeekRangeEnd(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::SeekRangeEnd::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeSeekRangeStart(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::SeekRangeStart::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ModeSelectClusterTest::WriteAttributeCurrentMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ModeSelect::Attributes::CurrentMode::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ModeSelectClusterTest::WriteAttributeStartUpMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ModeSelect::Attributes::StartUpMode::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ModeSelectClusterTest::WriteAttributeDescription(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ModeSelect::Attributes::Description::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ModeSelectClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ModeSelect::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR NetworkCommissioningClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, NetworkCommissioning::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR NetworkCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, NetworkCommissioning::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OtaSoftwareUpdateProviderClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OtaSoftwareUpdateRequestorClusterTest::WriteAttributeUpdatePossible(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OtaSoftwareUpdateRequestorClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancy(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OccupancySensing::Attributes::Occupancy::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancySensorType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OccupancySensing::Attributes::OccupancySensorType::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancySensorTypeBitmap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OccupancySensingClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OccupancySensing::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OnOffClusterTest::WriteAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OnOff::Attributes::OnOff::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OnOffClusterTest::WriteAttributeGlobalSceneControl(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OnOff::Attributes::GlobalSceneControl::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OnOffClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OnOff::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OnOffClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OnOff::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OnOffSwitchConfigurationClusterTest::WriteAttributeSwitchType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OnOffSwitchConfiguration::Attributes::SwitchType::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OnOffSwitchConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OnOffSwitchConfiguration::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeSupportedFabrics(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OperationalCredentials::Attributes::SupportedFabrics::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeCommissionedFabrics(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OperationalCredentials::Attributes::CommissionedFabrics::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeCurrentFabricIndex(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::FabricIndex value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OperationalCredentials::Attributes::CurrentFabricIndex::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, OperationalCredentials::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PowerSourceClusterTest::WriteAttributeStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::Status::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeOrder(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::Order::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeDescription(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::Description::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryVoltage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryVoltage::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryPercentRemaining(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryPercentRemaining::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryTimeRemaining(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryTimeRemaining::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryChargeLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryChargeLevel::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryChargeState(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryChargeState::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PowerSourceClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PowerSourceConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSourceConfiguration::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PressureMeasurement::Attributes::MeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PressureMeasurement::Attributes::MinMeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PressureMeasurement::Attributes::MaxMeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PressureMeasurement::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxPressure(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxPressure::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxSpeed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxSpeed::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxFlow(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxFlow::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinConstPressure(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinConstPressure::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxConstPressure(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxConstPressure::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinCompPressure(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinCompPressure::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxCompPressure(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxCompPressure::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinConstSpeed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinConstSpeed::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxConstSpeed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinConstFlow(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinConstFlow::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxConstFlow(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxConstFlow::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinConstTemp(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinConstTemp::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxConstTemp(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxConstTemp::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributePumpStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::PumpStatus::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeEffectiveOperationMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeEffectiveControlMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeCapacity(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Capacity::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeSpeed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Speed::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributePower(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Power::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeAlarmMask(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::AlarmMask::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::ClusterRevision::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::MeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeTolerance(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::Tolerance::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::ClusterRevision::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ScenesClusterTest::WriteAttributeSceneCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::SceneCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ScenesClusterTest::WriteAttributeCurrentScene(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::CurrentScene::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ScenesClusterTest::WriteAttributeCurrentGroup(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::CurrentGroup::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ScenesClusterTest::WriteAttributeSceneValid(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::SceneValid::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ScenesClusterTest::WriteAttributeNameSupport(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::NameSupport::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ScenesClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeCurrentHeapFree(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeCurrentHeapUsed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeCurrentHeapHighWatermark(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR SwitchClusterTest::WriteAttributeNumberOfPositions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::NumberOfPositions::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR SwitchClusterTest::WriteAttributeCurrentPosition(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::CurrentPosition::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR SwitchClusterTest::WriteAttributeMultiPressMax(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::MultiPressMax::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR SwitchClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR SwitchClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TvChannelClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TvChannel::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TargetNavigatorClusterTest::WriteAttributeCurrentNavigatorTarget(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TargetNavigator::Attributes::CurrentNavigatorTarget::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR TargetNavigatorClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TargetNavigator::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::MeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::MinMeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::MaxMeasuredValue::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeTolerance(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::Tolerance::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR TestClusterClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatClusterTest::WriteAttributeLocalTemperature(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::LocalTemperature::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMinHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::AbsMinHeatSetpointLimit::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMaxHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMinCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::AbsMinCoolSetpointLimit::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMaxCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeStartOfWeek(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::StartOfWeek::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeNumberOfWeeklyTransitions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::NumberOfWeeklyTransitions::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeNumberOfDailyTransitions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::NumberOfDailyTransitions::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThermostatClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThermostatUserInterfaceConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, + ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChannel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::Channel::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRoutingRole(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RoutingRole::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeNetworkName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::NetworkName::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePanId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::PanId::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeExtendedPanId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeMeshLocalPrefix(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::OverrunCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePartitionId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::PartitionId::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeWeighting(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::Weighting::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeDataVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::DataVersion::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeStableDataVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeLeaderRouterId(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeDetachedRoleCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChildRoleCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRouterRoleCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeLeaderRoleCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeAttachAttemptCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePartitionIdChangeCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeBetterPartitionAttachAttemptCount( + Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, + ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeParentChangeCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxTotalCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxUnicastCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBroadcastCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxAckRequestedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxAckedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxNoAckRequestedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDataCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxDataCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDataPollCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBeaconCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxOtherCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxRetryCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDirectMaxRetryExpiryCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, + ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxIndirectMaxRetryExpiryCount( + Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, + ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrCcaCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrAbortCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrBusyChannelCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxTotalCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxUnicastCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBroadcastCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDataCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxDataCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDataPollCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBeaconCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxOtherCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxAddressFilteredCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDestAddrFilteredCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDuplicatedCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrNoFrameCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrUnknownNeighborCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrInvalidSrcAddrCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrSecCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrFcsCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrOtherCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeActiveTimestamp(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePendingTimestamp(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeDelay(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::Delay::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChannelMask(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ChannelMask::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WakeOnLanClusterTest::WriteAttributeWakeOnLanMacAddress(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WakeOnLan::Attributes::WakeOnLanMacAddress::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WakeOnLanClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WakeOnLan::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeBssid(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::Bssid::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeSecurityType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::SecurityType::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeWiFiVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeChannelNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeRssi(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, int8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::Rssi::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeBeaconLostCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeBeaconRxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributePacketMulticastRxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributePacketMulticastTxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributePacketUnicastRxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributePacketUnicastTxCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeCurrentMaxRate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::Type::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionLift::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionTilt::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeConfigStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::ConfigStatus::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLiftPercentage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionLiftPercentage::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTiltPercentage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionTiltPercentage::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeOperationalStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::OperationalStatus::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeTargetPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeTargetPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeEndProductType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::EndProductType::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledOpenLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::InstalledOpenLimitLift::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledClosedLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::InstalledClosedLimitLift::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledOpenLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::InstalledOpenLimitTilt::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledClosedLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::InstalledClosedLimitTilt::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeSafetyStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::SafetyStatus::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::FeatureMap::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::ClusterRevision::Id), value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +} // namespace Controller +} // namespace chip diff --git a/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp index c991cb4d79a547..fd52718dda3633 100644 --- a/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp @@ -72,6 +72,15 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::Logout::Id: { + Commands::Logout::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfAccountLoginClusterLogoutCallback(apCommandObj, aCommandPath, commandData); + } + break; + } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); @@ -207,6 +216,15 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { + case Commands::HideApp::Id: { + Commands::HideApp::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfApplicationLauncherClusterHideAppCallback(apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::LaunchApp::Id: { Commands::LaunchApp::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -216,6 +234,15 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::StopApp::Id: { + Commands::StopApp::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfApplicationLauncherClusterStopAppCallback(apCommandObj, aCommandPath, commandData); + } + break; + } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); diff --git a/zzz_generated/tv-app/zap-generated/attribute-size.cpp b/zzz_generated/tv-app/zap-generated/attribute-size.cpp new file mode 100644 index 00000000000000..455380a3520a50 --- /dev/null +++ b/zzz_generated/tv-app/zap-generated/attribute-size.cpp @@ -0,0 +1,1022 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * 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. + */ + +// THIS FILE IS GENERATED BY ZAP + +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app::List; + +// The first 2 bytes specify the number of entries. A value of 0xFFFF means the list in invalid +// and data is undefined. +constexpr uint16_t kSizeLengthInBytes = 2u; + +void copyListMember(uint8_t * dest, uint8_t * src, bool write, uint16_t * offset, uint16_t length) +{ + if (write) + { + memmove(dest + *offset, src, length); + } + else + { + memmove(dest, src + *offset, length); + } + + *offset = static_cast(*offset + length); +} + +uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, bool write, uint8_t * dest, uint8_t * src, + int32_t index) +{ + if (index == -1) + { + memmove(dest, src, am->size); + return am->size; + } + + if (index == 0) + { + if (write) + { + // src is a pointer to native-endian uint16_t, dest is pointer to buffer that should hold little-endian value + emberAfCopyInt16u(dest, 0, *reinterpret_cast(src)); + } + else + { + // src is pointer to buffer holding little-endian value, dest is a pointer to native-endian uint16_t + *reinterpret_cast(dest) = emberAfGetInt16u(src, 0, kSizeLengthInBytes); + } + return kSizeLengthInBytes; + } + + if (!CanCastTo(index)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Should be between 1 and 65534", index); + return 0; + } + + uint16_t entryLength = 0; + switch (clusterId) + { + case 0x050D: // Application Basic Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0007: // allowed vendor list + { + entryLength = 2; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // INT16U + break; + } + } + break; + } + 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 %" PRId32 " 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 %" PRId32 " 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 + ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING + ByteSpan * nameSpan = &nameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } + case 0x050A: // Content Launcher Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // accepts header list + { + entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); + if (entryOffset == 0) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + + 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 %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + + if (!CanCastTo(acceptsHeaderListSpan->size())) + { + ChipLogError(Zcl, "Span size %zu is too large", acceptsHeaderListSpan->size()); + return 0; + } + entryLength = static_cast(acceptsHeaderListSpan->size()); + break; + } + } + break; + } + case 0x001D: // Descriptor Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // device list + { + entryLength = 6; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _DeviceType + _DeviceType * entry = reinterpret_cast<_DeviceType *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->type, write ? (uint8_t *) &entry->type : src, write, &entryOffset, + sizeof(entry->type)); // DEVTYPE_ID + copyListMember(write ? dest : (uint8_t *) &entry->revision, write ? (uint8_t *) &entry->revision : src, write, + &entryOffset, sizeof(entry->revision)); // INT16U + break; + } + case 0x0001: // server list + { + entryLength = 4; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // CLUSTER_ID + break; + } + case 0x0002: // client list + { + entryLength = 4; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // CLUSTER_ID + break; + } + case 0x0003: // parts list + { + entryLength = 2; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ENDPOINT_NO + break; + } + } + break; + } + case 0x0030: // General Commissioning Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0001: // BasicCommissioningInfoList + { + entryLength = 4; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _BasicCommissioningInfoType + _BasicCommissioningInfoType * entry = reinterpret_cast<_BasicCommissioningInfoType *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->FailSafeExpiryLengthMs, + write ? (uint8_t *) &entry->FailSafeExpiryLengthMs : src, write, &entryOffset, + sizeof(entry->FailSafeExpiryLengthMs)); // INT32U + break; + } + } + break; + } + case 0x0033: // General Diagnostics Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // NetworkInterfaces + { + entryLength = 48; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _NetworkInterfaceType + _NetworkInterfaceType * entry = reinterpret_cast<_NetworkInterfaceType *>(write ? src : dest); + ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING + ByteSpan * NameSpan = &NameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + copyListMember(write ? dest : (uint8_t *) &entry->FabricConnected, write ? (uint8_t *) &entry->FabricConnected : src, + write, &entryOffset, sizeof(entry->FabricConnected)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv4, + write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv4 : src, write, &entryOffset, + sizeof(entry->OffPremiseServicesReachableIPv4)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6, + write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv6 : src, write, &entryOffset, + sizeof(entry->OffPremiseServicesReachableIPv6)); // BOOLEAN + ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan) + : ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 10); + copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset, + sizeof(entry->Type)); // InterfaceType + break; + } + case 0x0005: // ActiveHardwareFaults + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 + break; + } + case 0x0006: // ActiveRadioFaults + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 + break; + } + case 0x0007: // ActiveNetworkFaults + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 + break; + } + } + break; + } + case 0x003F: // Group Key Management Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // groups + { + entryLength = 6; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _GroupState + _GroupState * entry = reinterpret_cast<_GroupState *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, + &entryOffset, sizeof(entry->VendorId)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->VendorGroupId, write ? (uint8_t *) &entry->VendorGroupId : src, write, + &entryOffset, sizeof(entry->VendorGroupId)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySetIndex, write ? (uint8_t *) &entry->GroupKeySetIndex : src, + write, &entryOffset, sizeof(entry->GroupKeySetIndex)); // INT16U + break; + } + case 0x0001: // group keys + { + entryLength = 31; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _GroupKey + _GroupKey * entry = reinterpret_cast<_GroupKey *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, + &entryOffset, sizeof(entry->VendorId)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyIndex, write ? (uint8_t *) &entry->GroupKeyIndex : src, write, + &entryOffset, sizeof(entry->GroupKeyIndex)); // INT16U + ByteSpan * GroupKeyRootSpan = &entry->GroupKeyRoot; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 18, GroupKeyRootSpan) + : ReadByteSpan(src + entryOffset, 18, GroupKeyRootSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 18); + copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyEpochStartTime, + write ? (uint8_t *) &entry->GroupKeyEpochStartTime : src, write, &entryOffset, + sizeof(entry->GroupKeyEpochStartTime)); // INT64U + copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySecurityPolicy, + write ? (uint8_t *) &entry->GroupKeySecurityPolicy : src, write, &entryOffset, + sizeof(entry->GroupKeySecurityPolicy)); // GroupKeySecurityPolicy + break; + } + } + 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 %" PRId32 " 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 + ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING + ByteSpan * nameSpan = &nameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + ByteSpan descriptionSpanStorage(Uint8::from_const_char(entry->description.data()), + entry->description.size()); // CHAR_STRING + ByteSpan * descriptionSpan = &descriptionSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, descriptionSpan) + : ReadByteSpan(src + entryOffset, 34, descriptionSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } + case 0x003E: // Operational Credentials Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0001: // fabrics list + { + entryLength = 120; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _FabricDescriptor + _FabricDescriptor * entry = reinterpret_cast<_FabricDescriptor *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->FabricIndex, write ? (uint8_t *) &entry->FabricIndex : src, write, + &entryOffset, sizeof(entry->FabricIndex)); // INT8U + ByteSpan * RootPublicKeySpan = &entry->RootPublicKey; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 67, RootPublicKeySpan) + : ReadByteSpan(src + entryOffset, 67, RootPublicKeySpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 67); + copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, + &entryOffset, sizeof(entry->VendorId)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->FabricId, write ? (uint8_t *) &entry->FabricId : src, write, + &entryOffset, sizeof(entry->FabricId)); // FABRIC_ID + copyListMember(write ? dest : (uint8_t *) &entry->NodeId, write ? (uint8_t *) &entry->NodeId : src, write, &entryOffset, + sizeof(entry->NodeId)); // NODE_ID + ByteSpan LabelSpanStorage(Uint8::from_const_char(entry->Label.data()), entry->Label.size()); // CHAR_STRING + ByteSpan * LabelSpan = &LabelSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, LabelSpan) : ReadByteSpan(src + entryOffset, 34, LabelSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + case 0x0004: // TrustedRootCertificates + { + entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); + if (entryOffset == 0) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + + ByteSpan * trustedRootCertificatesSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING + uint16_t trustedRootCertificatesRemainingSpace = static_cast(am->size - entryOffset); + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, trustedRootCertificatesRemainingSpace, trustedRootCertificatesSpan) + : ReadByteSpan(src + entryOffset, trustedRootCertificatesRemainingSpace, trustedRootCertificatesSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + + if (!CanCastTo(trustedRootCertificatesSpan->size())) + { + ChipLogError(Zcl, "Span size %zu is too large", trustedRootCertificatesSpan->size()); + return 0; + } + entryLength = static_cast(trustedRootCertificatesSpan->size()); + break; + } + } + break; + } + case 0x0034: // Software Diagnostics Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // ThreadMetrics + { + entryLength = 30; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _ThreadMetrics + _ThreadMetrics * entry = reinterpret_cast<_ThreadMetrics *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->Id, write ? (uint8_t *) &entry->Id : src, write, &entryOffset, + sizeof(entry->Id)); // INT64U + ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING + ByteSpan * NameSpan = &NameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 10, NameSpan) : ReadByteSpan(src + entryOffset, 10, NameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 10); + copyListMember(write ? dest : (uint8_t *) &entry->StackFreeCurrent, write ? (uint8_t *) &entry->StackFreeCurrent : src, + write, &entryOffset, sizeof(entry->StackFreeCurrent)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->StackFreeMinimum, write ? (uint8_t *) &entry->StackFreeMinimum : src, + write, &entryOffset, sizeof(entry->StackFreeMinimum)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->StackSize, write ? (uint8_t *) &entry->StackSize : src, write, + &entryOffset, sizeof(entry->StackSize)); // INT32U + break; + } + } + break; + } + case 0x0504: // TV Channel Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // channel list + { + entryLength = 106; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " 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 + ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING + ByteSpan * nameSpan = &nameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + ByteSpan callSignSpanStorage(Uint8::from_const_char(entry->callSign.data()), entry->callSign.size()); // CHAR_STRING + ByteSpan * callSignSpan = &callSignSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, callSignSpan) : ReadByteSpan(src + entryOffset, 34, callSignSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + ByteSpan affiliateCallSignSpanStorage(Uint8::from_const_char(entry->affiliateCallSign.data()), + entry->affiliateCallSign.size()); // CHAR_STRING + ByteSpan * affiliateCallSignSpan = &affiliateCallSignSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, affiliateCallSignSpan) + : ReadByteSpan(src + entryOffset, 34, affiliateCallSignSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " 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 %" PRId32 " 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 + ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING + ByteSpan * nameSpan = &nameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " 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; + switch (am->attributeId) + { + case 0x0007: // NeighborTableList + { + entryLength = 31; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _NeighborTable + _NeighborTable * entry = reinterpret_cast<_NeighborTable *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->ExtAddress, write ? (uint8_t *) &entry->ExtAddress : src, write, + &entryOffset, sizeof(entry->ExtAddress)); // INT64U + copyListMember(write ? dest : (uint8_t *) &entry->Age, write ? (uint8_t *) &entry->Age : src, write, &entryOffset, + sizeof(entry->Age)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->Rloc16, write ? (uint8_t *) &entry->Rloc16 : src, write, &entryOffset, + sizeof(entry->Rloc16)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->LinkFrameCounter, write ? (uint8_t *) &entry->LinkFrameCounter : src, + write, &entryOffset, sizeof(entry->LinkFrameCounter)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->MleFrameCounter, write ? (uint8_t *) &entry->MleFrameCounter : src, + write, &entryOffset, sizeof(entry->MleFrameCounter)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->LQI, write ? (uint8_t *) &entry->LQI : src, write, &entryOffset, + sizeof(entry->LQI)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->AverageRssi, write ? (uint8_t *) &entry->AverageRssi : src, write, + &entryOffset, sizeof(entry->AverageRssi)); // INT8S + copyListMember(write ? dest : (uint8_t *) &entry->LastRssi, write ? (uint8_t *) &entry->LastRssi : src, write, + &entryOffset, sizeof(entry->LastRssi)); // INT8S + copyListMember(write ? dest : (uint8_t *) &entry->FrameErrorRate, write ? (uint8_t *) &entry->FrameErrorRate : src, + write, &entryOffset, sizeof(entry->FrameErrorRate)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->MessageErrorRate, write ? (uint8_t *) &entry->MessageErrorRate : src, + write, &entryOffset, sizeof(entry->MessageErrorRate)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->RxOnWhenIdle, write ? (uint8_t *) &entry->RxOnWhenIdle : src, write, + &entryOffset, sizeof(entry->RxOnWhenIdle)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->FullThreadDevice, write ? (uint8_t *) &entry->FullThreadDevice : src, + write, &entryOffset, sizeof(entry->FullThreadDevice)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->FullNetworkData, write ? (uint8_t *) &entry->FullNetworkData : src, + write, &entryOffset, sizeof(entry->FullNetworkData)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->IsChild, write ? (uint8_t *) &entry->IsChild : src, write, + &entryOffset, sizeof(entry->IsChild)); // BOOLEAN + break; + } + case 0x0008: // RouteTableList + { + entryLength = 18; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _RouteTable + _RouteTable * entry = reinterpret_cast<_RouteTable *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->ExtAddress, write ? (uint8_t *) &entry->ExtAddress : src, write, + &entryOffset, sizeof(entry->ExtAddress)); // INT64U + copyListMember(write ? dest : (uint8_t *) &entry->Rloc16, write ? (uint8_t *) &entry->Rloc16 : src, write, &entryOffset, + sizeof(entry->Rloc16)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->RouterId, write ? (uint8_t *) &entry->RouterId : src, write, + &entryOffset, sizeof(entry->RouterId)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->NextHop, write ? (uint8_t *) &entry->NextHop : src, write, + &entryOffset, sizeof(entry->NextHop)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->PathCost, write ? (uint8_t *) &entry->PathCost : src, write, + &entryOffset, sizeof(entry->PathCost)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->LQIIn, write ? (uint8_t *) &entry->LQIIn : src, write, &entryOffset, + sizeof(entry->LQIIn)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->LQIOut, write ? (uint8_t *) &entry->LQIOut : src, write, &entryOffset, + sizeof(entry->LQIOut)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->Age, write ? (uint8_t *) &entry->Age : src, write, &entryOffset, + sizeof(entry->Age)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->Allocated, write ? (uint8_t *) &entry->Allocated : src, write, + &entryOffset, sizeof(entry->Allocated)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->LinkEstablished, write ? (uint8_t *) &entry->LinkEstablished : src, + write, &entryOffset, sizeof(entry->LinkEstablished)); // BOOLEAN + break; + } + case 0x003B: // SecurityPolicy + { + entryLength = 4; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _SecurityPolicy + _SecurityPolicy * entry = reinterpret_cast<_SecurityPolicy *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->RotationTime, write ? (uint8_t *) &entry->RotationTime : src, write, + &entryOffset, sizeof(entry->RotationTime)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->Flags, write ? (uint8_t *) &entry->Flags : src, write, &entryOffset, + sizeof(entry->Flags)); // BITMAP16 + break; + } + case 0x003D: // OperationalDatasetComponents + { + entryLength = 12; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _OperationalDatasetComponents + _OperationalDatasetComponents * entry = reinterpret_cast<_OperationalDatasetComponents *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->ActiveTimestampPresent, + write ? (uint8_t *) &entry->ActiveTimestampPresent : src, write, &entryOffset, + sizeof(entry->ActiveTimestampPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->PendingTimestampPresent, + write ? (uint8_t *) &entry->PendingTimestampPresent : src, write, &entryOffset, + sizeof(entry->PendingTimestampPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->MasterKeyPresent, write ? (uint8_t *) &entry->MasterKeyPresent : src, + write, &entryOffset, sizeof(entry->MasterKeyPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->NetworkNamePresent, + write ? (uint8_t *) &entry->NetworkNamePresent : src, write, &entryOffset, + sizeof(entry->NetworkNamePresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->ExtendedPanIdPresent, + write ? (uint8_t *) &entry->ExtendedPanIdPresent : src, write, &entryOffset, + sizeof(entry->ExtendedPanIdPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->MeshLocalPrefixPresent, + write ? (uint8_t *) &entry->MeshLocalPrefixPresent : src, write, &entryOffset, + sizeof(entry->MeshLocalPrefixPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->DelayPresent, write ? (uint8_t *) &entry->DelayPresent : src, write, + &entryOffset, sizeof(entry->DelayPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->PanIdPresent, write ? (uint8_t *) &entry->PanIdPresent : src, write, + &entryOffset, sizeof(entry->PanIdPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->ChannelPresent, write ? (uint8_t *) &entry->ChannelPresent : src, + write, &entryOffset, sizeof(entry->ChannelPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->PskcPresent, write ? (uint8_t *) &entry->PskcPresent : src, write, + &entryOffset, sizeof(entry->PskcPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->SecurityPolicyPresent, + write ? (uint8_t *) &entry->SecurityPolicyPresent : src, write, &entryOffset, + sizeof(entry->SecurityPolicyPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->ChannelMaskPresent, + write ? (uint8_t *) &entry->ChannelMaskPresent : src, write, &entryOffset, + sizeof(entry->ChannelMaskPresent)); // BOOLEAN + break; + } + case 0x003E: // ActiveNetworkFaultsList + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // NetworkFault + break; + } + } + break; + } + } + + return entryLength; +} + +// A list is a collection of entries of the same data type. The data type may be any defined data type. +uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attributeId, const uint8_t * buffer) +{ + // The first 2 bytes specify the number of entries. A value of 0xFFFF means the list in invalid + // and data is undefined. + uint16_t entryCount = emberAfGetInt16u(buffer, 0, kSizeLengthInBytes); + if (entryCount == 0xFFFF) + { + return 0; + } + + uint16_t entryLength = 0; + switch (clusterId) + { + case 0x050D: // Application Basic Cluster + switch (attributeId) + { + case 0x0007: // allowed vendor list + // uint16_t + entryLength = 2; + break; + } + break; + 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 Launcher Cluster + switch (attributeId) + { + case 0x0000: // accepts header list + // chip::ByteSpan + return GetByteSpanOffsetFromIndex(buffer, 256, entryCount); + break; + } + break; + case 0x001D: // Descriptor Cluster + switch (attributeId) + { + case 0x0000: // device list + // Struct _DeviceType + entryLength = 6; + break; + case 0x0001: // server list + // chip::ClusterId + entryLength = 4; + break; + case 0x0002: // client list + // chip::ClusterId + entryLength = 4; + break; + case 0x0003: // parts list + // chip::EndpointId + entryLength = 2; + break; + } + break; + case 0x0030: // General Commissioning Cluster + switch (attributeId) + { + case 0x0001: // BasicCommissioningInfoList + // Struct _BasicCommissioningInfoType + entryLength = 4; + break; + } + break; + case 0x0033: // General Diagnostics Cluster + switch (attributeId) + { + case 0x0000: // NetworkInterfaces + // Struct _NetworkInterfaceType + entryLength = 48; + break; + case 0x0005: // ActiveHardwareFaults + // uint8_t + entryLength = 1; + break; + case 0x0006: // ActiveRadioFaults + // uint8_t + entryLength = 1; + break; + case 0x0007: // ActiveNetworkFaults + // uint8_t + entryLength = 1; + break; + } + break; + case 0x003F: // Group Key Management Cluster + switch (attributeId) + { + case 0x0000: // groups + // Struct _GroupState + entryLength = 6; + break; + case 0x0001: // group keys + // Struct _GroupKey + entryLength = 31; + break; + } + break; + case 0x0507: // Media Input Cluster + switch (attributeId) + { + case 0x0000: // media input list + // Struct _MediaInputInfo + entryLength = 70; + break; + } + break; + case 0x003E: // Operational Credentials Cluster + switch (attributeId) + { + case 0x0001: // fabrics list + // Struct _FabricDescriptor + entryLength = 120; + break; + case 0x0004: // TrustedRootCertificates + // chip::ByteSpan + return GetByteSpanOffsetFromIndex(buffer, 402, entryCount); + break; + } + break; + case 0x0034: // Software Diagnostics Cluster + switch (attributeId) + { + case 0x0000: // ThreadMetrics + // Struct _ThreadMetrics + entryLength = 30; + break; + } + break; + case 0x0504: // TV Channel Cluster + switch (attributeId) + { + case 0x0000: // 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) + { + case 0x0007: // NeighborTableList + // Struct _NeighborTable + entryLength = 31; + break; + case 0x0008: // RouteTableList + // Struct _RouteTable + entryLength = 18; + break; + case 0x003B: // SecurityPolicy + // Struct _SecurityPolicy + entryLength = 4; + break; + case 0x003D: // OperationalDatasetComponents + // Struct _OperationalDatasetComponents + entryLength = 12; + break; + case 0x003E: // ActiveNetworkFaultsList + // uint8_t + entryLength = 1; + break; + } + break; + } + + uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); + if (!CanCastTo(totalSize)) + { + ChipLogError(Zcl, "Cluster " ChipLogFormatMEI ": Size of attribute " ChipLogFormatMEI " is too large.", + ChipLogValueMEI(clusterId), ChipLogValueMEI(attributeId)); + return 0; + } + + return static_cast(totalSize); +} diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 2ee440f77a9a4c..cb1c8cb49abd42 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -302,7 +302,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ \ - /* 1107 - tv channel list, */ \ + /* 1107 - 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, \ @@ -372,25 +372,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2123 - 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, \ + /* 2123 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2377 - application launcher list, */ \ + /* 2127 - 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, \ @@ -408,7 +395,7 @@ \ /* Endpoint: 2, Cluster: Audio Output (server), big-endian */ \ \ - /* 2631 - audio output list, */ \ + /* 2381 - 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, \ @@ -426,30 +413,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), big-endian */ \ \ - /* 2885 - start time, */ \ + /* 2635 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 2893 - duration, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 2901 - position updated at, */ \ + /* 2643 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2909 - position, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 2917 - playback speed, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 2651 - playback speed, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ - /* 2925 - seek range end, */ \ + /* 2655 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2933 - seek range start, */ \ + /* 2663 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2941 - accepts header list, */ \ + /* 2671 - accepts header 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, \ @@ -465,25 +446,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3195 - 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, \ + /* 2925 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), big-endian */ \ \ - /* 3449 - accepts header list, */ \ + /* 2929 - accepts header 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, \ @@ -499,21 +467,8 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3703 - 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, \ + /* 3183 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ } #else // !BIGENDIAN_CPU @@ -795,7 +750,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ \ - /* 1107 - tv channel list, */ \ + /* 1107 - 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, \ @@ -865,25 +820,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2123 - 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, \ + /* 2123 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2377 - application launcher list, */ \ + /* 2127 - 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, \ @@ -901,7 +843,7 @@ \ /* Endpoint: 2, Cluster: Audio Output (server), little-endian */ \ \ - /* 2631 - audio output list, */ \ + /* 2381 - 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, \ @@ -919,30 +861,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), little-endian */ \ \ - /* 2885 - start time, */ \ + /* 2635 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2893 - duration, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 2901 - position updated at, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 2909 - position, */ \ + /* 2643 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2917 - playback speed, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 2651 - playback speed, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ - /* 2925 - seek range end, */ \ + /* 2655 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2933 - seek range start, */ \ + /* 2663 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2941 - accepts header list, */ \ + /* 2671 - accepts header 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, \ @@ -958,25 +894,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3195 - 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, \ + /* 2925 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), little-endian */ \ \ - /* 3449 - accepts header list, */ \ + /* 2929 - accepts header 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, \ @@ -992,26 +915,13 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3703 - 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, \ + /* 3183 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (90) +#define GENERATED_DEFAULTS_COUNT (88) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1044,7 +954,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 267 +#define GENERATED_ATTRIBUTE_COUNT 263 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1269,13 +1179,16 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1107) }, /* tv channel list */ \ - { 0x0001, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* tv channel lineup */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* current tv channel */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1107) }, /* channel list */ \ + { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ + { 0x0002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* current channel */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1361) }, /* target navigator list */ \ + { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* current navigator target */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ @@ -1291,14 +1204,15 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1869) }, /* accepts header list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2123) }, /* supported streaming types */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(2123) }, /* supported streaming protocols */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2377) }, /* 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) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2127) }, /* application launcher list */ \ + { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* application launcher app */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ @@ -1335,7 +1249,7 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2631) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2381) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1348,28 +1262,28 @@ \ /* Endpoint: 3, 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(2885) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2893) }, /* duration */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2901) }, /* position updated at */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2909) }, /* position */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2917) }, /* playback speed */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2925) }, /* seek range end */ \ - { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2933) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2635) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2643) }, /* duration */ \ + { 0x0003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* position */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2651) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2655) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2663) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2941) }, /* accepts header list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3195) }, /* supported streaming types */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2671) }, /* accepts header list */ \ + { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(2925) }, /* supported streaming protocols */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* 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 status */ \ + { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Account Login (server) */ \ @@ -1383,18 +1297,18 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3449) }, /* accepts header list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3703) }, /* supported streaming types */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2929) }, /* accepts header list */ \ + { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(3183) }, /* supported streaming protocols */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* 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 status */ \ + { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 5, Cluster: Descriptor (server) */ \ @@ -1409,9 +1323,8 @@ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* 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 status */ \ + { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } @@ -1503,25 +1416,25 @@ 0x0503, ZAP_ATTRIBUTE_INDEX(167), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(169), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(169), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(173), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(173), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(175), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(176), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(178), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(179), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(179), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(180), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(180), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(181), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(183), 4, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(184), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { 0x0006, \ ZAP_ATTRIBUTE_INDEX(187), \ @@ -1545,31 +1458,31 @@ 0x001D, ZAP_ATTRIBUTE_INDEX(212), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(217), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(217), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(226), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(225), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(229), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(228), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(237), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(238), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(236), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(243), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(241), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(246), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(244), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(254), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(251), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(259), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(256), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } @@ -1578,8 +1491,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 19, 1905 }, { ZAP_CLUSTER_INDEX(19), 10, 1645 }, { ZAP_CLUSTER_INDEX(29), 4, 283 }, \ - { ZAP_CLUSTER_INDEX(33), 5, 679 }, { ZAP_CLUSTER_INDEX(38), 3, 618 }, { ZAP_CLUSTER_INDEX(41), 2, 108 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 1905 }, { ZAP_CLUSTER_INDEX(19), 10, 1328 }, { ZAP_CLUSTER_INDEX(29), 4, 283 }, \ + { ZAP_CLUSTER_INDEX(33), 5, 407 }, { ZAP_CLUSTER_INDEX(38), 3, 366 }, { ZAP_CLUSTER_INDEX(41), 2, 106 }, \ } // Largest attribute size is needed for various buffers @@ -1589,7 +1502,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (686) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (5238) +#define ATTRIBUTE_MAX_SIZE (4395) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-casting-app/zap-generated/attribute-size.cpp b/zzz_generated/tv-casting-app/zap-generated/attribute-size.cpp new file mode 100644 index 00000000000000..f23dd96d4c3c84 --- /dev/null +++ b/zzz_generated/tv-casting-app/zap-generated/attribute-size.cpp @@ -0,0 +1,1158 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * 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. + */ + +// THIS FILE IS GENERATED BY ZAP + +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app::List; + +// The first 2 bytes specify the number of entries. A value of 0xFFFF means the list in invalid +// and data is undefined. +constexpr uint16_t kSizeLengthInBytes = 2u; + +void copyListMember(uint8_t * dest, uint8_t * src, bool write, uint16_t * offset, uint16_t length) +{ + if (write) + { + memmove(dest + *offset, src, length); + } + else + { + memmove(dest, src + *offset, length); + } + + *offset = static_cast(*offset + length); +} + +uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, bool write, uint8_t * dest, uint8_t * src, + int32_t index) +{ + if (index == -1) + { + memmove(dest, src, am->size); + return am->size; + } + + if (index == 0) + { + if (write) + { + // src is a pointer to native-endian uint16_t, dest is pointer to buffer that should hold little-endian value + emberAfCopyInt16u(dest, 0, *reinterpret_cast(src)); + } + else + { + // src is pointer to buffer holding little-endian value, dest is a pointer to native-endian uint16_t + *reinterpret_cast(dest) = emberAfGetInt16u(src, 0, kSizeLengthInBytes); + } + return kSizeLengthInBytes; + } + + if (!CanCastTo(index)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Should be between 1 and 65534", index); + return 0; + } + + uint16_t entryLength = 0; + switch (clusterId) + { + case 0x050D: // Application Basic Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0007: // allowed vendor list + { + entryLength = 2; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // INT16U + break; + } + } + break; + } + 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 %" PRId32 " 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 %" PRId32 " 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 + ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING + ByteSpan * nameSpan = &nameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } + case 0x050A: // Content Launcher Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // accepts header list + { + entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); + if (entryOffset == 0) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + + 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 %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + + if (!CanCastTo(acceptsHeaderListSpan->size())) + { + ChipLogError(Zcl, "Span size %zu is too large", acceptsHeaderListSpan->size()); + return 0; + } + entryLength = static_cast(acceptsHeaderListSpan->size()); + break; + } + } + break; + } + case 0x001D: // Descriptor Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // device list + { + entryLength = 6; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _DeviceType + _DeviceType * entry = reinterpret_cast<_DeviceType *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->type, write ? (uint8_t *) &entry->type : src, write, &entryOffset, + sizeof(entry->type)); // DEVTYPE_ID + copyListMember(write ? dest : (uint8_t *) &entry->revision, write ? (uint8_t *) &entry->revision : src, write, + &entryOffset, sizeof(entry->revision)); // INT16U + break; + } + case 0x0001: // server list + { + entryLength = 4; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // CLUSTER_ID + break; + } + case 0x0002: // client list + { + entryLength = 4; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // CLUSTER_ID + break; + } + case 0x0003: // parts list + { + entryLength = 2; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ENDPOINT_NO + break; + } + } + break; + } + case 0x0040: // Fixed Label Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // label list + { + entryLength = 36; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _LabelStruct + _LabelStruct * entry = reinterpret_cast<_LabelStruct *>(write ? src : dest); + ByteSpan labelSpanStorage(Uint8::from_const_char(entry->label.data()), entry->label.size()); // CHAR_STRING + ByteSpan * labelSpan = &labelSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 18, labelSpan) : ReadByteSpan(src + entryOffset, 18, labelSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 18); + ByteSpan valueSpanStorage(Uint8::from_const_char(entry->value.data()), entry->value.size()); // CHAR_STRING + ByteSpan * valueSpan = &valueSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 18, valueSpan) : ReadByteSpan(src + entryOffset, 18, valueSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 18); + break; + } + } + break; + } + case 0x0030: // General Commissioning Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0001: // BasicCommissioningInfoList + { + entryLength = 4; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _BasicCommissioningInfoType + _BasicCommissioningInfoType * entry = reinterpret_cast<_BasicCommissioningInfoType *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->FailSafeExpiryLengthMs, + write ? (uint8_t *) &entry->FailSafeExpiryLengthMs : src, write, &entryOffset, + sizeof(entry->FailSafeExpiryLengthMs)); // INT32U + break; + } + } + break; + } + case 0x0033: // General Diagnostics Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // NetworkInterfaces + { + entryLength = 48; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _NetworkInterfaceType + _NetworkInterfaceType * entry = reinterpret_cast<_NetworkInterfaceType *>(write ? src : dest); + ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING + ByteSpan * NameSpan = &NameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + copyListMember(write ? dest : (uint8_t *) &entry->FabricConnected, write ? (uint8_t *) &entry->FabricConnected : src, + write, &entryOffset, sizeof(entry->FabricConnected)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv4, + write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv4 : src, write, &entryOffset, + sizeof(entry->OffPremiseServicesReachableIPv4)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6, + write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv6 : src, write, &entryOffset, + sizeof(entry->OffPremiseServicesReachableIPv6)); // BOOLEAN + ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan) + : ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 10); + copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset, + sizeof(entry->Type)); // InterfaceType + break; + } + case 0x0005: // ActiveHardwareFaults + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 + break; + } + case 0x0006: // ActiveRadioFaults + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 + break; + } + case 0x0007: // ActiveNetworkFaults + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 + break; + } + } + break; + } + case 0x003F: // Group Key Management Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // groups + { + entryLength = 6; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _GroupState + _GroupState * entry = reinterpret_cast<_GroupState *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, + &entryOffset, sizeof(entry->VendorId)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->VendorGroupId, write ? (uint8_t *) &entry->VendorGroupId : src, write, + &entryOffset, sizeof(entry->VendorGroupId)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySetIndex, write ? (uint8_t *) &entry->GroupKeySetIndex : src, + write, &entryOffset, sizeof(entry->GroupKeySetIndex)); // INT16U + break; + } + case 0x0001: // group keys + { + entryLength = 31; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _GroupKey + _GroupKey * entry = reinterpret_cast<_GroupKey *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, + &entryOffset, sizeof(entry->VendorId)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyIndex, write ? (uint8_t *) &entry->GroupKeyIndex : src, write, + &entryOffset, sizeof(entry->GroupKeyIndex)); // INT16U + ByteSpan * GroupKeyRootSpan = &entry->GroupKeyRoot; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 18, GroupKeyRootSpan) + : ReadByteSpan(src + entryOffset, 18, GroupKeyRootSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 18); + copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyEpochStartTime, + write ? (uint8_t *) &entry->GroupKeyEpochStartTime : src, write, &entryOffset, + sizeof(entry->GroupKeyEpochStartTime)); // INT64U + copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySecurityPolicy, + write ? (uint8_t *) &entry->GroupKeySecurityPolicy : src, write, &entryOffset, + sizeof(entry->GroupKeySecurityPolicy)); // GroupKeySecurityPolicy + break; + } + } + 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 %" PRId32 " 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 + ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING + ByteSpan * nameSpan = &nameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + ByteSpan descriptionSpanStorage(Uint8::from_const_char(entry->description.data()), + entry->description.size()); // CHAR_STRING + ByteSpan * descriptionSpan = &descriptionSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, descriptionSpan) + : ReadByteSpan(src + entryOffset, 34, descriptionSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } + case 0x003E: // Operational Credentials Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0001: // fabrics list + { + entryLength = 120; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _FabricDescriptor + _FabricDescriptor * entry = reinterpret_cast<_FabricDescriptor *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->FabricIndex, write ? (uint8_t *) &entry->FabricIndex : src, write, + &entryOffset, sizeof(entry->FabricIndex)); // INT8U + ByteSpan * RootPublicKeySpan = &entry->RootPublicKey; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 67, RootPublicKeySpan) + : ReadByteSpan(src + entryOffset, 67, RootPublicKeySpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 67); + copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, + &entryOffset, sizeof(entry->VendorId)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->FabricId, write ? (uint8_t *) &entry->FabricId : src, write, + &entryOffset, sizeof(entry->FabricId)); // FABRIC_ID + copyListMember(write ? dest : (uint8_t *) &entry->NodeId, write ? (uint8_t *) &entry->NodeId : src, write, &entryOffset, + sizeof(entry->NodeId)); // NODE_ID + ByteSpan LabelSpanStorage(Uint8::from_const_char(entry->Label.data()), entry->Label.size()); // CHAR_STRING + ByteSpan * LabelSpan = &LabelSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, LabelSpan) : ReadByteSpan(src + entryOffset, 34, LabelSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + case 0x0004: // TrustedRootCertificates + { + entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); + if (entryOffset == 0) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + + ByteSpan * trustedRootCertificatesSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING + uint16_t trustedRootCertificatesRemainingSpace = static_cast(am->size - entryOffset); + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, trustedRootCertificatesRemainingSpace, trustedRootCertificatesSpan) + : ReadByteSpan(src + entryOffset, trustedRootCertificatesRemainingSpace, trustedRootCertificatesSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + + if (!CanCastTo(trustedRootCertificatesSpan->size())) + { + ChipLogError(Zcl, "Span size %zu is too large", trustedRootCertificatesSpan->size()); + return 0; + } + entryLength = static_cast(trustedRootCertificatesSpan->size()); + break; + } + } + break; + } + case 0x0034: // Software Diagnostics Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // ThreadMetrics + { + entryLength = 30; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _ThreadMetrics + _ThreadMetrics * entry = reinterpret_cast<_ThreadMetrics *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->Id, write ? (uint8_t *) &entry->Id : src, write, &entryOffset, + sizeof(entry->Id)); // INT64U + ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING + ByteSpan * NameSpan = &NameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 10, NameSpan) : ReadByteSpan(src + entryOffset, 10, NameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 10); + copyListMember(write ? dest : (uint8_t *) &entry->StackFreeCurrent, write ? (uint8_t *) &entry->StackFreeCurrent : src, + write, &entryOffset, sizeof(entry->StackFreeCurrent)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->StackFreeMinimum, write ? (uint8_t *) &entry->StackFreeMinimum : src, + write, &entryOffset, sizeof(entry->StackFreeMinimum)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->StackSize, write ? (uint8_t *) &entry->StackSize : src, write, + &entryOffset, sizeof(entry->StackSize)); // INT32U + break; + } + } + break; + } + case 0x0504: // TV Channel Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // channel list + { + entryLength = 106; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " 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 + ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING + ByteSpan * nameSpan = &nameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + ByteSpan callSignSpanStorage(Uint8::from_const_char(entry->callSign.data()), entry->callSign.size()); // CHAR_STRING + ByteSpan * callSignSpan = &callSignSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, callSignSpan) : ReadByteSpan(src + entryOffset, 34, callSignSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + ByteSpan affiliateCallSignSpanStorage(Uint8::from_const_char(entry->affiliateCallSign.data()), + entry->affiliateCallSign.size()); // CHAR_STRING + ByteSpan * affiliateCallSignSpan = &affiliateCallSignSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, affiliateCallSignSpan) + : ReadByteSpan(src + entryOffset, 34, affiliateCallSignSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " 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 %" PRId32 " 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 + ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING + ByteSpan * nameSpan = &nameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + break; + } + } + break; + } + case 0x050F: // Test Cluster Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x001A: // list_int8u + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // INT8U + break; + } + case 0x001B: // list_octet_string + { + entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); + if (entryOffset == 0) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + + ByteSpan * listOctetStringSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING + uint16_t listOctetStringRemainingSpace = static_cast(am->size - entryOffset); + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, listOctetStringRemainingSpace, listOctetStringSpan) + : ReadByteSpan(src + entryOffset, listOctetStringRemainingSpace, listOctetStringSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + + if (!CanCastTo(listOctetStringSpan->size())) + { + ChipLogError(Zcl, "Span size %zu is too large", listOctetStringSpan->size()); + return 0; + } + entryLength = static_cast(listOctetStringSpan->size()); + break; + } + case 0x001C: // list_struct_octet_string + { + entryLength = 42; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _TestListStructOctet + _TestListStructOctet * entry = reinterpret_cast<_TestListStructOctet *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->fabricIndex, write ? (uint8_t *) &entry->fabricIndex : src, write, + &entryOffset, sizeof(entry->fabricIndex)); // INT64U + ByteSpan * operationalCertSpan = &entry->operationalCert; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, operationalCertSpan) + : ReadByteSpan(src + entryOffset, 34, operationalCertSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " 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; + switch (am->attributeId) + { + case 0x0007: // NeighborTableList + { + entryLength = 31; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _NeighborTable + _NeighborTable * entry = reinterpret_cast<_NeighborTable *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->ExtAddress, write ? (uint8_t *) &entry->ExtAddress : src, write, + &entryOffset, sizeof(entry->ExtAddress)); // INT64U + copyListMember(write ? dest : (uint8_t *) &entry->Age, write ? (uint8_t *) &entry->Age : src, write, &entryOffset, + sizeof(entry->Age)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->Rloc16, write ? (uint8_t *) &entry->Rloc16 : src, write, &entryOffset, + sizeof(entry->Rloc16)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->LinkFrameCounter, write ? (uint8_t *) &entry->LinkFrameCounter : src, + write, &entryOffset, sizeof(entry->LinkFrameCounter)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->MleFrameCounter, write ? (uint8_t *) &entry->MleFrameCounter : src, + write, &entryOffset, sizeof(entry->MleFrameCounter)); // INT32U + copyListMember(write ? dest : (uint8_t *) &entry->LQI, write ? (uint8_t *) &entry->LQI : src, write, &entryOffset, + sizeof(entry->LQI)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->AverageRssi, write ? (uint8_t *) &entry->AverageRssi : src, write, + &entryOffset, sizeof(entry->AverageRssi)); // INT8S + copyListMember(write ? dest : (uint8_t *) &entry->LastRssi, write ? (uint8_t *) &entry->LastRssi : src, write, + &entryOffset, sizeof(entry->LastRssi)); // INT8S + copyListMember(write ? dest : (uint8_t *) &entry->FrameErrorRate, write ? (uint8_t *) &entry->FrameErrorRate : src, + write, &entryOffset, sizeof(entry->FrameErrorRate)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->MessageErrorRate, write ? (uint8_t *) &entry->MessageErrorRate : src, + write, &entryOffset, sizeof(entry->MessageErrorRate)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->RxOnWhenIdle, write ? (uint8_t *) &entry->RxOnWhenIdle : src, write, + &entryOffset, sizeof(entry->RxOnWhenIdle)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->FullThreadDevice, write ? (uint8_t *) &entry->FullThreadDevice : src, + write, &entryOffset, sizeof(entry->FullThreadDevice)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->FullNetworkData, write ? (uint8_t *) &entry->FullNetworkData : src, + write, &entryOffset, sizeof(entry->FullNetworkData)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->IsChild, write ? (uint8_t *) &entry->IsChild : src, write, + &entryOffset, sizeof(entry->IsChild)); // BOOLEAN + break; + } + case 0x0008: // RouteTableList + { + entryLength = 18; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _RouteTable + _RouteTable * entry = reinterpret_cast<_RouteTable *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->ExtAddress, write ? (uint8_t *) &entry->ExtAddress : src, write, + &entryOffset, sizeof(entry->ExtAddress)); // INT64U + copyListMember(write ? dest : (uint8_t *) &entry->Rloc16, write ? (uint8_t *) &entry->Rloc16 : src, write, &entryOffset, + sizeof(entry->Rloc16)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->RouterId, write ? (uint8_t *) &entry->RouterId : src, write, + &entryOffset, sizeof(entry->RouterId)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->NextHop, write ? (uint8_t *) &entry->NextHop : src, write, + &entryOffset, sizeof(entry->NextHop)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->PathCost, write ? (uint8_t *) &entry->PathCost : src, write, + &entryOffset, sizeof(entry->PathCost)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->LQIIn, write ? (uint8_t *) &entry->LQIIn : src, write, &entryOffset, + sizeof(entry->LQIIn)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->LQIOut, write ? (uint8_t *) &entry->LQIOut : src, write, &entryOffset, + sizeof(entry->LQIOut)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->Age, write ? (uint8_t *) &entry->Age : src, write, &entryOffset, + sizeof(entry->Age)); // INT8U + copyListMember(write ? dest : (uint8_t *) &entry->Allocated, write ? (uint8_t *) &entry->Allocated : src, write, + &entryOffset, sizeof(entry->Allocated)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->LinkEstablished, write ? (uint8_t *) &entry->LinkEstablished : src, + write, &entryOffset, sizeof(entry->LinkEstablished)); // BOOLEAN + break; + } + case 0x003B: // SecurityPolicy + { + entryLength = 4; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _SecurityPolicy + _SecurityPolicy * entry = reinterpret_cast<_SecurityPolicy *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->RotationTime, write ? (uint8_t *) &entry->RotationTime : src, write, + &entryOffset, sizeof(entry->RotationTime)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->Flags, write ? (uint8_t *) &entry->Flags : src, write, &entryOffset, + sizeof(entry->Flags)); // BITMAP16 + break; + } + case 0x003D: // OperationalDatasetComponents + { + entryLength = 12; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _OperationalDatasetComponents + _OperationalDatasetComponents * entry = reinterpret_cast<_OperationalDatasetComponents *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->ActiveTimestampPresent, + write ? (uint8_t *) &entry->ActiveTimestampPresent : src, write, &entryOffset, + sizeof(entry->ActiveTimestampPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->PendingTimestampPresent, + write ? (uint8_t *) &entry->PendingTimestampPresent : src, write, &entryOffset, + sizeof(entry->PendingTimestampPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->MasterKeyPresent, write ? (uint8_t *) &entry->MasterKeyPresent : src, + write, &entryOffset, sizeof(entry->MasterKeyPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->NetworkNamePresent, + write ? (uint8_t *) &entry->NetworkNamePresent : src, write, &entryOffset, + sizeof(entry->NetworkNamePresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->ExtendedPanIdPresent, + write ? (uint8_t *) &entry->ExtendedPanIdPresent : src, write, &entryOffset, + sizeof(entry->ExtendedPanIdPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->MeshLocalPrefixPresent, + write ? (uint8_t *) &entry->MeshLocalPrefixPresent : src, write, &entryOffset, + sizeof(entry->MeshLocalPrefixPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->DelayPresent, write ? (uint8_t *) &entry->DelayPresent : src, write, + &entryOffset, sizeof(entry->DelayPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->PanIdPresent, write ? (uint8_t *) &entry->PanIdPresent : src, write, + &entryOffset, sizeof(entry->PanIdPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->ChannelPresent, write ? (uint8_t *) &entry->ChannelPresent : src, + write, &entryOffset, sizeof(entry->ChannelPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->PskcPresent, write ? (uint8_t *) &entry->PskcPresent : src, write, + &entryOffset, sizeof(entry->PskcPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->SecurityPolicyPresent, + write ? (uint8_t *) &entry->SecurityPolicyPresent : src, write, &entryOffset, + sizeof(entry->SecurityPolicyPresent)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->ChannelMaskPresent, + write ? (uint8_t *) &entry->ChannelMaskPresent : src, write, &entryOffset, + sizeof(entry->ChannelMaskPresent)); // BOOLEAN + break; + } + case 0x003E: // ActiveNetworkFaultsList + { + entryLength = 1; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + copyListMember(dest, src, write, &entryOffset, entryLength); // NetworkFault + break; + } + } + break; + } + } + + return entryLength; +} + +// A list is a collection of entries of the same data type. The data type may be any defined data type. +uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attributeId, const uint8_t * buffer) +{ + // The first 2 bytes specify the number of entries. A value of 0xFFFF means the list in invalid + // and data is undefined. + uint16_t entryCount = emberAfGetInt16u(buffer, 0, kSizeLengthInBytes); + if (entryCount == 0xFFFF) + { + return 0; + } + + uint16_t entryLength = 0; + switch (clusterId) + { + case 0x050D: // Application Basic Cluster + switch (attributeId) + { + case 0x0007: // allowed vendor list + // uint16_t + entryLength = 2; + break; + } + break; + 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 Launcher Cluster + switch (attributeId) + { + case 0x0000: // accepts header list + // chip::ByteSpan + return GetByteSpanOffsetFromIndex(buffer, 256, entryCount); + break; + } + break; + case 0x001D: // Descriptor Cluster + switch (attributeId) + { + case 0x0000: // device list + // Struct _DeviceType + entryLength = 6; + break; + case 0x0001: // server list + // chip::ClusterId + entryLength = 4; + break; + case 0x0002: // client list + // chip::ClusterId + entryLength = 4; + break; + case 0x0003: // parts list + // chip::EndpointId + entryLength = 2; + break; + } + break; + case 0x0040: // Fixed Label Cluster + switch (attributeId) + { + case 0x0000: // label list + // Struct _LabelStruct + entryLength = 36; + break; + } + break; + case 0x0030: // General Commissioning Cluster + switch (attributeId) + { + case 0x0001: // BasicCommissioningInfoList + // Struct _BasicCommissioningInfoType + entryLength = 4; + break; + } + break; + case 0x0033: // General Diagnostics Cluster + switch (attributeId) + { + case 0x0000: // NetworkInterfaces + // Struct _NetworkInterfaceType + entryLength = 48; + break; + case 0x0005: // ActiveHardwareFaults + // uint8_t + entryLength = 1; + break; + case 0x0006: // ActiveRadioFaults + // uint8_t + entryLength = 1; + break; + case 0x0007: // ActiveNetworkFaults + // uint8_t + entryLength = 1; + break; + } + break; + case 0x003F: // Group Key Management Cluster + switch (attributeId) + { + case 0x0000: // groups + // Struct _GroupState + entryLength = 6; + break; + case 0x0001: // group keys + // Struct _GroupKey + entryLength = 31; + break; + } + break; + case 0x0507: // Media Input Cluster + switch (attributeId) + { + case 0x0000: // media input list + // Struct _MediaInputInfo + entryLength = 70; + break; + } + break; + case 0x003E: // Operational Credentials Cluster + switch (attributeId) + { + case 0x0001: // fabrics list + // Struct _FabricDescriptor + entryLength = 120; + break; + case 0x0004: // TrustedRootCertificates + // chip::ByteSpan + return GetByteSpanOffsetFromIndex(buffer, 402, entryCount); + break; + } + break; + case 0x0034: // Software Diagnostics Cluster + switch (attributeId) + { + case 0x0000: // ThreadMetrics + // Struct _ThreadMetrics + entryLength = 30; + break; + } + break; + case 0x0504: // TV Channel Cluster + switch (attributeId) + { + case 0x0000: // 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 0x050F: // Test Cluster Cluster + switch (attributeId) + { + case 0x001A: // list_int8u + // uint8_t + entryLength = 1; + break; + case 0x001B: // list_octet_string + // chip::ByteSpan + return GetByteSpanOffsetFromIndex(buffer, 256, entryCount); + break; + case 0x001C: // list_struct_octet_string + // Struct _TestListStructOctet + entryLength = 42; + break; + } + break; + case 0x0035: // Thread Network Diagnostics Cluster + switch (attributeId) + { + case 0x0007: // NeighborTableList + // Struct _NeighborTable + entryLength = 31; + break; + case 0x0008: // RouteTableList + // Struct _RouteTable + entryLength = 18; + break; + case 0x003B: // SecurityPolicy + // Struct _SecurityPolicy + entryLength = 4; + break; + case 0x003D: // OperationalDatasetComponents + // Struct _OperationalDatasetComponents + entryLength = 12; + break; + case 0x003E: // ActiveNetworkFaultsList + // uint8_t + entryLength = 1; + break; + } + break; + } + + uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); + if (!CanCastTo(totalSize)) + { + ChipLogError(Zcl, "Cluster " ChipLogFormatMEI ": Size of attribute " ChipLogFormatMEI " is too large.", + ChipLogValueMEI(clusterId), ChipLogValueMEI(attributeId)); + return 0; + } + + return static_cast(totalSize); +} diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index e9c5a241f7b86b..36a1695e22f027 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -351,7 +351,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ \ - /* 1405 - tv channel list, */ \ + /* 1405 - 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, \ @@ -421,25 +421,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2421 - 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, \ + /* 2421 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2675 - audio output list, */ \ + /* 2425 - 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, \ @@ -457,7 +444,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2929 - application launcher list, */ \ + /* 2679 - 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, \ @@ -475,28 +462,28 @@ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 3183 - bitmap32, */ \ + /* 2933 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3187 - bitmap64, */ \ + /* 2937 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3195 - int32u, */ \ + /* 2945 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3199 - int64u, */ \ + /* 2949 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3207 - int32s, */ \ + /* 2957 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3211 - int64s, */ \ + /* 2961 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3219 - list_int8u, */ \ + /* 2969 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3229 - list_octet_string, */ \ + /* 2979 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -512,7 +499,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3483 - list_struct_octet_string, */ \ + /* 3233 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -857,7 +844,7 @@ \ /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ \ - /* 1405 - tv channel list, */ \ + /* 1405 - 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, \ @@ -927,25 +914,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2421 - 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, \ + /* 2421 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2675 - audio output list, */ \ + /* 2425 - 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, \ @@ -963,7 +937,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2929 - application launcher list, */ \ + /* 2679 - 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, \ @@ -981,28 +955,28 @@ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 3183 - bitmap32, */ \ + /* 2933 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3187 - bitmap64, */ \ + /* 2937 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3195 - int32u, */ \ + /* 2945 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3199 - int64u, */ \ + /* 2949 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3207 - int32s, */ \ + /* 2957 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3211 - int64s, */ \ + /* 2961 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3219 - list_int8u, */ \ + /* 2969 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3229 - list_octet_string, */ \ + /* 2979 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1018,7 +992,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3483 - list_struct_octet_string, */ \ + /* 3233 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1100,7 +1074,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 406 +#define GENERATED_ATTRIBUTE_COUNT 405 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1566,10 +1540,12 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1405) }, /* tv channel list */ \ - { 0x0001, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* tv channel lineup */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* current tv channel */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1405) }, /* channel list */ \ + { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ + { 0x0002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* current channel */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1659) }, /* target navigator list */ \ @@ -1587,15 +1563,16 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2167) }, /* accepts header list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2421) }, /* supported streaming types */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(2421) }, /* supported streaming protocols */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2425) }, /* audio output list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2929) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2679) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -1603,9 +1580,8 @@ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* 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 status */ \ + { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ @@ -1615,23 +1591,23 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3183) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3187) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2933) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2937) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3195) }, /* int32u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3199) }, /* int64u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2945) }, /* int32u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2949) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3207) }, /* int32s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3211) }, /* int64s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2957) }, /* int32s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2961) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ - { 0x001A, ZAP_TYPE(ARRAY), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3219) }, /* list_int8u */ \ - { 0x001B, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3229) }, /* list_octet_string */ \ + { 0x001A, ZAP_TYPE(ARRAY), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2969) }, /* list_int8u */ \ + { 0x001B, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2979) }, /* list_octet_string */ \ { 0x001C, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3483) }, /* list_struct_octet_string */ \ + ZAP_LONG_DEFAULTS_INDEX(3233) }, /* list_struct_octet_string */ \ { 0x001D, ZAP_TYPE(LONG_OCTET_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_octet_string */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -1836,7 +1812,7 @@ 0x0503, ZAP_ATTRIBUTE_INDEX(346), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(348), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(348), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ 0x0505, ZAP_ATTRIBUTE_INDEX(352), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1851,7 +1827,7 @@ 0x0509, ZAP_ATTRIBUTE_INDEX(357), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(358), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(358), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ 0x050B, ZAP_ATTRIBUTE_INDEX(361), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1860,25 +1836,25 @@ 0x050C, ZAP_ATTRIBUTE_INDEX(363), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(365), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(365), 7, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(373), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(374), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(373), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(395), \ + ZAP_ATTRIBUTE_INDEX(394), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(397), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(396), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(402), \ + ZAP_ATTRIBUTE_INDEX(401), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1890,7 +1866,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1900 }, { ZAP_CLUSTER_INDEX(16), 33, 5020 }, { ZAP_CLUSTER_INDEX(49), 3, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 16, 1900 }, { ZAP_CLUSTER_INDEX(16), 33, 4702 }, { ZAP_CLUSTER_INDEX(49), 3, 8 }, \ } // Largest attribute size is needed for various buffers @@ -1900,7 +1876,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1333) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (6928) +#define ATTRIBUTE_MAX_SIZE (6610) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3)