Skip to content

Commit

Permalink
Update TV example app clusters (#6060)
Browse files Browse the repository at this point in the history
Problem
TV example app does not support TV clusters.

Summary of Changes
- Updated all TV example app clusters that will be used by the application
- Updated chip tool zap, to enable sending of CHIP commands through chip tool
- Updated chip controller zap, to enable sending of CHIP commands through chip tool

Note
Everything which is not supported by the CHIP framework currently is noted with TODO comment.
  • Loading branch information
lazarkov authored and pull[bot] committed Jul 15, 2021
1 parent f9a16bb commit 1307194
Show file tree
Hide file tree
Showing 129 changed files with 41,282 additions and 13,529 deletions.
82 changes: 58 additions & 24 deletions examples/all-clusters-app/all-clusters-common/gen/af-structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ typedef struct _ApplicationLauncherApp
// Struct for AudioOutputInfo
typedef struct _AudioOutputInfo
{
uint8_t Index;
uint8_t OutputType;
uint8_t * Name;
uint8_t index;
uint8_t outputType;
uint8_t * name;
} EmberAfAudioOutputInfo;

// Struct for BasicCommissioningInfoType
Expand Down Expand Up @@ -100,17 +100,44 @@ typedef struct _ConfigureReportingStatusRecord
// Struct for ContentLaunchAdditionalInfo
typedef struct _ContentLaunchAdditionalInfo
{
uint8_t * Name;
uint8_t * Value;
uint8_t * name;
uint8_t * value;
} EmberAfContentLaunchAdditionalInfo;

// Struct for ContentLaunchSearch
typedef struct _ContentLaunchSearch
// Struct for ContentLaunchBrandingInformation
typedef struct _ContentLaunchBrandingInformation
{
uint8_t * providerName;
uint8_t background;
uint8_t logo;
uint8_t progressBar;
uint8_t splash;
uint8_t waterMark;
} EmberAfContentLaunchBrandingInformation;

// Struct for ContentLaunchDimension
typedef struct _ContentLaunchDimension
{
uint8_t * width;
uint8_t * height;
uint8_t metric;
} EmberAfContentLaunchDimension;

// Struct for ContentLaunchParamater
typedef struct _ContentLaunchParamater
{
uint8_t EntitiesList;
uint8_t * searchWindowStart;
uint8_t * searchWindowEnd;
} EmberAfContentLaunchSearch;
uint8_t Type;
uint8_t * Value;
/* TYPE WARNING: array array defaults to */ uint8_t * ExternalIDList;
} EmberAfContentLaunchParamater;

// Struct for ContentLaunchStyleInformation
typedef struct _ContentLaunchStyleInformation
{
uint8_t * imageUrl;
uint8_t * color;
uint8_t size;
} EmberAfContentLaunchStyleInformation;

// Struct for DebtPayload
typedef struct _DebtPayload
Expand Down Expand Up @@ -253,12 +280,19 @@ typedef uint8_t EmberAfIdentity;
// Struct for MediaInputInfo
typedef struct _MediaInputInfo
{
uint8_t Index;
uint8_t InputType;
uint8_t * Name;
uint8_t * Description;
uint8_t index;
uint8_t inputType;
uint8_t * name;
uint8_t * description;
} EmberAfMediaInputInfo;

// Struct for MediaPlaybackPosition
typedef struct _MediaPlaybackPosition
{
uint64_t updatedAt;
uint64_t position;
} EmberAfMediaPlaybackPosition;

