Skip to content

Commit 2912057

Browse files
lazarkovpull[bot]
authored andcommitted
Update Matter TV clusters & TV app per latest spec. (#12757)
* Update media clusters xml files * Run zap tool successfully * Fixed the gn_build.sh * Fixed tests, recompiled code, all green Fixed application launcher cluster Restyle fix Fixed tests Restyle fix Updated allowed vendor list attribute Restyle fix Disabled application basic cluster - allowed vendor list Run zap tool regen Restyle fix Re-Run of zap regen script Restyle fix Enable current navigator attribute in all cluster app. Restyle fix Re-run zap regen Restyle fix Updated tests per comments Added zap_regen Restyle fix Run zap regen tool Restyle fix Re-run zap regen code, to resolve conflicts Restyle fix Re-run zap regen code, to resolve conflicts Restyle fix Re-run zap regen code, to resolve conflicts Restyle fix Re-run zap regen code, to resolve conflicts Restyle fix Run zap regen code & restyle Run zap regen code & restyle * Disable struct attributes, they cause Cirque to fail
1 parent bb7c0af commit 2912057

File tree

91 files changed

+11154
-5363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+11154
-5363
lines changed

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+37-66
Original file line numberDiff line numberDiff line change
@@ -13496,7 +13496,7 @@
1349613496
],
1349713497
"attributes": [
1349813498
{
13499-
"name": "tv channel list",
13499+
"name": "channel list",
1350013500
"code": 0,
1350113501
"mfgCode": null,
1350213502
"side": "server",
@@ -13511,12 +13511,12 @@
1351113511
"reportableChange": 0
1351213512
},
1351313513
{
13514-
"name": "tv channel lineup",
13514+
"name": "channel lineup",
1351513515
"code": 1,
1351613516
"mfgCode": null,
1351713517
"side": "server",
13518-
"included": 1,
13519-
"storageOption": "RAM",
13518+
"included": 0,
13519+
"storageOption": "External",
1352013520
"singleton": 0,
1352113521
"bounded": 0,
1352213522
"defaultValue": "",
@@ -13526,12 +13526,12 @@
1352613526
"reportableChange": 0
1352713527
},
1352813528
{
13529-
"name": "current tv channel",
13529+
"name": "current channel",
1353013530
"code": 2,
1353113531
"mfgCode": null,
1353213532
"side": "server",
13533-
"included": 1,
13534-
"storageOption": "RAM",
13533+
"included": 0,
13534+
"storageOption": "External",
1353513535
"singleton": 0,
1353613536
"bounded": 0,
1353713537
"defaultValue": "",
@@ -13625,6 +13625,21 @@
1362513625
"maxInterval": 65344,
1362613626
"reportableChange": 0
1362713627
},
13628+
{
13629+
"name": "current navigator target",
13630+
"code": 1,
13631+
"mfgCode": null,
13632+
"side": "server",
13633+
"included": 1,
13634+
"storageOption": "RAM",
13635+
"singleton": 0,
13636+
"bounded": 0,
13637+
"defaultValue": "0x00",
13638+
"reportable": 0,
13639+
"minInterval": 1,
13640+
"maxInterval": 65534,
13641+
"reportableChange": 0
13642+
},
1362813643
{
1362913644
"name": "ClusterRevision",
1363013645
"code": 65533,
@@ -13900,28 +13915,13 @@
1390013915
"maxInterval": 65534,
1390113916
"reportableChange": 0
1390213917
},
13903-
{
13904-
"name": "position updated at",
13905-
"code": 3,
13906-
"mfgCode": null,
13907-
"side": "server",
13908-
"included": 1,
13909-
"storageOption": "RAM",
13910-
"singleton": 0,
13911-
"bounded": 0,
13912-
"defaultValue": "",
13913-
"reportable": 1,
13914-
"minInterval": 1,
13915-
"maxInterval": 65534,
13916-
"reportableChange": 0
13917-
},
1391813918
{
1391913919
"name": "position",
13920-
"code": 4,
13920+
"code": 3,
1392113921
"mfgCode": null,
1392213922
"side": "server",
13923-
"included": 1,
13924-
"storageOption": "RAM",
13923+
"included": 0,
13924+
"storageOption": "External",
1392513925
"singleton": 0,
1392613926
"bounded": 0,
1392713927
"defaultValue": "",
@@ -13932,7 +13932,7 @@
1393213932
},
1393313933
{
1393413934
"name": "playback speed",
13935-
"code": 5,
13935+
"code": 4,
1393613936
"mfgCode": null,
1393713937
"side": "server",
1393813938
"included": 1,
@@ -13947,7 +13947,7 @@
1394713947
},
1394813948
{
1394913949
"name": "seek range end",
13950-
"code": 6,
13950+
"code": 5,
1395113951
"mfgCode": null,
1395213952
"side": "server",
1395313953
"included": 1,
@@ -13962,7 +13962,7 @@
1396213962
},
1396313963
{
1396413964
"name": "seek range start",
13965-
"code": 7,
13965+
"code": 6,
1396613966
"mfgCode": null,
1396713967
"side": "server",
1396813968
"included": 1,
@@ -14323,7 +14323,7 @@
1432314323
"reportableChange": 0
1432414324
},
1432514325
{
14326-
"name": "supported streaming types",
14326+
"name": "supported streaming protocols",
1432714327
"code": 1,
1432814328
"mfgCode": null,
1432914329
"side": "server",
@@ -14522,27 +14522,12 @@
1452214522
"reportableChange": 0
1452314523
},
1452414524
{
14525-
"name": "catalog vendor id",
14525+
"name": "application launcher app",
1452614526
"code": 1,
1452714527
"mfgCode": null,
1452814528
"side": "server",
14529-
"included": 1,
14530-
"storageOption": "RAM",
14531-
"singleton": 0,
14532-
"bounded": 0,
14533-
"defaultValue": "0x00",
14534-
"reportable": 1,
14535-
"minInterval": 0,
14536-
"maxInterval": 65344,
14537-
"reportableChange": 0
14538-
},
14539-
{
14540-
"name": "application id",
14541-
"code": 2,
14542-
"mfgCode": null,
14543-
"side": "server",
14544-
"included": 1,
14545-
"storageOption": "RAM",
14529+
"included": 0,
14530+
"storageOption": "External",
1454614531
"singleton": 0,
1454714532
"bounded": 0,
1454814533
"defaultValue": "0x00",
@@ -14664,7 +14649,7 @@
1466414649
"reportableChange": 0
1466514650
},
1466614651
{
14667-
"name": "application id",
14652+
"name": "application status",
1466814653
"code": 5,
1466914654
"mfgCode": null,
1467014655
"side": "server",
@@ -14679,7 +14664,7 @@
1467914664
"reportableChange": 0
1468014665
},
1468114666
{
14682-
"name": "catalog vendor id",
14667+
"name": "application version",
1468314668
"code": 6,
1468414669
"mfgCode": null,
1468514670
"side": "server",
@@ -14693,21 +14678,6 @@
1469314678
"maxInterval": 65344,
1469414679
"reportableChange": 0
1469514680
},
14696-
{
14697-
"name": "application status",
14698-
"code": 7,
14699-
"mfgCode": null,
14700-
"side": "server",
14701-
"included": 1,
14702-
"storageOption": "RAM",
14703-
"singleton": 0,
14704-
"bounded": 0,
14705-
"defaultValue": "0x01",
14706-
"reportable": 1,
14707-
"minInterval": 0,
14708-
"maxInterval": 65344,
14709-
"reportableChange": 0
14710-
},
1471114681
{
1471214682
"name": "ClusterRevision",
1471314683
"code": 65533,
@@ -19458,5 +19428,6 @@
1945819428
"endpointVersion": 1,
1945919429
"deviceIdentifier": 22
1946019430
}
19461-
]
19462-
}
19431+
],
19432+
"log": []
19433+
}

