From 6fb856f5cd3f870b51335a29dea0782b6e5ab313 Mon Sep 17 00:00:00 2001 From: Lazar Kovacic Date: Wed, 30 Jun 2021 19:47:32 +0200 Subject: [PATCH] Updated the PR latests comments --- .github/workflows/tests.yaml | 11 +- .../all-clusters-common/gen/endpoint_config.h | 3 +- examples/chip-tool/commands/tests/Commands.h | 248 +++++++++--------- .../chip-tool/templates/tests-commands.zapt | 22 +- .../ApplicationLauncherManager.cpp | 6 +- .../media-playback/MediaPlaybackManager.cpp | 26 +- .../media-playback/MediaPlaybackManager.h | 18 +- .../TargetNavigatorManager.cpp | 5 +- .../tv-common/gen/IMClusterCommandHandler.cpp | 14 +- .../tv-app/tv-common/gen/endpoint_config.h | 3 +- scripts/tests/test_suites.sh | 48 ++-- scripts/tests/test_tv_suites.sh | 111 -------- .../application-launcher-server.cpp | 7 +- .../application-launcher-server.h | 44 ++++ .../media-playback-server.cpp | 27 +- .../media-playback-server.h | 56 ++++ .../target-navigator-server.cpp | 7 +- .../target-navigator-server.h | 45 ++++ src/app/common/gen/af-structs.h | 14 - src/app/common/gen/command-id.h | 2 +- src/app/common/gen/enums.h | 16 -- ...uster.yaml => TV_AccountLoginCluster.yaml} | 0 ...r.yaml => TV_ApplicationBasicCluster.yaml} | 0 ...aml => TV_ApplicationLauncherCluster.yaml} | 0 ...luster.yaml => TV_AudioOutputCluster.yaml} | 0 ...luster.yaml => TV_KeypadInputCluster.yaml} | 0 ...erCluster.yaml => TV_LowPowerCluster.yaml} | 0 ...Cluster.yaml => TV_MediaInputCluster.yaml} | 0 ...ster.yaml => TV_MediaPlaybackCluster.yaml} | 0 ...er.yaml => TV_TargetNavigatorCluster.yaml} | 0 ...lCluster.yaml => TV_TvChannelCluster.yaml} | 0 .../chip/application-basic-cluster.xml | 14 +- .../chip/application-launcher-cluster.xml | 9 +- .../chip/media-playback-cluster.xml | 16 +- .../chip/target-navigator-cluster.xml | 5 - .../data_model/controller-clusters.zap | 4 +- src/controller/data_model/gen/encoder.cpp | 2 +- .../data_model/gen/endpoint_config.h | 2 +- 38 files changed, 387 insertions(+), 398 deletions(-) delete mode 100755 scripts/tests/test_tv_suites.sh create mode 100644 src/app/clusters/application-launcher-server/application-launcher-server.h create mode 100644 src/app/clusters/media-playback-server/media-playback-server.h create mode 100644 src/app/clusters/target-navigator-server/target-navigator-server.h rename src/app/tests/suites/{AccountLoginCluster.yaml => TV_AccountLoginCluster.yaml} (100%) rename src/app/tests/suites/{ApplicationBasicCluster.yaml => TV_ApplicationBasicCluster.yaml} (100%) rename src/app/tests/suites/{ApplicationLauncherCluster.yaml => TV_ApplicationLauncherCluster.yaml} (100%) rename src/app/tests/suites/{AudioOutputCluster.yaml => TV_AudioOutputCluster.yaml} (100%) rename src/app/tests/suites/{KeypadInputCluster.yaml => TV_KeypadInputCluster.yaml} (100%) rename src/app/tests/suites/{LowPowerCluster.yaml => TV_LowPowerCluster.yaml} (100%) rename src/app/tests/suites/{MediaInputCluster.yaml => TV_MediaInputCluster.yaml} (100%) rename src/app/tests/suites/{MediaPlaybackCluster.yaml => TV_MediaPlaybackCluster.yaml} (100%) rename src/app/tests/suites/{TargetNavigatorCluster.yaml => TV_TargetNavigatorCluster.yaml} (100%) rename src/app/tests/suites/{TvChannelCluster.yaml => TV_TvChannelCluster.yaml} (100%) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 57255a2950c1de..43753dcb708c89 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -83,7 +83,12 @@ jobs: timeout-minutes: 10 run: | ifconfig -a - scripts/tests/test_suites.sh + scripts/tests/test_suites.sh + - name: Run TV Tests + timeout-minutes: 10 + run: | + ifconfig -a + scripts/tests/test_suites.sh -a tv -i 20 - name: Uploading core files uses: actions/upload-artifact@v2 if: ${{ failure() }} @@ -164,6 +169,10 @@ jobs: timeout-minutes: 15 run: | scripts/tests/test_suites.sh + - name: Run TV Tests + timeout-minutes: 10 + run: | + scripts/tests/test_suites.sh -a tv -i 20 - name: Uploading core files uses: actions/upload-artifact@v2 if: ${{ failure() }} diff --git a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h index 5920264ec1a0c8..d60b52f9a8accd 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h +++ b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h @@ -2567,7 +2567,7 @@ // Array of EmberAfCommandMetadata structs. #define ZAP_COMMAND_MASK(mask) COMMAND_MASK_##mask -#define EMBER_AF_GENERATED_COMMAND_COUNT (201) +#define EMBER_AF_GENERATED_COMMAND_COUNT (200) #define GENERATED_COMMANDS \ { \ \ @@ -2793,7 +2793,6 @@ { 0x0506, 0x09, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipBackward */ \ { 0x0506, 0x09, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipBackwardResponse */ \ { 0x0506, 0x0A, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipSeek */ \ - { 0x0506, 0x0A, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipSeekResponse */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ { 0x0507, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* SelectInput */ \ diff --git a/examples/chip-tool/commands/tests/Commands.h b/examples/chip-tool/commands/tests/Commands.h index 13bbe55e38d5c6..74a54f54bfe7c0 100644 --- a/examples/chip-tool/commands/tests/Commands.h +++ b/examples/chip-tool/commands/tests/Commands.h @@ -21,10 +21,10 @@ #include "TestCommand.h" -class TargetNavigatorCluster : public TestCommand +class TV_TargetNavigatorCluster : public TestCommand { public: - TargetNavigatorCluster() : TestCommand("TargetNavigatorCluster"), mTestIndex(0) {} + TV_TargetNavigatorCluster() : TestCommand("TV_TargetNavigatorCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33,7 +33,7 @@ class TargetNavigatorCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "TargetNavigatorCluster: Test complete"); + ChipLogProgress(chipTool, "TV_TargetNavigatorCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -53,7 +53,7 @@ class TargetNavigatorCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "TargetNavigatorCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_TargetNavigatorCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -101,7 +101,7 @@ class TargetNavigatorCluster : public TestCommand { ChipLogProgress(chipTool, "Target Navigator - Read attribute Target Navigator list: Failure Response"); - TargetNavigatorCluster * runner = reinterpret_cast(context); + TV_TargetNavigatorCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -122,7 +122,7 @@ class TargetNavigatorCluster : public TestCommand { ChipLogProgress(chipTool, "Target Navigator - Read attribute Target Navigator list: Success Response"); - TargetNavigatorCluster * runner = reinterpret_cast(context); + TV_TargetNavigatorCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -181,7 +181,7 @@ class TargetNavigatorCluster : public TestCommand { ChipLogProgress(chipTool, "Target Navigator - Navigate Target Command: Failure Response"); - TargetNavigatorCluster * runner = reinterpret_cast(context); + TV_TargetNavigatorCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -201,7 +201,7 @@ class TargetNavigatorCluster : public TestCommand { ChipLogProgress(chipTool, "Target Navigator - Navigate Target Command: Success Response"); - TargetNavigatorCluster * runner = reinterpret_cast(context); + TV_TargetNavigatorCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -217,10 +217,10 @@ class TargetNavigatorCluster : public TestCommand } }; -class AudioOutputCluster : public TestCommand +class TV_AudioOutputCluster : public TestCommand { public: - AudioOutputCluster() : TestCommand("AudioOutputCluster"), mTestIndex(0) {} + TV_AudioOutputCluster() : TestCommand("TV_AudioOutputCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -229,7 +229,7 @@ class AudioOutputCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "AudioOutputCluster: Test complete"); + ChipLogProgress(chipTool, "TV_AudioOutputCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -252,7 +252,7 @@ class AudioOutputCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "AudioOutputCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_AudioOutputCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -300,7 +300,7 @@ class AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Read attribute Audio Output list: Failure Response"); - AudioOutputCluster * runner = reinterpret_cast(context); + TV_AudioOutputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -320,7 +320,7 @@ class AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Read attribute Audio Output list: Success Response"); - AudioOutputCluster * runner = reinterpret_cast(context); + TV_AudioOutputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -378,7 +378,7 @@ class AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Select Output Command: Failure Response"); - AudioOutputCluster * runner = reinterpret_cast(context); + TV_AudioOutputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -397,7 +397,7 @@ class AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Select Output Command: Success Response"); - AudioOutputCluster * runner = reinterpret_cast(context); + TV_AudioOutputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -449,7 +449,7 @@ class AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Rename Output Command: Failure Response"); - AudioOutputCluster * runner = reinterpret_cast(context); + TV_AudioOutputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -468,7 +468,7 @@ class AudioOutputCluster : public TestCommand { ChipLogProgress(chipTool, "Audio Output - Rename Output Command: Success Response"); - AudioOutputCluster * runner = reinterpret_cast(context); + TV_AudioOutputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -484,10 +484,10 @@ class AudioOutputCluster : public TestCommand } }; -class ApplicationLauncherCluster : public TestCommand +class TV_ApplicationLauncherCluster : public TestCommand { public: - ApplicationLauncherCluster() : TestCommand("ApplicationLauncherCluster"), mTestIndex(0) {} + TV_ApplicationLauncherCluster() : TestCommand("TV_ApplicationLauncherCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -496,7 +496,7 @@ class ApplicationLauncherCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "ApplicationLauncherCluster: Test complete"); + ChipLogProgress(chipTool, "TV_ApplicationLauncherCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -516,7 +516,7 @@ class ApplicationLauncherCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "ApplicationLauncherCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_ApplicationLauncherCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -564,7 +564,7 @@ class ApplicationLauncherCluster : public TestCommand { ChipLogProgress(chipTool, "Application Launcher - Read attribute Application Launcher list: Failure Response"); - ApplicationLauncherCluster * runner = reinterpret_cast(context); + TV_ApplicationLauncherCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -584,7 +584,7 @@ class ApplicationLauncherCluster : public TestCommand { ChipLogProgress(chipTool, "Application Launcher - Read attribute Application Launcher list: Success Response"); - ApplicationLauncherCluster * runner = reinterpret_cast(context); + TV_ApplicationLauncherCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -645,7 +645,7 @@ class ApplicationLauncherCluster : public TestCommand { ChipLogProgress(chipTool, "Application Launcher - Launch App Command: Failure Response"); - ApplicationLauncherCluster * runner = reinterpret_cast(context); + TV_ApplicationLauncherCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -665,7 +665,7 @@ class ApplicationLauncherCluster : public TestCommand { ChipLogProgress(chipTool, "Application Launcher - Launch App Command: Success Response"); - ApplicationLauncherCluster * runner = reinterpret_cast(context); + TV_ApplicationLauncherCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -681,10 +681,10 @@ class ApplicationLauncherCluster : public TestCommand } }; -class KeypadInputCluster : public TestCommand +class TV_KeypadInputCluster : public TestCommand { public: - KeypadInputCluster() : TestCommand("KeypadInputCluster"), mTestIndex(0) {} + TV_KeypadInputCluster() : TestCommand("TV_KeypadInputCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -693,7 +693,7 @@ class KeypadInputCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "KeypadInputCluster: Test complete"); + ChipLogProgress(chipTool, "TV_KeypadInputCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -710,7 +710,7 @@ class KeypadInputCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "KeypadInputCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_KeypadInputCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -759,7 +759,7 @@ class KeypadInputCluster : public TestCommand { ChipLogProgress(chipTool, "Keypad Input - Send Key Command: Failure Response"); - KeypadInputCluster * runner = reinterpret_cast(context); + TV_KeypadInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -778,7 +778,7 @@ class KeypadInputCluster : public TestCommand { ChipLogProgress(chipTool, "Keypad Input - Send Key Command: Success Response"); - KeypadInputCluster * runner = reinterpret_cast(context); + TV_KeypadInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -794,10 +794,10 @@ class KeypadInputCluster : public TestCommand } }; -class AccountLoginCluster : public TestCommand +class TV_AccountLoginCluster : public TestCommand { public: - AccountLoginCluster() : TestCommand("AccountLoginCluster"), mTestIndex(0) {} + TV_AccountLoginCluster() : TestCommand("TV_AccountLoginCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -806,7 +806,7 @@ class AccountLoginCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "AccountLoginCluster: Test complete"); + ChipLogProgress(chipTool, "TV_AccountLoginCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -826,7 +826,7 @@ class AccountLoginCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "AccountLoginCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_AccountLoginCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -875,7 +875,7 @@ class AccountLoginCluster : public TestCommand { ChipLogProgress(chipTool, "Account Login - Get Setup PIN Command: Failure Response"); - AccountLoginCluster * runner = reinterpret_cast(context); + TV_AccountLoginCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -894,7 +894,7 @@ class AccountLoginCluster : public TestCommand { ChipLogProgress(chipTool, "Account Login - Get Setup PIN Command: Success Response"); - AccountLoginCluster * runner = reinterpret_cast(context); + TV_AccountLoginCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -947,7 +947,7 @@ class AccountLoginCluster : public TestCommand { ChipLogProgress(chipTool, "Account Login - Login Command: Failure Response"); - AccountLoginCluster * runner = reinterpret_cast(context); + TV_AccountLoginCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -966,7 +966,7 @@ class AccountLoginCluster : public TestCommand { ChipLogProgress(chipTool, "Account Login - Login Command: Success Response"); - AccountLoginCluster * runner = reinterpret_cast(context); + TV_AccountLoginCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -982,10 +982,10 @@ class AccountLoginCluster : public TestCommand } }; -class ApplicationBasicCluster : public TestCommand +class TV_ApplicationBasicCluster : public TestCommand { public: - ApplicationBasicCluster() : TestCommand("ApplicationBasicCluster"), mTestIndex(0) {} + TV_ApplicationBasicCluster() : TestCommand("TV_ApplicationBasicCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -994,7 +994,7 @@ class ApplicationBasicCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "ApplicationBasicCluster: Test complete"); + ChipLogProgress(chipTool, "TV_ApplicationBasicCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -1029,7 +1029,7 @@ class ApplicationBasicCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "ApplicationBasicCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_ApplicationBasicCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -1078,7 +1078,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Change Status Command: Failure Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -1097,7 +1097,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Change Status Command: Success Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -1147,7 +1147,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute vendor name: Failure Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -1166,7 +1166,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute vendor name: Success Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -1216,7 +1216,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute vendor id: Failure Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -1235,7 +1235,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute vendor id: Success Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -1292,7 +1292,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute name: Failure Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_3; delete runner->mOnSuccessCallback_3; @@ -1312,7 +1312,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute name: Success Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_3; delete runner->mOnSuccessCallback_3; @@ -1362,7 +1362,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute product id: Failure Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_4; delete runner->mOnSuccessCallback_4; @@ -1381,7 +1381,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute product id: Success Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_4; delete runner->mOnSuccessCallback_4; @@ -1438,7 +1438,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute id: Failure Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_5; delete runner->mOnSuccessCallback_5; @@ -1458,7 +1458,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute id: Success Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_5; delete runner->mOnSuccessCallback_5; @@ -1508,7 +1508,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute catalog vendor id: Failure Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_6; delete runner->mOnSuccessCallback_6; @@ -1527,7 +1527,7 @@ class ApplicationBasicCluster : public TestCommand { ChipLogProgress(chipTool, "Application Basic - Read attribute catalog vendor id: Success Response"); - ApplicationBasicCluster * runner = reinterpret_cast(context); + TV_ApplicationBasicCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_6; delete runner->mOnSuccessCallback_6; @@ -1550,10 +1550,10 @@ class ApplicationBasicCluster : public TestCommand } }; -class MediaPlaybackCluster : public TestCommand +class TV_MediaPlaybackCluster : public TestCommand { public: - MediaPlaybackCluster() : TestCommand("MediaPlaybackCluster"), mTestIndex(0) {} + TV_MediaPlaybackCluster() : TestCommand("TV_MediaPlaybackCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -1562,7 +1562,7 @@ class MediaPlaybackCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "MediaPlaybackCluster: Test complete"); + ChipLogProgress(chipTool, "TV_MediaPlaybackCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -1609,7 +1609,7 @@ class MediaPlaybackCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "MediaPlaybackCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_MediaPlaybackCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -1657,7 +1657,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Play Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -1676,7 +1676,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Play Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -1726,7 +1726,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Pause Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -1745,7 +1745,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Pause Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -1795,7 +1795,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Stop Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -1814,7 +1814,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Stop Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -1864,7 +1864,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Start Over Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_3; delete runner->mOnSuccessCallback_3; @@ -1883,7 +1883,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Start Over Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_3; delete runner->mOnSuccessCallback_3; @@ -1933,7 +1933,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Previous Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_4; delete runner->mOnSuccessCallback_4; @@ -1952,7 +1952,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Previous Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_4; delete runner->mOnSuccessCallback_4; @@ -2002,7 +2002,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Next Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_5; delete runner->mOnSuccessCallback_5; @@ -2021,7 +2021,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Next Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_5; delete runner->mOnSuccessCallback_5; @@ -2071,7 +2071,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Rewind Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_6; delete runner->mOnSuccessCallback_6; @@ -2090,7 +2090,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Rewind Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_6; delete runner->mOnSuccessCallback_6; @@ -2140,7 +2140,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Fast Forward Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_7; delete runner->mOnSuccessCallback_7; @@ -2159,7 +2159,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Fast Forward Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_7; delete runner->mOnSuccessCallback_7; @@ -2211,7 +2211,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Skip Forward Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_8; delete runner->mOnSuccessCallback_8; @@ -2230,7 +2230,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Skip Forward Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_8; delete runner->mOnSuccessCallback_8; @@ -2282,7 +2282,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Skip Backward Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_9; delete runner->mOnSuccessCallback_9; @@ -2302,7 +2302,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Skip Backward Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_9; delete runner->mOnSuccessCallback_9; @@ -2353,7 +2353,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Skip Seek Command: Failure Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_10; delete runner->mOnSuccessCallback_10; @@ -2372,7 +2372,7 @@ class MediaPlaybackCluster : public TestCommand { ChipLogProgress(chipTool, "Media Playback - Media Playback Skip Seek Command: Success Response"); - MediaPlaybackCluster * runner = reinterpret_cast(context); + TV_MediaPlaybackCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_10; delete runner->mOnSuccessCallback_10; @@ -2388,10 +2388,10 @@ class MediaPlaybackCluster : public TestCommand } }; -class TvChannelCluster : public TestCommand +class TV_TvChannelCluster : public TestCommand { public: - TvChannelCluster() : TestCommand("TvChannelCluster"), mTestIndex(0) {} + TV_TvChannelCluster() : TestCommand("TV_TvChannelCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -2400,7 +2400,7 @@ class TvChannelCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "TvChannelCluster: Test complete"); + ChipLogProgress(chipTool, "TV_TvChannelCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -2423,7 +2423,7 @@ class TvChannelCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "TvChannelCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_TvChannelCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -2471,7 +2471,7 @@ class TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Read attribute TV Channel list: Failure Response"); - TvChannelCluster * runner = reinterpret_cast(context); + TV_TvChannelCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -2491,7 +2491,7 @@ class TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Read attribute TV Channel list: Success Response"); - TvChannelCluster * runner = reinterpret_cast(context); + TV_TvChannelCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -2551,7 +2551,7 @@ class TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Change Channel By Number Command: Failure Response"); - TvChannelCluster * runner = reinterpret_cast(context); + TV_TvChannelCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -2570,7 +2570,7 @@ class TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Change Channel By Number Command: Success Response"); - TvChannelCluster * runner = reinterpret_cast(context); + TV_TvChannelCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -2621,7 +2621,7 @@ class TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Skip Channel Command: Failure Response"); - TvChannelCluster * runner = reinterpret_cast(context); + TV_TvChannelCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -2640,7 +2640,7 @@ class TvChannelCluster : public TestCommand { ChipLogProgress(chipTool, "TV Channel - Skip Channel Command: Success Response"); - TvChannelCluster * runner = reinterpret_cast(context); + TV_TvChannelCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -2656,10 +2656,10 @@ class TvChannelCluster : public TestCommand } }; -class LowPowerCluster : public TestCommand +class TV_LowPowerCluster : public TestCommand { public: - LowPowerCluster() : TestCommand("LowPowerCluster"), mTestIndex(0) {} + TV_LowPowerCluster() : TestCommand("TV_LowPowerCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -2668,7 +2668,7 @@ class LowPowerCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "LowPowerCluster: Test complete"); + ChipLogProgress(chipTool, "TV_LowPowerCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -2685,7 +2685,7 @@ class LowPowerCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "LowPowerCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_LowPowerCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -2733,7 +2733,7 @@ class LowPowerCluster : public TestCommand { ChipLogProgress(chipTool, "Low Power - Sleep Input Status Command: Failure Response"); - LowPowerCluster * runner = reinterpret_cast(context); + TV_LowPowerCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -2752,7 +2752,7 @@ class LowPowerCluster : public TestCommand { ChipLogProgress(chipTool, "Low Power - Sleep Input Status Command: Success Response"); - LowPowerCluster * runner = reinterpret_cast(context); + TV_LowPowerCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -2768,10 +2768,10 @@ class LowPowerCluster : public TestCommand } }; -class MediaInputCluster : public TestCommand +class TV_MediaInputCluster : public TestCommand { public: - MediaInputCluster() : TestCommand("MediaInputCluster"), mTestIndex(0) {} + TV_MediaInputCluster() : TestCommand("TV_MediaInputCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -2780,7 +2780,7 @@ class MediaInputCluster : public TestCommand if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, "MediaInputCluster: Test complete"); + ChipLogProgress(chipTool, "TV_MediaInputCluster: Test complete"); SetCommandExitStatus(CHIP_NO_ERROR); } @@ -2809,7 +2809,7 @@ class MediaInputCluster : public TestCommand if (CHIP_NO_ERROR != err) { - ChipLogProgress(chipTool, "MediaInputCluster: %s", chip::ErrorStr(err)); + ChipLogProgress(chipTool, "TV_MediaInputCluster: %s", chip::ErrorStr(err)); SetCommandExitStatus(err); } } @@ -2857,7 +2857,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Read attribute media input list: Failure Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -2877,7 +2877,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Read attribute media input list: Success Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_0; delete runner->mOnSuccessCallback_0; @@ -2935,7 +2935,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Select Input Command: Failure Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -2954,7 +2954,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Select Input Command: Success Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_1; delete runner->mOnSuccessCallback_1; @@ -3004,7 +3004,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Hide Input Status Command: Failure Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -3023,7 +3023,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Hide Input Status Command: Success Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_2; delete runner->mOnSuccessCallback_2; @@ -3073,7 +3073,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Show Input Status Command: Failure Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_3; delete runner->mOnSuccessCallback_3; @@ -3092,7 +3092,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Show Input Status Command: Success Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_3; delete runner->mOnSuccessCallback_3; @@ -3144,7 +3144,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Rename Input Command: Failure Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_4; delete runner->mOnSuccessCallback_4; @@ -3163,7 +3163,7 @@ class MediaInputCluster : public TestCommand { ChipLogProgress(chipTool, "Media Input - Rename Input Command: Success Response"); - MediaInputCluster * runner = reinterpret_cast(context); + TV_MediaInputCluster * runner = reinterpret_cast(context); delete runner->mOnFailureCallback_4; delete runner->mOnSuccessCallback_4; @@ -14949,16 +14949,16 @@ void registerCommandsTests(Commands & commands) const char * clusterName = "Tests"; 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(), diff --git a/examples/chip-tool/templates/tests-commands.zapt b/examples/chip-tool/templates/tests-commands.zapt index fb900f0f7603d6..6664166cbad08e 100644 --- a/examples/chip-tool/templates/tests-commands.zapt +++ b/examples/chip-tool/templates/tests-commands.zapt @@ -4,23 +4,23 @@ #include "TestCommand.h" -{{>test_cluster tests="TargetNavigatorCluster, AudioOutputCluster, ApplicationLauncherCluster, KeypadInputCluster, AccountLoginCluster, ApplicationBasicCluster, MediaPlaybackCluster, TvChannelCluster, LowPowerCluster, MediaInputCluster, TestCluster, Test_3_1_1, Test_3_2_1, Test_3_2_2, Test_10_1_1"}} +{{>test_cluster tests="TV_TargetNavigatorCluster, TV_AudioOutputCluster, TV_ApplicationLauncherCluster, TV_KeypadInputCluster, TV_AccountLoginCluster, TV_ApplicationBasicCluster, TV_MediaPlaybackCluster, TV_TvChannelCluster, TV_LowPowerCluster, TV_MediaInputCluster, TestCluster, Test_3_1_1, Test_3_2_1, Test_3_2_2, Test_10_1_1"}} void registerCommandsTests(Commands & commands) { const char * clusterName = "Tests"; 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(), diff --git a/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.cpp b/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.cpp index de0d283646f234..10b1871e71ad59 100644 --- a/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.cpp +++ b/examples/tv-app/linux/include/application-launcher/ApplicationLauncherManager.cpp @@ -18,11 +18,11 @@ #include "ApplicationLauncherManager.h" #include +#include #include #include #include #include - #include #include @@ -45,10 +45,10 @@ vector ApplicationLauncherManager::proxyGetApplicationList() return applications; } -EmberAfApplicationLauncherResponse applicationLauncherClusterLaunchApp(EmberAfApplicationLauncherApp application, std::string data) +ApplicationLauncherResponse applicationLauncherClusterLaunchApp(EmberAfApplicationLauncherApp application, std::string data) { // TODO: Insert your code - EmberAfApplicationLauncherResponse response; + ApplicationLauncherResponse response; char testData[] = "data"; response.data = (uint8_t *) testData; response.status = EMBER_ZCL_APPLICATION_LAUNCHER_STATUS_SUCCESS; diff --git a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp index ef292ef66ae8e6..3146f0c3d79036 100644 --- a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp +++ b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp @@ -38,32 +38,32 @@ CHIP_ERROR MediaPlaybackManager::Init() return err; } -EmberAfMediaPlaybackStatus MediaPlaybackManager::proxyMediaPlaybackRequest(EmberAfMediaPlaybackRequest mediaPlaybackRequest, +EmberAfMediaPlaybackStatus MediaPlaybackManager::proxyMediaPlaybackRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds) { switch (mediaPlaybackRequest) { - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PLAY: + case MEDIA_PLAYBACK_REQUEST_PLAY: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PAUSE: + case MEDIA_PLAYBACK_REQUEST_PAUSE: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_STOP: + case MEDIA_PLAYBACK_REQUEST_STOP: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_START_OVER: + case MEDIA_PLAYBACK_REQUEST_START_OVER: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PREVIOUS: + case MEDIA_PLAYBACK_REQUEST_PREVIOUS: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_NEXT: + case MEDIA_PLAYBACK_REQUEST_NEXT: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_REWIND: + case MEDIA_PLAYBACK_REQUEST_REWIND: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_FAST_FORWARD: + case MEDIA_PLAYBACK_REQUEST_FAST_FORWARD: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD: + case MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD: + case MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD: // TODO: Insert code here - case EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SEEK: + case MEDIA_PLAYBACK_REQUEST_SEEK: return EMBER_ZCL_MEDIA_PLAYBACK_STATUS_SUCCESS; break; default: { @@ -72,7 +72,7 @@ EmberAfMediaPlaybackStatus MediaPlaybackManager::proxyMediaPlaybackRequest(Ember } } -EmberAfMediaPlaybackStatus mediaPlaybackClusterSendMediaPlaybackRequest(EmberAfMediaPlaybackRequest mediaPlaybackRequest, +EmberAfMediaPlaybackStatus mediaPlaybackClusterSendMediaPlaybackRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds) { return MediaPlaybackManager().proxyMediaPlaybackRequest(mediaPlaybackRequest, deltaPositionMilliseconds); diff --git a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.h b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.h index 5e4335bbe2d14e..75b1ae1a177685 100644 --- a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.h +++ b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.h @@ -18,32 +18,18 @@ #pragma once +#include #include #include #include -enum MediaPlaybackRequest -{ - Play, - Pause, - Stop, - StartOver, - Previous, - Next, - Rewind, - FastForward, - SkipForward, - SkipBackward, - Seek -}; - class MediaPlaybackManager { public: CHIP_ERROR Init(); void storeNewPlaybackState(chip::EndpointId endpoint, uint8_t newPlaybackState); - EmberAfMediaPlaybackStatus proxyMediaPlaybackRequest(EmberAfMediaPlaybackRequest mediaPlaybackRequest, + EmberAfMediaPlaybackStatus proxyMediaPlaybackRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds); private: diff --git a/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp index 7eb75b47ad1efb..df249a8902e046 100644 --- a/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp @@ -17,6 +17,7 @@ #include "TargetNavigatorManager.h" #include +#include #include #include #include @@ -58,10 +59,10 @@ std::vector TargetNavigatorManager::proxyGetTar return targets; } -EmberAfTargetNavigatorResponse targetNavigatorClusterNavigateTarget(uint8_t target, std::string data) +TargetNavigatorResponse targetNavigatorClusterNavigateTarget(uint8_t target, std::string data) { // TODO: Insert code here - EmberAfTargetNavigatorResponse response; + TargetNavigatorResponse response; char testData[] = "data response"; response.data = (uint8_t *) testData; response.status = EMBER_ZCL_APPLICATION_LAUNCHER_STATUS_SUCCESS; diff --git a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp index ff99feb51e3930..328a287b27598b 100644 --- a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp +++ b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp @@ -191,7 +191,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_ACCOUNT_LOGIN_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ACCOUNT_LOGIN_CLUSTER_ID); return; } } @@ -418,7 +418,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_APPLICATION_LAUNCHER_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_APPLICATION_LAUNCHER_CLUSTER_ID); return; } } @@ -1434,7 +1434,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_KEYPAD_INPUT_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_KEYPAD_INPUT_CLUSTER_ID); return; } } @@ -2019,7 +2019,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_LOW_POWER_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LOW_POWER_CLUSTER_ID); return; } } @@ -2203,7 +2203,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_MEDIA_INPUT_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_MEDIA_INPUT_CLUSTER_ID); return; } } @@ -4253,7 +4253,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_TV_CHANNEL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_TV_CHANNEL_CLUSTER_ID); return; } } @@ -4366,7 +4366,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx8 " for cluster %" PRIx16, aCommandId, ZCL_TARGET_NAVIGATOR_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_TARGET_NAVIGATOR_CLUSTER_ID); return; } } diff --git a/examples/tv-app/tv-common/gen/endpoint_config.h b/examples/tv-app/tv-common/gen/endpoint_config.h index 0d1acc223c7da6..872f5a37aa1ee9 100644 --- a/examples/tv-app/tv-common/gen/endpoint_config.h +++ b/examples/tv-app/tv-common/gen/endpoint_config.h @@ -1847,7 +1847,7 @@ // Array of EmberAfCommandMetadata structs. #define ZAP_COMMAND_MASK(mask) COMMAND_MASK_##mask -#define EMBER_AF_GENERATED_COMMAND_COUNT (117) +#define EMBER_AF_GENERATED_COMMAND_COUNT (116) #define GENERATED_COMMANDS \ { \ \ @@ -1997,7 +1997,6 @@ { 0x0506, 0x09, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipBackward */ \ { 0x0506, 0x09, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipBackwardResponse */ \ { 0x0506, 0x0A, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipSeek */ \ - { 0x0506, 0x0A, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipSeekResponse */ \ \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { 0x050A, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* LaunchContent */ \ diff --git a/scripts/tests/test_suites.sh b/scripts/tests/test_suites.sh index 04eba4ca42c486..2f70ca2ad551ba 100755 --- a/scripts/tests/test_suites.sh +++ b/scripts/tests/test_suites.sh @@ -18,14 +18,31 @@ set -e -declare -a test_array=("Test_3_1_1" - "Test_3_2_1" - "Test_3_2_2" - "Test_10_1_1" - "TestCluster") declare -i iterations=20 declare -i background_pid=0 +# read shell arguments +# - a for application +# - i for number of iterations you want to have +while getopts a:i: flag; do + case "${flag}" in + a) application=${OPTARG} ;; + i) iterations=${OPTARG} ;; + esac +done + +echo "Running tests for application: $application, with iterations set to: $iterations" + +if [[ $application == "tv" ]]; then + declare -a test_array="($(find src/app/tests/suites -type f -name "TV_*.yaml" -exec basename {} .yaml \;))" + cp examples/tv-app/linux/include/endpoint-configuration/chip_tv_config.ini /tmp/chip_tv_config.ini +# in case there's no application argument +# always default to all-cluters app +else + application="all-clusters" + declare -a test_array="($(find src/app/tests/suites -type f -name "Test*.yaml" -exec basename {} .yaml \;))" +fi + cleanup() { if [[ $background_pid != 0 ]]; then # In case we died on a failure before we cleaned up our background task. @@ -34,12 +51,9 @@ cleanup() { } trap cleanup EXIT -if [[ -n $1 ]]; then - iterations=$1 - if [[ $iterations == 0 ]]; then - echo "Invalid iteration count: '$1'" - exit 1 - fi +if [[ $iterations == 0 ]]; then + echo "Invalid iteration count: '$1'" + exit 1 fi echo "Found tests:" @@ -59,7 +73,7 @@ for j in "${iter_array[@]}"; do echo " * Starting cluster server" rm -rf /tmp/chip_tool_config.ini # This part is a little complicated. We want to - # 1) Start chip-all-clusters-app in the background + # 1) Start chip-app in the background # 2) Pipe its output through tee so we can wait until it's ready for a # PASE handshake. # 3) Save its pid off so we can kill it. @@ -76,14 +90,14 @@ for j in "${iter_array[@]}"; do # Clear out our temp files so we don't accidentally do a stale # read from them before we write to them. - rm -rf /tmp/all-clusters-log - touch /tmp/all-clusters-log + rm -rf /tmp/$application-log + touch /tmp/$application-log rm -rf /tmp/pid ( - stdbuf -o0 out/debug/standalone/chip-all-clusters-app & + stdbuf -o0 out/debug/standalone/chip-$application-app & echo $! >&3 - ) 3>/tmp/pid | tee /tmp/all-clusters-log & - while ! grep -q "Server Listening" /tmp/all-clusters-log; do + ) 3>/tmp/pid | tee /tmp/$application-log & + while ! grep -q "Server Listening" /tmp/$application-log; do : done # Now read $background_pid from /tmp/pid; presumably it's diff --git a/scripts/tests/test_tv_suites.sh b/scripts/tests/test_tv_suites.sh deleted file mode 100755 index 31ba57bd93a0b1..00000000000000 --- a/scripts/tests/test_tv_suites.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright (c) 2020 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. -# - -set -e - -declare -i iterations=1 -declare -i background_pid=0 -declare -a test_array=("TargetNavigatorCluster" - "AudioOutputCluster" - "ApplicationLauncherCluster" - "KeypadInputCluster" - "ApplicationBasicCluster" - "MediaPlaybackCluster" - "TvChannelCluster" - "MediaInputCluster" - "LowPowerCluster" - "AccountLoginCluster") - -cleanup() { - if [[ $background_pid != 0 ]]; then - # In case we died on a failure before we cleaned up our background task. - kill -9 "$background_pid" || true - fi -} -trap cleanup EXIT - -if [[ -n $1 ]]; then - iterations=$1 - if [[ $iterations == 0 ]]; then - echo "Invalid iteration count: '$1'" - exit 1 - fi -fi - -echo "Found tests:" -for i in "${test_array[@]}"; do - echo " $i" -done -echo "" -echo "" - -ulimit -c unlimited || true - -declare -a iter_array="($(seq "$iterations"))" -for j in "${iter_array[@]}"; do - echo " ===== Iteration $j starting" - for i in "${test_array[@]}"; do - echo " ===== Running test: $i" - echo " * Starting cluster server" - cp examples/tv-app/linux/include/endpoint-configuration/chip_tv_config.ini /tmp/chip_tv_config.ini - rm -rf /tmp/chip_tool_config.ini - # This part is a little complicated. We want to - # 1) Start chip-tv-app in the background - # 2) Pipe its output through tee so we can wait until it's ready for a - # PASE handshake. - # 3) Save its pid off so we can kill it. - # - # The subshell with echoing of $! to a file descriptor and - # then reading things out of there accomplishes item 3; - # otherwise $! would be the last-started command which would - # be the tee. This part comes from https://stackoverflow.com/a/3786955 - # and better ideas are welcome. - # - # The stdbuf -o0 is to make sure our output is flushed through - # tee expeditiously; otherwise it will buffer things up and we - # will never see the string we want. - - # Clear out our temp files so we don't accidentally do a stale - # read from them before we write to them. - rm -rf /tmp/tv-log - rm -rf /tmp/pid - ( - stdbuf -o0 out/debug/standalone/chip-tv-app & - echo $! >&3 - ) 3>/tmp/pid | tee /tmp/tv-log & - while ! grep -q "Server Listening" /tmp/tv-log; do - : - done - # Now read $background_pid from /tmp/pid; presumably it's - # landed there by now. If we try to read it immediately after - # kicking off the subshell, sometimes we try to do it before - # the data is there yet. - background_pid="$( +#include #include #include #include #include #include -EmberAfApplicationLauncherResponse applicationLauncherClusterLaunchApp(EmberAfApplicationLauncherApp application, std::string data); +ApplicationLauncherResponse applicationLauncherClusterLaunchApp(EmberAfApplicationLauncherApp application, std::string data); bool emberAfApplicationLauncherClusterLaunchAppCallback(chip::app::Command * commandObj, unsigned char *, unsigned char *) { @@ -54,7 +55,7 @@ bool emberAfApplicationLauncherClusterLaunchAppCallback(chip::app::Command * com return true; } -void sendResponse(chip::app::Command * command, EmberAfApplicationLauncherResponse response) +void sendResponse(chip::app::Command * command, ApplicationLauncherResponse response) { CHIP_ERROR err = CHIP_NO_ERROR; chip::app::CommandPathParams cmdParams = { emberAfCurrentEndpoint(), /* group id */ 0, ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, @@ -87,7 +88,7 @@ bool emberAfApplicationLauncherClusterLaunchAppCallback(chip::app::Command * com { EmberAfApplicationLauncherApp application = getApplicationFromCommand(requestApplicationCatalogVendorId, requestApplicationId); std::string reqestDataString(reinterpret_cast(requestData)); - EmberAfApplicationLauncherResponse response = applicationLauncherClusterLaunchApp(application, reqestDataString); + ApplicationLauncherResponse response = applicationLauncherClusterLaunchApp(application, reqestDataString); sendResponse(command, response); return true; } diff --git a/src/app/clusters/application-launcher-server/application-launcher-server.h b/src/app/clusters/application-launcher-server/application-launcher-server.h new file mode 100644 index 00000000000000..ae41a0418fd6b6 --- /dev/null +++ b/src/app/clusters/application-launcher-server/application-launcher-server.h @@ -0,0 +1,44 @@ +/** + * + * 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. + */ + +/** + * + * Copyright (c) 2021 Silicon Labs + * + * 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. + */ +/**************************************************************************** + * @file + * @brief Routines for the Application Launcher plugin, the + *server implementation of the Application Launcher cluster. + ******************************************************************************* + ******************************************************************************/ +typedef struct _ApplicationLauncherResponse +{ + uint8_t status; + uint8_t * data; +} ApplicationLauncherResponse; \ No newline at end of file diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp index d7821426f7abe3..32f77642ab8fdb 100644 --- a/src/app/clusters/media-playback-server/media-playback-server.cpp +++ b/src/app/clusters/media-playback-server/media-playback-server.cpp @@ -39,6 +39,7 @@ ******************************************************************************/ #include +#include #include #include #include @@ -46,7 +47,7 @@ #include #include -EmberAfMediaPlaybackStatus mediaPlaybackClusterSendMediaPlaybackRequest(EmberAfMediaPlaybackRequest mediaPlaybackRequest, +EmberAfMediaPlaybackStatus mediaPlaybackClusterSendMediaPlaybackRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds); uint8_t mediaPlaybackClusterPlaybackState; @@ -114,7 +115,7 @@ static void sendResponse(chip::app::Command * command, const char * responseName bool emberAfMediaPlaybackClusterMediaPlayCallback(chip::app::Command * command) { - EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PLAY, 0); + EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_PLAY, 0); storeNewPlaybackState(emberAfCurrentEndpoint(), EMBER_ZCL_MEDIA_PLAYBACK_STATE_PLAYING); sendResponse(command, "MediaPlayResponse", ZCL_MEDIA_PLAY_RESPONSE_COMMAND_ID, status); return true; @@ -122,7 +123,7 @@ bool emberAfMediaPlaybackClusterMediaPlayCallback(chip::app::Command * command) bool emberAfMediaPlaybackClusterMediaPauseCallback(chip::app::Command * command) { - EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PAUSE, 0); + EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_PAUSE, 0); storeNewPlaybackState(emberAfCurrentEndpoint(), EMBER_ZCL_MEDIA_PLAYBACK_STATE_PAUSED); sendResponse(command, "MediaPauseResponse", ZCL_MEDIA_PAUSE_RESPONSE_COMMAND_ID, status); return true; @@ -130,7 +131,7 @@ bool emberAfMediaPlaybackClusterMediaPauseCallback(chip::app::Command * command) bool emberAfMediaPlaybackClusterMediaStopCallback(chip::app::Command * command) { - EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_STOP, 0); + EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_STOP, 0); storeNewPlaybackState(emberAfCurrentEndpoint(), EMBER_ZCL_MEDIA_PLAYBACK_STATE_NOT_PLAYING); sendResponse(command, "MediaStopResponse", ZCL_MEDIA_STOP_RESPONSE_COMMAND_ID, status); return true; @@ -138,22 +139,21 @@ bool emberAfMediaPlaybackClusterMediaStopCallback(chip::app::Command * command) bool emberAfMediaPlaybackClusterMediaFastForwardCallback(chip::app::Command * command) { - EmberAfMediaPlaybackStatus status = - mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_FAST_FORWARD, 0); + EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_FAST_FORWARD, 0); sendResponse(command, "MediaFastForward", ZCL_MEDIA_FAST_FORWARD_RESPONSE_COMMAND_ID, status); return true; } bool emberAfMediaPlaybackClusterMediaPreviousCallback(chip::app::Command * command) { - EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PREVIOUS, 0); + EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_PREVIOUS, 0); sendResponse(command, "MediaPrevious", ZCL_MEDIA_PREVIOUS_RESPONSE_COMMAND_ID, status); return true; } bool emberAfMediaPlaybackClusterMediaRewindCallback(chip::app::Command * command) { - EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_REWIND, 0); + EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_REWIND, 0); sendResponse(command, "MediaRewind", ZCL_MEDIA_REWIND_RESPONSE_COMMAND_ID, status); return true; } @@ -161,7 +161,7 @@ bool emberAfMediaPlaybackClusterMediaRewindCallback(chip::app::Command * command bool emberAfMediaPlaybackClusterMediaSkipBackwardCallback(chip::app::Command * command, uint64_t deltaPositionMilliseconds) { EmberAfMediaPlaybackStatus status = - mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD, deltaPositionMilliseconds); + mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD, deltaPositionMilliseconds); sendResponse(command, "MediaSkipBackward", ZCL_MEDIA_SKIP_BACKWARD_RESPONSE_COMMAND_ID, status); return true; } @@ -169,7 +169,7 @@ bool emberAfMediaPlaybackClusterMediaSkipBackwardCallback(chip::app::Command * c bool emberAfMediaPlaybackClusterMediaSkipForwardCallback(chip::app::Command * command, uint64_t deltaPositionMilliseconds) { EmberAfMediaPlaybackStatus status = - mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD, deltaPositionMilliseconds); + mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD, deltaPositionMilliseconds); sendResponse(command, "MediaSkipForward", ZCL_MEDIA_SKIP_FORWARD_RESPONSE_COMMAND_ID, status); return true; } @@ -177,21 +177,20 @@ bool emberAfMediaPlaybackClusterMediaSkipForwardCallback(chip::app::Command * co bool emberAfMediaPlaybackClusterMediaSkipSeekCallback(chip::app::Command * command, uint64_t positionMilliseconds) { EmberAfMediaPlaybackStatus status = - mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SEEK, positionMilliseconds); + mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_SEEK, positionMilliseconds); sendResponse(command, "MediaSeek", ZCL_MEDIA_SKIP_SEEK_RESPONSE_COMMAND_ID, status); return true; } bool emberAfMediaPlaybackClusterMediaNextCallback(chip::app::Command * command) { - EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_NEXT, 0); + EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_NEXT, 0); sendResponse(command, "MediaNext", ZCL_MEDIA_NEXT_RESPONSE_COMMAND_ID, status); return true; } bool emberAfMediaPlaybackClusterMediaStartOverCallback(chip::app::Command * command) { - EmberAfMediaPlaybackStatus status = - mediaPlaybackClusterSendMediaPlaybackRequest(EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_START_OVER, 0); + EmberAfMediaPlaybackStatus status = mediaPlaybackClusterSendMediaPlaybackRequest(MEDIA_PLAYBACK_REQUEST_START_OVER, 0); sendResponse(command, "MediaStartOver", ZCL_MEDIA_START_OVER_RESPONSE_COMMAND_ID, status); return true; } diff --git a/src/app/clusters/media-playback-server/media-playback-server.h b/src/app/clusters/media-playback-server/media-playback-server.h new file mode 100644 index 00000000000000..c536bbb58d8907 --- /dev/null +++ b/src/app/clusters/media-playback-server/media-playback-server.h @@ -0,0 +1,56 @@ +/** + * + * 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. + */ + +/** + * + * Copyright (c) 2021 Silicon Labs + * + * 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. + */ +/**************************************************************************** + * @file + * @brief Routines for the Media Playback plugin, the + *server implementation of the Media Playback cluster. + ******************************************************************************* + ******************************************************************************/ + +#include + +enum MediaPlaybackRequest : uint8_t +{ + MEDIA_PLAYBACK_REQUEST_PLAY = 0, + MEDIA_PLAYBACK_REQUEST_PAUSE = 1, + MEDIA_PLAYBACK_REQUEST_STOP = 2, + MEDIA_PLAYBACK_REQUEST_START_OVER = 3, + MEDIA_PLAYBACK_REQUEST_PREVIOUS = 4, + MEDIA_PLAYBACK_REQUEST_NEXT = 5, + MEDIA_PLAYBACK_REQUEST_REWIND = 6, + MEDIA_PLAYBACK_REQUEST_FAST_FORWARD = 7, + MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD = 8, + MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD = 9, + MEDIA_PLAYBACK_REQUEST_SEEK = 10, +}; \ No newline at end of file diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.cpp b/src/app/clusters/target-navigator-server/target-navigator-server.cpp index 56fd4755e4cc3c..c07c3aed645d27 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-server.cpp +++ b/src/app/clusters/target-navigator-server/target-navigator-server.cpp @@ -39,15 +39,16 @@ ******************************************************************************/ #include +#include #include #include #include #include #include -EmberAfTargetNavigatorResponse targetNavigatorClusterNavigateTarget(uint8_t target, std::string data); +TargetNavigatorResponse targetNavigatorClusterNavigateTarget(uint8_t target, std::string data); -void sendResponse(chip::app::Command * command, EmberAfTargetNavigatorResponse response) +void sendResponse(chip::app::Command * command, TargetNavigatorResponse response) { CHIP_ERROR err = CHIP_NO_ERROR; chip::app::CommandPathParams cmdParams = { emberAfCurrentEndpoint(), /* group id */ 0, ZCL_TARGET_NAVIGATOR_CLUSTER_ID, @@ -69,7 +70,7 @@ void sendResponse(chip::app::Command * command, EmberAfTargetNavigatorResponse r bool emberAfTargetNavigatorClusterNavigateTargetCallback(chip::app::Command * command, unsigned char target, unsigned char * data) { std::string dataString(reinterpret_cast(data)); - EmberAfTargetNavigatorResponse response = targetNavigatorClusterNavigateTarget(target, dataString); + TargetNavigatorResponse response = targetNavigatorClusterNavigateTarget(target, dataString); sendResponse(command, response); return true; } diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.h b/src/app/clusters/target-navigator-server/target-navigator-server.h new file mode 100644 index 00000000000000..99c4635bebe536 --- /dev/null +++ b/src/app/clusters/target-navigator-server/target-navigator-server.h @@ -0,0 +1,45 @@ +/** + * + * 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. + */ + +/** + * + * Copyright (c) 2021 Silicon Labs + * + * 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. + */ +/**************************************************************************** + * @file + * @brief Routines for the Target Navigator plugin, the + *server implementation of the Target Navigator cluster. + ******************************************************************************* + ******************************************************************************/ + +typedef struct _TargetNavigatorResponse +{ + uint8_t status; + uint8_t * data; +} TargetNavigatorResponse; \ No newline at end of file diff --git a/src/app/common/gen/af-structs.h b/src/app/common/gen/af-structs.h index 45f4d4246981f9..fffbf046564fa4 100644 --- a/src/app/common/gen/af-structs.h +++ b/src/app/common/gen/af-structs.h @@ -32,13 +32,6 @@ typedef struct _ApplicationLauncherApp uint8_t * applicationId; } EmberAfApplicationLauncherApp; -// Struct for ApplicationLauncherResponse -typedef struct _ApplicationLauncherResponse -{ - uint8_t status; - uint8_t * data; -} EmberAfApplicationLauncherResponse; - // Struct for AudioOutputInfo typedef struct _AudioOutputInfo { @@ -353,13 +346,6 @@ typedef struct _SecurityPolicy uint8_t Flags; } EmberAfSecurityPolicy; -// Struct for TargetNavigatorResponse -typedef struct _TargetNavigatorResponse -{ - uint8_t status; - uint8_t * data; -} EmberAfTargetNavigatorResponse; - // Struct for TestListStructOctet typedef struct _TestListStructOctet { diff --git a/src/app/common/gen/command-id.h b/src/app/common/gen/command-id.h index 5de8fa92c056c3..a8eaee2d563a44 100644 --- a/src/app/common/gen/command-id.h +++ b/src/app/common/gen/command-id.h @@ -400,7 +400,7 @@ #define ZCL_MEDIA_SKIP_BACKWARD_COMMAND_ID (0x09) #define ZCL_MEDIA_SKIP_BACKWARD_RESPONSE_COMMAND_ID (0x09) #define ZCL_MEDIA_SKIP_SEEK_COMMAND_ID (0x0A) -#define ZCL_MEDIA_SKIP_SEEK_RESPONSE_COMMAND_ID (0x0A) +#define ZCL_MEDIA_SKIP_SEEK_RESPONSE_COMMAND_ID (0x0B) // Commands for cluster: Media Input #define ZCL_SELECT_INPUT_COMMAND_ID (0x00) diff --git a/src/app/common/gen/enums.h b/src/app/common/gen/enums.h index 11e2598895115c..4145e4207f7e3f 100644 --- a/src/app/common/gen/enums.h +++ b/src/app/common/gen/enums.h @@ -934,22 +934,6 @@ enum EmberAfMediaInputType : uint8_t EMBER_ZCL_MEDIA_INPUT_TYPE_OTHER = 11, }; -// Enum for MediaPlaybackRequest -enum EmberAfMediaPlaybackRequest : uint8_t -{ - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PLAY = 0, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PAUSE = 1, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_STOP = 2, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_START_OVER = 3, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_PREVIOUS = 4, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_NEXT = 5, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_REWIND = 6, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_FAST_FORWARD = 7, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD = 8, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD = 9, - EMBER_ZCL_MEDIA_PLAYBACK_REQUEST_SEEK = 10, -}; - // Enum for MediaPlaybackState enum EmberAfMediaPlaybackState : uint8_t { diff --git a/src/app/tests/suites/AccountLoginCluster.yaml b/src/app/tests/suites/TV_AccountLoginCluster.yaml similarity index 100% rename from src/app/tests/suites/AccountLoginCluster.yaml rename to src/app/tests/suites/TV_AccountLoginCluster.yaml diff --git a/src/app/tests/suites/ApplicationBasicCluster.yaml b/src/app/tests/suites/TV_ApplicationBasicCluster.yaml similarity index 100% rename from src/app/tests/suites/ApplicationBasicCluster.yaml rename to src/app/tests/suites/TV_ApplicationBasicCluster.yaml diff --git a/src/app/tests/suites/ApplicationLauncherCluster.yaml b/src/app/tests/suites/TV_ApplicationLauncherCluster.yaml similarity index 100% rename from src/app/tests/suites/ApplicationLauncherCluster.yaml rename to src/app/tests/suites/TV_ApplicationLauncherCluster.yaml diff --git a/src/app/tests/suites/AudioOutputCluster.yaml b/src/app/tests/suites/TV_AudioOutputCluster.yaml similarity index 100% rename from src/app/tests/suites/AudioOutputCluster.yaml rename to src/app/tests/suites/TV_AudioOutputCluster.yaml diff --git a/src/app/tests/suites/KeypadInputCluster.yaml b/src/app/tests/suites/TV_KeypadInputCluster.yaml similarity index 100% rename from src/app/tests/suites/KeypadInputCluster.yaml rename to src/app/tests/suites/TV_KeypadInputCluster.yaml diff --git a/src/app/tests/suites/LowPowerCluster.yaml b/src/app/tests/suites/TV_LowPowerCluster.yaml similarity index 100% rename from src/app/tests/suites/LowPowerCluster.yaml rename to src/app/tests/suites/TV_LowPowerCluster.yaml diff --git a/src/app/tests/suites/MediaInputCluster.yaml b/src/app/tests/suites/TV_MediaInputCluster.yaml similarity index 100% rename from src/app/tests/suites/MediaInputCluster.yaml rename to src/app/tests/suites/TV_MediaInputCluster.yaml diff --git a/src/app/tests/suites/MediaPlaybackCluster.yaml b/src/app/tests/suites/TV_MediaPlaybackCluster.yaml similarity index 100% rename from src/app/tests/suites/MediaPlaybackCluster.yaml rename to src/app/tests/suites/TV_MediaPlaybackCluster.yaml diff --git a/src/app/tests/suites/TargetNavigatorCluster.yaml b/src/app/tests/suites/TV_TargetNavigatorCluster.yaml similarity index 100% rename from src/app/tests/suites/TargetNavigatorCluster.yaml rename to src/app/tests/suites/TV_TargetNavigatorCluster.yaml diff --git a/src/app/tests/suites/TvChannelCluster.yaml b/src/app/tests/suites/TV_TvChannelCluster.yaml similarity index 100% rename from src/app/tests/suites/TvChannelCluster.yaml rename to src/app/tests/suites/TV_TvChannelCluster.yaml 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 837cd12db6fdcb..abc8951e75baa4 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 @@ -24,13 +24,13 @@ limitations under the License. true true This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. - vendor name - vendor id - application name - product id - application id - catalog vendor id - application status + vendor name + vendor id + application name + product id + application id + catalog vendor id + application status Upon receipt, this SHALL change the running status of the application. 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 ed9a3367219db6..330505e950c31b 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,14 +26,14 @@ 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 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. - + @@ -51,11 +51,6 @@ 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 cf267751a9d51c..14cccbd5f0a13d 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 @@ -134,7 +134,7 @@ limitations under the License. - + Upon receipt, this SHALL change the playback position in the media to the given position using data as follows: @@ -161,18 +161,4 @@ limitations under the License. - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml index 493f97baa0c8d6..70aa60616d2007 100644 --- a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml @@ -51,9 +51,4 @@ limitations under the License. - - - - - diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 821e2d20e67bdf..ed2c89915b00ad 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -7580,7 +7580,7 @@ }, { "name": "MediaSkipSeekResponse", - "code": 10, + "code": 11, "mfgCode": null, "source": "server", "incoming": 1, @@ -8940,4 +8940,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/src/controller/data_model/gen/encoder.cpp b/src/controller/data_model/gen/encoder.cpp index 18d3629a47a7c0..4cc9de0a42798c 100644 --- a/src/controller/data_model/gen/encoder.cpp +++ b/src/controller/data_model/gen/encoder.cpp @@ -490,7 +490,7 @@ PacketBufferHandle encodeApplicationBasicClusterReadCatalogVendorIdAttribute(uin PacketBufferHandle encodeApplicationBasicClusterReadApplicationStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { COMMAND_HEADER("ReadApplicationBasicApplicationStatus", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0007); COMMAND_FOOTER(); } diff --git a/src/controller/data_model/gen/endpoint_config.h b/src/controller/data_model/gen/endpoint_config.h index 93ecdf2ac369ee..2986a1876a6ee7 100644 --- a/src/controller/data_model/gen/endpoint_config.h +++ b/src/controller/data_model/gen/endpoint_config.h @@ -655,7 +655,7 @@ { 0x0506, 0x09, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipBackward */ \ { 0x0506, 0x09, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipBackwardResponse */ \ { 0x0506, 0x0A, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MediaSkipSeek */ \ - { 0x0506, 0x0A, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipSeekResponse */ \ + { 0x0506, 0x0B, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* MediaSkipSeekResponse */ \ \ /* Endpoint: 1, Cluster: Media Input (client) */ \ { 0x0507, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* SelectInput */ \