// Struct for NavigateTargetTargetInfo
typedef struct _NavigateTargetTargetInfo
{
Expand Down Expand Up @@ -485,20 +519,20 @@ typedef struct _TransferredPhase
// Struct for TvChannelInfo
typedef struct _TvChannelInfo
{
uint16_t MajorNumber;
uint16_t MinorNumber;
uint8_t * Name;
uint8_t * CallSign;
uint8_t * AffiliateCallSign;
uint16_t majorNumber;
uint16_t minorNumber;
uint8_t * name;
uint8_t * callSign;
uint8_t * affiliateCallSign;
} EmberAfTvChannelInfo;

// Struct for TvChannelLineupInfo
typedef struct _TvChannelLineupInfo
{
uint8_t * OperatorName;
uint8_t * LineupName;
uint8_t * PostalCode;
uint8_t LineupInfoType;
uint8_t * operatorName;
uint8_t * lineupName;
uint8_t * postalCode;
uint8_t lineupInfoType;
} EmberAfTvChannelLineupInfo;

// Struct for WiFiInterfaceScanResult
Expand Down
14 changes: 12 additions & 2 deletions examples/all-clusters-app/all-clusters-common/gen/attribute-id.h
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,14 @@
// Client attributes

// Server attributes
#define ZCL_CURRENT_STATE_ATTRIBUTE_ID (0x0000)
#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)

// Attribute ids for cluster: Media Input

Expand All @@ -1194,6 +1201,8 @@
// Client attributes

// Server attributes
#define ZCL_CONTENT_LAUNCHER_ACCEPTS_HEADER_ATTRIBUTE_ID (0x0000)
#define ZCL_CONTENT_LAUNCHER_SUPPORTED_STREAMING_TYPES_ATTRIBUTE_ID (0x0001)

// Attribute ids for cluster: Audio Output

Expand All @@ -1209,7 +1218,8 @@

// Server attributes
#define ZCL_APPLICATION_LAUNCHER_LIST_ATTRIBUTE_ID (0x0000)
#define ZCL_APPLICATION_LAUNCHER_CURRENT_APP_ATTRIBUTE_ID (0x0001)
#define ZCL_APPLICATION_LAUNCHER_CURRENT_APP_CATALOG_VENDOR_ID_ATTRIBUTE_ID (0x0001)
#define ZCL_APPLICATION_LAUNCHER_CURRENT_APP_APPLICATION_ID_ATTRIBUTE_ID (0x0002)

// Attribute ids for cluster: Application Basic

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3361,95 +3361,126 @@
\
ZCL_NAVIGATE_TARGET_COMMAND_ID, "uuuu", target, status, data, data);

/** @brief Command description for PlayRequest
/** @brief Command description for MediaPlay
*
* Command: PlayRequest
* Command: MediaPlay
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterPlayRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaPlay(mediaPlaybackStatus) emberAfFillExternalBuffer(mask, \
\
ZCL_PLAY_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_PLAY_COMMAND_ID, "u", mediaPlaybackStatus);

/** @brief Command description for PauseRequest
/** @brief Command description for MediaPause
*
* Command: PauseRequest
* Command: MediaPause
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterPauseRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaPause(mediaPlaybackStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_PAUSE_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_PAUSE_COMMAND_ID, "u", mediaPlaybackStatus);

/** @brief Command description for StopRequest
/** @brief Command description for MediaStop
*
* Command: StopRequest
* Command: MediaStop
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterStopRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaStop(mediaPlaybackStatus) emberAfFillExternalBuffer(mask, \
\
ZCL_STOP_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_STOP_COMMAND_ID, "u", mediaPlaybackStatus);

/** @brief Command description for StartOverRequest
/** @brief Command description for MediaStartOver
*
* Command: StartOverRequest
* Command: MediaStartOver
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterStartOverRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaStartOver(mediaPlaybackStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_START_OVER_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_START_OVER_COMMAND_ID, "u", mediaPlaybackStatus);

/** @brief Command description for PreviousRequest
/** @brief Command description for MediaPrevious
*
* Command: PreviousRequest
* Command: MediaPrevious
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterPreviousRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaPrevious(mediaPlaybackStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_PREVIOUS_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_PREVIOUS_COMMAND_ID, "u", mediaPlaybackStatus);

/** @brief Command description for NextRequest
/** @brief Command description for MediaNext
*
* Command: NextRequest
* Command: MediaNext
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterNextRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaNext(mediaPlaybackStatus) emberAfFillExternalBuffer(mask, \
\
ZCL_NEXT_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_NEXT_COMMAND_ID, "u", mediaPlaybackStatus);

/** @brief Command description for RewindRequest
/** @brief Command description for MediaRewind
*
* Command: RewindRequest
* Command: MediaRewind
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterRewindRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaRewind(mediaPlaybackStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_REWIND_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_REWIND_COMMAND_ID, "u", mediaPlaybackStatus);

/** @brief Command description for FastForwardRequest
/** @brief Command description for MediaFastForward
*
* Command: FastForwardRequest
* Command: MediaFastForward
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterFastForwardRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaFastForward(mediaPlaybackStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_FAST_FORWARD_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_FAST_FORWARD_COMMAND_ID, "u", mediaPlaybackStatus);

/** @brief Command description for SkipForwardRequest
/** @brief Command description for MediaSkipForward
*
* Command: SkipForwardRequest
* Command: MediaSkipForward
* @param deltaPositionMilliseconds INT64U
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterSkipForwardRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaSkipForward(deltaPositionMilliseconds, mediaPlaybackStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_SKIP_FORWARD_COMMAND_ID, "uu", deltaPositionMilliseconds, mediaPlaybackStatus);

/** @brief Command description for SkipBackwardRequest
/** @brief Command description for MediaSkipBackward
*
* Command: SkipBackwardRequest
* Command: MediaSkipBackward
* @param deltaPositionMilliseconds INT64U
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterSkipBackwardRequest() emberAfFillExternalBuffer(mask, \
PlaybackClusterMediaSkipBackward(deltaPositionMilliseconds, mediaPlaybackStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID, "", );
ZCL_MEDIA_SKIP_BACKWARD_COMMAND_ID, "uu", deltaPositionMilliseconds, mediaPlaybackStatus);

/** @brief Command description for MediaSkipSeek
*
* Command: MediaSkipSeek
* @param position INT64U
* @param mediaPlaybackStatus MediaPlaybackStatus
*/
#define emberAfFillCommandMedia \
PlaybackClusterMediaSkipSeek(position, mediaPlaybackStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_MEDIA_SKIP_SEEK_COMMAND_ID, "uu", position, mediaPlaybackStatus);