examples/tv-app/android/include/account-login/AccountLoginManager.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,22 @@ string AccountLoginManager::proxySetupPinRequest(string requestTempAccountIdenti
6767
return "tempPin123";
6868
}
6969

70+
bool AccountLoginManager::proxyLogout()
71+
{
72+
// TODO: Insert your code here to send logout request
73+
return true;
74+
}
75+
7076
bool accountLoginClusterIsUserLoggedIn(std::string requestTempAccountIdentifier, std::string requestSetupPin)
7177
{
7278
return AccountLoginManager().GetInstance().isUserLoggedIn(requestTempAccountIdentifier, requestSetupPin);
7379
}
7480

81+
bool accountLoginClusterLogout()
82+
{
83+
return AccountLoginManager().GetInstance().proxyLogout();
84+
}
85+
7586
std::string accountLoginClusterGetSetupPin(std::string requestTempAccountIdentifier, chip::EndpointId endpoint)
7687
{
7788
string responseSetupPin = AccountLoginManager().proxySetupPinRequest(requestTempAccountIdentifier, endpoint);

examples/tv-app/android/include/account-login/AccountLoginManager.h

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class AccountLoginManager
2727
{
2828
public:
2929
bool isUserLoggedIn(std::string requestTempAccountIdentifier, std::string requestSetupPin);
30+
bool proxyLogout();
3031
std::string proxySetupPinRequest(std::string requestTempAccountIdentifier, chip::EndpointId endpoint);
3132
void setTempAccountIdentifierForPin(std::string requestTempAccountIdentifier, std::string requestSetupPin);
3233

examples/tv-app/android/include/application-basic/Application.h

+10-8
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222

2323
struct Application
2424
{
25-
using ApplicationBasicStatus = chip::app::Clusters::ApplicationBasic::ApplicationBasicStatus;
26-
char vendorName[32] = "";
27-
char name[32] = "";
28-
char id[32] = "";
29-
uint16_t vendorId = 0;
30-
uint16_t productId = 0;
31-
uint16_t catalogVendorId = 0;
32-
ApplicationBasicStatus status = ApplicationBasicStatus::kStopped;
25+
using ApplicationBasicStatus = chip::app::Clusters::ApplicationBasic::ApplicationBasicStatus;
26+
char vendorName[32] = "";
27+
char name[32] = "";
28+
char id[32] = "";
29+
char version[32] = "";
30+
uint16_t vendorId = 0;
31+
uint16_t productId = 0;
32+
uint16_t catalogVendorId = 0;
33+
uint16_t allowedVendorList[32] = { 123, 456 };
34+
ApplicationBasicStatus status = ApplicationBasicStatus::kStopped;
3335
};

examples/tv-app/android/include/application-basic/ApplicationBasicManager.cpp

+9-17
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ void ApplicationBasicManager::store(chip::EndpointId endpoint, Application * app
7474
ChipLogError(Zcl, "Failed to store name attribute.");
7575
}
7676

77+
MakeZclCharString(zclString, application->version);
78+
EmberAfStatus versionStatus =
79+
emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_VERSION_ATTRIBUTE_ID,
80+
zclString.data(), ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
81+
if (versionStatus != EMBER_ZCL_STATUS_SUCCESS)
82+
{
83+
ChipLogError(Zcl, "Failed to store version attribute.");
84+
}
85+
7786
EmberAfStatus productIdStatus =
7887
emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_PRODUCT_ID_ATTRIBUTE_ID,
7988
(uint8_t *) &application->productId, ZCL_INT16U_ATTRIBUTE_TYPE);
@@ -82,23 +91,6 @@ void ApplicationBasicManager::store(chip::EndpointId endpoint, Application * app
8291
ChipLogError(Zcl, "Failed to store product id attribute.");
8392
}
8493

85-
MakeZclCharString(zclString, application->id);
86-
EmberAfStatus idStatus =
87-
emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_ID_ATTRIBUTE_ID, zclString.data(),
88-
ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
89-
if (idStatus != EMBER_ZCL_STATUS_SUCCESS)
90-
{
91-
ChipLogError(Zcl, "Failed to store id attribute.");
92-
}
93-
94-
EmberAfStatus catalogVendorIdStatus =
95-
emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_CATALOG_VENDOR_ID_ATTRIBUTE_ID,
96-
(uint8_t *) &application->catalogVendorId, ZCL_INT16U_ATTRIBUTE_TYPE);
97-
if (catalogVendorIdStatus != EMBER_ZCL_STATUS_SUCCESS)
98-
{
99-
ChipLogError(Zcl, "Failed to store catalog vendor id attribute.");
100-
}
101-
10294
EmberAfStatus applicationStatus =
10395
emberAfWriteServerAttribute(endpoint, ZCL_APPLICATION_BASIC_CLUSTER_ID, ZCL_APPLICATION_STATUS_ATTRIBUTE_ID,
10496
(uint8_t *) &application->status, ZCL_ENUM8_ATTRIBUTE_TYPE);

