Skip to content

Commit

Permalink
Updated TV example app to align with latest spec changes (#7569)
Browse files Browse the repository at this point in the history
* Update TV example clusters xml per latest spec

Problem
TV example app clusters are not up to date with latest spec changes
https://github.com/CHIP-Specifications/connectedhomeip-spec/releases/tag/0.7-app-cluster-ballot-2

Summary of Changes
- Updated the tv.zap
- Updated the controller.zap
- Renamed Content Launch to Content Launcher cluster per spec
- Added missing command to the Application Basic cluster
- Moved Media clusters to the Media section from General section, by changing their XML
- Run zap_regen to build boilerplate code
- Updated the ApplicationBasicManager cpp and header file to support ChangeStatus command

Test
Used the ./gn_build.sh to verify the building is successful
Run tv example app locally
Sent pairing command from chip-device-ctrl to tv example app and got successful response
Sent change status command from chip-tool to tv example app and got success response
  • Loading branch information
lazarkov authored and pull[bot] committed Jul 29, 2021
1 parent 51b26a9 commit 5365937
Show file tree
Hide file tree
Showing 53 changed files with 724 additions and 410 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo
}
break;
}
case 0x050A: // Content Launch Cluster
case 0x050A: // Content Launcher Cluster
{
uint16_t entryOffset = kSizeLengthInBytes;
switch (am->attributeId)
Expand Down Expand Up @@ -787,7 +787,7 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut
break;
}
break;
case 0x050A: // Content Launch Cluster
case 0x050A: // Content Launcher Cluster
switch (attributeId)
{
case 0x0000: // accepts header list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
emberAfColorControlClusterInitCallback(endpoint);
break;
case ZCL_CONTENT_LAUNCH_CLUSTER_ID:
emberAfContentLaunchClusterInitCallback(endpoint);
emberAfContentLauncherClusterInitCallback(endpoint);
break;
case ZCL_DESCRIPTOR_CLUSTER_ID:
emberAfDescriptorClusterInitCallback(endpoint);
Expand Down Expand Up @@ -220,7 +220,7 @@ void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId end
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfContentLaunchClusterInitCallback(EndpointId endpoint)
void __attribute__((weak)) emberAfContentLauncherClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
Expand Down
43 changes: 22 additions & 21 deletions examples/all-clusters-app/all-clusters-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ void emberAfBridgedDeviceBasicClusterInitCallback(chip::EndpointId endpoint);
*/
void emberAfColorControlClusterInitCallback(chip::EndpointId endpoint);

/** @brief Content Launch Cluster Init
/** @brief Content Launcher Cluster Init
*
* Cluster Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAfContentLaunchClusterInitCallback(chip::EndpointId endpoint);
void emberAfContentLauncherClusterInitCallback(chip::EndpointId endpoint);

/** @brief Descriptor Cluster Init
*
Expand Down Expand Up @@ -1102,39 +1102,39 @@ EmberAfStatus emberAfColorControlClusterServerPreAttributeChangedCallback(chip::
void emberAfColorControlClusterServerTickCallback(chip::EndpointId endpoint);

//
// Content Launch Cluster server
// Content Launcher Cluster server
//

/** @brief Content Launch Cluster Server Init
/** @brief Content Launcher Cluster Server Init
*
* Server Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAfContentLaunchClusterServerInitCallback(chip::EndpointId endpoint);
void emberAfContentLauncherClusterServerInitCallback(chip::EndpointId endpoint);

/** @brief Content Launch Cluster Server Attribute Changed
/** @brief Content Launcher Cluster Server Attribute Changed
*
* Server Attribute Changed
*
* @param endpoint Endpoint that is being initialized
* @param attributeId Attribute that changed
*/
void emberAfContentLaunchClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
void emberAfContentLauncherClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);

/** @brief Content Launch Cluster Server Manufacturer Specific Attribute Changed
/** @brief Content Launcher Cluster Server Manufacturer Specific Attribute Changed
*
* Server Manufacturer Specific Attribute Changed
*
* @param endpoint Endpoint that is being initialized
* @param attributeId Attribute that changed
* @param manufacturerCode Manufacturer Code of the attribute that changed
*/
void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
chip::AttributeId attributeId,
uint16_t manufacturerCode);
void emberAfContentLauncherClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
chip::AttributeId attributeId,
uint16_t manufacturerCode);

