Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDK-45352 RDK-45346: Upgrade SkyXione-LLAMA & Xumo devices to use Thunder R4.4.1 #5566

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions DeviceInfo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.13] - 2024-05-31
### Changed
- RDK-45345: Upgrade Sky Glass devices to use Thunder R4.4.1

## [1.0.12] - 2023-01-26
### Changed
- RDK-44991: Upgrade Flex-2.0 devices to use Thunder R4.4.1
Expand Down
2 changes: 1 addition & 1 deletion DeviceInfo/DeviceInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ namespace Plugin {
Core::SystemInfo& singleton(Core::SystemInfo::Instance());

systemInfo.Time = Core::Time::Now().ToRFC1123(true);
#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR >= 4))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR >= 4))
systemInfo.Version = _subSystem->Version() + _T("#") + _subSystem->BuildTreeHash();
#else
systemInfo.Version = _service->Version() + _T("#") + _subSystem->BuildTreeHash();
Expand Down
2 changes: 1 addition & 1 deletion DeviceInfo/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#endif

#include <plugins/plugins.h>
#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR == 4))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
#include <definitions/definitions.h>
#else
#include <interfaces/definitions.h>
Expand Down
4 changes: 4 additions & 0 deletions Messenger/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.1.4] - 2024-05-31
### Changed
- RDK-45345: Upgrade Sky Glass devices to use Thunder R4.4.1

## [1.1.3] - 2023-01-26
### Changed
- RDK-44991: Upgrade Flex-2.0 devices to use Thunder R4.4.1
Expand Down
2 changes: 1 addition & 1 deletion Messenger/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#endif

#include <plugins/plugins.h>
#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR == 4))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
#include <definitions/definitions.h>
#else
#include <interfaces/definitions.h>
Expand Down
5 changes: 5 additions & 0 deletions Monitor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.7] - 2024-07-24
### Changed
- RDK-45345: Upgrade Sky Glass devices to use Thunder R4.4.1

## [1.0.7] - 2024-07-19
### Changed
- Added Delay in Thread Restart Logic
Expand Down
2 changes: 1 addition & 1 deletion Monitor/Monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ namespace Plugin {
_service = nullptr;
}

#if (THUNDER_VERSION_MAJOR >= 4)
#if (THUNDER_VERSION >= 4)
#if (THUNDER_VERSION_MINOR == 2)
void Activation(const string& name, PluginHost::IShell* service) override
{
Expand Down
5 changes: 5 additions & 0 deletions OpenCDMi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.6] - 2024-05-31
### Changed
- RDK-45345: Upgrade Sky Glass devices to use Thunder R4.4.1