examples/tv-app/android/include/endpoint-configuration/chip_tv_config.ini

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ name=exampleName1
1313
productId=1
1414
id=1
1515
catalogVendorId=1
16+
version=exampleVersion
1617

1718
[endpoint4]
1819
type=app
@@ -22,6 +23,7 @@ name=exampleName2
2223
productId=2
2324
id=2
2425
catalogVendorId=2
26+
version=exampleVersion
2527

2628
[endpoint5]
2729
type=app
@@ -31,6 +33,7 @@ name=exampleName3
3133
productId=3
3234
id= 3
3335
catalogVendorId=3
36+
version=exampleVersion
3437

3538
[endpoint6]
3639
type=app
@@ -39,4 +42,5 @@ vendorId=4
3942
name=exampleName4
4043
productId=4
4144
id=4
42-
catalogVendorId=4
45+
catalogVendorId=4
46+
version=exampleVersion

examples/tv-app/android/java/ContentLauncherManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ContentLauncherAttrAccess : public app::AttributeAccessInterface
5959
{
6060
return ContentLauncherMgr().GetAcceptsHeader(aEncoder);
6161
}
62-
else if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::SupportedStreamingTypes::Id)
62+
else if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id)
6363
{
6464
return ContentLauncherMgr().GetSupportedStreamingTypes(aEncoder);
6565
}