/** @brief Command description for SelectInput
*
Expand Down Expand Up @@ -3502,7 +3533,7 @@
/** @brief Command description for SendKey
*
* Command: SendKey
* @param keyCode INT8U
* @param keyCode KeypadInputCecKeyCode
* @param status KeypadInputStatus
*/
#define emberAfFillCommandKeypad \
Expand All @@ -3513,23 +3544,30 @@
/** @brief Command description for LaunchContent
*
* Command: LaunchContent
* @param autoPlay BOOLEAN
* @param data CHAR_STRING
* @param data CHAR_STRING
* @param contentLaunchStatus ContentLaunchStatus
*/
#define emberAfFillCommandContent \
LaunchClusterLaunchContent(contentLaunchStatus) \
LaunchClusterLaunchContent(autoPlay, data, data, contentLaunchStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_LAUNCH_CONTENT_COMMAND_ID, "u", contentLaunchStatus);
ZCL_LAUNCH_CONTENT_COMMAND_ID, "uuuu", autoPlay, data, data, contentLaunchStatus);

/** @brief Command description for LaunchURL
*
* Command: LaunchURL
* @param contentURL CHAR_STRING
* @param data CHAR_STRING
* @param displayString CHAR_STRING
* @param contentLaunchStatus ContentLaunchStatus
*/
#define emberAfFillCommandContent \
LaunchClusterLaunchURL(contentLaunchStatus) emberAfFillExternalBuffer(mask, \
LaunchClusterLaunchURL(contentURL, data, displayString, contentLaunchStatus) \
emberAfFillExternalBuffer(mask, \
\
ZCL_LAUNCH_URL_COMMAND_ID, "u", contentLaunchStatus);
ZCL_LAUNCH_URL_COMMAND_ID, "uuuu", contentURL, data, displayString, contentLaunchStatus);

/** @brief Command description for SelectOutput
*
Expand All @@ -3555,17 +3593,17 @@
/** @brief Command description for LaunchApp
*
* Command: LaunchApp
* @param data CHAR_STRING
* @param status ApplicationLauncherStatus
* @param application ApplicationLauncherApp []
* @param applicationLen int
* @param status ApplicationLauncherStatus
* @param data CHAR_STRING
* @param data CHAR_STRING
*/
#define emberAfFillCommandApplication \
LauncherClusterLaunchApp(application, applicationLen, status, data, data) \
LauncherClusterLaunchApp(data, status, application, applicationLen, data) \
emberAfFillExternalBuffer(mask, \
\
ZCL_LAUNCH_APP_COMMAND_ID, "buuu", application, applicationLen, status, data, data);
ZCL_LAUNCH_APP_COMMAND_ID, "uubu", data, status, application, applicationLen, data);

/** @brief Command description for GetSetupPIN
*
Expand Down
Loading

0 comments on commit 1307194

Please sign in to comment.