## [1.0.5] - 2024-03-29
### Security
- Resolved security vulnerabilities
Expand Down
2 changes: 1 addition & 1 deletion OpenCDMi/FrameworkRPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace Plugin {
: RPC::Communicator(source, _T(""), Core::ProxyType<Core::IIPCServer>(engine))
, _parentInterface(parentInterface)
{
#if ((THUNDER_VERSION_MAJOR == 2) || ((THUNDER_VERSION_MAJOR == 4) && (THUNDER_VERSION_MINOR == 2)))
#if ((THUNDER_VERSION == 2) || ((THUNDER_VERSION == 4) && (THUNDER_VERSION_MINOR == 2)))
engine->Announcements(Announcement());
#endif
Open(Core::infinite);
Expand Down
5 changes: 5 additions & 0 deletions RDKShell/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.4.188888888] - 2024-05-31
### Changed
- RDK-45345: Upgrade Sky Glass devices to use Thunder R4.4.1

## [1.4.17] - 2024-04-10
### Added
- Fix for rdkshell missing events
Expand Down
49 changes: 46 additions & 3 deletions RDKShell/RDKShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,11 @@ namespace WPEFramework {
private:
uint32_t mId { 0 };
std::string mCallSign { };
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
PluginHost::ILocalDispatcher * dispatcher_ {nullptr};
#else
PluginHost::IDispatcher * dispatcher_ {nullptr};
#endif

Core::ProxyType<Core::JSONRPC::Message> Message() const
{
Expand Down Expand Up @@ -620,7 +624,11 @@ namespace WPEFramework {
: mCallSign(callsign)
{
if (service)
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
dispatcher_ = service->QueryInterfaceByCallsign<PluginHost::ILocalDispatcher>(mCallSign);
#else
dispatcher_ = service->QueryInterfaceByCallsign<PluginHost::IDispatcher>(mCallSign);
#endif
}

JSONRPCDirectLink(PluginHost::IShell* service)
Expand Down Expand Up @@ -664,20 +672,55 @@ namespace WPEFramework {
ToMessage(parameters, message);

const uint32_t channelId = ~0;
#ifndef USE_THUNDER_R4
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
string output = "";
uint32_t result = Core::ERROR_BAD_REQUEST;

if (dispatcher_ != nullptr) {
PluginHost::ILocalDispatcher* localDispatcher = dispatcher_->Local();

ASSERT(localDispatcher != nullptr);

if (localDispatcher != nullptr)
result = dispatcher_->Invoke(channelId, message->Id.Value(), sThunderSecurityToken, message->Designator.Value(), message->Parameters.Value(),output);
}

if (message.IsValid() == true) {
if (result == static_cast<uint32_t>(~0)) {
message.Release();
}
else if (result == Core::ERROR_NONE)
{
if (output.empty() == true)
message->Result.Null(true);
else
message->Result = output;
}
else
{
message->Error.SetError(result);
if (output.empty() == false) {
message->Error.Text = output;
}
}
}
#elif (THUNDER_VERSION == 2)
auto resp = dispatcher_->Invoke(sThunderSecurityToken, channelId, *message);
#else
Core::JSONRPC::Context context(channelId, message->Id.Value(), sThunderSecurityToken) ;
auto resp = dispatcher_->Invoke(context, *message);
#endif /* USE_THUNDER_R4 */
#endif

#if ((THUNDER_VERSION == 2) || (THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 2))

if (resp->Error.IsSet()) {
std::cout << "Call failed: " << message->Designator.Value() << " error: " << resp->Error.Text.Value() << "\n";
return resp->Error.Code;
}

if (!FromMessage(response, resp, isResponseString))
return Core::ERROR_GENERAL;

#endif
return Core::ERROR_NONE;
}
};
Expand Down
4 changes: 4 additions & 0 deletions ResourceManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.2] - 2024-05-31
### Changed
- RDK-45345: Upgrade Sky Glass devices to use Thunder R4.4.1

## [1.0.1] - 2023-11-08
### Changed
- Added an RFC to control reserveTTS API
Expand Down
49 changes: 46 additions & 3 deletions ResourceManager/ResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ namespace WPEFramework {
private:
uint32_t mId { 0 };
std::string mCallSign { };
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
PluginHost::ILocalDispatcher * dispatcher_ {nullptr};
#else
PluginHost::IDispatcher * dispatcher_ {nullptr};
#endif

Core::ProxyType<Core::JSONRPC::Message> Message() const
{
Expand Down Expand Up @@ -312,7 +316,11 @@ namespace WPEFramework {
: mCallSign(callsign)
{
if (service)
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
dispatcher_ = service->QueryInterfaceByCallsign<PluginHost::ILocalDispatcher>(mCallSign);
#else
dispatcher_ = service->QueryInterfaceByCallsign<PluginHost::IDispatcher>(mCallSign);
#endif
}

JSONRPCDirectLink(PluginHost::IShell* service)
Expand Down Expand Up @@ -356,20 +364,55 @@ namespace WPEFramework {
ToMessage(parameters, message);

const uint32_t channelId = ~0;
#ifndef USE_THUNDER_R4
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
string output = "";
uint32_t result = Core::ERROR_BAD_REQUEST;

if (dispatcher_ != nullptr) {
PluginHost::ILocalDispatcher* localDispatcher = dispatcher_->Local();

ASSERT(localDispatcher != nullptr);

if (localDispatcher != nullptr)
result = dispatcher_->Invoke(channelId, message->Id.Value(), sThunderSecurityToken, message->Designator.Value(), message->Parameters.Value(),output);
}

if (message.IsValid() == true) {
if (result == static_cast<uint32_t>(~0)) {
message.Release();
}
else if (result == Core::ERROR_NONE)
{
if (output.empty() == true)
message->Result.Null(true);
else
message->Result = output;
}
else
{
message->Error.SetError(result);
if (output.empty() == false) {
message->Error.Text = output;
}
}
}
#elif (THUNDER_VERSION == 2)
auto resp = dispatcher_->Invoke(sThunderSecurityToken, channelId, *message);
#else
Core::JSONRPC::Context context(channelId, message->Id.Value(), sThunderSecurityToken) ;
auto resp = dispatcher_->Invoke(context, *message);
#endif /* USE_THUNDER_R4 */
#endif

#if ((THUNDER_VERSION == 2) || (THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 2))

if (resp->Error.IsSet()) {
std::cout << "Call failed: " << message->Designator.Value() << " error: " << resp->Error.Text.Value() << "\n";
return resp->Error.Code;
}

if (!FromMessage(response, resp, isResponseString))
return Core::ERROR_GENERAL;

#endif
return Core::ERROR_NONE;
}
};
Expand Down
5 changes: 5 additions & 0 deletions RustAdapter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.4] - 2024-05-31
### Changed
- RDK-45345: Upgrade Sky Glass devices to use Thunder R4.4.1

## [1.0.3] - 2023-01-26
### Changed
- RDK-44991: Upgrade Flex-2.0 devices to use Thunder R4.4.1
Expand Down
8 changes: 4 additions & 4 deletions RustAdapter/LocalPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ WPEFramework::Plugin::Rust::LocalPlugin::SendTo(uint32_t channel_id, const char

#if JSON_RPC_CONTEXT

#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR == 4))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
WPEFramework::Core::hresult
WPEFramework::Plugin::Rust::LocalPlugin::Invoke(ICallback* callback, const uint32_t channelId, const uint32_t id, const string& token, const string& method, const string& parameters, string& response)
{
Expand Down Expand Up @@ -240,7 +240,7 @@ WPEFramework::Core::ProxyType<WPEFramework::Core::JSONRPC::Message>
}
#endif

#if ((THUNDER_VERSION_MAJOR == 4) && (THUNDER_VERSION_MINOR == 4))
#if ((THUNDER_VERSION == 4) && (THUNDER_VERSION_MINOR == 4))
WPEFramework::Core::hresult WPEFramework::Plugin::Rust::LocalPlugin::Revoke(ICallback* callback)
{
return {};
Expand All @@ -253,7 +253,7 @@ WPEFramework::Core::hresult WPEFramework::Plugin::Rust::LocalPlugin::Validate(co
#endif


#if ((THUNDER_VERSION_MAJOR == 2) || ((THUNDER_VERSION_MAJOR == 4) && (THUNDER_VERSION_MINOR == 2)))
#if ((THUNDER_VERSION == 2) || ((THUNDER_VERSION == 4) && (THUNDER_VERSION_MINOR == 2)))
void
WPEFramework::Plugin::Rust::LocalPlugin::Activate(
WPEFramework::PluginHost::IShell *shell)
Expand Down Expand Up @@ -321,7 +321,7 @@ WPEFramework::Plugin::Rust::LocalPlugin::Information() const
return { };
}

#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR == 2))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 2))
void WPEFramework::Plugin::Rust::LocalPlugin::Close(const uint32_t channelId) /* override */
{
return;
Expand Down
10 changes: 5 additions & 5 deletions RustAdapter/LocalPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class LocalPlugin : public Rust::IPlugin
/**
* IDispatcher::Activate
*/
#if ((THUNDER_VERSION_MAJOR == 2) || ((THUNDER_VERSION_MAJOR == 4) && (THUNDER_VERSION_MINOR == 2)))
#if ((THUNDER_VERSION == 2) || ((THUNDER_VERSION == 4) && (THUNDER_VERSION_MINOR == 2)))
void Activate(PluginHost::IShell *shell) override;
/**
*
Expand All @@ -89,15 +89,15 @@ class LocalPlugin : public Rust::IPlugin
/**
* IDispatcher::Close
*/
#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR == 2))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 2))
void Close(const uint32_t channelId) override;
#endif /* THUNDER_VERSION */
/**
* WPEFramework::PluginHost::IDispatcher::Invoke
*/
#if JSON_RPC_CONTEXT

#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR == 4))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
Core::hresult Invoke(ICallback* callback, const uint32_t channelId, const uint32_t id, const string& token, const string& method, const string& parameters, string& response ) override;
#else
Core::ProxyType<Core::JSONRPC::Message> Invoke(
Expand All @@ -110,7 +110,7 @@ class LocalPlugin : public Rust::IPlugin
const string& token, const uint32_t channelId, const Core::JSONRPC::Message& req) override;
#endif

#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR == 4))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
Core::hresult Revoke(ICallback* callback) override;
Core::hresult Validate(const string& token, const string& method, const string& paramaters /* @restrict:(4M-1) */) const override;
#endif
Expand All @@ -121,7 +121,7 @@ class LocalPlugin : public Rust::IPlugin
Core::ProxyType<Core::JSON::IElement> Inbound(const uint32_t id,
const Core::ProxyType<Core::JSON::IElement> &element) override;

#if ((THUNDER_VERSION_MAJOR >= 4) && (THUNDER_VERSION_MINOR == 4))
#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4))
public:
WPEFramework::PluginHost::ILocalDispatcher* Local() override {
return nullptr; // Replace nullptr with your actual implementation.
Expand Down
Loading
Loading