diff --git a/CHANGELOG.md b/CHANGELOG.md index c736e074b..7d3920110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.4.0-next.10](https://github.com/rdkcentral/firebolt-apis/compare/v1.4.0-next.9...v1.4.0-next.10) (2024-09-19) + + +### Features + +* Add global subscribe & HDMI tests to manage test app ([#320](https://github.com/rdkcentral/firebolt-apis/issues/320)) ([63962ab](https://github.com/rdkcentral/firebolt-apis/commit/63962ab3131358f77e97af73bc3e4207f958e5fb)) + # [1.4.0-next.9](https://github.com/rdkcentral/firebolt-apis/compare/v1.4.0-next.8...v1.4.0-next.9) (2024-09-19) diff --git a/package-lock.json b/package-lock.json index f1d774e7a..2407354f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@firebolt-js/sdks", - "version": "1.4.0-next.9", + "version": "1.4.0-next.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@firebolt-js/sdks", - "version": "1.4.0-next.9", + "version": "1.4.0-next.10", "license": "Apache-2.0", "workspaces": [ "src/sdks/core", diff --git a/package.json b/package.json index 9e149cd01..8827c5d38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/sdks", - "version": "1.4.0-next.9", + "version": "1.4.0-next.10", "description": "The Firebolt JS SDK", "type": "module", "bin": { diff --git a/src/sdks/core/package.json b/src/sdks/core/package.json index d7f06536d..652cf8e11 100644 --- a/src/sdks/core/package.json +++ b/src/sdks/core/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/sdk", - "version": "1.4.0-next.9", + "version": "1.4.0-next.10", "description": "The Firebolt JS SDK", "main": "./dist/lib/firebolt.mjs", "types": "./dist/lib/firebolt.d.ts", diff --git a/src/sdks/discovery/package.json b/src/sdks/discovery/package.json index af169d23f..b9f5be665 100644 --- a/src/sdks/discovery/package.json +++ b/src/sdks/discovery/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/discovery-sdk", - "version": "1.4.0-next.9", + "version": "1.4.0-next.10", "description": "The Firebolt Discovery JS SDK", "main": "./dist/lib/firebolt-discovery.mjs", "types": "./dist/lib/firebolt-discovery.d.ts", diff --git a/src/sdks/manage/package.json b/src/sdks/manage/package.json index 7e2d98034..57d2ee973 100644 --- a/src/sdks/manage/package.json +++ b/src/sdks/manage/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/manage-sdk", - "version": "1.4.0-next.9", + "version": "1.4.0-next.10", "description": "The Firebolt Manage JS SDK", "main": "./dist/lib/firebolt-manage.mjs", "types": "./dist/lib/firebolt-manage.d.ts", diff --git a/src/sdks/manage/src/cpp/sdk/cpptest/Main.cpp b/src/sdks/manage/src/cpp/sdk/cpptest/Main.cpp index 4d2698dbe..402bda600 100644 --- a/src/sdks/manage/src/cpp/sdk/cpptest/Main.cpp +++ b/src/sdks/manage/src/cpp/sdk/cpptest/Main.cpp @@ -121,6 +121,15 @@ void RunAllTests() { runTest(ManageSDKTest::SendResponseMessageToPinChallengeProvider, "SendResponseMessageToPinChallengeProvider"); runTest(ManageSDKTest::SendErrorMessageToPinChallengeProvider, "SendErrorMessageToPinChallengeProvider"); + runTest(ManageSDKTest::GlobalSubscribeHdmiAutoLowLatencyModeCapableChanged, "GlobalSubscribeHdmiAutoLowLatencyModeCapableChanged"); + runTest(ManageSDKTest::GlobalUnsubscribeHdmiAutoLowLatencyModeCapableChanged, "GlobalUnsubscribeHdmiAutoLowLatencyModeCapableChanged"); + + runTest(ManageSDKTest::GetAutoLowLatencyModeCapable, "GetAutoLowLatencyModeCapable"); + runTest(ManageSDKTest::SetAutoLowLatencyModeCapable, "SetAutoLowLatencyModeCapable"); + runTest(ManageSDKTest::GetEdidVersion, "GetEdidVersion"); + runTest(ManageSDKTest::SetEdidVersion, "SetEdidVersion"); + runTest(ManageSDKTest::GetHdmiPortInfo, "GetHdmiPortInfo"); + if (allTestsPassed) { cout << "============================" << endl; cout << "ALL MANAGE SDK TESTS SUCCEEDED!" << endl; diff --git a/src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.cpp b/src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.cpp index 6dde2c9c2..04a2bb504 100644 --- a/src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.cpp +++ b/src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.cpp @@ -31,6 +31,7 @@ ManageSDKTest::OnPreferredAudioLanguagesChangedNotification ManageSDKTest::_pref ManageSDKTest::OnAllowACRCollectionChangedNotification ManageSDKTest::_allowACRCollectionChangedNotification; ManageSDKTest::OnSignInNotification ManageSDKTest::_signInNotification; ManageSDKTest::OnSignOutNotification ManageSDKTest::_signOutNotification; +ManageSDKTest::OnAutoLowLatencyModeCapableChangedNotification ManageSDKTest::_autoLowLatencyModeCapableChangedNotification; ManageSDKTest::KeyboardProvider ManageSDKTest::_keyboardProvider; ManageSDKTest::AcknowledgeChallengeProvider ManageSDKTest::_acknowledgeChallengeProvider; ManageSDKTest::PinChallengeProvider ManageSDKTest::_pinChallengeProvider; @@ -1012,3 +1013,104 @@ void ManageSDKTest::WifiDisconnect() throw std::runtime_error("WifiDisconnect failed. " + errorMessage); } } + +void ManageSDKTest::OnAutoLowLatencyModeCapableChangedNotification::onAutoLowLatencyModeCapableChanged( const Firebolt::HDMIInput::AutoLowLatencyModeCapableChangedInfo& info) +{ + cout << "Low latency capable changed" << endl; +} + +void ManageSDKTest::GlobalSubscribeHdmiAutoLowLatencyModeCapableChanged() +{ + Firebolt::Error error = Firebolt::Error::None; + Firebolt::IFireboltAccessor::Instance().HDMIInputInterface().globalSubscribe(_autoLowLatencyModeCapableChangedNotification, &error); + if (error == Firebolt::Error::None) { + cout << "Global Subscribe for HDMIInput AutoLowLatencyModeCapable is a success." << endl; + } else { + std::string errorMessage = "Error: " + std::to_string(static_cast(error)); + throw std::runtime_error("SubscribeHDMIInputAutoLowLatencyModeCapable failed." + errorMessage); + } +} + +void ManageSDKTest::GlobalUnsubscribeHdmiAutoLowLatencyModeCapableChanged() +{ + Firebolt::Error error = Firebolt::Error::None; + Firebolt::IFireboltAccessor::Instance().HDMIInputInterface().globalUnsubscribe(_autoLowLatencyModeCapableChangedNotification, &error); + if (error == Firebolt::Error::None) { + cout << "Global Unsubscribe for HDMIInput AutoLowLatencyModeCapable is a success." << endl; + } else { + std::string errorMessage = "Error: " + std::to_string(static_cast(error)); + throw std::runtime_error("UnsubscribeHDMIInputAutoLowLatencyModeCapable failed." + errorMessage); + } +} + +void ManageSDKTest::GetAutoLowLatencyModeCapable() +{ + Firebolt::Error error = Firebolt::Error::None; + std::string port = "HDMI1"; + bool result = Firebolt::IFireboltAccessor::Instance().HDMIInputInterface().autoLowLatencyModeCapable(port, &error); + + if (error == Firebolt::Error::None) { + cout << "GetAutoLowLatencyModeCapable is a success." << endl; + } else { + std::string errorMessage = "Error: " + std::to_string(static_cast(error)); + throw std::runtime_error("GetAutoLowLatencyModeCapable failed. " + errorMessage); + } +} + +void ManageSDKTest::SetAutoLowLatencyModeCapable() +{ + Firebolt::Error error = Firebolt::Error::None; + std::string port = "HDMI1"; + bool value = false; + Firebolt::IFireboltAccessor::Instance().HDMIInputInterface().setAutoLowLatencyModeCapable(port, value, &error); + + if (error == Firebolt::Error::None) { + cout << "SetAutoLowLatencyModeCapable is a success." << endl; + } else { + std::string errorMessage = "Error: " + std::to_string(static_cast(error)); + throw std::runtime_error("SetAutoLowLatencyModeCapable failed. " + errorMessage); + } +} + +void ManageSDKTest::GetEdidVersion() +{ + Firebolt::Error error = Firebolt::Error::None; + std::string port = "HDMI1"; + Firebolt::IFireboltAccessor::Instance().HDMIInputInterface().edidVersion(port, &error); + + if (error == Firebolt::Error::None) { + cout << "GetEdidVersion is a success." << endl; + } else { + std::string errorMessage = "Error: " + std::to_string(static_cast(error)); + throw std::runtime_error("GetEdidVersion failed. " + errorMessage); + } +} + +void ManageSDKTest::SetEdidVersion() +{ + Firebolt::Error error = Firebolt::Error::None; + std::string port = "HDMI1"; + Firebolt::HDMIInput::EDIDVersion value = Firebolt::HDMIInput::EDIDVersion::V1_4; + Firebolt::IFireboltAccessor::Instance().HDMIInputInterface().setEdidVersion(port, value, &error); + + if (error == Firebolt::Error::None) { + cout << "SetEdidVersion is a success." << endl; + } else { + std::string errorMessage = "Error: " + std::to_string(static_cast(error)); + throw std::runtime_error("SetEdidVersionfailed. " + errorMessage); + } +} + +void ManageSDKTest::GetHdmiPortInfo() +{ + Firebolt::Error error = Firebolt::Error::None; + std::string portId = "HDMI1"; + Firebolt::IFireboltAccessor::Instance().HDMIInputInterface().port(portId, &error); + + if (error == Firebolt::Error::None) { + cout << "GetHdmiPortInfo is a success." << endl; + } else { + std::string errorMessage = "Error: " + std::to_string(static_cast(error)); + throw std::runtime_error("GetHdmiPortInfo failed. " + errorMessage); + } +} diff --git a/src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.h b/src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.h index 2f8be7145..018350ec2 100644 --- a/src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.h +++ b/src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.h @@ -108,6 +108,11 @@ class ManageSDKTest { bool _challengeInput; }; + class OnAutoLowLatencyModeCapableChangedNotification : public Firebolt::HDMIInput::IHDMIInput::IOnAutoLowLatencyModeCapableChangedNotification { + public: + void onAutoLowLatencyModeCapableChanged( const Firebolt::HDMIInput::AutoLowLatencyModeCapableChangedInfo& ) override; + }; + public: ManageSDKTest() = default; virtual ~ManageSDKTest() = default; @@ -183,6 +188,15 @@ class ManageSDKTest { static void WifiConnect(); static void WifiDisconnect(); + static void GlobalSubscribeHdmiAutoLowLatencyModeCapableChanged(); + static void GlobalUnsubscribeHdmiAutoLowLatencyModeCapableChanged(); + + static void GetAutoLowLatencyModeCapable(); + static void SetAutoLowLatencyModeCapable(); + static void GetEdidVersion(); + static void SetEdidVersion(); + static void GetHdmiPortInfo(); + static bool WaitOnConnectionReady(); private: @@ -199,6 +213,7 @@ class ManageSDKTest { static PinChallengeProvider _pinChallengeProvider; static OnSignInNotification _signInNotification; static OnSignOutNotification _signOutNotification; + static OnAutoLowLatencyModeCapableChangedNotification _autoLowLatencyModeCapableChangedNotification; static Firebolt::Wifi::AccessPointList _apList; };