Skip to content

Commit

Permalink
Merge branch 'feature/mfos-run-manage-discovery' of https://github.co…
Browse files Browse the repository at this point in the history
…m/rdkcentral/firebolt-apis into feature/mfos-run-manage-discovery
  • Loading branch information
kdivya153 committed Sep 19, 2024
2 parents a771495 + 2a62c0f commit e291ce7
Show file tree
Hide file tree
Showing 9 changed files with 139 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/sdks/core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/sdks/discovery/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/sdks/manage/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 9 additions & 0 deletions src/sdks/manage/src/cpp/sdk/cpptest/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
102 changes: 102 additions & 0 deletions src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<int>(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<int>(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<int>(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<int>(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<int>(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<int>(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<int>(error));
throw std::runtime_error("GetHdmiPortInfo failed. " + errorMessage);
}
}
15 changes: 15 additions & 0 deletions src/sdks/manage/src/cpp/sdk/cpptest/ManageSDKTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand All @@ -199,6 +213,7 @@ class ManageSDKTest {
static PinChallengeProvider _pinChallengeProvider;
static OnSignInNotification _signInNotification;
static OnSignOutNotification _signOutNotification;
static OnAutoLowLatencyModeCapableChangedNotification _autoLowLatencyModeCapableChangedNotification;

static Firebolt::Wifi::AccessPointList _apList;
};
Expand Down

0 comments on commit e291ce7

Please sign in to comment.