/** @brief Content Launch Cluster Server Message Sent
/** @brief Content Launcher Cluster Server Message Sent
*
* Server Message Sent
*
Expand All @@ -1145,11 +1145,11 @@ void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallba
* @param message The message that was sent
* @param status The status of the sent message
*/
void emberAfContentLaunchClusterServerMessageSentCallback(const chip::MessageSendDestination & destination,
EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
EmberStatus status);
void emberAfContentLauncherClusterServerMessageSentCallback(const chip::MessageSendDestination & destination,
EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
EmberStatus status);

/** @brief Content Launch Cluster Server Pre Attribute Changed
/** @brief Content Launcher Cluster Server Pre Attribute Changed
*
* server Pre Attribute Changed
*
Expand All @@ -1159,17 +1159,18 @@ void emberAfContentLaunchClusterServerMessageSentCallback(const chip::MessageSen
* @param size Attribute size
* @param value Attribute value
*/
EmberAfStatus emberAfContentLaunchClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
EmberAfAttributeType attributeType, uint16_t size,
uint8_t * value);
EmberAfStatus emberAfContentLauncherClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint,
chip::AttributeId attributeId,
EmberAfAttributeType attributeType, uint16_t size,
uint8_t * value);

/** @brief Content Launch Cluster Server Tick
/** @brief Content Launcher Cluster Server Tick
*
* server Tick
*
* @param endpoint Endpoint that is being served
*/
void emberAfContentLaunchClusterServerTickCallback(chip::EndpointId endpoint);
void emberAfContentLauncherClusterServerTickCallback(chip::EndpointId endpoint);

//
// Descriptor Cluster server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,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, \
\
/* Endpoint: 1, Cluster: Content Launch (server), big-endian */ \
/* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \
\
/* 6928 - accepts header list, */ \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
Expand Down Expand Up @@ -1498,7 +1498,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, \
\
/* Endpoint: 1, Cluster: Content Launch (server), little-endian */ \
/* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \
\
/* 6928 - accepts header list, */ \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
Expand Down Expand Up @@ -2049,7 +2049,7 @@
/* Endpoint: 1, Cluster: Keypad Input (server) */ \
{ 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \
\
/* Endpoint: 1, Cluster: Content Launch (server) */ \
/* Endpoint: 1, Cluster: Content Launcher (server) */ \
{ 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6928) }, /* accepts header list */ \
{ 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7182) }, /* supported streaming types */ \
{ 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \
Expand Down Expand Up @@ -2305,7 +2305,7 @@
}, /* Endpoint: 1, Cluster: Keypad Input (server) */ \
{ \
0x050A, ZAP_ATTRIBUTE_INDEX(275), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \
}, /* Endpoint: 1, Cluster: Content Launch (server) */ \
}, /* Endpoint: 1, Cluster: Content Launcher (server) */ \
{ \
0x050B, ZAP_ATTRIBUTE_INDEX(278), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \
}, /* Endpoint: 1, Cluster: Audio Output (server) */ \
Expand Down Expand Up @@ -2631,7 +2631,7 @@
{ 0x0509, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* SendKey */ \
{ 0x0509, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* SendKeyResponse */ \
\
/* Endpoint: 1, Cluster: Content Launch (server) */ \
/* Endpoint: 1, Cluster: Content Launcher (server) */ \
{ 0x050A, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* LaunchContent */ \
{ 0x050A, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* LaunchContentResponse */ \
{ 0x050A, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* LaunchURL */ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@
#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP
#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV

// Use this macro to check if the server side of the Content Launch cluster is included
// Use this macro to check if the server side of the Content Launcher cluster is included
#define ZCL_USING_CONTENT_LAUNCH_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_CONTENT_LAUNCH_SERVER
#define EMBER_AF_PLUGIN_CONTENT_LAUNCH
#define EMBER_AF_PLUGIN_CONTENT_LAUNCHER_SERVER
#define EMBER_AF_PLUGIN_CONTENT_LAUNCHER

// Use this macro to check if the server side of the Descriptor cluster is included
#define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER
Expand Down
Loading

0 comments on commit 5365937

Please sign in to comment.