From 414b13084060d0f0b6246be111d45fbd337e6214 Mon Sep 17 00:00:00 2001 From: Gene Gallagher <129112619+egalla204@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:07:48 -0400 Subject: [PATCH 1/3] Release/1.1.12 (#200) https://ccp.sys.comcast.net/browse/RDKEMW-16915 --- CHANGELOG.md | 26 +++++++++- CMakeLists.txt | 2 - include/ctrlm_ipc_voice.h | 2 +- src/auth/ctrlm_auth.h | 1 - src/auth/ctrlm_auth_thunder.cpp | 5 -- src/auth/ctrlm_auth_thunder.h | 1 - src/auth/ctrlm_thunder_plugin_authservice.cpp | 18 ------- src/auth/ctrlm_thunder_plugin_authservice.h | 7 --- src/ctrlm.h | 1 - src/ctrlm_controller.cpp | 4 -- src/ctrlm_controller.h | 1 - src/ctrlm_main.cpp | 46 ------------------ src/ctrlm_network.cpp | 10 ---- src/ctrlm_network.h | 3 -- src/thunder/ctrlm_thunder_plugin.cpp | 47 +++++++++++++++++++ src/thunder/ctrlm_thunder_plugin.h | 29 +++++++++--- .../ctrlm_thunder_plugin_powermanager.cpp | 21 +++++---- src/voice/ctrlm_voice_obj.cpp | 18 ------- src/voice/ctrlm_voice_obj.h | 3 -- src/voice/endpoints/ctrlm_voice_endpoint.cpp | 1 - src/voice/endpoints/ctrlm_voice_endpoint.h | 1 - .../endpoints/ctrlm_voice_endpoint_http.cpp | 8 ---- .../endpoints/ctrlm_voice_endpoint_http.h | 1 - .../ctrlm_voice_endpoint_ws_nextgen.cpp | 8 ---- .../ctrlm_voice_endpoint_ws_nextgen.h | 1 - 25 files changed, 107 insertions(+), 158 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52e8cb2d..8121aa80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,32 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + + +#### [1.1.12](https://github.com/rdkcentral/control/compare/1.1.11...1.1.12) + +> 9 April 2026 + +- RDKEMW-16333: Update Thunder plugin to use _string and _boolean [`#197`](https://github.com/rdkcentral/control/pull/197) +- RDKEMW-5849 : remove deprecated "experience" code [`#185`](https://github.com/rdkcentral/control/pull/185) + +#### [1.1.11.2](https://github.com/rdkcentral/control/compare/1.1.11.1...1.1.11.2) + +> 7 April 2026 + +- RDKEMW-16711: CHANGELOG for ctrlm hotfix release 1.1.11.2 [`#196`](https://github.com/rdkcentral/control/pull/196) +- RDKEMW-16711 : Add wakeup reason string, on support/1.1.11 [`#195`](https://github.com/rdkcentral/control/pull/195) + +#### [1.1.11.1](https://github.com/rdkcentral/control/compare/1.1.11...1.1.11.1) + +> 1 April 2026 + +- RDKEMW-16330: Update Control Manager to use bool for NSM [`#188`](https://github.com/rdkcentral/control/pull/188) +- RDKEMW-16330: update CHANGELOG for release 1.1.11p1 [`98ea5f5`](https://github.com/rdkcentral/control/commit/98ea5f51f8da9ef6ded7038d760baa3b41cc4a90) + #### [1.1.11](https://github.com/rdkcentral/control/compare/1.1.10...1.1.11) -> 5 March 2026 +> 6 March 2026 - RDKEMW-14589: No UI action with "Info" keypress from rf4ce remote in RF mode [`#181`](https://github.com/rdkcentral/control/pull/181) - RDKEMW-14445 : Add session end and protocol return to telemetry [`#182`](https://github.com/rdkcentral/control/pull/182) @@ -15,7 +38,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - RDKEMW-12930: RF4CE network export XCONF on pair/unpair/etc. [`#177`](https://github.com/rdkcentral/control/pull/177) - RDKEMW-13833: Remove duplicate RFC fetch attempts in listeners [`#179`](https://github.com/rdkcentral/control/pull/179) - #### [1.1.10](https://github.com/rdkcentral/control/compare/1.1.9...1.1.10) diff --git a/CMakeLists.txt b/CMakeLists.txt index 565ab874..112b3c00 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,8 +234,6 @@ if(THUNDER) if(AUTH_ACTIVATION_STATUS) add_compile_definitions(AUTH_ACTIVATION_STATUS) endif() - #By default disabled but can be enabled - #add_compile_definitions(AUTH_EXPERIENCE) target_link_libraries(controlMgr RdkCertSelector) endif() endif() diff --git a/include/ctrlm_ipc_voice.h b/include/ctrlm_ipc_voice.h index 665ffaa5..ed96c951 100644 --- a/include/ctrlm_ipc_voice.h +++ b/include/ctrlm_ipc_voice.h @@ -64,7 +64,7 @@ #define CTRLM_VOICE_SESSION_TEXT_MAX_LENGTH (512) ///< Session text string maximum length #define CTRLM_VOICE_SESSION_MSG_MAX_LENGTH (128) ///< Session message string maximum length #define CTRLM_VOICE_QUERY_STRING_MAX_LENGTH (128) ///< Query string maximum name or value length -#define CTRLM_VOICE_QUERY_STRING_MAX_PAIRS (16) ///< Query string maximum number of name/value pairs +#define CTRLM_VOICE_QUERY_STRING_MAX_PAIRS (24) ///< Query string maximum number of name/value pairs #define CTRLM_VOICE_REQUEST_IP_MAX_LENGTH (48) ///< cURL request primary IP address string maximum length (big enough for IPv6) #define CTRLM_VOICE_MIN_UTTERANCE_DURATION_MAXIMUM (600) ///< Maximum value of the utterance duration minimum setting (in milliseconds) diff --git a/src/auth/ctrlm_auth.h b/src/auth/ctrlm_auth.h index 0964335f..bda34998 100644 --- a/src/auth/ctrlm_auth.h +++ b/src/auth/ctrlm_auth.h @@ -34,7 +34,6 @@ class ctrlm_auth_t { virtual bool get_device_id(std::string &device_id) = 0; virtual bool get_account_id(std::string &account_id) = 0; virtual bool get_partner_id(std::string &partner_id) = 0; - virtual bool get_experience(std::string &experience) = 0; virtual bool get_sat(std::string &sat, time_t &expiration) = 0; virtual bool supports_sat_expiration() const = 0; diff --git a/src/auth/ctrlm_auth_thunder.cpp b/src/auth/ctrlm_auth_thunder.cpp index 2f954df3..7e37f8b4 100644 --- a/src/auth/ctrlm_auth_thunder.cpp +++ b/src/auth/ctrlm_auth_thunder.cpp @@ -48,11 +48,6 @@ bool ctrlm_auth_thunder_t::get_partner_id(std::string &partner_id) { return(ret); } -bool ctrlm_auth_thunder_t::get_experience(std::string &experience) { - bool ret = this->plugin->get_experience(experience); - return(ret); -} - bool ctrlm_auth_thunder_t::get_sat(std::string &sat, time_t &expiration) { bool ret = this->plugin->get_sat(sat, expiration); return(ret); diff --git a/src/auth/ctrlm_auth_thunder.h b/src/auth/ctrlm_auth_thunder.h index 3a476e67..67a385db 100644 --- a/src/auth/ctrlm_auth_thunder.h +++ b/src/auth/ctrlm_auth_thunder.h @@ -13,7 +13,6 @@ class ctrlm_auth_thunder_t : public ctrlm_auth_t { virtual bool get_device_id(std::string &device_id); virtual bool get_account_id(std::string &account_id); virtual bool get_partner_id(std::string &partner_id); - virtual bool get_experience(std::string &experience); virtual bool get_sat(std::string &sat, time_t &expiration); virtual bool supports_sat_expiration() const; diff --git a/src/auth/ctrlm_thunder_plugin_authservice.cpp b/src/auth/ctrlm_thunder_plugin_authservice.cpp index 60c57d7a..e5913d07 100644 --- a/src/auth/ctrlm_thunder_plugin_authservice.cpp +++ b/src/auth/ctrlm_thunder_plugin_authservice.cpp @@ -125,24 +125,6 @@ bool ctrlm_thunder_plugin_authservice_t::get_account_id(std::string &account_id) return(ret); } -bool ctrlm_thunder_plugin_authservice_t::get_experience(std::string &experience) { - bool ret = false; - JsonObject params, response; - if(this->call_plugin("getExperience", (void *)¶ms, (void *)&response)) { - if(response["success"].Boolean()) { // If success doesn't exist, it defaults to false which is fine. - experience = response["experience"].String(); - if(!experience.empty()) { - ret = true; - } - } else { - XLOGD_WARN("Success for getExperience was false"); - } - } else { - XLOGD_WARN("Call for getExperience failed"); - } - return(ret); -} - bool ctrlm_thunder_plugin_authservice_t::get_sat(std::string &sat, time_t &expiration) { bool ret = false; JsonObject params, response; diff --git a/src/auth/ctrlm_thunder_plugin_authservice.h b/src/auth/ctrlm_thunder_plugin_authservice.h index c39de41d..169cee88 100644 --- a/src/auth/ctrlm_thunder_plugin_authservice.h +++ b/src/auth/ctrlm_thunder_plugin_authservice.h @@ -75,13 +75,6 @@ class ctrlm_thunder_plugin_authservice_t : public Thunder::Plugin::ctrlm_thunder */ bool get_account_id(std::string &account_id); - /** - * Function that retrieves the Experience String from Authservice. - * @param experience The reference to a string which will contain the Experience String. - * @return True on success otherwise False. - */ - bool get_experience(std::string &experience); - /** * Function that retrieves the SAT Token from Authservice. * @param sat The reference to a string which will contain the SAT Token. diff --git a/src/ctrlm.h b/src/ctrlm.h index 905803d1..376608b3 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -458,7 +458,6 @@ gboolean ctrlm_main_has_device_id_get(void); gboolean ctrlm_main_has_device_type_get(void); gboolean ctrlm_main_has_service_account_id_get(void); gboolean ctrlm_main_has_partner_id_get(void); -gboolean ctrlm_main_has_experience_get(void); gboolean ctrlm_main_needs_service_access_token_get(void); void ctrlm_main_invalidate_service_access_token(void); void ctrlm_main_sat_enabled_set(gboolean sat_enabled); diff --git a/src/ctrlm_controller.cpp b/src/ctrlm_controller.cpp index 15496dd3..60173d47 100644 --- a/src/ctrlm_controller.cpp +++ b/src/ctrlm_controller.cpp @@ -118,10 +118,6 @@ string ctrlm_obj_controller_t::partner_id_get() const { return(obj_network_->partner_id_get()); } -string ctrlm_obj_controller_t::experience_get() const { - return(obj_network_->experience_get()); -} - string ctrlm_obj_controller_t::stb_name_get() const { return(obj_network_->stb_name_get()); } diff --git a/src/ctrlm_controller.h b/src/ctrlm_controller.h index 66749062..ae9b800b 100644 --- a/src/ctrlm_controller.h +++ b/src/ctrlm_controller.h @@ -63,7 +63,6 @@ class ctrlm_obj_controller_t std::string device_id_get() const; std::string service_account_id_get() const; std::string partner_id_get() const; - std::string experience_get() const; std::string stb_name_get() const; void set_device_minor_id(int device_minor_id); int get_device_minor_id() const; diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index f76c3682..c3da8d6d 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -302,10 +302,6 @@ static void ctrlm_main_has_service_account_id_set(gboolean has_id); static gboolean ctrlm_load_partner_id(void); static void ctrlm_main_has_partner_id_set(gboolean has_id); #endif -#ifdef AUTH_EXPERIENCE -static gboolean ctrlm_load_experience(void); -static void ctrlm_main_has_experience_set(gboolean has_experience); -#endif #ifdef AUTH_SAT_TOKEN static gboolean ctrlm_load_service_access_token(void); static void ctrlm_main_has_service_access_token_set(gboolean has_token); @@ -1421,30 +1417,6 @@ gboolean ctrlm_load_partner_id(void) { } #endif -#ifdef AUTH_EXPERIENCE -gboolean ctrlm_main_has_experience_get(void) { - return(g_ctrlm.has_experience); -} - -void ctrlm_main_has_experience_set(gboolean has_experience) { - g_ctrlm.has_experience = has_experience; -} - -gboolean ctrlm_load_experience(void) { - if(!g_ctrlm.authservice->get_experience(g_ctrlm.experience)) { - ctrlm_main_has_experience_set(false); - return(false); - } - g_ctrlm.voice_session->voice_stb_data_experience_set(g_ctrlm.experience); - - for(auto const &itr : g_ctrlm.networks) { - itr.second->experience_set(g_ctrlm.experience); - } - ctrlm_main_has_experience_set(true); - return(true); -} -#endif - #ifdef AUTH_SAT_TOKEN gboolean ctrlm_main_needs_service_access_token_get(void) { gboolean ret = false; @@ -1510,12 +1482,6 @@ gboolean ctrlm_has_authservice_data(void) { } #endif -#ifdef AUTH_EXPERIENCE - if(!ctrlm_main_has_experience_get()) { - ret = FALSE; - } -#endif - #ifdef AUTH_SAT_TOKEN if(ctrlm_main_needs_service_access_token_get()) { ret = FALSE; @@ -1566,18 +1532,6 @@ gboolean ctrlm_load_authservice_data(void) { } #endif -#ifdef AUTH_EXPERIENCE - if(!ctrlm_main_has_experience_get()) { - XLOGD_INFO("load experience"); - if(!ctrlm_load_experience()) { - XLOGD_TELEMETRY("failed to load experience"); - ret = FALSE; - } else { - XLOGD_INFO("load experience successfully <%s>", ctrlm_is_pii_mask_enabled() ? "***" : g_ctrlm.experience.c_str()); - } - } -#endif - #ifdef AUTH_SAT_TOKEN if(ctrlm_main_needs_service_access_token_get()) { XLOGD_INFO("load sat token"); diff --git a/src/ctrlm_network.cpp b/src/ctrlm_network.cpp index e8f591c3..26201231 100644 --- a/src/ctrlm_network.cpp +++ b/src/ctrlm_network.cpp @@ -187,16 +187,6 @@ string ctrlm_obj_network_t::partner_id_get() const { return(partner_id_); } -void ctrlm_obj_network_t::experience_set(const string& experience) { - THREAD_ID_VALIDATE(); - experience_ = experience; -} - -string ctrlm_obj_network_t::experience_get() const { - THREAD_ID_VALIDATE(); - return(experience_); -} - void ctrlm_obj_network_t::stb_name_set(const string& stb_name) { THREAD_ID_VALIDATE(); XLOGD_INFO("STB Name <%s>", stb_name.c_str()); diff --git a/src/ctrlm_network.h b/src/ctrlm_network.h index 90ea909f..ca6ad547 100644 --- a/src/ctrlm_network.h +++ b/src/ctrlm_network.h @@ -192,8 +192,6 @@ class ctrlm_obj_network_t std::string service_account_id_get() const; void partner_id_set(const std::string& partner_id); std::string partner_id_get() const; - void experience_set(const std::string& experience); - std::string experience_get() const; void mask_key_codes_set(gboolean mask_key_codes); gboolean mask_key_codes_get() const; void stb_name_set(const std::string& stb_name); @@ -325,7 +323,6 @@ class ctrlm_obj_network_t std::string device_id_; std::string service_account_id_; std::string partner_id_; - std::string experience_; std::string stb_name_; ctrlm_rcu_validation_result_t validation_result_ = CTRLM_RCU_VALIDATION_RESULT_MAX; ctrlm_key_code_t validation_key_ = CTRLM_KEY_CODE_INVALID; diff --git a/src/thunder/ctrlm_thunder_plugin.cpp b/src/thunder/ctrlm_thunder_plugin.cpp index 3040fae5..ca6afffc 100644 --- a/src/thunder/ctrlm_thunder_plugin.cpp +++ b/src/thunder/ctrlm_thunder_plugin.cpp @@ -261,6 +261,53 @@ bool ctrlm_thunder_plugin_t::call_plugin(std::string method, void *params, void return(ret); } +bool ctrlm_thunder_plugin_t::call_plugin_boolean(std::string method, void *params, bool *response) { + bool ret = false; + auto clientObject = (JSONRPC::LinkType*)this->plugin_client; + JsonObject *jsonParams = (JsonObject *)params; + if(clientObject) { + if(!method.empty() && jsonParams && response) { + Core::JSON::Boolean jsonResponse; + uint32_t thunderRet = clientObject->Invoke(CALL_TIMEOUT, _T(method), *jsonParams, jsonResponse); + if(thunderRet != Core::ERROR_NONE) { + XLOGD_ERROR("Thunder call failed <%s> <%u>", method.c_str(), thunderRet); + } else { + *response = jsonResponse.Value(); + ret = true; + } + } else { + XLOGD_ERROR("Invalid parameters"); + } + } else { + XLOGD_ERROR("Client is NULL"); + } + return(ret); +} + +bool ctrlm_thunder_plugin_t::call_plugin_string(std::string method, void *params, std::string *response) { + bool ret = false; + auto clientObject = (JSONRPC::LinkType*)this->plugin_client; + JsonObject *jsonParams = (JsonObject *)params; + if(clientObject) { + if(!method.empty() && jsonParams && response) { + Core::JSON::String jsonString; + uint32_t thunderRet = clientObject->Invoke(CALL_TIMEOUT, _T(method), *jsonParams, jsonString); + if(thunderRet != Core::ERROR_NONE) { + XLOGD_ERROR("Thunder call failed <%s> <%u>", method.c_str(), thunderRet); + } else { + *response = jsonString.Value(); + ret = true; + } + } else { + XLOGD_ERROR("Invalid parameters"); + } + } else { + XLOGD_ERROR("Client is NULL"); + } + return(ret); +} + + bool ctrlm_thunder_plugin_t::call_controller(std::string method, void *params, void *response) { bool ret = false; if(this->controller) { diff --git a/src/thunder/ctrlm_thunder_plugin.h b/src/thunder/ctrlm_thunder_plugin.h index f1a3944a..9bf6d780 100644 --- a/src/thunder/ctrlm_thunder_plugin.h +++ b/src/thunder/ctrlm_thunder_plugin.h @@ -105,9 +105,8 @@ class ctrlm_thunder_plugin_t { std::string callsign_with_api(); /** - * This functions is used to get a Thunder Plugin property. - * @param method The method in which the user wants to call. - * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) + * This function is used to get a Thunder Plugin property. + * @param property The name of the property that the user wants to get * @param response The WPEFramework JsonObject containing the response from the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) * @param retries The number of retries if the call times out. * @return True if the call succeeded, otherwise False. @@ -115,7 +114,7 @@ class ctrlm_thunder_plugin_t { bool property_get(std::string property, void *response, unsigned int retries = 0); /** - * This functions is used to call a Thunder Plugin method. + * This function is used to call a Thunder Plugin method. * @param method The method in which the user wants to call. * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) * @param response The WPEFramework JsonObject containing the response from the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) @@ -125,7 +124,25 @@ class ctrlm_thunder_plugin_t { bool call_plugin(std::string method, void *params, void *response, unsigned int retries = 0); /** - * This functions is used to call a Thunder Controller method. + * This function is used to call a Thunder Plugin method. + * @param method The method in which the user wants to call. + * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) + * @param response The boolean pointer which will be assigned the response from the call + * @return True if the call succeeded, otherwise False. + */ + bool call_plugin_boolean(std::string method, void *params, bool *response); + + /** + * This function is used to call a Thunder Plugin method. + * @param method The method in which the user wants to call. + * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) + * @param response The string pointer which will be assigned containing the response from the call. + * @return True if the call succeeded, otherwise False. + */ + bool call_plugin_string(std::string method, void *params, std::string *response); + + /** + * This function is used to call a Thunder Controller method. * @param method The method in which the user wants to call. * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) * @param params The WPEFramework JsonObject containing the response from the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) @@ -164,4 +181,4 @@ class ctrlm_thunder_plugin_t { }; }; -#endif \ No newline at end of file +#endif diff --git a/src/thunder/ctrlm_thunder_plugin_powermanager.cpp b/src/thunder/ctrlm_thunder_plugin_powermanager.cpp index 6e0c83b0..e84fa983 100755 --- a/src/thunder/ctrlm_thunder_plugin_powermanager.cpp +++ b/src/thunder/ctrlm_thunder_plugin_powermanager.cpp @@ -89,16 +89,15 @@ ctrlm_power_state_t ctrlm_thunder_plugin_powermanager_t::get_power_state() { /* root@pioneer-uhd:~# curl --request POST --url http://127.0.0.1:9998/jsonrpc --header 'Content-Type: application/json' --data '{ "jsonrpc": "2.0", "id": 1234567890, "method": "org.rdk.PowerManager.1.getNetworkStandbyMode", "params": {} }' {"jsonrpc":"2.0","id":1234567890,"result":true} */ bool ctrlm_thunder_plugin_powermanager_t::get_networked_standby_mode() { - JsonObject params, response; + JsonObject params; params = {}; bool networked_standby_mode = false; - sem_wait(&this->semaphore); - if(this->call_plugin("getNetworkStandbyMode", (void *)¶ms, (void *)&response)) { - networked_standby_mode = response["result"].Boolean(); + sem_wait(&this->semaphore); + if(this->call_plugin_boolean("getNetworkStandbyMode", (void *)¶ms, &networked_standby_mode)) { XLOGD_DEBUG("networked_standby_mode is %s", networked_standby_mode?"TRUE":"FALSE"); } else { - XLOGD_ERROR("getNetworkedStandbyMode call failed"); + XLOGD_ERROR("getNetworkStandbyMode call failed"); } sem_post(&this->semaphore); @@ -108,19 +107,23 @@ bool ctrlm_thunder_plugin_powermanager_t::get_networked_standby_mode() { /* root@pioneer-uhd:~# curl --request POST --url http://127.0.0.1:9998/jsonrpc --header 'Content-Type: application/json' --data '{ "jsonrpc": "2.0", "id": 1234567890, "method": "org.rdk.PowerManager.1.getLastWakeupReason", "params": {} }' {"jsonrpc":"2.0","id":1234567890,"result":"COLDBOOT"} */ bool ctrlm_thunder_plugin_powermanager_t::get_wakeup_reason_voice() { - JsonObject params, response; + JsonObject params; + std::string response; params = {}; bool wakeup_reason_voice = false; sem_wait(&this->semaphore); - if(this->call_plugin("getLastWakeupReason", (void *)¶ms, (void *)&response)) { - wakeup_reason_voice = (0 == strncmp(response["result"].String().c_str(), "VOICE", 5)); - XLOGD_DEBUG("voice_wakeup is %s", wakeup_reason_voice?"TRUE":"FALSE"); + if(this->call_plugin_string("getLastWakeupReason", (void *)¶ms, &response)) { + if(response == "VOICE") { + wakeup_reason_voice = true; + } } else { XLOGD_ERROR("getLastWakeupReason call failed"); } sem_post(&this->semaphore); + XLOGD_DEBUG("voice_wakeup is %s", wakeup_reason_voice?"TRUE":"FALSE"); + return wakeup_reason_voice; } diff --git a/src/voice/ctrlm_voice_obj.cpp b/src/voice/ctrlm_voice_obj.cpp index 6e4b354f..a6787b1e 100644 --- a/src/voice/ctrlm_voice_obj.cpp +++ b/src/voice/ctrlm_voice_obj.cpp @@ -2252,18 +2252,6 @@ std::string ctrlm_voice_t::voice_stb_data_partner_id_get() const { return(this->partner_id); } -void ctrlm_voice_t::voice_stb_data_experience_set(std::string &experience) { - XLOGD_DEBUG("Experience Tag set to %s", experience.c_str()); - this->experience = experience; - for(const auto &itr : this->endpoints) { - itr->voice_stb_data_experience_set(experience); - } -} - -std::string ctrlm_voice_t::voice_stb_data_experience_get() const { - return(this->experience); -} - std::string ctrlm_voice_t::voice_stb_data_app_id_http_get() const { return(this->prefs.app_id_http); } @@ -2427,12 +2415,6 @@ bool ctrlm_voice_t::voice_session_has_stb_data() { return(false); } #endif -#ifdef AUTH_EXPERIENCE - if(this->experience == "") { - XLOGD_INFO("No experience tag"); - return(false); - } -#endif #ifdef AUTH_SAT_TOKEN if(this->sat_token_required && this->sat_token[0] == '\0') { XLOGD_INFO("No SAT token"); diff --git a/src/voice/ctrlm_voice_obj.h b/src/voice/ctrlm_voice_obj.h index 38699a6b..3ec217b2 100644 --- a/src/voice/ctrlm_voice_obj.h +++ b/src/voice/ctrlm_voice_obj.h @@ -525,8 +525,6 @@ class ctrlm_voice_t { ctrlm_device_type_t voice_stb_data_device_type_get() const; virtual void voice_stb_data_partner_id_set(std::string &partner_id); std::string voice_stb_data_partner_id_get() const; - virtual void voice_stb_data_experience_set(std::string &experience); - std::string voice_stb_data_experience_get() const; std::string voice_stb_data_app_id_http_get() const; std::string voice_stb_data_app_id_ws_get() const; virtual void voice_stb_data_guide_language_set(const char *language); @@ -662,7 +660,6 @@ class ctrlm_voice_t { std::string device_id; ctrlm_device_type_t device_type; std::string partner_id; - std::string experience; char sat_token[XRSR_SAT_TOKEN_LEN_MAX]; bool sat_token_required; bool mtls_required; diff --git a/src/voice/endpoints/ctrlm_voice_endpoint.cpp b/src/voice/endpoints/ctrlm_voice_endpoint.cpp index 7815cd27..1aed8d46 100644 --- a/src/voice/endpoints/ctrlm_voice_endpoint.cpp +++ b/src/voice/endpoints/ctrlm_voice_endpoint.cpp @@ -63,7 +63,6 @@ void ctrlm_voice_endpoint_t::voice_stb_data_account_number_set(std::string &acco void ctrlm_voice_endpoint_t::voice_stb_data_device_id_set(std::string &device_id) {} void ctrlm_voice_endpoint_t::voice_stb_data_device_type_set(ctrlm_device_type_t device_type) {} void ctrlm_voice_endpoint_t::voice_stb_data_partner_id_set(std::string &partner_id) {} -void ctrlm_voice_endpoint_t::voice_stb_data_experience_set(std::string &experience) {} void ctrlm_voice_endpoint_t::voice_stb_data_guide_language_set(const char *language) {} void ctrlm_voice_endpoint_t::voice_stb_data_mask_pii_set(bool enable) {} diff --git a/src/voice/endpoints/ctrlm_voice_endpoint.h b/src/voice/endpoints/ctrlm_voice_endpoint.h index ac881880..3298348f 100644 --- a/src/voice/endpoints/ctrlm_voice_endpoint.h +++ b/src/voice/endpoints/ctrlm_voice_endpoint.h @@ -50,7 +50,6 @@ class ctrlm_voice_endpoint_t { virtual void voice_stb_data_device_id_set(std::string &device_id); virtual void voice_stb_data_device_type_set(ctrlm_device_type_t device_type); virtual void voice_stb_data_partner_id_set(std::string &partner_id); - virtual void voice_stb_data_experience_set(std::string &experience); virtual void voice_stb_data_guide_language_set(const char *language); virtual void voice_stb_data_mask_pii_set(bool enable); // End Data Setters diff --git a/src/voice/endpoints/ctrlm_voice_endpoint_http.cpp b/src/voice/endpoints/ctrlm_voice_endpoint_http.cpp index 1ec3e647..c119ee43 100644 --- a/src/voice/endpoints/ctrlm_voice_endpoint_http.cpp +++ b/src/voice/endpoints/ctrlm_voice_endpoint_http.cpp @@ -72,14 +72,12 @@ bool ctrlm_voice_endpoint_http_t::open() { std::string device_id = this->voice_obj->voice_stb_data_device_id_get(); std::string partner_id = this->voice_obj->voice_stb_data_partner_id_get(); - std::string experience = this->voice_obj->voice_stb_data_experience_get(); std::string app_id = this->voice_obj->voice_stb_data_app_id_http_get(); std::string language = this->voice_obj->voice_stb_data_guide_language_get().c_str(); xrsv_http_params_t params_http = { .device_id = device_id.c_str(), .partner_id = partner_id.c_str(), - .experience = experience.c_str(), .app_id = app_id.c_str(), .language = language.c_str(), .test_flag = this->voice_obj->voice_stb_data_test_get(), @@ -138,12 +136,6 @@ void ctrlm_voice_endpoint_http_t::voice_stb_data_partner_id_set(std::string &par } } -void ctrlm_voice_endpoint_http_t::voice_stb_data_experience_set(std::string &experience) { - if(this->xrsv_obj_http) { - xrsv_http_update_experience(this->xrsv_obj_http, experience.c_str()); - } -} - void ctrlm_voice_endpoint_http_t::voice_stb_data_guide_language_set(const char *language) { if(this->xrsv_obj_http) { xrsv_http_update_language(this->xrsv_obj_http, language); diff --git a/src/voice/endpoints/ctrlm_voice_endpoint_http.h b/src/voice/endpoints/ctrlm_voice_endpoint_http.h index 9338e20d..79a0d50d 100644 --- a/src/voice/endpoints/ctrlm_voice_endpoint_http.h +++ b/src/voice/endpoints/ctrlm_voice_endpoint_http.h @@ -32,7 +32,6 @@ class ctrlm_voice_endpoint_http_t : public ctrlm_voice_endpoint_t { public: void voice_stb_data_device_id_set(std::string &device_id); void voice_stb_data_partner_id_set(std::string &partner_id); - void voice_stb_data_experience_set(std::string &experience); void voice_stb_data_guide_language_set(const char *language); void voice_stb_data_pii_mask_set(bool enable); diff --git a/src/voice/endpoints/ctrlm_voice_endpoint_ws_nextgen.cpp b/src/voice/endpoints/ctrlm_voice_endpoint_ws_nextgen.cpp index e5165cd7..9abc27db 100644 --- a/src/voice/endpoints/ctrlm_voice_endpoint_ws_nextgen.cpp +++ b/src/voice/endpoints/ctrlm_voice_endpoint_ws_nextgen.cpp @@ -86,7 +86,6 @@ bool ctrlm_voice_endpoint_ws_nextgen_t::open() { } std::string device_id = this->voice_obj->voice_stb_data_device_id_get(); std::string partner_id = this->voice_obj->voice_stb_data_partner_id_get(); - std::string experience = this->voice_obj->voice_stb_data_experience_get(); std::string language = this->voice_obj->voice_stb_data_guide_language_get().c_str(); std::string account_number = this->voice_obj->voice_stb_data_account_number_get(); std::string device_mac = ctrlm_device_mac_get(); @@ -96,7 +95,6 @@ bool ctrlm_voice_endpoint_ws_nextgen_t::open() { .device_id = (device_id.empty() == false ? device_id.c_str() : NULL), .account_id = (account_number.empty() == false ? account_number.c_str() : NULL), .partner_id = (partner_id.empty() == false ? partner_id.c_str() : NULL), - .experience = (experience.empty() == false ? experience.c_str() : NULL), .audio_profile = controller_name_to_audio_profile(""), .audio_model = controller_name_to_audio_model(""), .language = language.c_str(), @@ -235,12 +233,6 @@ void ctrlm_voice_endpoint_ws_nextgen_t::voice_stb_data_partner_id_set(std::strin } } -void ctrlm_voice_endpoint_ws_nextgen_t::voice_stb_data_experience_set(std::string &experience) { - if(this->xrsv_obj_ws_nextgen) { - xrsv_ws_nextgen_update_experience(this->xrsv_obj_ws_nextgen, experience.c_str()); - } -} - void ctrlm_voice_endpoint_ws_nextgen_t::voice_stb_data_guide_language_set(const char *language) { if(this->xrsv_obj_ws_nextgen) { xrsv_ws_nextgen_update_language(this->xrsv_obj_ws_nextgen, language); diff --git a/src/voice/endpoints/ctrlm_voice_endpoint_ws_nextgen.h b/src/voice/endpoints/ctrlm_voice_endpoint_ws_nextgen.h index 16667f2f..218e1d39 100644 --- a/src/voice/endpoints/ctrlm_voice_endpoint_ws_nextgen.h +++ b/src/voice/endpoints/ctrlm_voice_endpoint_ws_nextgen.h @@ -37,7 +37,6 @@ class ctrlm_voice_endpoint_ws_nextgen_t : public ctrlm_voice_endpoint_t { void voice_stb_data_device_id_set(std::string &device_id); void voice_stb_data_device_type_set(ctrlm_device_type_t device_type); void voice_stb_data_partner_id_set(std::string &partner_id); - void voice_stb_data_experience_set(std::string &experience); void voice_stb_data_guide_language_set(const char *language); void voice_stb_data_mask_pii_set(bool enable); From 3686f35f51f46a507288def44c3a18f0175ec992 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Tue, 9 Jun 2026 11:57:54 -0400 Subject: [PATCH 2/3] RDKEMW-19785 : control manager - remove deprecated RFCs --- src/ctrlm_main.cpp | 6 - src/ctrlm_tr181.h | 36 +--- src/ipc/ctrlm_ipc_iarm_powermanager.cpp | 2 +- src/rf4ce/ctrlm_rf4ce_network.cpp | 192 +----------------- src/rf4ce/ctrlm_rf4ce_network.h | 4 - .../ctrlm_rf4ce_network_attr_config.cpp | 45 ---- .../ctrlm_rf4ce_network_attr_config.h | 1 - src/voice/ctrlm_voice_obj.cpp | 113 ----------- src/voice/ctrlm_voice_obj.h | 1 - 9 files changed, 3 insertions(+), 397 deletions(-) diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 54ddb884..815d950d 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -938,12 +938,6 @@ void ctrlm_thread_monitor_init(void) { g_ctrlm.monitor_threads.shrink_to_fit(); - if(CTRLM_TR181_RESULT_SUCCESS != ctrlm_tr181_bool_get(CTRLM_RF4CE_TR181_THREAD_MONITOR_MINIDUMP_ENABLE, &g_ctrlm.thread_monitor_minidump)) { - XLOGD_INFO("Thread Monitor Minidump is <%s> (TR181 not present)", (g_ctrlm.thread_monitor_minidump ? "ENABLED" : "DISABLED")); - } else { - XLOGD_INFO("Thread Monitor Minidump is <%s>", (g_ctrlm.thread_monitor_minidump ? "ENABLED" : "DISABLED")); - } - // Run once to kick off the first poll ctrlm_thread_monitor(NULL); } diff --git a/src/ctrlm_tr181.h b/src/ctrlm_tr181.h index 8fdb0b34..b1eb19a5 100644 --- a/src/ctrlm_tr181.h +++ b/src/ctrlm_tr181.h @@ -24,46 +24,12 @@ #include "rfcapi.h" #define CTRLM_RFC_MAX_PARAM_LEN MAX_PARAM_LEN //from rfcapi.h is 2048 -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.XRPollingConfiguration." -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_ENABLED CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "Enable" -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_DEFAULT CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "Default" -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR11V2 CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "XR11v2" -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR15V1 CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "XR15v1" -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR15V2 CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "XR15v2" -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR16V1 CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "XR16v1" -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR19V1 CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "XR19v1" -#define CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XRAV1 CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_PREFIX "XRAv1" -#define CTRLM_RF4CE_TR181_PRESS_AND_RELEASE_EOS_TIMEOUT "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.PressAndRelease.EOSTimeout" -#define CTRLM_RF4CE_TR181_PRESS_AND_RELEASE_EOS_METHOD "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.PressAndRelease.EOSMethod" -#define CTRLM_RF4CE_TR181_MAC_POLLING_CONFIGURATION_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.XRmacPolling.Enable" -#define CTRLM_RF4CE_TR181_MAC_POLLING_CONFIGURATION_INTERVAL "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.XRmacPolling.macPollingInterval" -#define CTRLM_RF4CE_TR181_ASB_ENABLED "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.XRPairing.ASBEnable" -#define CTRLM_RF4CE_TR181_ASB_DERIVATION_METHOD "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.XRPairing.ASBDerivationMethod" -#define CTRLM_RF4CE_TR181_ASB_FAIL_THRESHOLD "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.XRPairing.ASBFailThreshold" -#define CTRLM_RF4CE_TR181_THREAD_MONITOR_MINIDUMP_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ThreadMonitorMinidump.Enable" -#define CTRLM_RF4CE_TR181_XR19_DSP_CONFIGURATION "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.XRDsp.XR19.Configuration" -#define CTRLM_RF4CE_TR181_RF4CE_AUDIO_PROFILE_TARGET "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RF4CE.AudioProfileTarget" -#define CTRLM_RF4CE_TR181_RF4CE_OPUS_ENCODER_PARAMS "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RF4CE.OpusEncoderParams" -#define CTRLM_RF4CE_TR181_RF4CE_RSP_IDLE_FF "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RF4CE.FF.RspIdle" -#define CTRLM_RF4CE_TR181_RF4CE_VOICE_ENCRYPTION "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RF4CE.VoiceEncryption.Enable" -#define CTRLM_RF4CE_TR181_RF4CE_HOST_PACKET_DECRYPTION "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RF4CE.HostPacketDecryption.Enable" -#define CTRLM_RF4CE_TR181_RSP_TIME_PREFIX "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RF4CE.RspTime." -#define CTRLM_RF4CE_TR181_RSP_TIME_XRC CTRLM_RF4CE_TR181_RSP_TIME_PREFIX "XRC" -#define CTRLM_RF4CE_TR181_RSP_TIME_XVP CTRLM_RF4CE_TR181_RSP_TIME_PREFIX "XVP" -#define CTRLM_RF4CE_TR181_RSP_TIME_XDIU CTRLM_RF4CE_TR181_RSP_TIME_PREFIX "XDIU" -#define CTRLM_TR181_VOICE_PARAMS_AUDIO_MODE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Voice.AudioMode" -#define CTRLM_TR181_VOICE_PARAMS_AUDIO_TIMING "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Voice.AudioTiming" -#define CTRLM_TR181_VOICE_PARAMS_AUDIO_CONFIDENCE_THRESHOLD "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Voice.AudioConfidenceThreshold" -#define CTRLM_TR181_VOICE_PARAMS_AUDIO_DUCKING_TYPE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Voice.AudioDuckingType" -#define CTRLM_TR181_VOICE_PARAMS_AUDIO_DUCKING_LEVEL "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Voice.AudioDuckingLevel" -#define CTRLM_TR181_VOICE_PARAMS_VSDK_CONFIGURATION "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Voice.VSDKConfiguration" -#define CTRLM_TR181_VOICE_PARAMS_KEYWORD_SENSITIVITY "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Voice.KeywordSensitivity" #define CTRLM_TR181_TELEMETRY_REPORT_GLOBAL "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ctrlm.telemetry_report.global" #define CTRLM_TR181_TELEMETRY_REPORT_RF4CE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ctrlm.telemetry_report.rf4ce" #define CTRLM_TR181_TELEMETRY_REPORT_BLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ctrlm.telemetry_report.ble" #define CTRLM_TR181_TELEMETRY_REPORT_IP "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ctrlm.telemetry_report.ip" #define CTRLM_TR181_TELEMETRY_REPORT_VOICE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ctrlm.telemetry_report.voice" -#define CTRLM_RT181_POWER_RFC_PWRMGR2 "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Power.PwrMgr2.Enable" +#define CTRLM_TR181_POWER_RFC_PWRMGR2 "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Power.PwrMgr2.Enable" typedef enum { diff --git a/src/ipc/ctrlm_ipc_iarm_powermanager.cpp b/src/ipc/ctrlm_ipc_iarm_powermanager.cpp index 24897391..90882c8e 100755 --- a/src/ipc/ctrlm_ipc_iarm_powermanager.cpp +++ b/src/ipc/ctrlm_ipc_iarm_powermanager.cpp @@ -70,7 +70,7 @@ bool ctrlm_ipc_iarm_powermanager_t::get_wakeup_reason_voice() { bool wakeup_reason_voice = false; bool pwrmgr2 = false; - if(CTRLM_TR181_RESULT_SUCCESS != ctrlm_tr181_bool_get(CTRLM_RT181_POWER_RFC_PWRMGR2, &pwrmgr2)) { + if(CTRLM_TR181_RESULT_SUCCESS != ctrlm_tr181_bool_get(CTRLM_TR181_POWER_RFC_PWRMGR2, &pwrmgr2)) { XLOGD_INFO("failed to determine Power Manager revision, defaulting to 1"); } diff --git a/src/rf4ce/ctrlm_rf4ce_network.cpp b/src/rf4ce/ctrlm_rf4ce_network.cpp index 2caa75c2..81eaa3cd 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.cpp +++ b/src/rf4ce/ctrlm_rf4ce_network.cpp @@ -726,9 +726,6 @@ gboolean ctrlm_obj_network_rf4ce_t::load_config(json_t *json_obj_net_rf4ce) { sub_conf.config_value_get(JSON_INT_NAME_NETWORK_RF4CE_DSP_IC_DETECT, dsp_configuration_.ic_config_detect, 0x00, 0xFF); } } - //Read tr181 values here. tr181 values will override any config file values. - polling_config_tr181_read(); - process_xconf(); XLOGD_INFO("User String <%s>", user_string_.c_str()); XLOGD_INFO("Timeout Key Release %u ms", timeout_key_release_); @@ -2927,110 +2924,6 @@ void ctrlm_obj_network_rf4ce_t::default_polling_configuration() { } } -void ctrlm_obj_network_rf4ce_t::polling_config_tr181_read() { - guint8 default_polling_methods = 0; - ctrlm_rf4ce_polling_configuration_t default_polling_config_hb = {0}; - - ctrlm_rf4ce_polling_configuration_t default_polling_config_mac; - errno_t safec_rc = memset_s(&default_polling_config_mac, sizeof(ctrlm_rf4ce_polling_configuration_t), 0, sizeof(ctrlm_rf4ce_polling_configuration_t)); - ERR_CHK(safec_rc); - default_polling_config_mac.trigger = POLLING_TRIGGER_FLAG_TIME; - default_polling_config_mac.time_interval = JSON_INT_VALUE_NETWORK_RF4CE_POLLING_DEFAULT_MAC_TIME_INTERVAL; - - bool b_has_default_config = false; - - char tr181_buf[1024] = {0}; - if(CTRLM_TR181_RESULT_SUCCESS == ctrlm_tr181_string_get(CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_DEFAULT, tr181_buf, sizeof(tr181_buf))) { - if(4 == sscanf(tr181_buf, "%hhu:%hu:%hhu:%u:", &default_polling_methods, &default_polling_config_hb.trigger, &default_polling_config_hb.kp_counter, &default_polling_config_hb.time_interval)) { - XLOGD_INFO("Default HB Polling Configuration from TR181"); - b_has_default_config = true; - } - } - - bool b_has_default_mac_config = false; - - bool mac_polling_enabled = false; - if(CTRLM_TR181_RESULT_SUCCESS == ctrlm_tr181_bool_get(CTRLM_RF4CE_TR181_MAC_POLLING_CONFIGURATION_ENABLE, &mac_polling_enabled)) { - XLOGD_INFO("Default Mac Polling Configuration from TR181"); - b_has_default_mac_config = mac_polling_enabled; - ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_MAC_POLLING_CONFIGURATION_INTERVAL, (int*)&default_polling_config_mac.time_interval, 1000, 60000); - - if(mac_polling_enabled) { - polling_methods_ |= POLLING_METHODS_FLAG_MAC; - } else { - polling_methods_ &= ~POLLING_METHODS_FLAG_MAC; - } - - } - for(int i = 0; i < RF4CE_CONTROLLER_TYPE_INVALID; i++) { - XLOGD_INFO("Polling Configuration Remote Type <%s>", ctrlm_rf4ce_controller_type_str((ctrlm_rf4ce_controller_type_t)i)); - const char *controller_tr181_str = 0; - - switch((ctrlm_rf4ce_controller_type_t)i) { - case RF4CE_CONTROLLER_TYPE_XR11: { - controller_tr181_str = CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR11V2; - break; - } - case RF4CE_CONTROLLER_TYPE_XR15: { - controller_tr181_str = CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR15V1; - break; - } - case RF4CE_CONTROLLER_TYPE_XR15V2: { - controller_tr181_str = CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR15V2; - break; - } - case RF4CE_CONTROLLER_TYPE_XR16: { - controller_tr181_str = CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR16V1; - break; - } - case RF4CE_CONTROLLER_TYPE_XR19: { - controller_tr181_str = CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XR19V1; - break; - } - case RF4CE_CONTROLLER_TYPE_XRA: { - controller_tr181_str = CTRLM_RF4CE_TR181_POLLING_CONFIGURATION_XRAV1; - break; - } - default: { - break; - } - } - - if (b_has_default_mac_config) { - controller_polling_configuration_mac_[i] = default_polling_config_mac; - } - - if(controller_tr181_str) { - if (b_has_default_config) { - controller_polling_methods_[i] = default_polling_methods; - controller_polling_configuration_heartbeat_[i] = default_polling_config_hb; - } - safec_rc = memset_s(tr181_buf, sizeof(tr181_buf), 0, sizeof(tr181_buf)); - ERR_CHK(safec_rc); - ctrlm_rf4ce_polling_configuration_t controller_polling_configuration; - if(CTRLM_TR181_RESULT_SUCCESS == ctrlm_tr181_string_get(controller_tr181_str, tr181_buf, sizeof(tr181_buf))) { - if(4 == sscanf(tr181_buf, "%hhu:%hu:%hhu:%u:", &controller_polling_methods_[i], - &controller_polling_configuration.trigger, - &controller_polling_configuration.kp_counter, - &controller_polling_configuration.time_interval)) { - //If MAC polling bit is set, save the mac config - if(controller_polling_methods_[i] & POLLING_METHODS_FLAG_MAC) { - controller_polling_configuration_mac_[i].trigger = controller_polling_configuration.trigger; - controller_polling_configuration_mac_[i].kp_counter = controller_polling_configuration.kp_counter; - // The MAC polling period has been set above when MAC was enabled - } - //If Heartbeat polling bit is set, save the heartbeat config - if(controller_polling_methods_[i] & POLLING_METHODS_FLAG_HEARTBEAT) { - controller_polling_configuration_heartbeat_[i] = controller_polling_configuration; - } - XLOGD_INFO("Controller Polling Configuration Read from TR181 <%s><%s>", ctrlm_rf4ce_controller_type_str((ctrlm_rf4ce_controller_type_t)i),ctrlm_rf4ce_controller_polling_methods_str(controller_polling_methods_[i])); - } - } - } - controller_polling_methods_[i] &= polling_methods_; // The controller polling_methods should only contain methods currently supported by target - } -} - void ctrlm_obj_network_rf4ce_t::polling_config_read(json_config *conf) { if(NULL == conf) { XLOGD_ERROR("json config is NULL!"); @@ -3405,42 +3298,6 @@ void ctrlm_obj_network_rf4ce_t::polling_action_push(void *data, int size) { } } -void ctrlm_obj_network_rf4ce_t::process_xconf() { - int result; - int value = 0; - bool b_value = true; - result = ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_RF4CE_AUDIO_PROFILE_TARGET, &value, 1, 7); - if(result != CTRLM_TR181_RESULT_SUCCESS) { - XLOGD_INFO("audio profile target not present"); - } else { - audio_profiles_targ_ = value; - XLOGD_INFO("audio profile target 0x%04X", audio_profiles_targ_); - } - - result = ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_RF4CE_RSP_IDLE_FF, &value, 0, 1000); - if(result != CTRLM_TR181_RESULT_SUCCESS) { - XLOGD_INFO("FF Rsp Idle time not present"); - } else { - response_idle_time_ff_ = value; - XLOGD_INFO("FF Rsp Idle time %u", response_idle_time_ff_); - } - - if(CTRLM_TR181_RESULT_SUCCESS != ctrlm_tr181_bool_get(CTRLM_RF4CE_TR181_RF4CE_VOICE_ENCRYPTION, &b_value)) { - XLOGD_INFO("TR181 RF4CE Voice Encryption not present"); - } else { - XLOGD_TELEMETRY("TR181 RF4CE Voice Encryption set to %s", (b_value ? "TRUE" : "FALSE")); - voice_command_encryption_ = (b_value ? VOICE_COMMAND_ENCRYPTION_ENABLED : VOICE_COMMAND_ENCRYPTION_DISABLED); - } - - if(CTRLM_TR181_RESULT_SUCCESS != ctrlm_tr181_bool_get(CTRLM_RF4CE_TR181_RF4CE_HOST_PACKET_DECRYPTION, &host_decryption_)) { - XLOGD_INFO("TR181 RF4CE Host Packet Decryption not present"); - } else { - XLOGD_INFO("TR181 RF4CE Host Packet Decryption set to %s", (host_decryption_ ? "TRUE" : "FALSE")); - } - - rsp_time_.legacy_rfc(); -} - // ASB Functions bool ctrlm_obj_network_rf4ce_t::rf4ce_asb_init(void *data, int size) { @@ -3518,8 +3375,6 @@ void ctrlm_obj_network_rf4ce_t::asb_link_key_derivation_perform(void *data, int } void ctrlm_obj_network_rf4ce_t::asb_configuration(json_config *conf) { - int temp_i; - bool temp_b; // Get JSON configuration first if(NULL != conf) { conf->config_value_get(JSON_BOOL_NAME_NETWORK_RF4CE_ASB_ENABLE, asb_enabled_); @@ -3527,23 +3382,6 @@ void ctrlm_obj_network_rf4ce_t::asb_configuration(json_config *conf) { conf->config_value_get(JSON_INT_NAME_NETWORK_RF4CE_ASB_FALLBACK_THRESHOLD, asb_fallback_count_threshold_, 0x01, 0xFF); conf->config_value_get(JSON_BOOL_NAME_NETWORK_RF4CE_ASB_FORCE_SETTINGS, asb_force_settings_); } - - // Now check TR181 - if(CTRLM_TR181_RESULT_SUCCESS == ctrlm_tr181_bool_get(CTRLM_RF4CE_TR181_ASB_ENABLED, &temp_b)) { - asb_enabled_ = temp_b; - XLOGD_INFO("TR181 ASB Enable set to %s", (asb_enabled_ ? "TRUE" : "FALSE")); - } - if(asb_enabled_) { - if(CTRLM_TR181_RESULT_SUCCESS == ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_ASB_DERIVATION_METHOD, &temp_i, 0x01, 0xFF)) { - asb_key_derivation_methods_ = temp_i; - XLOGD_INFO("TR181 ASB Key Derivation Method set to %d", asb_key_derivation_methods_); - } - if(CTRLM_TR181_RESULT_SUCCESS == ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_ASB_FAIL_THRESHOLD, &temp_i, 0x01, 0xFF)) { - asb_fallback_count_threshold_ = temp_i; - XLOGD_INFO("TR181 ASB Fallback Threshold set to %d", asb_fallback_count_threshold_); - } - } - } void ctrlm_obj_network_rf4ce_t::rf4ce_asb_destroy(void *data, int size) { @@ -3983,9 +3821,7 @@ void ctrlm_obj_network_rf4ce_t::set_timers() { } void ctrlm_obj_network_rf4ce_t::xconf_configuration() { - if(FALSE == force_dsp_configuration_) { - dsp_configuration_xconf(); - } else { + if(FALSE != force_dsp_configuration_) { XLOGD_WARN("force dsp configuration is true, tell device(s) to read it"); update_far_field_configuration(RF4CE_POLLING_ACTION_DSP_CONFIGURATION); } @@ -4120,32 +3956,6 @@ void ctrlm_obj_network_rf4ce_t::update_far_field_configuration(ctrlm_rf4ce_polli } } -void ctrlm_obj_network_rf4ce_t::dsp_configuration_xconf() { - char rfc_val[100] = {'\0'}; - unsigned char *decoded_buf = NULL; - size_t decoded_buf_len = 0; - if(force_dsp_configuration_) { - XLOGD_WARN("not going to xconf for DSP configuration"); - return; - } - if(CTRLM_TR181_RESULT_SUCCESS == ctrlm_tr181_string_get(CTRLM_RF4CE_TR181_XR19_DSP_CONFIGURATION, rfc_val, sizeof(rfc_val))) { - decoded_buf = g_base64_decode(rfc_val, &decoded_buf_len); - if(decoded_buf) { - if(decoded_buf_len == CTRLM_RF4CE_RIB_ATTR_LEN_DSP_CONFIGURATION) { - XLOGD_INFO("DSP configuration taken from XCONF"); - property_write_dsp_configuration(decoded_buf, (uint8_t)decoded_buf_len); - } else { - XLOGD_WARN("incorrect length"); - } - free(decoded_buf); - } else { - XLOGD_WARN("failed to decode base64"); - } - } else { - XLOGD_INFO("no rfc value"); - } -} - void ctrlm_obj_network_rf4ce_t::attributes_from_db() { // So far just getting the DSP configuration if(!force_dsp_configuration_) { diff --git a/src/rf4ce/ctrlm_rf4ce_network.h b/src/rf4ce/ctrlm_rf4ce_network.h index 10cc771a..5a736a3a 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.h +++ b/src/rf4ce/ctrlm_rf4ce_network.h @@ -635,10 +635,6 @@ class ctrlm_obj_network_rf4ce_t : public ctrlm_obj_network_t static gboolean binding_in_progress_timeout(gpointer user_data); void default_polling_configuration(); void polling_config_read(json_config *conf); - void polling_config_tr181_read(); - void process_xconf(); - - void dsp_configuration_xconf(); gboolean is_asb_active(ctrlm_hal_rf4ce_ieee_address_t ieee_address); static gboolean asb_link_validation_timeout(gpointer user_data); diff --git a/src/rf4ce/network/attributes/ctrlm_rf4ce_network_attr_config.cpp b/src/rf4ce/network/attributes/ctrlm_rf4ce_network_attr_config.cpp index f4898cac..4988b397 100644 --- a/src/rf4ce/network/attributes/ctrlm_rf4ce_network_attr_config.cpp +++ b/src/rf4ce/network/attributes/ctrlm_rf4ce_network_attr_config.cpp @@ -62,51 +62,6 @@ unsigned int ctrlm_rf4ce_rsp_time_t::get_us(uint8_t profile_id) const { return(1000 * this->get_ms(profile_id)); } -// TODO: remove once generic RFC is approved for use -void ctrlm_rf4ce_rsp_time_t::legacy_rfc() { - unsigned int value = 0; - bool changed = false; - int rsp_time_min = (ctrlm_is_production_build() ? RESPONSE_TIME_MIN : RESPONSE_TIME_CONFIG_VBN_MIN); - int rsp_time_max = (ctrlm_is_production_build() ? RESPONSE_TIME_MAX : RESPONSE_TIME_CONFIG_VBN_MAX); - ctrlm_tr181_result_t result = ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_RSP_TIME_XRC, &value, rsp_time_min, rsp_time_max); - if(result != CTRLM_TR181_RESULT_SUCCESS) { - XLOGD_INFO("XRC Response Time not present"); - } else { - if(value != this->rsp_times[RESPONSE_TIME_PROFILE_XRC]) { - changed = true; - } - this->rsp_times[RESPONSE_TIME_PROFILE_XRC] = value; - XLOGD_INFO("XRC Response Time %ums", this->rsp_times[RESPONSE_TIME_PROFILE_XRC]); - } - - result = ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_RSP_TIME_XVP, &value, rsp_time_min, rsp_time_max); - if(result != CTRLM_TR181_RESULT_SUCCESS) { - XLOGD_INFO("XVP Response Time not present"); - } else { - if(value != this->rsp_times[RESPONSE_TIME_PROFILE_XVP]) { - changed = true; - } - this->rsp_times[RESPONSE_TIME_PROFILE_XVP] = value; - XLOGD_INFO("XVP Response Time %ums", this->rsp_times[RESPONSE_TIME_PROFILE_XVP]); - } - - result = ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_RSP_TIME_XDIU, &value, rsp_time_min, rsp_time_max); - if(result != CTRLM_TR181_RESULT_SUCCESS) { - XLOGD_INFO("XDIU Response Time not present"); - } else { - if(value != this->rsp_times[RESPONSE_TIME_PROFILE_XDIU]) { - changed = true; - } - this->rsp_times[RESPONSE_TIME_PROFILE_XDIU] = value; - XLOGD_INFO("XDIU Response Time %ums", this->rsp_times[RESPONSE_TIME_PROFILE_XDIU]); - } - - if(changed && this->updated_listener) { - XLOGD_INFO("calling updated listener for %s", this->get_name().c_str()); - this->updated_listener(*this); - } -} - std::string ctrlm_rf4ce_rsp_time_t::to_string() const { std::stringstream ss; ss << "XRC <" << this->rsp_times.at(RESPONSE_TIME_PROFILE_XRC) << "ms> "; diff --git a/src/rf4ce/network/attributes/ctrlm_rf4ce_network_attr_config.h b/src/rf4ce/network/attributes/ctrlm_rf4ce_network_attr_config.h index 44a6a646..cdabf815 100644 --- a/src/rf4ce/network/attributes/ctrlm_rf4ce_network_attr_config.h +++ b/src/rf4ce/network/attributes/ctrlm_rf4ce_network_attr_config.h @@ -54,7 +54,6 @@ class ctrlm_rf4ce_rsp_time_t : public ctrlm_attr_t, public ctrlm_rf4ce_rib_attr_ public: unsigned int get_ms(uint8_t profile_id) const; unsigned int get_us(uint8_t profile_id) const; - void legacy_rfc(); public: /** diff --git a/src/voice/ctrlm_voice_obj.cpp b/src/voice/ctrlm_voice_obj.cpp index a6787b1e..0dd3b04b 100644 --- a/src/voice/ctrlm_voice_obj.cpp +++ b/src/voice/ctrlm_voice_obj.cpp @@ -566,7 +566,6 @@ bool ctrlm_voice_t::voice_configure_config_file_json(json_t *obj_voice, json_t * } this->set_audio_mode(&audio_settings); - this->process_xconf(&json_obj_vsdk, local_conf); // Disable muting/ducking to recover in case ctrlm restarts while muted/ducked. this->audio_state_set(false); @@ -937,118 +936,6 @@ bool ctrlm_voice_t::voice_init_set(const char *init, bool db_write) { return(ret); } -void ctrlm_voice_t::process_xconf(json_t **json_obj_vsdk, bool local_conf) { - XLOGD_INFO("Voice XCONF Settings"); - int result; - - char vsdk_config_str[CTRLM_RFC_MAX_PARAM_LEN] = {0}; //MAX_PARAM_LEN from rfcapi.h is 2048 - - if(ctrlm_is_rf4ce_enabled()) { - char encoder_params_str[CTRLM_RCU_RIB_ATTR_LEN_OPUS_ENCODING_PARAMS * 2 + 1] = {0}; - - result = ctrlm_tr181_string_get(CTRLM_RF4CE_TR181_RF4CE_OPUS_ENCODER_PARAMS, encoder_params_str, sizeof(encoder_params_str)); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - std::string opus_encoder_params_str = encoder_params_str; - this->voice_params_opus_encoder_validate(opus_encoder_params_str); - - XLOGD_INFO("opus encoder params <%s>", this->prefs.opus_encoder_params_str.c_str()); - } - } - - ctrlm_voice_audio_settings_t audio_settings = {this->audio_mode, this->audio_timing, this->audio_confidence_threshold, this->audio_ducking_type, this->audio_ducking_level, this->audio_ducking_beep_enabled}; - bool changed = false; - - result = ctrlm_tr181_int_get(CTRLM_TR181_VOICE_PARAMS_AUDIO_MODE, (int*)&audio_settings.mode); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - changed = true; - } - result = ctrlm_tr181_int_get(CTRLM_TR181_VOICE_PARAMS_AUDIO_TIMING, (int *)&audio_settings.timing); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - changed = true; - } - result = ctrlm_tr181_real_get(CTRLM_TR181_VOICE_PARAMS_AUDIO_CONFIDENCE_THRESHOLD, &audio_settings.confidence_threshold); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - changed = true; - } - result = ctrlm_tr181_int_get(CTRLM_TR181_VOICE_PARAMS_AUDIO_DUCKING_TYPE, (int *)&audio_settings.ducking_type); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - changed = true; - } - result = ctrlm_tr181_real_get(CTRLM_TR181_VOICE_PARAMS_AUDIO_DUCKING_LEVEL, &audio_settings.ducking_level); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - changed = true; - } - - // CTRLM_TR181_VOICE_PARAMS_AUDIO_DUCKING_BEEP doesn't exist because this is a user configurable setting via configureVoice thunder api - - result = ctrlm_tr181_string_get(CTRLM_TR181_VOICE_PARAMS_VSDK_CONFIGURATION, &vsdk_config_str[0], CTRLM_RFC_MAX_PARAM_LEN); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - json_error_t jerror; - json_t *jvsdk; - char *decoded_buf = NULL; - size_t decoded_buf_len = 0; - - decoded_buf = (char *)g_base64_decode((const gchar*)vsdk_config_str, &decoded_buf_len); - if(decoded_buf) { - if(decoded_buf_len > 0 && decoded_buf_len < CTRLM_RFC_MAX_PARAM_LEN) { - XLOGD_INFO("VSDK configuration taken from XCONF"); - XLOGD_INFO("%s", decoded_buf); - - jvsdk = json_loads(&decoded_buf[0], 0, &jerror); - do { - if(NULL == jvsdk) { - XLOGD_ERROR("XCONF has VSDK params but json_loads() failed, line %d: %s ", jerror.line, jerror.text ); - break; - } - if(!json_is_object(jvsdk)) - { - XLOGD_ERROR("found VSDK in text but invalid object"); - break; - } - - //If execution reaches here we have XCONF settings to use. If developer has used local conf settings, keep them. - if(local_conf) { - if(!json_object_update(jvsdk, *json_obj_vsdk)) { - XLOGD_ERROR("failed to update json_obj_vsdk"); - break; - } - } - - *json_obj_vsdk = json_deep_copy(jvsdk); - if(NULL == *json_obj_vsdk) - { - XLOGD_ERROR("found VSDK object but failed to copy. We have lost any /opt file VSDK parameters"); - /* Nothing to do about this unlikely error. If I copy to a temp pointer to protect the input, - * then I have to copy from temp to real, and check that copy for failure. Where would it end? - */ - break; - } - }while(0); - } else { - XLOGD_WARN("incorrect length"); - } - free(decoded_buf); - } else { - XLOGD_WARN("failed to decode base64"); - } - } - - int value = 0; - result = ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_PRESS_AND_RELEASE_EOS_TIMEOUT, &value, 0, UINT16_MAX); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - this->prefs.par_voice_eos_timeout = value; - } - - result = ctrlm_tr181_int_get(CTRLM_RF4CE_TR181_PRESS_AND_RELEASE_EOS_METHOD, &value, 0, UINT8_MAX); - if(result == CTRLM_TR181_RESULT_SUCCESS) { - this->prefs.par_voice_eos_method = value; - } - - if(changed) { - this->set_audio_mode(&audio_settings); - } -} - void ctrlm_voice_t::query_strings_updated() { // N/A } diff --git a/src/voice/ctrlm_voice_obj.h b/src/voice/ctrlm_voice_obj.h index 3ec217b2..b7368631 100644 --- a/src/voice/ctrlm_voice_obj.h +++ b/src/voice/ctrlm_voice_obj.h @@ -554,7 +554,6 @@ class ctrlm_voice_t { void voice_params_qos_get(voice_params_qos_t *params); void voice_params_opus_encoder_get(voice_params_opus_encoder_t *params); void voice_params_par_get(voice_params_par_t *params); - virtual void process_xconf(json_t **json_obj_vsdk, bool local_conf); virtual void query_strings_updated(); int packet_loss_threshold_get() const; From fa0e440c0d9621aab5635aede214fe6a0e147fa1 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Tue, 9 Jun 2026 12:17:24 -0400 Subject: [PATCH 3/3] fix copilot concern --- src/voice/ctrlm_voice_obj.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/voice/ctrlm_voice_obj.cpp b/src/voice/ctrlm_voice_obj.cpp index 0dd3b04b..60d72cc8 100644 --- a/src/voice/ctrlm_voice_obj.cpp +++ b/src/voice/ctrlm_voice_obj.cpp @@ -405,6 +405,7 @@ bool ctrlm_voice_t::voice_configure_config_file_json(json_t *obj_voice, json_t * ctrlm_voice_iarm_call_settings_t *voice_settings = NULL; uint32_t voice_settings_len = 0; std::string init; + (void)local_conf; XLOGD_INFO("Configuring voice"); ctrlm_voice_audio_settings_t audio_settings = {this->audio_mode, this->audio_timing, this->audio_confidence_threshold, this->audio_ducking_type, this->audio_ducking_level, this->audio_ducking_beep_enabled};