examples/tv-app/android/java/MediaPlaybackManager.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ class MediaPlayBackAttrAccess : public app::AttributeAccessInterface
5050
attrId = ZCL_MEDIA_PLAYBACK_DURATION_ATTRIBUTE_ID;
5151
break;
5252
}
53-
case app::Clusters::MediaPlayback::Attributes::PositionUpdatedAt::Id: {
54-
attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_UPDATED_AT_ATTRIBUTE_ID;
55-
break;
56-
}
5753
case app::Clusters::MediaPlayback::Attributes::Position::Id: {
5854
attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_ATTRIBUTE_ID;
5955
break;

examples/tv-app/android/java/TvChannelManager.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ class ChannelInfoAttrAccess : public app::AttributeAccessInterface
4242
ChannelInfoAttrAccess() : app::AttributeAccessInterface(Optional<EndpointId>::Missing(), app::Clusters::TvChannel::Id) {}
4343
CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override
4444
{
45-
if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::TvChannelList::Id)
45+
if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::ChannelList::Id)
4646
{
4747
return TvChannelMgr().getTvChannelList(aEncoder);
4848
}
49-
else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::TvChannelLineup::Id)
49+
else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::ChannelLineup::Id)
5050
{
5151
return TvChannelMgr().getTvChannelLineup(aEncoder);
5252
}
53-
else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::CurrentTvChannel::Id)
53+
else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::CurrentChannel::Id)
5454
{
5555
return TvChannelMgr().getCurrentTvChannel(aEncoder);
5656
}

examples/tv-app/linux/AppImpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
105105
DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(contentLauncherAttrs)
106106
DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CONTENT_LAUNCHER_ACCEPTS_HEADER_ATTRIBUTE_ID, ARRAY, kDescriptorAttributeArraySize,
107107
0), /* accept header list */
108-
DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_TYPES_ATTRIBUTE_ID, BITMAP32, 1,
108+
DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID, BITMAP32, 1,
109109
0), /* streaming protocols */
110110
DECLARE_DYNAMIC_ATTRIBUTE_LIST_END();
111111

0 commit comments

Comments
 (0)