From 61a6d570ac661084114864676294e07afb40ded4 Mon Sep 17 00:00:00 2001 From: dwolaver <44593664+dwolaver@users.noreply.github.com> Date: Thu, 25 Jun 2026 10:59:00 -0400 Subject: [PATCH 01/16] RDKEMW-20361 : ctrlm branch name print in logs not correct (#248) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9cdf593..00266a6f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -264,7 +264,7 @@ install(FILES ${CMAKE_BINARY_DIR}/ctrlm_config.json DESTINATION ${CMAKE_INSTALL_ # GENERATED FILES add_custom_command( OUTPUT ctrlm_version_build.h COMMAND echo -n "#define CTRLM_MAIN_BRANCH \"" >> ctrlm_version_build.h - COMMAND git -C ${CMAKE_CURRENT_SOURCE_DIR} branch --all --contains | sed -n -e "s/^\\s*remotes\\/origin\\///" -e "2p" | tr -d "\\n" >> ctrlm_version_build.h + COMMAND sh -c "src=\"${CMAKE_CURRENT_SOURCE_DIR}\"; ref=$(git -C \"$src\" describe --tags --exact-match 2>/dev/null || git -C \"$src\" branch -a --format='%(refname:short)' --contains HEAD 2>/dev/null | sed -n '2{p;q}'); echo -n \"$ref\" >> ctrlm_version_build.h" COMMAND echo "\"" >> ctrlm_version_build.h COMMAND echo -n "#define CTRLM_MAIN_COMMIT_ID " >> ctrlm_version_build.h COMMAND git -C ${CMAKE_CURRENT_SOURCE_DIR} log --format=\"%H\" -n 1 >> ctrlm_version_build.h From 75504292c04665875720f282d8798ab3337bbab4 Mon Sep 17 00:00:00 2001 From: dwolaver <44593664+dwolaver@users.noreply.github.com> Date: Wed, 8 Jul 2026 14:48:10 -0400 Subject: [PATCH 02/16] RDKEMW-17935 : remove ctrlm build flags - USE_DEPRECATED_HDMI_INPUT_PLUGIN (#250) --- CMakeLists.txt | 5 - src/CMakeLists.txt | 1 - src/irdb/ctrlm_irdb_interface.cpp | 12 - .../ctrlm_thunder_plugin_hdmi_input.cpp | 242 ------------------ .../plugins/ctrlm_thunder_plugin_hdmi_input.h | 99 ------- 5 files changed, 359 deletions(-) delete mode 100644 src/thunder/plugins/ctrlm_thunder_plugin_hdmi_input.cpp delete mode 100644 src/thunder/plugins/ctrlm_thunder_plugin_hdmi_input.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 00266a6f..55d597d8 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,6 @@ option(XRSR_HTTP "Enable XRSR_HTTP" OFF) option(XRSR_SDT "Enable XRSR_SDT" OFF) option(ENABLE_ASYNC_SRVR_MSG "Enable Asynchronous Server Messaging Feature" OFF) option(ENABLE_AVS_WITH_SDT "Enable SDT Based AVS Support" OFF) -option(USE_DEPRECATED_HDMI_INPUT_PLUGIN "Use deprecated HDMI Input plugin instead of AV Input plugin" OFF) # BUILD SYSTEM set(STAGING_BINDIR_NATIVE, "invalid" CACHE PATH "staging bin dir native") @@ -253,10 +252,6 @@ else() add_compile_definitions(SAFEC_DUMMY_API) endif() -if(USE_DEPRECATED_HDMI_INPUT_PLUGIN) - add_compile_definitions(USE_DEPRECATED_HDMI_INPUT_PLUGIN) -endif() - install(TARGETS controlMgr RUNTIME DESTINATION bin) install(FILES ${CMAKE_BINARY_DIR}/ctrlm_config.json DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} COMPONENT config ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 93f3f745..99916598 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -198,7 +198,6 @@ if(THUNDER) thunder/plugins/ctrlm_thunder_plugin_display_settings.cpp thunder/plugins/ctrlm_thunder_plugin_device_info.cpp thunder/plugins/ctrlm_thunder_plugin_av_input.cpp - thunder/plugins/ctrlm_thunder_plugin_hdmi_input.cpp thunder/plugins/ctrlm_thunder_plugin_system.cpp ipc/ctrlm_rcp_ipc_iarm_thunder.cpp voice/ipc/ctrlm_voice_ipc_iarm_thunder.cpp diff --git a/src/irdb/ctrlm_irdb_interface.cpp b/src/irdb/ctrlm_irdb_interface.cpp index bab8f9a6..e9b5395e 100644 --- a/src/irdb/ctrlm_irdb_interface.cpp +++ b/src/irdb/ctrlm_irdb_interface.cpp @@ -32,11 +32,7 @@ #include "ctrlm_thunder_plugin_display_settings.h" #include "ctrlm_thunder_plugin_cec_source.h" // TV Platforms -#ifdef USE_DEPRECATED_HDMI_INPUT_PLUGIN -#include "ctrlm_thunder_plugin_hdmi_input.h" -#else #include "ctrlm_thunder_plugin_av_input.h" -#endif #include "ctrlm_thunder_plugin_cec_sink.h" #endif @@ -111,11 +107,7 @@ typedef struct { Thunder::DisplaySettings::ctrlm_thunder_plugin_display_settings_t *display_settings; Thunder::CEC::ctrlm_thunder_plugin_cec_source_t *cec_source; Thunder::CECSink::ctrlm_thunder_plugin_cec_sink_t *cec_sink; - #ifdef USE_DEPRECATED_HDMI_INPUT_PLUGIN - Thunder::HDMIInput::ctrlm_thunder_plugin_hdmi_input_t *av_input; - #else Thunder::AVInput::ctrlm_thunder_plugin_av_input_t *av_input; - #endif #endif } ctrlm_irdb_global_t; @@ -383,11 +375,7 @@ void ctrlm_irdb_interface_t::on_thunder_ready() { } } } else { - #ifdef USE_DEPRECATED_HDMI_INPUT_PLUGIN - g_irdb.av_input = Thunder::HDMIInput::ctrlm_thunder_plugin_hdmi_input_t::getInstance(); - #else g_irdb.av_input = Thunder::AVInput::ctrlm_thunder_plugin_av_input_t::getInstance(); - #endif g_irdb.cec_sink = Thunder::CECSink::ctrlm_thunder_plugin_cec_sink_t::getInstance(); } #endif diff --git a/src/thunder/plugins/ctrlm_thunder_plugin_hdmi_input.cpp b/src/thunder/plugins/ctrlm_thunder_plugin_hdmi_input.cpp deleted file mode 100644 index ed9f2a1e..00000000 --- a/src/thunder/plugins/ctrlm_thunder_plugin_hdmi_input.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* - * If not stated otherwise in this file or this component's license file the - * following copyright and licenses apply: - * - * Copyright 2015 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -#include "ctrlm_thunder_plugin_hdmi_input.h" -#include "ctrlm_log.h" -#include -#include -#include -#include - -using namespace Thunder; -using namespace HDMIInput; -using namespace WPEFramework; - -static int _on_hotplug_thread(void *data) { - auto params = (std::pair *)data; - if(params) { - if(params->first) { - params->first->check_device_list((void *)¶ms->second); - } else { - XLOGD_ERROR("Plugin NULL"); - } - delete params; - } else { - XLOGD_ERROR("Params NULL"); - } - return(0); -} - -static void _on_hotplug(ctrlm_thunder_plugin_hdmi_input_t *plugin, JsonObject params) { - g_idle_add(_on_hotplug_thread, new std::pair(plugin, params)); -} - -static int _on_device_status_change_thread(void *data) { - auto params = (std::pair *)data; - if(params) { - if(params->first) { - if(params->second.HasLabel("id") && params->second.HasLabel("status")) { - params->first->on_device_status_change(params->second["id"].Number(), params->second["status"].String() == "started"); - } else { - std::string response_str; - params->second.ToString(response_str); - XLOGD_ERROR("HDMIInput device status changemalformed: <%s>", response_str.c_str()); - } - } else { - XLOGD_ERROR("Plugin NULL"); - } - delete params; - } else { - XLOGD_ERROR("Params NULL"); - } - return(0); -} - -static void _on_device_status_change(ctrlm_thunder_plugin_hdmi_input_t *plugin, JsonObject params) { - g_idle_add(_on_device_status_change_thread, new std::pair(plugin, params)); -} - -ctrlm_thunder_plugin_hdmi_input_t::ctrlm_thunder_plugin_hdmi_input_t() : ctrlm_thunder_plugin_t("HdmiInput", "org.rdk.HdmiInput", 2) { - sem_init(&this->semaphore, 0, 1); - this->registered_events = false; -} - -ctrlm_thunder_plugin_hdmi_input_t::~ctrlm_thunder_plugin_hdmi_input_t() { - -} - -ctrlm_thunder_plugin_hdmi_input_t *ctrlm_thunder_plugin_hdmi_input_t::getInstance() { - XLOGD_INFO("HDMI Input Plugin"); - static ctrlm_thunder_plugin_hdmi_input_t instance; - return &instance; -} - -void ctrlm_thunder_plugin_hdmi_input_t::get_infoframes(std::map > &infoframes) { - // Lock sempahore as we are touching infoframe cache - sem_wait(&this->semaphore); - infoframes = this->infoframes; - // Unlock semaphore as we are done touching the infoframe cache - sem_post(&this->semaphore); -} - -bool ctrlm_thunder_plugin_hdmi_input_t::_get_infoframe(int port) { - bool ret = false; - JsonObject params, response; - - XLOGD_INFO("Calling HDMIInput for infoframe data for port %d", port); - - params["portId"] = port; - // Lock sempahore as we are touching infoframe cache - sem_wait(&this->semaphore); - this->infoframes[port].clear(); - - if(this->call_plugin("getRawHDMISPD", (void *)¶ms, (void *)&response)) { - if(response.HasLabel("HDMISPD")) { - std::string infoframe_str = response["HDMISPD"].String(); - if(!infoframe_str.empty()) { - uint8_t *infoframe_buf = NULL; - size_t infoframe_size = 0; - - // Base64 decode the string - infoframe_buf = g_base64_decode(infoframe_str.c_str(), &infoframe_size); - if(infoframe_buf && infoframe_size > 0) { - for(size_t i = 0; i < infoframe_size; i++) { - this->infoframes[port].push_back(infoframe_buf[i]); // This checksum byte is not part of the HDMI spec, not sure why dsMgr/TvServer adds it within the infoframe - } -#define REMOVE_RSD_BYTE -#ifdef REMOVE_RSD_BYTE - this->infoframes[port].erase(this->infoframes[port].begin() + 3); -#endif - if(this->infoframes[port].size() < 29) { - XLOGD_INFO("Padding infoframe to complete 29 bytes"); - for(size_t i = this->infoframes[port].size(); i < 29; i++) { - this->infoframes[port].push_back(0x00); - } - } else if(this->infoframes[port].size() > 29) { - XLOGD_INFO("Removing padding from infoframe to 29 bytes"); - for(size_t i = this->infoframes[port].size(); i > 29; i--) { - this->infoframes[port].pop_back(); - } - } - ret = true; - } else { - XLOGD_ERROR("Failed to decode Infoframe base64!"); - } - g_free(infoframe_buf); - } else { - XLOGD_ERROR("Infoframe string is empty!"); - } - } else { - std::string response_str; - response.ToString(response_str); - XLOGD_ERROR("HDMIInput readINFOFRAME response malformed: <%s>", response_str.c_str()); - } - } else { - XLOGD_ERROR("HDMIInput readINFOFRAME call failed!"); - } - - // Unlock semaphore as we are done touching the infoframe cache - sem_post(&this->semaphore); - return(ret); -} - -void ctrlm_thunder_plugin_hdmi_input_t::_clear_infoframe(int port) { - XLOGD_INFO("Clearing infoframe data from cache for port %d", port); - // Lock sempahore as we are touching infoframe cache - sem_wait(&this->semaphore); - this->infoframes[port].clear(); - // Unlock semaphore as we are done touching the infoframe cache - sem_post(&this->semaphore); -} - -void ctrlm_thunder_plugin_hdmi_input_t::on_device_status_change(int port, bool active) { - XLOGD_INFO("Device status changed <%s>", (active ? "STARTED" : "STOPPED")); - if(active) { - XLOGD_INFO("Acquiring new infoframe data"); - this->_get_infoframe(port); - } else { - XLOGD_INFO("Purposely doing nothing when status is stopped"); - } -} - -bool ctrlm_thunder_plugin_hdmi_input_t::register_events() { - bool ret = this->registered_events; - if(ret == false) { - auto clientObject = (JSONRPC::LinkType*)this->plugin_client; - if(clientObject) { - ret = true; - uint32_t thunderRet = clientObject->Subscribe(CALL_TIMEOUT, _T("onDevicesChanged"), &_on_hotplug, this); - if(thunderRet != Core::ERROR_NONE) { - XLOGD_ERROR("Thunder subscribe failed "); - ret = false; - } - thunderRet = clientObject->Subscribe(CALL_TIMEOUT, _T("onInputStatusChanged"), &_on_device_status_change, this); - if(thunderRet != Core::ERROR_NONE) { - XLOGD_ERROR("Thunder subscribe failed "); - ret = false; - } - if(ret) { - this->registered_events = true; - } - } - } - Thunder::Plugin::ctrlm_thunder_plugin_t::register_events(); - return(ret); -} - -void ctrlm_thunder_plugin_hdmi_input_t::on_initial_activation() { - // Get initial INFOFRAME info - JsonObject params, response; - if(this->call_plugin("getHDMIInputDevices", (void *)¶ms, (void *)&response)) { - this->check_device_list((void *)&response); - } - - Thunder::Plugin::ctrlm_thunder_plugin_t::on_initial_activation(); -} - -void ctrlm_thunder_plugin_hdmi_input_t::check_device_list(void *params) { - JsonObject *root = (JsonObject *)params; - if(root) { - std::string response_st; - root->ToString(response_st); - XLOGD_INFO("%s", response_st.c_str()); - if(root->HasLabel("devices")) { - JsonArray devices = (*root)["devices"].Array(); - for(int i = 0; i < devices.Length(); i++) { - JsonObject device = devices[i].Object(); - if(device.HasLabel("id") && device.HasLabel("connected")) { - if(device["connected"].String() == "true") { - this->_get_infoframe(device["id"].Number()); - } else { - this->_clear_infoframe(device["id"].Number()); - } - } else { - std::string response_str; - device.ToString(response_str); - XLOGD_WARN("Malformed device object <%s>", response_str.c_str()); - } - } - } else { - std::string response_str; - root->ToString(response_str); - XLOGD_WARN("Missing device list! <%s>", response_str.c_str()); - } - } else { - XLOGD_WARN("JsonObject is NULL"); - } -} diff --git a/src/thunder/plugins/ctrlm_thunder_plugin_hdmi_input.h b/src/thunder/plugins/ctrlm_thunder_plugin_hdmi_input.h deleted file mode 100644 index 0a858186..00000000 --- a/src/thunder/plugins/ctrlm_thunder_plugin_hdmi_input.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * If not stated otherwise in this file or this component's license file the - * following copyright and licenses apply: - * - * Copyright 2014 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -#ifndef __CTRLM_THUNDER_PLUGIN_HDMI_INPUT_H__ -#define __CTRLM_THUNDER_PLUGIN_HDMI_INPUT_H__ -#include "ctrlm_thunder_plugin.h" -#include -#include - -namespace Thunder { -namespace HDMIInput { - -/** - * This class is used within ControlMgr to interact with the HDMIInput Thunder Plugin. - */ -class ctrlm_thunder_plugin_hdmi_input_t : public Thunder::Plugin::ctrlm_thunder_plugin_t { -public: - /** - * This function is used to get the Thunder HDMI Input instance, as it is a Singleton. - * @return The instance of the Thunder HDMI Input, or NULL on error. - */ - static ctrlm_thunder_plugin_hdmi_input_t *getInstance(); - - /** - * HDMIInput Thunder Plugin Destructor - */ - virtual ~ctrlm_thunder_plugin_hdmi_input_t(); - - /** - * This function is used to get the HDMI Infoframe data from cache. - * @param infoframe The vector that the resulting Infoframe data will be placed. - */ - void get_infoframes(std::map > &infoframes); - -public: - /** - * This function is technically used internally but from static function. This is used to handle device status events. - * @param port The HDMI port of the input device which has changed status. - * @param active The boolean that states whether the source is active or not. - */ - void on_device_status_change(int port, bool active); - - /** - * This function is technically used internally but from static function. This function is used to parse device list from HdmiInput calls/events - */ - void check_device_list(void *params); - -protected: - /** - * HDMIInput Thunder Plugin Default Constructor - */ - ctrlm_thunder_plugin_hdmi_input_t(); - - /** - * This function is called when registering for Thunder events. - * @return True if the events were registered for successfully otherwise False. - */ - virtual bool register_events(); - - /** - * This function is called when the initial activation of the plugin occurs. - */ - virtual void on_initial_activation(); - - /** - * This function actually calls the HDMI Input Thunder Plugin to get the Infoframe data. - * @return True if the call was successful and there is data available, otherwise False. - */ - bool _get_infoframe(int port); - - /** - * This function clears the current infoframe cache. - */ - void _clear_infoframe(int port); - -private: - std::map > infoframes; - sem_t semaphore; - bool registered_events; - -}; -}; -}; -#endif From 8c8118740728284656c185ccf1c6b19d83724f61 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 8 Jul 2026 15:42:49 -0400 Subject: [PATCH 03/16] RDKEMW-18082: ctrlm coverity cleanup (#225) --- ci/build_dependencies.sh | 103 ++++++++++++++++++---------- ci/cov_build.sh | 6 -- ci/mocks/devicesettings_ctrlm.patch | 40 ----------- ci/mocks/safec_lib.h | 44 ------------ ci/mocks/testframework_overrides.h | 48 ------------- ci/mocks/xlog_ci_compat.h | 42 ------------ src/ctrlm_utils.cpp | 6 ++ src/voice/ctrlm_voice_obj.cpp | 4 ++ 8 files changed, 75 insertions(+), 218 deletions(-) delete mode 100644 ci/mocks/devicesettings_ctrlm.patch delete mode 100644 ci/mocks/safec_lib.h delete mode 100644 ci/mocks/testframework_overrides.h delete mode 100644 ci/mocks/xlog_ci_compat.h diff --git a/ci/build_dependencies.sh b/ci/build_dependencies.sh index 9abff1c9..5d5bb7a9 100644 --- a/ci/build_dependencies.sh +++ b/ci/build_dependencies.sh @@ -43,22 +43,21 @@ apt install -y \ uuid-dev \ libevdev-dev \ libdrm-dev \ - libsafec-dev \ + libbsd-dev \ + autoconf \ + automake \ + libtool \ + make \ + gperf \ python3-pip python3 -m pip install jsonref ########################################### # 2. Clone the required repositories -XRSDK_REF="1.0.13" -git clone --depth 1 --filter=blob:none --branch "${XRSDK_REF}" https://github.com/rdkcentral/xr-voice-sdk.git +git clone --depth 1 --filter=blob:none --branch develop https://github.com/rdkcentral/xr-voice-sdk.git -git clone --depth 1 --filter=blob:none --branch develop https://github.com/rdkcentral/entservices-testframework.git - -# Patch the upstream testframework devicesettings.h with ctrlm-specific -# additions (ducking types, setAudioDucking, Manager::IsInitialized). -# We can remove this if added to upstream testframework -git -C entservices-testframework apply "$GITHUB_WORKSPACE/ci/mocks/devicesettings_ctrlm.patch" +git clone --depth 1 --filter=blob:none https://github.com/rdkcentral/entservices-testframework.git git clone --depth 1 --filter=blob:none --sparse --branch develop https://github.com/rdkcentral/iarmmgrs.git git -C iarmmgrs sparse-checkout set hal @@ -72,10 +71,22 @@ git -C rdk-halif-power_manager sparse-checkout set include git clone --depth 1 --filter=blob:none --sparse --branch develop https://github.com/rdkcentral/rdkversion.git git -C rdkversion sparse-checkout set src +git clone --depth 1 --filter=blob:none --sparse https://github.com/rdkcentral/meta-rdk-oss-reference.git +git -C meta-rdk-oss-reference sparse-checkout set recipes-common/safec-common-wrapper/files + +# Build and install nopoll for xr-voice-sdk WS-enabled native CI build. +git clone --depth 1 https://github.com/ASPLes/nopoll.git +cd nopoll +./autogen.sh --prefix=/usr +make -j$(nproc) +make install +cd "${GITHUB_WORKSPACE}" + IARMMGRS_DIR="$GITHUB_WORKSPACE/iarmmgrs" DEEPSLEEP_HAL_DIR="$GITHUB_WORKSPACE/rdk-halif-deepsleep_manager" POWER_HAL_DIR="$GITHUB_WORKSPACE/rdk-halif-power_manager" RDKVERSION_DIR="$GITHUB_WORKSPACE/rdkversion" +SAFEC_WRAPPER_DIR="$GITHUB_WORKSPACE/meta-rdk-oss-reference/recipes-common/safec-common-wrapper/files" ############################ # 3. Create stub/empty headers for external dependencies @@ -83,30 +94,49 @@ echo "========================================================================== echo "Creating stub headers" HEADERS_DIR="$GITHUB_WORKSPACE/ci/headers" -XRSDK_HEADERS_DIR="$HEADERS_DIR/xr-voice-sdk" mkdir -p "${HEADERS_DIR}" mkdir -p "${HEADERS_DIR}/rdk/iarmbus" mkdir -p "${HEADERS_DIR}/rdk/ds" mkdir -p "${HEADERS_DIR}/rdk/iarmmgrs-hal" -mkdir -p "${XRSDK_HEADERS_DIR}" - -# Copy real xr-voice-sdk headers. -# xr_fdc.h is NOT copied: only needed when FDC_ENABLED=ON -cp "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr-speech-vrex/xrsv.h" "${XRSDK_HEADERS_DIR}/" -cp "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr-speech-router/xrsr.h" "${XRSDK_HEADERS_DIR}/" -cp "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr-mq/xr_mq.h" "${XRSDK_HEADERS_DIR}/" -cp "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr-speech-vrex/xrsv_http/xrsv_http.h" "${XRSDK_HEADERS_DIR}/" -cp "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr-speech-vrex/xrsv_ws_nextgen/xrsv_ws_nextgen.h" "${XRSDK_HEADERS_DIR}/" -cp "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr-timestamp/xr_timestamp.h" "${XRSDK_HEADERS_DIR}/" - -# Generate rdkx_logger_modules.h from xr-voice-sdk's module configuration, -# then copy the real rdkx_logger and xr_voice_sdk headers. -# This replaces the hand-written ci/mocks/control/ stubs. -python3 "$GITHUB_WORKSPACE/xr-voice-sdk/scripts/rdkx_logger_modules_to_c.py" \ - "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr-logger/rdkv/rdkx_logger_modules.json" \ - "${XRSDK_HEADERS_DIR}/rdkx_logger_modules" "mw" -cp "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr-logger/rdkx_logger_mw.h" "${XRSDK_HEADERS_DIR}/rdkx_logger.h" -cp "$GITHUB_WORKSPACE/xr-voice-sdk/src/xr_voice_sdk.h" "${XRSDK_HEADERS_DIR}/xr_voice_sdk.h" + +# Use the Yocto safec_lib.h sysroot header for CI builds without libsafec. +# Add include guards because the upstream header does not provide them. +cp "$SAFEC_WRAPPER_DIR/safec_lib.h" "$HEADERS_DIR/safec_lib.h" +sed -i '1s/^/#ifndef CTRLM_CI_SAFEC_LIB_H\n#define CTRLM_CI_SAFEC_LIB_H\n/' "$HEADERS_DIR/safec_lib.h" +printf '\n#endif /* CTRLM_CI_SAFEC_LIB_H */\n' >> "$HEADERS_DIR/safec_lib.h" +# patching parseFormat to avoid -Wmaybe-uninitialized warnings in ctrlm_database.cpp from the safec wrapper's dummy implementation +sed -i 's/static inline int parseFormat(const char \*dst,/static inline int parseFormat(char *dst,/' "$HEADERS_DIR/safec_lib.h" +# patching strcpy_s to avoid Coverity's array-vs-NULL warning on string literals while +# preserving the dummy wrapper's null and bounds checks in CI builds. +perl -0pi -e 's{#define strcpy_s\(dst,max,src\) \(src != NULL\)\?\(\(max > strlen\(src\)\)\?EOK:ESLEMAX\):ESNULLP; \\\n if\(\(src != NULL\) && \(max > strlen\(src\)\)\) strcpy\(dst,src\);}{#define strcpy_s(dst,max,src) ({ const char *ctrlm_ci_src__ = (src); ctrlm_ci_src__ != NULL ? (((max) > strlen(ctrlm_ci_src__)) ? (strcpy((dst), ctrlm_ci_src__), EOK) : ESLEMAX) : ESNULLP; })}s or die "failed to patch strcpy_s in safec_lib.h\n"' "$HEADERS_DIR/safec_lib.h" +# patching strncpy_s to avoid the wrapper's raw strncpy expansion, which triggers +# -Wstringop-truncation in CI even though ctrlm manually terminates the destination buffer. +perl -0pi -e 's{#define strncpy_s\(dst,max,src,len\) \(src != NULL\)\?\(\(len <= max\)\?EOK:ESLEMAX\):ESNULLP; \\\n if\(\(src != NULL\) && \(len <= max\)\) strncpy\(dst,src,len\);}{#define strncpy_s(dst,max,src,len) (src != NULL)?((len <= max)?EOK:ESLEMAX):ESNULLP; \\\n if((src != NULL) && (len <= max)) { size_t copy_len = strnlen(src, len); memcpy(dst, src, copy_len); if(copy_len < (size_t)(max)) memset((char *)(dst) + copy_len, 0, (size_t)(max) - copy_len); }}s or die "failed to patch strncpy_s in safec_lib.h\n"' "$HEADERS_DIR/safec_lib.h" + +# Stage rdkversion.h before building xr-voice-sdk. +cp "$RDKVERSION_DIR/src/rdkversion.h" "$HEADERS_DIR/rdkversion.h" + +# Build xr-voice-sdk and install its headers under ${HEADERS_DIR}/xr-voice-sdk/. +# Version doesn't matter here, but we try to get the latest tag for good measure since it's included in the generated headers and may be used by downstream code. +XRSDK_REF=$(git ls-remote --tags https://github.com/rdkcentral/xr-voice-sdk.git \ + | grep -oP '\d+\.\d+\.\d+$' | sort -V | tail -1) +echo "Building xr-voice-sdk at ref ${XRSDK_REF}" +cmake -G Ninja \ + -S "$GITHUB_WORKSPACE/xr-voice-sdk" \ + -B "$GITHUB_WORKSPACE/build/xr-voice-sdk" \ + -DCMAKE_INSTALL_PREFIX="${HEADERS_DIR}" \ + -DCMAKE_INSTALL_INCLUDEDIR="xr-voice-sdk" \ + -DCMAKE_INSTALL_SYSCONFDIR="${HEADERS_DIR}/etc" \ + -DCMAKE_C_FLAGS="-I${HEADERS_DIR} -DSAFEC_DUMMY_API" \ + -DSTAGING_BINDIR_NATIVE="/usr/bin" \ + -DCMAKE_PROJECT_VERSION="${XRSDK_REF}" \ + -DWS_ENABLED=ON \ + -DWS_NOPOLL_PATCHES=OFF \ + -DINSTALL_INTERNAL_HEADERS=ON + +cmake --build "$GITHUB_WORKSPACE/build/xr-voice-sdk" +cmake --install "$GITHUB_WORKSPACE/build/xr-voice-sdk" --component headers +cmake --install "$GITHUB_WORKSPACE/build/xr-voice-sdk" --component internal-headers cd "${HEADERS_DIR}" @@ -160,16 +190,11 @@ find "$IARMMGRS_DIR" -name comcastIrKeyCodes.h -print -quit | xargs -r -I{} cp " [ -f comcastIrKeyCodes.h ] # rdkversion.h (used by ctrlm_main.cpp) -cp "$RDKVERSION_DIR/src/rdkversion.h" rdkversion.h [ -f rdkversion.h ] # secure_wrapper (types provided via empty stub — no v_secure_* calls in core) touch secure_wrapper.h -# safec compatibility header - committed in ci/mocks, copied here so it is -# resolved on the generated-headers include path. -cp "$GITHUB_WORKSPACE/ci/mocks/safec_lib.h" safec_lib.h - echo "Stub headers created successfully" cd "${GITHUB_WORKSPACE}" @@ -190,13 +215,15 @@ cat > /tmp/stub.c << 'STUB_EOF' void __stub_placeholder(void) {} STUB_EOF -# Build stub .so for each missing library -# nopoll and dshalcli are unused (factory-only) but unconditionally linked by CMakeLists.txt -# We can remove them from the link list in the future if desired, but for now just provide stubs to satisfy the linker. -for lib in xr-voice-sdk rdkversion IARMBus ds nopoll dshalcli rfcapi secure_wrapper evdev; do +# Build stub .so files for libraries still linked in CI. +# nopoll and dshalcli are factory-only but still linked unconditionally. +for lib in rdkversion IARMBus ds nopoll dshalcli rfcapi secure_wrapper evdev; do gcc -shared -fPIC -o "${STUB_LIB_DIR}/lib${lib}.so" /tmp/stub.c done +# Copy the real xr-voice-sdk .so alongside the stubs. +cp "$GITHUB_WORKSPACE/build/xr-voice-sdk/src/libxr-voice-sdk.so" "${STUB_LIB_DIR}/libxr-voice-sdk.so" + rm /tmp/stub.c echo "Stub libraries created in ${STUB_LIB_DIR}" diff --git a/ci/cov_build.sh b/ci/cov_build.sh index 3a51b921..5b48686b 100644 --- a/ci/cov_build.sh +++ b/ci/cov_build.sh @@ -28,9 +28,7 @@ ls -la "${GITHUB_WORKSPACE}" echo "building control (ctrlm-main)" XRSDK_REAL_HEADERS="$GITHUB_WORKSPACE/ci/headers/xr-voice-sdk" -XLOG_COMPAT="$GITHUB_WORKSPACE/ci/mocks/xlog_ci_compat.h" MOCK_DIR="$GITHUB_WORKSPACE/entservices-testframework/Tests/mocks" -MOCK_OVERRIDES="$GITHUB_WORKSPACE/ci/mocks/testframework_overrides.h" HEADERS_DIR="$GITHUB_WORKSPACE/ci/headers" EMPTY_JSON="$GITHUB_WORKSPACE/install/usr/include/ctrlm_config_empty.json" GLIB_CFLAGS="$(pkg-config --cflags glib-2.0)" @@ -77,13 +75,10 @@ cmake -G Ninja -S "$GITHUB_WORKSPACE" -B build/control \ -I ${GITHUB_WORKSPACE}/install/usr/include \ -I /usr/include/libdrm \ ${GLIB_CFLAGS} \ --include ${XLOG_COMPAT} \ -include ${MOCK_DIR}/Iarm.h \ --include ${MOCK_OVERRIDES} \ -include ${MOCK_DIR}/devicesettings.h \ -include ${MOCK_DIR}/Rfc.h \ -Wall -Wno-error \ --DSAFEC_DUMMY_API \ -DDISABLE_SECURITY_TOKEN" \ -DCMAKE_C_FLAGS=" \ -I ${XRSDK_REAL_HEADERS} \ @@ -96,7 +91,6 @@ ${GLIB_CFLAGS} \ -I /usr/include/libdrm \ ${GLIB_CFLAGS} \ -Wall -Wno-error \ --DSAFEC_DUMMY_API \ -DDISABLE_SECURITY_TOKEN" \ -DCMAKE_EXE_LINKER_FLAGS="-L${GITHUB_WORKSPACE}/install/usr/lib -Wl,--unresolved-symbols=ignore-all" diff --git a/ci/mocks/devicesettings_ctrlm.patch b/ci/mocks/devicesettings_ctrlm.patch deleted file mode 100644 index d2faf8a8..00000000 --- a/ci/mocks/devicesettings_ctrlm.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/Tests/mocks/devicesettings.h 2026-04-21 19:12:58.154981897 +0000 -+++ b/Tests/mocks/devicesettings.h 2026-04-21 19:13:50.591192520 +0000 -@@ -72,6 +72,16 @@ - dsAUDIOPORT_TYPE_MAX /**< Maximum index for audio port type. */ - } dsAudioPortType_t; - -+typedef enum _dsAudioDuckingAction_t { -+ dsAUDIO_DUCKINGACTION_START = 0, -+ dsAUDIO_DUCKINGACTION_STOP = 1 -+} dsAudioDuckingAction_t; -+ -+typedef enum _dsAudioDuckingType_t { -+ dsAUDIO_DUCKINGTYPE_ABSOLUTE = 0, -+ dsAUDIO_DUCKINGTYPE_RELATIVE = 1 -+} dsAudioDuckingType_t; -+ - typedef enum _dsVideoPortType_t { - dsVIDEOPORT_TYPE_RF = 0, ///< RF modulator (channel 3/4) video output - dsVIDEOPORT_TYPE_BB, ///< Baseband (composite, RCA) video output -@@ -934,6 +944,11 @@ - void enableARC(dsAudioARCTypes_t type, bool enable); - uint32_t getDolbyVolumeMode() const; - void setStereoMode(const std::string &mode, bool persist); -+ void setAudioDucking(dsAudioDuckingAction_t action, dsAudioDuckingType_t type, float level) { -+ (void)action; -+ (void)type; -+ (void)level; -+ } - - - -@@ -1420,6 +1435,8 @@ - static ManagerImpl* impl; - - public: -+ static bool IsInitialized; -+ - Manager(); - - static void setImpl(ManagerImpl* newImpl); diff --git a/ci/mocks/safec_lib.h b/ci/mocks/safec_lib.h deleted file mode 100644 index 37d75748..00000000 --- a/ci/mocks/safec_lib.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * If not stated otherwise in this file or this component's license file the - * following copyright and licenses apply: - * - * Copyright 2026 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Compatibility header: maps ctrlm's local include name to the real libsafec - * package headers (libsafec-dev / safec-common-wrapper in production). - * - * In CI this file is copied from ci/mocks/ into ci/headers/ by - * build_dependencies.sh so it is resolved on the generated-headers include - * path used by cov_build.sh. - * - * This exists because ctrlm includes safec_lib.h directly, while the native CI - * environment provides the underlying libsafec package headers instead of that - * project-local wrapper. - */ - -#ifndef CTRLM_CI_SAFEC_LIB_H_ -#define CTRLM_CI_SAFEC_LIB_H_ - -#include -#include -#include - -#ifndef ERR_CHK -#define ERR_CHK(rc) do { (void)(rc); } while(0) -#endif - -#endif /* CTRLM_CI_SAFEC_LIB_H_ */ diff --git a/ci/mocks/testframework_overrides.h b/ci/mocks/testframework_overrides.h deleted file mode 100644 index 22b8a0a2..00000000 --- a/ci/mocks/testframework_overrides.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * If not stated otherwise in this file or this component's license file the - * following copyright and licenses apply: - * - * Copyright 2026 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * CI patch layer for gaps in the entservices-testframework mock headers. - * - * ctrlm needs a few IARM declarations that are missing from the testframework - * headers used by this reduced build. This file adds only those missing pieces - * and can be removed once they exist upstream. - */ -#ifndef CTRLM_CI_TESTFRAMEWORK_OVERRIDES_H_ -#define CTRLM_CI_TESTFRAMEWORK_OVERRIDES_H_ - -/* Pinned testframework Iarm.h stops at UNKNOWN; ctrlm also references MAX. */ -#ifndef DEEPSLEEP_WAKEUPREASON_MAX -#define DEEPSLEEP_WAKEUPREASON_MAX (DEEPSLEEP_WAKEUPREASON_UNKNOWN + 1) -#endif - -/* IARM common API string not present in the pinned testframework mock */ -#ifndef IARM_BUS_COMMON_API_PowerPreChange -#define IARM_BUS_COMMON_API_PowerPreChange "PowerPreChange" -#endif - -/* Struct not present in the pinned testframework mock */ -#ifndef CTRLM_IARM_BUS_COMMON_API_POWERPRECHANGE_PARAM_T_DEFINED -#define CTRLM_IARM_BUS_COMMON_API_POWERPRECHANGE_PARAM_T_DEFINED -typedef struct { - IARM_Bus_PWRMgr_PowerState_t newState; - IARM_Bus_PWRMgr_PowerState_t curState; -} IARM_Bus_CommonAPI_PowerPreChange_Param_t; -#endif - -#endif /* CTRLM_CI_TESTFRAMEWORK_OVERRIDES_H_ */ diff --git a/ci/mocks/xlog_ci_compat.h b/ci/mocks/xlog_ci_compat.h deleted file mode 100644 index 43836b73..00000000 --- a/ci/mocks/xlog_ci_compat.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * If not stated otherwise in this file or this component's license file the - * following copyright and licenses apply: - * - * Copyright 2026 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * CI compatibility shim. - * - * The production rdkx_logger.h is included transitively everywhere via - * ctrlm_log.h. In the Yocto build the SDK headers pull several std:: names - * into the global namespace. A handful of ctrlm TUs (e.g. ctrlm_utils.cpp) - * rely on those names being globally visible. This tiny header replicates - * that behaviour for the CI native build. - */ -#ifndef CTRLM_CI_XLOG_COMPAT_H_ -#define CTRLM_CI_XLOG_COMPAT_H_ - -#ifdef __cplusplus -#include -#include -#include -using std::get; -using std::map; -using std::string; -using std::tuple; -#endif - -#endif /* CTRLM_CI_XLOG_COMPAT_H_ */ diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index eb8c7b7e..6be8556a 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "ctrlm.h" #include "ctrlm_utils.h" #include @@ -47,6 +48,11 @@ #include // end dsMgr includes +using std::get; +using std::map; +using std::string; +using std::tuple; + #define BLOCK_SIZE (1024 * 4 * 10) /* bytes */ #define MAX_RECURSE_DEPTH 20 diff --git a/src/voice/ctrlm_voice_obj.cpp b/src/voice/ctrlm_voice_obj.cpp index c81a629a..e6e8636d 100644 --- a/src/voice/ctrlm_voice_obj.cpp +++ b/src/voice/ctrlm_voice_obj.cpp @@ -2925,11 +2925,15 @@ void ctrlm_voice_t::voice_stream_end_callback(ctrlm_voice_stream_end_cb_t *strea if(session->packets_processed > 0) { uint32_t stream_duration = session->packets_processed * 20; // assume 20 ms per packet + #ifdef TELEMETRY_SUPPORT uint32_t samples_per_packet = 320; // 16 kHz samples at 20 ms per packet + #endif if(session->format.type == CTRLM_VOICE_FORMAT_ADPCM_FRAME) { uint32_t frame_duration_us = (session->format.value.adpcm_frame.size_packet - session->format.value.adpcm_frame.size_header) * 125; // 125 us per byte for ADPCM at 16 kHz stream_duration = (session->packets_processed * frame_duration_us) / 1000; + #ifdef TELEMETRY_SUPPORT samples_per_packet = (session->format.value.adpcm_frame.size_packet - session->format.value.adpcm_frame.size_header) * 2; // 2 samples per byte for ADPCM + #endif } XLOGD_AUTOMATION_TELEMETRY("src <%s> Packets Lost/Total <%u/%u> %.02f%% duration <%u> ms", ctrlm_voice_device_str(session->voice_device), session->packets_lost, session->packets_lost + session->packets_processed, 100.0 * ((double)session->packets_lost / (double)(session->packets_lost + session->packets_processed)), stream_duration); #ifdef TELEMETRY_SUPPORT From 87b09d95fdb25e6cc481f0f9f98fd4ccdc6363c8 Mon Sep 17 00:00:00 2001 From: dwolaver <44593664+dwolaver@users.noreply.github.com> Date: Thu, 9 Jul 2026 14:44:34 -0400 Subject: [PATCH 04/16] RDKEMW-7310 : remove ctrlm build flags - USE_DEPRECATED_IRMGR (#254) --- src/ctrlm.h | 1 - src/ctrlm_main.cpp | 392 +--------------------------------------- src/ctrlm_main_iarm.cpp | 9 - 3 files changed, 2 insertions(+), 400 deletions(-) diff --git a/src/ctrlm.h b/src/ctrlm.h index b5c73f0a..e4a9b518 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -469,7 +469,6 @@ gboolean ctrlm_pairing_window_active_get(void); void ctrlm_pairing_window_bind_status_set(ctrlm_bind_status_t bind_status); void ctrlm_discovery_remote_type_set(const char *remote_type_str); ctrlm_pairing_restrict_by_remote_t restrict_pairing_by_remote_get(); -void ctrlm_event_handler_ir(const char *owner, IARM_EventId_t event_id, void *data, size_t len); void ctrlm_quit_main_loop(); gboolean ctrlm_power_state_change(ctrlm_power_state_t power_state); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index a4b38fac..daf0977b 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -36,10 +36,6 @@ #include #include "jansson.h" #include "libIBus.h" -#ifdef USE_DEPRECATED_IRMGR -#include "irMgr.h" -#include "plat_ir.h" -#endif #include "sysMgr.h" #ifdef BREAKPAD_SUPPORT #include "client/linux/handler/exception_handler.h" @@ -369,11 +365,10 @@ static void ctrlm_stop_one_touch_autobind_(ctrlm_network_id_t network_id); static void ctrlm_close_pairing_window_(ctrlm_network_id_t network_id, ctrlm_close_pairing_window_reason reason); static void ctrlm_pairing_window_bind_status_set_(ctrlm_bind_status_t bind_status); static void ctrlm_discovery_remote_type_set_(const char* remote_type_str); -static void ctrlm_controller_product_name_get(ctrlm_controller_id_t controller_id, char *source_name) __attribute__((unused)); //USE_DEPRECATED_IRMGR static void ctrlm_global_rfc_values_retrieved(const ctrlm_rfc_attr_t &attr); -static gboolean ctrlm_timeout_line_of_sight(gpointer user_data) __attribute__((unused)); //USE_DEPRECATED_IRMGR -static gboolean ctrlm_timeout_autobind(gpointer user_data) __attribute__((unused)); //USE_DEPRECATED_IRMGR +static gboolean ctrlm_timeout_line_of_sight(gpointer user_data); +static gboolean ctrlm_timeout_autobind(gpointer user_data); static gboolean ctrlm_timeout_binding_button(gpointer user_data); static gboolean ctrlm_timeout_screen_bind(gpointer user_data); static gboolean ctrlm_timeout_one_touch_autobind(gpointer user_data); @@ -392,9 +387,6 @@ static void ctrlm_property_write_shutdown_time(void); static guchar ctrlm_property_write_shutdown_time(guchar *data, guchar length); static void ctrlm_property_read_shutdown_time(void); static void control_service_values_read_from_db(); -#ifdef USE_DEPRECATED_IRMGR -static void ctrlm_check_for_key_tag(int key_tag) __attribute__((unused)); //USE_DEPRECATED_IRMGR -#endif #if CTRLM_HAL_RF4CE_API_VERSION >= 9 static void ctrlm_crash_recovery_check(); @@ -4226,351 +4218,6 @@ gboolean ctrlm_main_iarm_call_chip_status_get(ctrlm_main_iarm_call_chip_status_t return(true); } -#ifdef USE_DEPRECATED_IRMGR -void ctrlm_event_handler_ir(const char *owner, IARM_EventId_t event_id, void *data, size_t len) -{ - IARM_Bus_IRMgr_EventData_t *ir_event = (IARM_Bus_IRMgr_EventData_t *)data; - - switch(ir_event->data.irkey.keySrc) { - case IARM_BUS_IRMGR_KEYSRC_IR: { - int key_code = ir_event->data.irkey.keyCode; - int key_type = ir_event->data.irkey.keyType; - if(key_code == KED_SETUP && key_type == KET_KEYDOWN) { // Received IR Line of sight code - XLOGD_INFO("Setup IR code received."); - // Cancel active line of sight timer (if active) - ctrlm_timeout_destroy(&g_ctrlm.line_of_sight_timeout_tag); - - if(!g_ctrlm.line_of_sight) { - ctrlm_main_iarm_event_binding_line_of_sight(TRUE); - } - // Set line of sight as active - g_ctrlm.line_of_sight = TRUE; - - // Set a timer to clear the line of sight after a period of time - g_ctrlm.line_of_sight_timeout_tag = ctrlm_timeout_create(g_ctrlm.line_of_sight_timeout_val, ctrlm_timeout_line_of_sight, NULL); - return; - } else if(key_code == KED_RF_PAIR_GHOST && key_type == KET_KEYDOWN) { // Received IR autobinding ghost code - XLOGD_INFO("Autobind ghost code received."); - // Cancel active autobind timer (if active) - ctrlm_timeout_destroy(&g_ctrlm.autobind_timeout_tag); - - if(!g_ctrlm.autobind) { - ctrlm_main_iarm_event_autobind_line_of_sight(TRUE); - } - // Set autobind as active - g_ctrlm.autobind = TRUE; - - // Set a timer to clear the autobind after a period of time - g_ctrlm.autobind_timeout_tag = ctrlm_timeout_create(g_ctrlm.autobind_timeout_val, ctrlm_timeout_autobind, NULL); - return; - } - break; - } - case IARM_BUS_IRMGR_KEYSRC_FP: { - if(0) { // TODO Pairing button was pressed - // Cancel active line of sight timer (if active) - ctrlm_timeout_destroy(&g_ctrlm.binding_button_timeout_tag); - - if(!g_ctrlm.binding_button) { - ctrlm_main_iarm_event_binding_button(TRUE); - } - // Set button binding as active - g_ctrlm.binding_button = TRUE; - - // Set a timer to clear the line of sight after a period of time - g_ctrlm.binding_button_timeout_tag = ctrlm_timeout_create(g_ctrlm.binding_button_timeout_val, ctrlm_timeout_binding_button, NULL); - } - return; - } - case IARM_BUS_IRMGR_KEYSRC_RF: { - XLOGD_DEBUG("RF key source received."); - break; - } - default: { - XLOGD_WARN("Other key source received. 0x%08x", ir_event->data.irkey.keySrc); - break; - } - } - - //Listen for control events - if(event_id == IARM_BUS_IRMGR_EVENT_CONTROL) - { - IARM_Bus_IRMgr_EventData_t *ir_event_data = (IARM_Bus_IRMgr_EventData_t*)data; - int key_code = ir_event_data->data.irkey.keyCode; - int key_src = ir_event_data->data.irkey.keySrc; - int key_tag = ir_event_data->data.irkey.keyTag; - int controller_id = ir_event_data->data.irkey.keySourceId; - bool need_to_update_db = false; - bool need_to_update_last_key_info = false; - bool send_on_control_event = false; - ctrlm_ir_remote_type old_remote_type = g_ctrlm.last_key_info.last_ir_remote_type; - ctrlm_remote_keypad_config old_remote_keypad_config = g_ctrlm.last_key_info.remote_keypad_config; - ctrlm_key_source_t last_source_type = g_ctrlm.last_key_info.source_type; - gboolean write_last_key_info = false; - char last_source_name[CTRLM_RCU_RIB_ATTR_LEN_PRODUCT_NAME]; - char source_name[CTRLM_RCU_RIB_ATTR_LEN_PRODUCT_NAME]; - ctrlm_remote_keypad_config remote_keypad_config; - string type; - string str_data; - errno_t safec_rc = -1; - int ind = -1; - - safec_rc = strcpy_s(last_source_name, sizeof(last_source_name), g_ctrlm.last_key_info.source_name); - ERR_CHK(safec_rc); - - if ((key_src != IARM_BUS_IRMGR_KEYSRC_IR) && (key_src != IARM_BUS_IRMGR_KEYSRC_RF)) { - // NOTE: For now, we are explicitly ignoring keypresses from IP or FP sources! - return; - } - - //Check for day change - need_to_update_db = ctrlm_main_handle_day_change_ir_remote_usage(); - - if (len != sizeof(IARM_Bus_IRMgr_EventData_t)) { - XLOGD_ERROR("ERROR - Got IARM_BUS_IRMGR_EVENT_CONTROL event with bad data length <%u>, should be <%u>!!", len, sizeof(IARM_Bus_IRMgr_EventData_t)); - return; - } - - switch(key_code) { - case KED_XR2V3: - case KED_XR5V2: - case KED_XR11V1: - case KED_XR11V2: { - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XR11V2; - g_ctrlm.last_key_info.remote_keypad_config = CTRLM_REMOTE_KEYPAD_CONFIG_HAS_SETUP_KEY_WITH_NUMBER_KEYS; - g_ctrlm.last_key_info.source_type = IARM_BUS_IRMGR_KEYSRC_IR; - g_ctrlm.last_key_info.is_screen_bind_mode = false; - type = "irRemote"; - str_data = std::to_string(g_ctrlm.last_key_info.remote_keypad_config); - send_on_control_event = true; - need_to_update_last_key_info = true; - safec_rc = strncpy_s(source_name, sizeof(source_name), ctrlm_rcu_ir_remote_types_str(g_ctrlm.last_key_info.last_ir_remote_type), CTRLM_RCU_RIB_ATTR_LEN_PRODUCT_NAME - 1); - ERR_CHK(safec_rc); - source_name[CTRLM_RCU_RIB_ATTR_LEN_PRODUCT_NAME - 1] = '\0'; - switch(key_code) { - case KED_XR2V3: - if(!g_ctrlm.ir_remote_usage_today.has_ir_xr2) { - g_ctrlm.ir_remote_usage_today.has_ir_xr2 = true; - need_to_update_db = true; - } - break; - case KED_XR5V2: - if(!g_ctrlm.ir_remote_usage_today.has_ir_xr5) { - g_ctrlm.ir_remote_usage_today.has_ir_xr5 = true; - need_to_update_db = true; - } - break; - case KED_XR11V1: - case KED_XR11V2: - if(!g_ctrlm.ir_remote_usage_today.has_ir_xr11) { - g_ctrlm.ir_remote_usage_today.has_ir_xr11 = true; - need_to_update_db = true; - } - break; - } - break; - } - - case KED_XR11_NOTIFY: - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XR11V2; - g_ctrlm.last_key_info.remote_keypad_config = CTRLM_REMOTE_KEYPAD_CONFIG_HAS_SETUP_KEY_WITH_NUMBER_KEYS; - g_ctrlm.last_key_info.source_type = IARM_BUS_IRMGR_KEYSRC_IR; - g_ctrlm.last_key_info.is_screen_bind_mode = false; - XLOGD_INFO("Received KED_XR11_NOTIFY"); - if((!g_ctrlm.ir_remote_usage_today.has_ir_remote) || (old_remote_type != g_ctrlm.last_key_info.last_ir_remote_type) || (old_remote_keypad_config != g_ctrlm.last_key_info.remote_keypad_config)) { - //Don't use has_ir_xr11 because this could be XR2 or XR5. Use has_ir_remote. - g_ctrlm.ir_remote_usage_today.has_ir_remote = true; - need_to_update_db = true; - } - break; - case KED_XR15V1_NOTIFY: - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XR15V1; - g_ctrlm.last_key_info.remote_keypad_config = CTRLM_REMOTE_KEYPAD_CONFIG_HAS_NO_SETUP_KEY_WITH_NUMBER_KEYS; - g_ctrlm.last_key_info.source_type = IARM_BUS_IRMGR_KEYSRC_IR; - XLOGD_INFO("Received KED_XR15V1_NOTIFY"); - if((!g_ctrlm.ir_remote_usage_today.has_ir_xr15) || (old_remote_type != g_ctrlm.last_key_info.last_ir_remote_type) || (old_remote_keypad_config != g_ctrlm.last_key_info.remote_keypad_config)) { - g_ctrlm.ir_remote_usage_today.has_ir_xr15 = true; - need_to_update_db = true; - } - break; - case KED_XR16V1_NOTIFY: - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_NA; - g_ctrlm.last_key_info.remote_keypad_config = CTRLM_REMOTE_KEYPAD_CONFIG_HAS_NO_SETUP_KEY_WITH_NO_NUMBER_KEYS; - g_ctrlm.last_key_info.source_type = IARM_BUS_IRMGR_KEYSRC_IR; - XLOGD_INFO("Received KED_XR16V1_NOTIFY"); - if((!g_ctrlm.ir_remote_usage_today.has_ir_remote) || (old_remote_type != g_ctrlm.last_key_info.last_ir_remote_type) || (old_remote_keypad_config != g_ctrlm.last_key_info.remote_keypad_config)) { - g_ctrlm.ir_remote_usage_today.has_ir_remote = true; - need_to_update_db = true; - } - break; - case KED_SCREEN_BIND_NOTIFY: - g_ctrlm.last_key_info.is_screen_bind_mode = true; - XLOGD_INFO("Received KED_SCREEN_BIND_NOTIFY"); - break; - case KED_VOLUMEUP: - case KED_VOLUMEDOWN: - case KED_MUTE: - case KED_INPUTKEY: - case KED_POWER: - case KED_TVPOWER: - case KED_RF_POWER: - case KED_DISCRETE_POWER_ON: - case KED_DISCRETE_POWER_STANDBY: { - send_on_control_event = true; - need_to_update_last_key_info = true; - type = "TV"; - break; - } - case KED_PUSH_TO_TALK: - send_on_control_event = true; - need_to_update_last_key_info = true; - type = "mic"; - break; - default: - break; - } - - if(key_src == IARM_BUS_IRMGR_KEYSRC_RF) { - ctrlm_controller_product_name_get(controller_id, source_name); - remote_keypad_config = ctrlm_get_remote_keypad_config(source_name); - } else { - remote_keypad_config = g_ctrlm.last_key_info.remote_keypad_config; - controller_id = -1; - //Check to see if the tag was included. If so, use it. - ctrlm_check_for_key_tag(key_tag); - safec_rc = strcpy_s(source_name, sizeof(source_name), ctrlm_rcu_ir_remote_types_str(g_ctrlm.last_key_info.last_ir_remote_type)); - ERR_CHK(safec_rc); - } - - XLOGD_INFO("Got IARM_BUS_IRMGR_EVENT_CONTROL event, controller_id <%d>, controlCode <0x%02X>, src <%d>.", controller_id, (unsigned int)key_code, key_src); - - //Only save the last key info to the db if the source type (IR or RF) or the source name (XR11, XR15) have changed - //It's not worth the writes to the db for every key. It is important to know if we are IR/RF and XR11/XR15 - bool isValid = false; - (last_source_type != key_src) ? isValid = true : (safec_rc = strcmp_s(last_source_name, sizeof(last_source_name), source_name, &ind)); - if((isValid) || ((safec_rc == EOK) && (ind != 0))) { - write_last_key_info = true; - } else if(safec_rc != EOK) { - ERR_CHK(safec_rc); - } - - if(send_on_control_event) { - str_data = std::to_string(remote_keypad_config); - ctrlm_rcu_iarm_event_control(controller_id, key_source_names[key_src], type.c_str(), str_data.c_str(), key_code, 0); - } - - if(need_to_update_last_key_info) { - ctrlm_update_last_key_info(controller_id, key_src, key_code, source_name, g_ctrlm.last_key_info.is_screen_bind_mode, write_last_key_info); - } - - if(need_to_update_db) { - ctrlm_property_write_ir_remote_usage(); - } - } - //Listen for key events to keep track of last key info - else if (event_id == IARM_BUS_IRMGR_EVENT_IRKEY) - { - IARM_Bus_IRMgr_EventData_t *ir_event_data = (IARM_Bus_IRMgr_EventData_t*)data; - int key_code = ir_event_data->data.irkey.keyCode; - int key_src = ir_event_data->data.irkey.keySrc; - int key_tag = ir_event_data->data.irkey.keyTag; - int controller_id = ir_event_data->data.irkey.keySourceId; - guchar last_source_type = g_ctrlm.last_key_info.source_type; - gboolean write_last_key_info = false; - char last_source_name[CTRLM_RCU_RIB_ATTR_LEN_PRODUCT_NAME]; - char source_name[CTRLM_RCU_RIB_ATTR_LEN_PRODUCT_NAME]; - - errno_t safec_rc = -1; - int ind = -1; - - safec_rc = strcpy_s(last_source_name, sizeof(last_source_name), g_ctrlm.last_key_info.source_name); - ERR_CHK(safec_rc); - - if ((ir_event_data->data.irkey.keyType == KET_KEYUP) || (ir_event_data->data.irkey.keyType == KET_KEYREPEAT)) { - // Don't remember keyup or repeat events - only use keydown. - return; - } - - if ((key_src != IARM_BUS_IRMGR_KEYSRC_IR) && (key_src != IARM_BUS_IRMGR_KEYSRC_RF)) { - // NOTE: For now, we are explicitly ignoring keypresses from IP or FP sources! - return; - } - - if (key_src != IARM_BUS_IRMGR_KEYSRC_RF) { - controller_id = -1; - } - - if(key_src == IARM_BUS_IRMGR_KEYSRC_RF) { - ctrlm_controller_product_name_get(controller_id, source_name); - } else { - controller_id = -1; - //Check to see if the tag was included. If so, use it. - ctrlm_check_for_key_tag(key_tag); - safec_rc = strcpy_s(source_name, sizeof(source_name), ctrlm_rcu_ir_remote_types_str(g_ctrlm.last_key_info.last_ir_remote_type)); - ERR_CHK(safec_rc); - } - - if (len != sizeof(IARM_Bus_IRMgr_EventData_t)) { - XLOGD_ERROR("ERROR - Got IARM_BUS_IRMGR_EVENT_IRKEY event with bad data length <%u>, should be <%u>!!", len, sizeof(IARM_Bus_IRMgr_EventData_t)); - return; - } - - //Only save the last key info to the db if the source type (IR or RF) or the source name (XR11, XR15) have changed - //It's not worth the writes to the db for every key. It is important to know if we are IR/RF and XR11/XR15 - bool isValid = false; - (last_source_type != key_src) ? isValid = true : (safec_rc = strcmp_s(last_source_name, sizeof(last_source_name), source_name, &ind)); - if((isValid) || ((safec_rc == EOK) && (ind != 0))) { - write_last_key_info = true; - } else if(safec_rc != EOK) { - ERR_CHK(safec_rc); - } - - ctrlm_update_last_key_info(controller_id, key_src, key_code, source_name, g_ctrlm.last_key_info.is_screen_bind_mode, write_last_key_info); - } -} - -void ctrlm_check_for_key_tag(int key_tag) { - switch(key_tag) { - case XMP_TAG_PLATCO: { - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_PLATCO; - break; - } - case XMP_TAG_XR11V2: { - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XR11V2; - break; - } - case XMP_TAG_XR15V1: { - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XR15V1; - break; - } - case XMP_TAG_XR15V2: { - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XR15V2; - break; - } - case XMP_TAG_XR16V1: { - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XR16V1; - break; - } - case XMP_TAG_XRAV1: { - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XRAV1; - break; - } - case XMP_TAG_XR20V1: { - g_ctrlm.last_key_info.last_ir_remote_type = CTRLM_IR_REMOTE_TYPE_XR20V1; - break; - } - case XMP_TAG_COMCAST: - case XMP_TAG_UNDEFINED: - default: { - break; - } - } - if(key_tag != XMP_TAG_COMCAST) { - XLOGD_DEBUG("key_tag <%s>", ctrlm_rcu_ir_remote_types_str(g_ctrlm.last_key_info.last_ir_remote_type)); - } -} -#endif // USE_DEPRECATED_IRMGR - gboolean ctrlm_timeout_line_of_sight(gpointer user_data) { XLOGD_INFO("Timeout - Line of sight."); // Allocate a message and send it to Control Manager's queue @@ -5891,35 +5538,6 @@ ctrlm_controller_id_t ctrlm_last_used_controller_get(ctrlm_network_type_t networ return CTRLM_MAIN_CONTROLLER_ID_INVALID; } -void ctrlm_controller_product_name_get(ctrlm_controller_id_t controller_id, char *source_name) { - // Signal completion of the operation - sem_t semaphore; - ctrlm_main_status_cmd_result_t cmd_result = CTRLM_MAIN_STATUS_REQUEST_PENDING; - - // Allocate a message and send it to Control Manager's queue - ctrlm_main_queue_msg_product_name_t msg; - errno_t safec_rc = memset_s(&msg, sizeof(msg), 0, sizeof(msg)); - ERR_CHK(safec_rc); - - sem_init(&semaphore, 0, 0); - msg.controller_id = controller_id; - msg.product_name = source_name; - msg.semaphore = &semaphore; - msg.cmd_result = &cmd_result; - - ctrlm_main_queue_handler_push(CTRLM_HANDLER_NETWORK, (ctrlm_msg_handler_network_t)&ctrlm_obj_network_t::req_process_controller_product_name, &msg, sizeof(msg), NULL, 1); // TODO: Hack, using default RF4CE network ID. - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process CONTROLLER_TYPE request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result != CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - XLOGD_ERROR("ERROR getting product name!!"); - return; - } -} - void control_service_values_read_from_db() { guchar *data = NULL; guint32 length; @@ -6064,12 +5682,6 @@ gboolean ctrlm_start_iarm(gpointer user_data) { // Register iarm calls and events XLOGD_INFO(": Register iarm calls and events"); -#ifdef USE_DEPRECATED_IRMGR - // IARM Events that we are listening to from other processes - IARM_Bus_RegisterEventHandler(IARM_BUS_IRMGR_NAME, IARM_BUS_IRMGR_EVENT_IRKEY, ctrlm_event_handler_ir); - IARM_Bus_RegisterEventHandler(IARM_BUS_IRMGR_NAME, IARM_BUS_IRMGR_EVENT_CONTROL, ctrlm_event_handler_ir); -#endif - ctrlm_main_iarm_init(); XLOGD_INFO("Notifying systemd of successful initialization"); diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index db124af4..a51cdd1f 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -22,9 +22,6 @@ #include #include "libIBus.h" #include "libIBusDaemon.h" -#ifdef USE_DEPRECATED_IRMGR -#include "irMgr.h" -#endif #include "sysMgr.h" #include "comcastIrKeyCodes.h" #include "ctrlm.h" @@ -129,12 +126,6 @@ void ctrlm_main_iarm_terminate(void) { // Change to stopped or terminated state, so we do not accept new calls g_atomic_int_set(&running, 0); -#ifdef USE_DEPRECATED_IRMGR - // IARM Events that we are listening to from other processes - IARM_Bus_RemoveEventHandler(IARM_BUS_IRMGR_NAME, IARM_BUS_IRMGR_EVENT_IRKEY, ctrlm_event_handler_ir); - IARM_Bus_RemoveEventHandler(IARM_BUS_IRMGR_NAME, IARM_BUS_IRMGR_EVENT_CONTROL, ctrlm_event_handler_ir); -#endif - // Unregister calls that can be invoked by IARM bus clients //for(index = 0; index < sizeof(ctrlm_iarm_calls)/sizeof(ctrlm_iarm_call_t); index++) { // result = IARM_Bus_UnRegisterCall(ctrlm_iarm_calls[index].name, ctrlm_iarm_calls[index].handler); From c2483a9572613d81b853a2c2b80bd52497bfec5d Mon Sep 17 00:00:00 2001 From: Kelvin Lu <119349872+klu339@users.noreply.github.com> Date: Mon, 13 Jul 2026 10:48:21 -0400 Subject: [PATCH 05/16] RDKEMW-20543: Send IR Prog State RF4CE Network (#252) --- src/rf4ce/ctrlm_rf4ce_network.cpp | 11 +++++++++++ src/rf4ce/ctrlm_rf4ce_network.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/rf4ce/ctrlm_rf4ce_network.cpp b/src/rf4ce/ctrlm_rf4ce_network.cpp index 85a3caea..91df3fb5 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.cpp +++ b/src/rf4ce/ctrlm_rf4ce_network.cpp @@ -2620,6 +2620,13 @@ guchar ctrlm_obj_network_rf4ce_t::target_irdb_status_flags_get() { return(target_irdb_status_.flags); } +void ctrlm_obj_network_rf4ce_t::ir_prog_state_set(ctrlm_ir_state_t state) { + THREAD_ID_VALIDATE(); + XLOGD_INFO("RF4CE remote IR programming state changed to <%s>", ctrlm_ir_state_str(state)); + ir_state_ = state; + iarm_event_rcu_status(); +} + ctrlm_rf4ce_controller_irdb_status_t ctrlm_obj_network_rf4ce_t::most_recent_controller_irdb_status_get(void) { THREAD_ID_VALIDATE(); ctrlm_rf4ce_controller_irdb_status_t most_recent_controller_irdb_status; @@ -4452,6 +4459,8 @@ void ctrlm_obj_network_rf4ce_t::req_process_program_ir_codes(void *data, int siz XLOGD_ERROR("Controller %u doesn't exist", dqm->controller_id); } + ir_prog_state_set(success ? CTRLM_IR_STATE_COMPLETE : CTRLM_IR_STATE_FAILED); + if(dqm->success) dqm->success->push_back(success); // post the semaphore if(dqm->semaphore) { @@ -4482,6 +4491,8 @@ void ctrlm_obj_network_rf4ce_t::req_process_ir_clear_codes(void *data, int size) XLOGD_ERROR("Controller %u doesn't exist", dqm->controller_id); } + ir_prog_state_set(success ? CTRLM_IR_STATE_COMPLETE : CTRLM_IR_STATE_FAILED); + if(dqm->success) dqm->success->push_back(success); // post the semaphore if(dqm->semaphore) { diff --git a/src/rf4ce/ctrlm_rf4ce_network.h b/src/rf4ce/ctrlm_rf4ce_network.h index 10cc771a..44dd2570 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.h +++ b/src/rf4ce/ctrlm_rf4ce_network.h @@ -386,6 +386,7 @@ class ctrlm_obj_network_rf4ce_t : public ctrlm_obj_network_t gboolean target_irdb_status_read_from_db(); void target_irdb_status_set(ctrlm_rf4ce_controller_irdb_status_t controller_irdb_status); guchar target_irdb_status_flags_get(); + void ir_prog_state_set(ctrlm_ir_state_t state); ctrlm_rf4ce_controller_irdb_status_t most_recent_controller_irdb_status_get(); virtual void disable_hal_calls(); From 51f7a1e453b0ac7cbe65c3fe1611bd32bdd23575 Mon Sep 17 00:00:00 2001 From: dwolaver <44593664+dwolaver@users.noreply.github.com> Date: Mon, 13 Jul 2026 15:08:00 -0400 Subject: [PATCH 06/16] RDKEMW-17936 : remove ctrlm build flags - USE_IARM_POWER_MANAGER (#251) --- CMakeLists.txt | 5 - ci/cov_build.sh | 1 - src/CMakeLists.txt | 13 +-- src/ctrlm_main.cpp | 8 +- src/ctrlm_main_iarm.cpp | 9 -- src/ctrlm_powermanager_factory.cpp | 19 ++-- src/ctrlm_utils.cpp | 27 ----- src/ctrlm_utils.h | 6 -- src/factory/CMakeLists.txt | 2 +- src/factory/ctrlmf_main.c | 2 + src/factory/ctrlmf_version.c | 26 ++++- src/ipc/ctrlm_ipc_iarm_powermanager.cpp | 126 ------------------------ src/ipc/ctrlm_ipc_iarm_powermanager.h | 40 -------- src/voice/ctrlm_voice_obj.cpp | 16 +++ 14 files changed, 57 insertions(+), 243 deletions(-) delete mode 100755 src/ipc/ctrlm_ipc_iarm_powermanager.cpp delete mode 100755 src/ipc/ctrlm_ipc_iarm_powermanager.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 55d597d8..b7d58266 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,6 @@ option(TELEMETRY_SUPPORT "Enable TELEMETRY_SUPPORT" OFF) option(THUNDER "Enable THUNDER" ON) option(THUNDER_SECURITY "Enable THUNDER_SECURITY" OFF) option(USE_SAFEC "Use safec" OFF) -option(USE_IARM_POWER_MANAGER "Use IARM Power Manager" OFF) option(XRSR_HTTP "Enable XRSR_HTTP" OFF) option(XRSR_SDT "Enable XRSR_SDT" OFF) option(ENABLE_ASYNC_SRVR_MSG "Enable Asynchronous Server Messaging Feature" OFF) @@ -238,10 +237,6 @@ if(THUNDER) endif() endif() -if(USE_IARM_POWER_MANAGER) - add_compile_definitions(USE_IARM_POWER_MANAGER) -endif() - if(USE_SAFEC) find_package(PkgConfig) pkg_check_modules(SAFEC REQUIRED libsafec) diff --git a/ci/cov_build.sh b/ci/cov_build.sh index 5b48686b..c89df5b4 100644 --- a/ci/cov_build.sh +++ b/ci/cov_build.sh @@ -51,7 +51,6 @@ cmake -G Ninja -S "$GITHUB_WORKSPACE" -B build/control \ -DBUILD_CTRLM_FACTORY=OFF \ -DBUILD_FACTORY_TEST=OFF \ -DUSE_SAFEC=OFF \ --DUSE_IARM_POWER_MANAGER=ON \ -DBREAKPAD=OFF \ -DFDC_ENABLED=OFF \ -DENABLE_ASYNC_SRVR_MSG=OFF \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 99916598..6cc4dd7a 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -144,17 +144,6 @@ if(BUILD_CTRLM_SERVER) add_subdirectory(server) endif() -if(USE_IARM_POWER_MANAGER) - target_sources(controlMgr PRIVATE - ipc/ctrlm_ipc_iarm_powermanager.cpp - ) -else() - target_sources(controlMgr PRIVATE - thunder/ctrlm_thunder_powermanager.cpp - thunder/ctrlm_thunder_plugin_powermanager.cpp - ) -endif() - if(RF4CE_ENABLED) target_sources(controlMgr PRIVATE rf4ce/controller/attributes/ctrlm_rf4ce_controller_attr_battery.cpp @@ -192,6 +181,8 @@ if(THUNDER) thunder/ctrlm_thunder_controller.cpp thunder/ctrlm_thunder_plugin.cpp thunder/ctrlm_thunder_plugin_system_audio_player.cpp + thunder/ctrlm_thunder_powermanager.cpp + thunder/ctrlm_thunder_plugin_powermanager.cpp thunder/helpers/ctrlm_thunder_helpers.cpp thunder/plugins/ctrlm_thunder_plugin_cec_sink.cpp thunder/plugins/ctrlm_thunder_plugin_cec_source.cpp diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index daf0977b..2d5348bf 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -2713,7 +2713,7 @@ gpointer ctrlm_main_thread(gpointer param) { g_ctrlm.wake_with_voice_allowed = false; - if((wake_with_voice_allowed == true) && (g_ctrlm.power_manager->get_wakeup_reason_voice())) { + if((wake_with_voice_allowed == true) && (g_ctrlm.power_manager != NULL) && (g_ctrlm.power_manager->get_wakeup_reason_voice())) { if( g_ctrlm.voice_session->nsm_voice_session == true ) { XLOGD_INFO("Handling NSM voice session, ignore ON"); } else { @@ -5523,7 +5523,11 @@ gboolean ctrlm_main_get_networked_standby_mode(void) { bool networked_standby_mode = false; if(g_ctrlm.networked_standby_supported && (g_ctrlm.power_state == CTRLM_POWER_STATE_DEEP_SLEEP)) { - networked_standby_mode = g_ctrlm.power_manager->get_networked_standby_mode(); + if(g_ctrlm.power_manager == NULL) { + XLOGD_ERROR("power_manager is invalid, defaulting to OFF"); + } else { + networked_standby_mode = g_ctrlm.power_manager->get_networked_standby_mode(); + } } return networked_standby_mode ? true : false; diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index a51cdd1f..a967f46f 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -27,7 +27,6 @@ #include "ctrlm.h" #include "ctrlm_log.h" #include "ctrlm_ipc.h" -#include "ctrlm_ipc_iarm_powermanager.h" #include "ctrlm_network.h" #include "ctrlm_tr181.h" #include "ctrlm_utils.h" @@ -56,9 +55,6 @@ static IARM_Result_t ctrlm_main_iarm_call_start_pair_with_code(void *arg); static IARM_Result_t ctrlm_main_iarm_call_chip_status_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_audio_capture_start(void *arg); static IARM_Result_t ctrlm_main_iarm_call_audio_capture_stop(void *arg); -#if CTRLM_HAL_RF4CE_API_VERSION >= 10 && !defined(CTRLM_DPI_CONTROL_NOT_SUPPORTED) -extern IARM_Result_t ctrlm_iarm_powermanager_event_handler_power_pre_change(void* pArgs); -#endif typedef struct { const char * name; @@ -92,11 +88,6 @@ ctrlm_iarm_call_t ctrlm_iarm_calls[] = { {CTRLM_MAIN_IARM_CALL_CHIP_STATUS_GET, ctrlm_main_iarm_call_chip_status_get }, {CTRLM_MAIN_IARM_CALL_AUDIO_CAPTURE_START, ctrlm_main_iarm_call_audio_capture_start }, {CTRLM_MAIN_IARM_CALL_AUDIO_CAPTURE_STOP, ctrlm_main_iarm_call_audio_capture_stop }, - #if USE_IARM_POWER_MANAGER - #if CTRLM_HAL_RF4CE_API_VERSION >= 10 && !defined(CTRLM_DPI_CONTROL_NOT_SUPPORTED) - {IARM_BUS_COMMON_API_PowerPreChange, ctrlm_iarm_powermanager_event_handler_power_pre_change }, - #endif - #endif }; diff --git a/src/ctrlm_powermanager_factory.cpp b/src/ctrlm_powermanager_factory.cpp index 7048c028..bd4eeae8 100755 --- a/src/ctrlm_powermanager_factory.cpp +++ b/src/ctrlm_powermanager_factory.cpp @@ -18,32 +18,31 @@ */ #include #include "ctrlm_powermanager.h" -#ifdef USE_IARM_POWER_MANAGER -#include "ctrlm_ipc_iarm_powermanager.h" -#else #include "ctrlm_thunder_powermanager.h" -#endif +#ifdef CTRLM_THUNDER static ctrlm_powermanager_t *instance = NULL; +#endif ctrlm_powermanager_t* ctrlm_powermanager_t::get_instance() { + #ifdef CTRLM_THUNDER if(instance == NULL) { - #ifdef USE_IARM_POWER_MANAGER - instance = new ctrlm_ipc_iarm_powermanager_t(); - #else instance = new ctrlm_thunder_powermanager_t(); - #endif } - + return(instance); + #else + return(NULL); + #endif } void ctrlm_powermanager_t::destroy_instance() { - + #ifdef CTRLM_THUNDER if(instance != NULL) { delete instance; instance = NULL; } + #endif } ctrlm_powermanager_t::~ctrlm_powermanager_t() { diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index 6be8556a..d2a87311 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -1383,33 +1383,6 @@ const char *ctrlm_linux_key_code_str(uint16_t code, bool mask) { } } -#ifdef USE_IARM_POWER_MANAGER -const char *ctrlm_wakeup_reason_str(DeepSleep_WakeupReason_t wakeup_reason) { - switch(wakeup_reason) { - case DEEPSLEEP_WAKEUPREASON_IR: return("IR"); - case DEEPSLEEP_WAKEUPREASON_RCU_BT: return("RCU_BT"); - case DEEPSLEEP_WAKEUPREASON_RCU_RF4CE: return("RCU_RF4CE"); - case DEEPSLEEP_WAKEUPREASON_GPIO: return("GPIO"); - case DEEPSLEEP_WAKEUPREASON_LAN: return("LAN"); - case DEEPSLEEP_WAKEUPREASON_WLAN: return("WLAN"); - case DEEPSLEEP_WAKEUPREASON_TIMER: return("TIMER"); - case DEEPSLEEP_WAKEUPREASON_FRONT_PANEL: return("FRONT_PANEL"); - case DEEPSLEEP_WAKEUPREASON_WATCHDOG: return("WATCHDOG"); - case DEEPSLEEP_WAKEUPREASON_SOFTWARE_RESET: return("SOFTWARE_RESET"); - case DEEPSLEEP_WAKEUPREASON_THERMAL_RESET: return("THERMAL_RESET"); - case DEEPSLEEP_WAKEUPREASON_WARM_RESET: return("WARM_RESET"); - case DEEPSLEEP_WAKEUPREASON_COLDBOOT: return("COLDBOOT"); - case DEEPSLEEP_WAKEUPREASON_STR_AUTH_FAILURE: return("STR_AUTH_FAILURE"); - case DEEPSLEEP_WAKEUPREASON_CEC: return("CEC"); - case DEEPSLEEP_WAKEUPREASON_PRESENCE: return("PRESENCE"); - case DEEPSLEEP_WAKEUPREASON_VOICE: return("VOICE"); - case DEEPSLEEP_WAKEUPREASON_UNKNOWN: return("UNKNOWN"); - case DEEPSLEEP_WAKEUPREASON_MAX: return("MAX"); - } - return(ctrlm_invalid_return(wakeup_reason)); -} -#endif - bool ctrlm_file_copy(const char* src, const char* dst, bool overwrite, bool follow_dst_symbolic_link) { bool ret = FALSE; GFile *g_src = g_file_new_for_path(src); diff --git a/src/ctrlm_utils.h b/src/ctrlm_utils.h index baed40e7..098131be 100644 --- a/src/ctrlm_utils.h +++ b/src/ctrlm_utils.h @@ -36,9 +36,6 @@ #include "libIBus.h" #include "libIBusDaemon.h" #include -#ifdef USE_IARM_POWER_MANAGER -#include "deepSleepMgr.h" -#endif #ifdef TELEMETRY_SUPPORT #include #endif @@ -205,9 +202,6 @@ const char *ctrlm_ir_state_str(ctrlm_ir_state_t state); const char *ctrlm_power_state_str(ctrlm_power_state_t state); const char *ctrlm_device_type_str(ctrlm_device_type_t device_type); -#ifdef USE_IARM_POWER_MANAGER -const char *ctrlm_wakeup_reason_str(DeepSleep_WakeupReason_t wakeup_reason); -#endif const char *ctrlm_rcu_wakeup_config_str(ctrlm_rcu_wakeup_config_t config); #ifdef TELEMETRY_SUPPORT diff --git a/src/factory/CMakeLists.txt b/src/factory/CMakeLists.txt index 530cbf5b..610e05c8 100644 --- a/src/factory/CMakeLists.txt +++ b/src/factory/CMakeLists.txt @@ -40,7 +40,6 @@ target_sources(ctrlm-fta PRIVATE ctrlmf_utils.c ctrlmf_audio_capture.cpp ctrlmf_audio_control.cpp - ctrlmf_audio_playback.cpp ctrlmf_mic_test.cpp ctrlmf_ws.c iarm/ctrlmf_iarm_client.cpp @@ -58,6 +57,7 @@ endif() if(THUNDER) add_compile_definitions(PRIVATE CTRLMF_THUNDER) target_sources(ctrlm-fta PRIVATE + ctrlmf_audio_playback.cpp thunder/ctrlmf_thunder_controller.cpp thunder/ctrlmf_thunder_plugin.cpp thunder/ctrlmf_thunder_plugin_system_audio_player.cpp diff --git a/src/factory/ctrlmf_main.c b/src/factory/ctrlmf_main.c index e70337d9..11e07039 100644 --- a/src/factory/ctrlmf_main.c +++ b/src/factory/ctrlmf_main.c @@ -116,7 +116,9 @@ int main(int argc, char* argv[]) { XLOGD_INFO("ctrlmf_main: test result <%s>", test_result.pass ? "PASS" : "FAIL"); } } else if(g_ctrlmf_opts.audio_file_path != NULL) { + #ifdef CTRLMF_THUNDER ctrlmf_audio_playback_start(g_ctrlmf_opts.audio_file_path); + #endif } if(g_ctrlmf_opts.mute_main_audio) { ctrlmf_audio_control_mute(false); diff --git a/src/factory/ctrlmf_version.c b/src/factory/ctrlmf_version.c index 7d52efc0..bf148401 100644 --- a/src/factory/ctrlmf_version.c +++ b/src/factory/ctrlmf_version.c @@ -7,7 +7,9 @@ #include #include #include +#ifdef CTRLMF_THUNDER #include +#endif #include #include @@ -56,12 +58,24 @@ bool ctrlmf_init(xlog_level_t level, bool requires_audio_playback, bool requires return(false); } - if(requires_audio_playback && !ctrlmf_audio_playback_init()) { - XLOGD_ERROR("failed to init audio playback"); - if(requires_audio_control) { - ctrlmf_audio_control_term(); + if(requires_audio_playback) { + #ifdef CTRLMF_THUNDER + bool audio_playback_available = true; + if(!ctrlmf_audio_playback_init()) { + XLOGD_ERROR("failed to init audio playback"); + audio_playback_available = false; + } + #else + bool audio_playback_available = false; + XLOGD_ERROR("audio playback is disabled"); + #endif + + if(!audio_playback_available) { + if(requires_audio_control) { + ctrlmf_audio_control_term(); + } + return(false); } - return(false); } g_ctrlmf.handle_audio_analysis = ctrlmf_load_plugin_audio_analysis(audio_analyze_func); @@ -74,7 +88,9 @@ bool ctrlmf_init(xlog_level_t level, bool requires_audio_playback, bool requires void ctrlmf_term(void) { if(g_ctrlmf.audio_playback_init) { + #ifdef CTRLMF_THUNDER ctrlmf_audio_playback_term(); + #endif } if(g_ctrlmf.audio_control_init) { diff --git a/src/ipc/ctrlm_ipc_iarm_powermanager.cpp b/src/ipc/ctrlm_ipc_iarm_powermanager.cpp deleted file mode 100755 index 24897391..00000000 --- a/src/ipc/ctrlm_ipc_iarm_powermanager.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * If not stated otherwise in this file or this component's license file the - * following copyright and licenses apply: - * - * Copyright 2015 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -#include "ctrlm.h" -#include "ctrlm_ipc.h" -#include "ctrlm_ipc_iarm_powermanager.h" -#include "ctrlm_log.h" -#include "ctrlm_utils.h" -#include "pwrMgr.h" -#include "ctrlm_tr181.h" - -static ctrlm_power_state_t ctrlm_iarm_power_state_map(IARM_Bus_PowerState_t iarm_power_state); - -ctrlm_ipc_iarm_powermanager_t::ctrlm_ipc_iarm_powermanager_t() { - XLOGD_INFO("IARM PowerManager Implementation"); -} - -ctrlm_ipc_iarm_powermanager_t::~ctrlm_ipc_iarm_powermanager_t() { -} - -ctrlm_power_state_t ctrlm_ipc_iarm_powermanager_t::get_power_state() { - IARM_Bus_PWRMgr_GetPowerState_Param_t param; - ctrlm_power_state_t power_state = CTRLM_POWER_STATE_ON; - - if(IARM_RESULT_SUCCESS != IARM_Bus_Call(IARM_BUS_PWRMGR_NAME, IARM_BUS_PWRMGR_API_GetPowerState, (void *)¶m, sizeof(param))) { - XLOGD_WARN("IARM bus failed to read power state, defaulting to <%s>", ctrlm_power_state_str(power_state)); - } else { - power_state = ctrlm_iarm_power_state_map(param.curState); - //If ctrlm restarts with system STANDBY state, set to ON, will receive a DEEP_SLEEP or ON message shortly - if(ctrlm_is_networked_standby_supported() && (power_state == CTRLM_POWER_STATE_STANDBY)) { - power_state = CTRLM_POWER_STATE_ON; - } - XLOGD_DEBUG("power state <%s>", ctrlm_power_state_str(power_state)); - } - - return power_state; -} - -bool ctrlm_ipc_iarm_powermanager_t::get_networked_standby_mode() { - IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t param = {0}; - IARM_Result_t res = IARM_Bus_Call(IARM_BUS_PWRMGR_NAME, IARM_BUS_PWRMGR_API_GetNetworkStandbyMode, (void *)¶m, sizeof(param)); - - if (res != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("IARM query for network standby mode failed, default to NO"); - return false; - } - - return param.bStandbyMode ? true : false; - -} - -bool ctrlm_ipc_iarm_powermanager_t::get_wakeup_reason_voice() { - DeepSleep_WakeupReason_t wakeup_reason; - IARM_Result_t res; - bool wakeup_reason_voice = false; - bool pwrmgr2 = false; - - if(CTRLM_TR181_RESULT_SUCCESS != ctrlm_tr181_bool_get(CTRLM_RT181_POWER_RFC_PWRMGR2, &pwrmgr2)) { - XLOGD_INFO("failed to determine Power Manager revision, defaulting to 1"); - } - - res = IARM_Bus_Call(pwrmgr2 ? IARM_BUS_PWRMGR_NAME : IARM_BUS_DEEPSLEEPMGR_NAME, IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupReason, (void*)&wakeup_reason, sizeof(wakeup_reason)); - if(res != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("IARM query for wakeup reason failed, returning false!"); - return false; - } - - XLOGD_AUTOMATION_INFO("wakeup_reason <%s>", ctrlm_wakeup_reason_str(wakeup_reason)); - - wakeup_reason_voice = (wakeup_reason == DEEPSLEEP_WAKEUPREASON_VOICE) ? true: false; - - return wakeup_reason_voice; -} - -#if CTRLM_HAL_RF4CE_API_VERSION >= 10 && !defined(CTRLM_DPI_CONTROL_NOT_SUPPORTED) -IARM_Result_t ctrlm_iarm_powermanager_event_handler_power_pre_change(void* pArgs) -{ - const IARM_Bus_CommonAPI_PowerPreChange_Param_t* pParams = (const IARM_Bus_CommonAPI_PowerPreChange_Param_t*) pArgs; - - if(pArgs == NULL) { - XLOGD_ERROR("Invalid argument"); - return IARM_RESULT_INVALID_PARAM; - } - - ctrlm_main_queue_power_state_change_t *msg = (ctrlm_main_queue_power_state_change_t *)g_malloc(sizeof(ctrlm_main_queue_power_state_change_t)); - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return IARM_RESULT_OOM; - } - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_POWER_STATE_CHANGE; - msg->new_state = ctrlm_iarm_power_state_map(pParams->newState); - XLOGD_DEBUG("Power State mapped to <%s>", ctrlm_power_state_str(msg->new_state)); - ctrlm_main_queue_msg_push(msg); - - return IARM_RESULT_SUCCESS; -} -#endif - -ctrlm_power_state_t ctrlm_iarm_power_state_map(IARM_Bus_PowerState_t iarm_power_state) { - - switch(iarm_power_state) { - case IARM_BUS_PWRMGR_POWERSTATE_ON: return CTRLM_POWER_STATE_ON; - case IARM_BUS_PWRMGR_POWERSTATE_STANDBY: - case IARM_BUS_PWRMGR_POWERSTATE_STANDBY_LIGHT_SLEEP: return CTRLM_POWER_STATE_STANDBY; - case IARM_BUS_PWRMGR_POWERSTATE_STANDBY_DEEP_SLEEP: - case IARM_BUS_PWRMGR_POWERSTATE_OFF: return CTRLM_POWER_STATE_DEEP_SLEEP; - default: return CTRLM_POWER_STATE_ON; - } -} diff --git a/src/ipc/ctrlm_ipc_iarm_powermanager.h b/src/ipc/ctrlm_ipc_iarm_powermanager.h deleted file mode 100755 index 4944340a..00000000 --- a/src/ipc/ctrlm_ipc_iarm_powermanager.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * If not stated otherwise in this file or this component's license file the - * following copyright and licenses apply: - * - * Copyright 2015 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -#include "ctrlm_ipc.h" -#include "ctrlm_powermanager.h" -#include - -class ctrlm_ipc_iarm_powermanager_t : public ctrlm_powermanager_t { -public: - ctrlm_ipc_iarm_powermanager_t(); - ~ctrlm_ipc_iarm_powermanager_t(); - - ctrlm_power_state_t get_power_state(); - bool get_networked_standby_mode(); - bool get_wakeup_reason_voice(); - - -private: - sem_t semaphore; -}; - -#if CTRLM_HAL_RF4CE_API_VERSION >= 10 && !defined(CTRLM_DPI_CONTROL_NOT_SUPPORTED) -IARM_Result_t ctrlm_iarm_powermanager_event_handler_power_pre_change(void* pArgs); -#endif -IARM_Result_t ctrlm_iarm_powermanager_call_power_state_change(void *arg); diff --git a/src/voice/ctrlm_voice_obj.cpp b/src/voice/ctrlm_voice_obj.cpp index e6e8636d..43f28c05 100644 --- a/src/voice/ctrlm_voice_obj.cpp +++ b/src/voice/ctrlm_voice_obj.cpp @@ -67,7 +67,9 @@ static void ctrlm_voice_data_post_processing_cb(int bytes_sent, void *user_data) static ctrlm_voice_session_group_t voice_device_to_session_group(ctrlm_voice_device_t device_type); +#ifdef CTRLM_THUNDER static void ctrlm_voice_system_audio_player_event_handler(system_audio_player_event_t event, void *user_data); +#endif static xrsr_power_mode_t voice_xrsr_power_map(ctrlm_power_state_t ctrlm_power_state); @@ -268,12 +270,20 @@ ctrlm_voice_t::ctrlm_voice_t() { sem_init(&this->vsr_semaphore, 0, 0); if(this->beep_on_kwd_supported) { + #ifdef CTRLM_THUNDER this->obj_sap = Thunder::SystemAudioPlayer::ctrlm_thunder_plugin_system_audio_player_t::getInstance(); this->obj_sap->add_event_handler(ctrlm_voice_system_audio_player_event_handler, this); this->sap_opened = this->obj_sap->open(SYSTEM_AUDIO_PLAYER_AUDIO_TYPE_WAV, SYSTEM_AUDIO_PLAYER_SOURCE_TYPE_FILE, SYSTEM_AUDIO_PLAYER_PLAY_MODE_SYSTEM); if(!this->sap_opened) { XLOGD_WARN("unable to open system audio player"); } + #else + this->obj_sap = NULL; + this->sap_opened = false; + this->beep_on_kwd_supported = false; + this->beep_on_kwd_file = NULL; + XLOGD_WARN("beep on keyword is not supported without Thunder"); + #endif } // Set audio mode to default @@ -313,12 +323,14 @@ ctrlm_voice_t::~ctrlm_voice_t() { } } + #ifdef CTRLM_THUNDER if(this->beep_on_kwd_supported && this->sap_opened) { if(!this->obj_sap->close()) { XLOGD_WARN("unable to close system audio player"); } this->sap_opened = false; } + #endif /* Close Voice SDK */ @@ -3031,6 +3043,7 @@ void ctrlm_voice_t::voice_action_keyword_verification_callback(const uuid_t uuid } void ctrlm_voice_t::voice_keyword_verified_action(void) { + #ifdef CTRLM_THUNDER if(this->beep_on_kwd_supported && (this->beep_on_kwd_file != NULL) && this->audio_ducking_beep_enabled) { // play beep audio before ducking audio if(this->audio_ducking_beep_in_progress) { XLOGD_WARN("audio ducking beep already in progress!"); @@ -3072,6 +3085,7 @@ void ctrlm_voice_t::voice_keyword_verified_action(void) { } while(retry >= 0); } this->audio_state_set(true); + #endif } void ctrlm_voice_t::voice_keyword_beep_completed_normal(void *data, int size) { @@ -3865,6 +3879,7 @@ void ctrlm_voice_t::voice_device_disable(ctrlm_voice_device_t device, bool db_wr sem_post(&this->device_status_semaphore); } +#ifdef CTRLM_THUNDER void ctrlm_voice_system_audio_player_event_handler(system_audio_player_event_t event, void *user_data) { if(user_data == NULL) { return; @@ -3904,6 +3919,7 @@ void ctrlm_voice_system_audio_player_event_handler(system_audio_player_event_t e } } } +#endif void ctrlm_voice_t::voice_nsm_session_request(void) { ctrlm_network_id_t network_id = CTRLM_MAIN_NETWORK_ID_DSP; From c650ac273504981086eb5b33fabbc3fb0d3e6f3d Mon Sep 17 00:00:00 2001 From: Kelvin Lu <119349872+klu339@users.noreply.github.com> Date: Mon, 13 Jul 2026 15:21:08 -0400 Subject: [PATCH 07/16] RDKEMW-20544: Add timestamp to T2 accum markers (#261) --- src/ble/ctrlm_ble_controller.cpp | 37 ++++++----- src/ble/ctrlm_ble_controller.h | 2 + src/ble/ctrlm_ble_network.cpp | 67 ++++++++++---------- src/ble/ctrlm_ble_network.h | 1 + src/ctrlm_utils.cpp | 8 +++ src/ctrlm_utils.h | 3 + src/irdb/ctrlm_irdb_interface.cpp | 7 +- src/irdb/ipc/ctrlm_irdb_ipc_iarm_thunder.cpp | 54 +++++++--------- src/telemetry/ctrlm_telemetry_markers.h | 17 +++-- 9 files changed, 109 insertions(+), 87 deletions(-) diff --git a/src/ble/ctrlm_ble_controller.cpp b/src/ble/ctrlm_ble_controller.cpp index 388fabb8..f91b99c7 100644 --- a/src/ble/ctrlm_ble_controller.cpp +++ b/src/ble/ctrlm_ble_controller.cpp @@ -34,6 +34,7 @@ #include "ctrlm_telemetry_event.h" #include +#include #include #include #include @@ -528,6 +529,24 @@ ctrlm_timestamp_t ctrlm_obj_controller_ble_t::getVoiceStartTimeLocal() const { return(voice_start_time_local_); } +void ctrlm_obj_controller_ble_t::emit_irdb_vendor_set( + int set_result, uint8_t rcu_bitmask, + const std::string &vendor_name, uint8_t vendor_bitmask, int supported) +{ +#ifdef TELEMETRY_SUPPORT + std::ostringstream ss; + ss << "[" << MARKER_IRDB_VENDOR_SET_VERSION + << "," << set_result + << ",0x" << std::hex << std::setfill('0') << std::setw(2) << (int)rcu_bitmask + << ",\"" << vendor_name << "\"" + << ",0x" << std::setw(2) << (int)vendor_bitmask << std::dec + << "," << supported + << "," << ctrlm_timestamp_get_ms() << "]"; + ctrlm_telemetry_event_t ev(MARKER_IRDB_VENDOR_SET, ss.str()); + ev.event(); +#endif +} + void ctrlm_obj_controller_ble_t::setSupportedIrdbs(uint8_t vendor_support_bitmask) { this->irdbs_supported_ = vendor_support_bitmask; @@ -535,12 +554,7 @@ void ctrlm_obj_controller_ble_t::setSupportedIrdbs(uint8_t vendor_support_bitmas if (irdb == NULL) { XLOGD_ERROR("IRDB interface is NULL!!!"); -#ifdef TELEMETRY_SUPPORT - char t2_buf[256]; - snprintf(t2_buf, sizeof(t2_buf), "[0,0x%02X,\"unknown\",0x00,0]", vendor_support_bitmask); - ctrlm_telemetry_event_t ev(MARKER_IRDB_VENDOR_SET, t2_buf); - ev.event(); -#endif + emit_irdb_vendor_set(0, vendor_support_bitmask, "unknown", 0x00, 0); return; } @@ -569,15 +583,8 @@ void ctrlm_obj_controller_ble_t::setSupportedIrdbs(uint8_t vendor_support_bitmas XLOGD_WARN("Controller <%s> IRDBs supported bitmask = <0x%X>, couldn't retrieve IRDB plugin vendor info.", ieee_address_get().to_string().c_str(), vendor_support_bitmask); } -#ifdef TELEMETRY_SUPPORT - char t2_buf[256]; - snprintf(t2_buf, sizeof(t2_buf), "[%d,0x%02X,\"%s\",0x%02X,%d]", - (int)set_result,vendor_support_bitmask, - vendor_info.name.c_str(), vendor_info.rcu_support_bitmask, - (int)supported); - ctrlm_telemetry_event_t ev(MARKER_IRDB_VENDOR_SET, t2_buf); - ev.event(); -#endif + emit_irdb_vendor_set((int)set_result, vendor_support_bitmask, + vendor_info.name, vendor_info.rcu_support_bitmask, (int)supported); } uint8_t ctrlm_obj_controller_ble_t::getSupportedIrdbs() const { diff --git a/src/ble/ctrlm_ble_controller.h b/src/ble/ctrlm_ble_controller.h index 432f5c76..5e1bc5ce 100644 --- a/src/ble/ctrlm_ble_controller.h +++ b/src/ble/ctrlm_ble_controller.h @@ -150,6 +150,8 @@ class ctrlm_obj_controller_ble_t : public ctrlm_obj_controller_t { void update_controller_id_and_db_entry(std::string name, ctrlm_network_id_t network_id, ctrlm_controller_id_t new_id); private: + void emit_irdb_vendor_set(int set_result, uint8_t rcu_bitmask, const std::string &vendor_name, uint8_t vendor_bitmask, int supported); + ctrlm_obj_network_ble_t *obj_network_ble_ = NULL; bool connected_ = false; diff --git a/src/ble/ctrlm_ble_network.cpp b/src/ble/ctrlm_ble_network.cpp index f5c316b4..64ec4984 100644 --- a/src/ble/ctrlm_ble_network.cpp +++ b/src/ble/ctrlm_ble_network.cpp @@ -49,6 +49,7 @@ #include "ctrlm_rcp_ipc_iarm_thunder.h" #include "ctrlm_telemetry.h" #include +#include #include "ctrlm_telemetry_event.h" using namespace std; @@ -773,6 +774,23 @@ void ctrlm_obj_network_ble_t::req_process_pair_with_code(void *data, int size) { } } +void ctrlm_obj_network_ble_t::emit_irdb_program_result(int ir_state, const std::string &fail_reason, + uint8_t rcu_bitmask, + const std::string &vendor_name, uint8_t vendor_bitmask) +{ +#ifdef TELEMETRY_SUPPORT + std::ostringstream ss; + ss << "[" << MARKER_IRDB_PROGRAM_RESULT_VERSION + << "," << ir_state + << ",\"" << fail_reason << "\"" + << ",0x" << std::hex << std::setfill('0') << std::setw(2) << (int)rcu_bitmask + << ",\"" << vendor_name << "\"" + << ",0x" << std::setw(2) << (int)vendor_bitmask << std::dec + << "," << ctrlm_timestamp_get_ms() << "]"; + ctrlm_telemetry_event_t ev(MARKER_IRDB_PROGRAM_RESULT, ss.str()); + ev.event(); +#endif +} void ctrlm_obj_network_ble_t::req_process_program_ir_codes(void *data, int size) { XLOGD_DEBUG("Enter..."); @@ -793,16 +811,9 @@ void ctrlm_obj_network_ble_t::req_process_program_ir_codes(void *data, int size) XLOGD_ERROR("Controller doesn't exist!"); } else if (!controllers_[controller_id]->isSupportedIrdb(dqm->vendor_info)) { XLOGD_ERROR("Unsupported IRDB - not continuing with ir code download!"); -#ifdef TELEMETRY_SUPPORT - char t2_buf[256]; - snprintf(t2_buf, sizeof(t2_buf), "[%d,\"unsupported\",0x%02X,\"%s\",0x%02X]", - (int)CTRLM_IR_STATE_FAILED, - controllers_[controller_id]->getSupportedIrdbs(), - dqm->vendor_info.name.c_str(), - dqm->vendor_info.rcu_support_bitmask); - ctrlm_telemetry_event_t ev(MARKER_IRDB_PROGRAM_RESULT, t2_buf); - ev.event(); -#endif + emit_irdb_program_result((int)CTRLM_IR_STATE_FAILED, "unsupported", + controllers_[controller_id]->getSupportedIrdbs(), + dqm->vendor_info.name, dqm->vendor_info.rcu_support_bitmask); } else { if(dqm->ir_codes) { @@ -1754,6 +1765,7 @@ void ctrlm_obj_network_ble_t::ind_process_rcu_pairing_outcome(void *data, int si ss << ","; } } + ss << "," << ctrlm_timestamp_get_ms(); ss << "]"; ctrlm_telemetry_event_t ev(MARKER_RCU_PAIRING_ATTEMPT, ss.str()); @@ -1806,37 +1818,24 @@ void ctrlm_obj_network_ble_t::ind_process_rcu_status(void *data, int size) { ir_state_ = dqm->ir_state; // send event immediately. schedule_status_event(true); -#ifdef TELEMETRY_SUPPORT - { + if (dqm->ir_state == CTRLM_IR_STATE_COMPLETE || dqm->ir_state == CTRLM_IR_STATE_FAILED) { ctrlm_irdb_vendor_info_t vendor_info{}; vendor_info.name = "unknown"; vendor_info.rcu_support_bitmask = 0xFF; - ctrlm_irdb_interface_t *irdb = ctrlm_main_irdb_get(); if (irdb) { irdb->get_vendor_info(vendor_info); } - char t2_buf[256]; - if (dqm->ir_state == CTRLM_IR_STATE_COMPLETE || dqm->ir_state == CTRLM_IR_STATE_FAILED) { - ctrlm_controller_id_t controller_id; - uint8_t rcu_bitmask = 0xFF; - if (false == getControllerId(dqm->rcu_data.ieee_address, &controller_id)) { - XLOGD_ERROR("Controller <%s> NOT found in the network!!", - ctrlm_convert_mac_long_to_string(dqm->rcu_data.ieee_address).c_str()); - } else { - auto controller = controllers_[controller_id]; - rcu_bitmask = controller->getSupportedIrdbs(); - } - - snprintf(t2_buf, sizeof(t2_buf), "[%d,\"%s\",0x%02X,\"%s\",0x%02X]", - (int)dqm->ir_state, - dqm->ir_fail_reason, - rcu_bitmask, - vendor_info.name.c_str(), - vendor_info.rcu_support_bitmask); - ctrlm_telemetry_event_t ev(MARKER_IRDB_PROGRAM_RESULT, t2_buf); - ev.event(); + + ctrlm_controller_id_t controller_id; + uint8_t rcu_bitmask = 0xFF; + if (false == getControllerId(dqm->rcu_data.ieee_address, &controller_id)) { + XLOGD_ERROR("Controller <%s> NOT found in the network!!", + ctrlm_convert_mac_long_to_string(dqm->rcu_data.ieee_address).c_str()); + } else { + rcu_bitmask = controllers_[controller_id]->getSupportedIrdbs(); } + emit_irdb_program_result((int)dqm->ir_state, dqm->ir_fail_reason, + rcu_bitmask, vendor_info.name, vendor_info.rcu_support_bitmask); } -#endif break; default: { diff --git a/src/ble/ctrlm_ble_network.h b/src/ble/ctrlm_ble_network.h index 73f2c8b9..62201e5f 100644 --- a/src/ble/ctrlm_ble_network.h +++ b/src/ble/ctrlm_ble_network.h @@ -216,6 +216,7 @@ class ctrlm_obj_network_ble_t : public ctrlm_obj_network_t { ctrlm_controller_id_t get_last_used_controller(void); bool end_voice_session_for_controller(uint64_t ieee_address, ctrlm_voice_session_end_reason_t reason, int32_t audioDuration = -1, int32_t startLag = -1, rdkx_timestamp_t *keyDownTime = NULL, rdkx_timestamp_t *keyUpTime = NULL); ctrlm_controller_id_t find_controller_from_upgrade_session_uuid(const std::string &uuid); + void emit_irdb_program_result(int ir_state, const std::string &fail_reason, uint8_t rcu_bitmask, const std::string &vendor_name, uint8_t vendor_bitmask); json_t * json_config_ = NULL; bool voice_disabled_ = false; diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index d2a87311..83dfba02 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -134,6 +134,14 @@ void ctrlm_timestamp_get_monotonic(ctrlm_timestamp_t *timestamp) { } } +uint64_t ctrlm_timestamp_get_ms(void) { + struct timespec ts; + if(clock_gettime(CLOCK_REALTIME, &ts) != 0) { + return 0; + } + return ((uint64_t)ts.tv_sec * 1000ULL) + ((uint64_t)ts.tv_nsec / 1000000ULL); +} + // 1 : one is greater than two // 0 : one and two are equal // -1 : one is less than two diff --git a/src/ctrlm_utils.h b/src/ctrlm_utils.h index 098131be..9623c31d 100644 --- a/src/ctrlm_utils.h +++ b/src/ctrlm_utils.h @@ -259,6 +259,9 @@ void ctrlm_utils_message_queue_close(int *msgq); bool ctrlm_utils_queue_msg_push(int msgq, const char *msg, size_t msg_len); std::string ctrlm_utils_time_as_string(time_t time); +// Returns the current wall-clock time in epoch milliseconds. +uint64_t ctrlm_timestamp_get_ms(void); + ctrlm_fmr_alarm_level_t ctrlm_utils_str_to_fmr_level(const std::string &level); ctrlm_rcu_wakeup_config_t ctrlm_utils_str_to_wakeup_config(const std::string &wakeup_config); int ctrlm_utils_custom_key_str_to_array(const std::string &custom_keys, int *custom_list); diff --git a/src/irdb/ctrlm_irdb_interface.cpp b/src/irdb/ctrlm_irdb_interface.cpp index e9b5395e..ad847489 100644 --- a/src/irdb/ctrlm_irdb_interface.cpp +++ b/src/irdb/ctrlm_irdb_interface.cpp @@ -20,6 +20,7 @@ #include "ctrlm_irdb_interface.h" #include "ctrlm_network.h" #include "ctrlm_log.h" +#include "ctrlm_utils.h" #include "ctrlm_irdb_stub.h" #include "ctrlm_telemetry_event.h" @@ -617,12 +618,14 @@ bool ctrlm_irdb_interface_t::get_ir_codes_by_autolookup(ctrlm_autolookup_ranked_ } std::string results = ss.str(); ss.str(""); - ss << "[\"" << t2_vendor_info.name << "\"" + ss << "[" << MARKER_IRDB_AUTOLOOKUP_RESULT_VERSION + << ",\"" << t2_vendor_info.name << "\"" << ",0x" << std::hex << std::setfill('0') << std::setw(2) << (int)t2_vendor_info.rcu_support_bitmask << "," << std::dec << (int)m_platform_tv << "," << tv_count << "," << avr_count - << "," << (results.empty() ? "\"\"" : results) << "]"; + << "," << (results.empty() ? "\"\"" : results) + << "," << ctrlm_timestamp_get_ms() << "]"; ctrlm_telemetry_event_t ev(MARKER_IRDB_AUTOLOOKUP_RESULT, ss.str()); ev.event(); #endif diff --git a/src/irdb/ipc/ctrlm_irdb_ipc_iarm_thunder.cpp b/src/irdb/ipc/ctrlm_irdb_ipc_iarm_thunder.cpp index e58f7a64..0afede14 100644 --- a/src/irdb/ipc/ctrlm_irdb_ipc_iarm_thunder.cpp +++ b/src/irdb/ipc/ctrlm_irdb_ipc_iarm_thunder.cpp @@ -18,6 +18,8 @@ */ #include +#include +#include #include "ctrlm_irdb_ipc_iarm_thunder.h" #include "ctrlm.h" #include "ctrlm_log.h" @@ -38,6 +40,25 @@ namespace { constexpr char const* SUCCESS = "success"; constexpr char const* TV = "TV"; constexpr char const* AMP = "AMP"; + + void emit_irdb_manual_result(ctrlm_irdb_interface_t *irdb, const char *method, bool success) + { +#ifdef TELEMETRY_SUPPORT + ctrlm_irdb_vendor_info_t vendor_info{}; + if (irdb) { + irdb->get_vendor_info(vendor_info); + } + std::ostringstream ss; + ss << "[" << MARKER_IRDB_MANUAL_RESULT_VERSION + << ",\"" << vendor_info.name << "\"" + << ",0x" << std::hex << std::setfill('0') << std::setw(2) << (int)vendor_info.rcu_support_bitmask << std::dec + << ",\"" << method << "\"" + << "," << (int)success + << "," << ctrlm_timestamp_get_ms() << "]"; + ctrlm_telemetry_event_t ev(MARKER_IRDB_MANUAL_RESULT, ss.str()); + ev.event(); +#endif + } } ctrlm_irdb_ipc_iarm_thunder_t::ctrlm_irdb_ipc_iarm_thunder_t() : ctrlm_ipc_iarm_t() { @@ -153,16 +174,7 @@ IARM_Result_t ctrlm_irdb_ipc_iarm_thunder_t::get_manufacturers(void *arg) { } } -#ifdef TELEMETRY_SUPPORT - ctrlm_irdb_vendor_info_t vendor_info{}; - if (irdb) { - irdb->get_vendor_info(vendor_info); - } - char t2_buf[128]; - snprintf(t2_buf, sizeof(t2_buf), "[\"%s\",0x%02X,\"%s\",%d]", vendor_info.name.c_str(), vendor_info.rcu_support_bitmask, CTRLM_MAIN_IARM_CALL_IR_MANUFACTURERS, (int)success); - ctrlm_telemetry_event_t ev(MARKER_IRDB_MANUAL_RESULT, t2_buf); - ev.event(); -#endif + emit_irdb_manual_result(irdb, CTRLM_MAIN_IARM_CALL_IR_MANUFACTURERS, success); // Assemble the return json_object_set_new(ret, SUCCESS, json_boolean(success)); @@ -238,16 +250,7 @@ IARM_Result_t ctrlm_irdb_ipc_iarm_thunder_t::get_models(void *arg) { } } -#ifdef TELEMETRY_SUPPORT - ctrlm_irdb_vendor_info_t vendor_info{}; - if(irdb) { - irdb->get_vendor_info(vendor_info); - } - char t2_buf[128]; - snprintf(t2_buf, sizeof(t2_buf), "[\"%s\",0x%02X,\"%s\",%d]", vendor_info.name.c_str(), vendor_info.rcu_support_bitmask, CTRLM_MAIN_IARM_CALL_IR_MODELS, (int)success); - ctrlm_telemetry_event_t ev(MARKER_IRDB_MANUAL_RESULT, t2_buf); - ev.event(); -#endif + emit_irdb_manual_result(irdb, CTRLM_MAIN_IARM_CALL_IR_MODELS, success); // Assemble the return json_object_set_new(ret, SUCCESS, json_boolean(success)); @@ -389,16 +392,7 @@ IARM_Result_t ctrlm_irdb_ipc_iarm_thunder_t::get_irdb_entry_ids(void *arg) { } } -#ifdef TELEMETRY_SUPPORT - ctrlm_irdb_vendor_info_t vendor_info{}; - if (irdb) { - irdb->get_vendor_info(vendor_info); - } - char t2_buf[128]; - snprintf(t2_buf, sizeof(t2_buf), "[\"%s\",0x%02X,\"%s\",%d]", vendor_info.name.c_str(), vendor_info.rcu_support_bitmask, CTRLM_MAIN_IARM_CALL_IR_CODES, (int)success); - ctrlm_telemetry_event_t ev(MARKER_IRDB_MANUAL_RESULT, t2_buf); - ev.event(); -#endif + emit_irdb_manual_result(irdb, CTRLM_MAIN_IARM_CALL_IR_CODES, success); // Assemble the return json_object_set_new(ret, SUCCESS, json_boolean(success)); diff --git a/src/telemetry/ctrlm_telemetry_markers.h b/src/telemetry/ctrlm_telemetry_markers.h index f1314e0f..55baa379 100644 --- a/src/telemetry/ctrlm_telemetry_markers.h +++ b/src/telemetry/ctrlm_telemetry_markers.h @@ -131,7 +131,7 @@ // BLE RCU Pairing Attempt Marker // Value format: Array of comma separated integers or string with the fields below. -// [,,,,,,,,,] +// [,,,,,,,,,,] // - version of the marker format. // - type of network the marker is coming from // - enum representing pairing method (see PairingMethod) @@ -142,8 +142,9 @@ // - error message 1 from bluez layer or null if no error // - error message 2 from bluez layer or null if no error // - error message 3 from bluez layer or null if no error +// - wall-clock time the marker was generated, in epoch milliseconds (makes each marker value unique) #define MARKER_RCU_PAIRING_ATTEMPT "ctrlm.rcu.pairing.attempt_accum" -#define MARKER_RCU_PAIRING_ATTEMPT_VERSION 1 +#define MARKER_RCU_PAIRING_ATTEMPT_VERSION 2 // // End RCU Markers @@ -152,10 +153,14 @@ // // All _accum markers are aggregated by the T2 platform within each reporting window. -#define MARKER_IRDB_AUTOLOOKUP_RESULT "ctrlm.irdb.autolookup.result_accum" // format: ,,,,, -#define MARKER_IRDB_MANUAL_RESULT "ctrlm.irdb.manual.result_accum" // format: ,,, -#define MARKER_IRDB_PROGRAM_RESULT "ctrlm.irdb.program.result_accum" // format: ,,,, -#define MARKER_IRDB_VENDOR_SET "ctrlm.irdb.vendor_set_accum" // format: ,,,, +#define MARKER_IRDB_AUTOLOOKUP_RESULT "ctrlm.irdb.autolookup.result_accum" // format: ,,,,,,, +#define MARKER_IRDB_AUTOLOOKUP_RESULT_VERSION 1 +#define MARKER_IRDB_MANUAL_RESULT "ctrlm.irdb.manual.result_accum" // format: ,,,,, +#define MARKER_IRDB_MANUAL_RESULT_VERSION 1 +#define MARKER_IRDB_PROGRAM_RESULT "ctrlm.irdb.program.result_accum" // format: ,,,,,, +#define MARKER_IRDB_PROGRAM_RESULT_VERSION 1 +#define MARKER_IRDB_VENDOR_SET "ctrlm.irdb.vendor_set_accum" // format: ,,,,,, +#define MARKER_IRDB_VENDOR_SET_VERSION 1 // // End IRDB Markers From 4fa7429a071fa6ab0490a238007e808759259cbe Mon Sep 17 00:00:00 2001 From: dwolaver <44593664+dwolaver@users.noreply.github.com> Date: Tue, 14 Jul 2026 20:49:34 -0400 Subject: [PATCH 08/16] RDKEMW-19785 : control manager - remove deprecated RFCs (#243) --- src/ctrlm_main.cpp | 6 - src/ctrlm_tr181.h | 36 +--- 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 | 114 +---------- src/voice/ctrlm_voice_obj.h | 1 - 8 files changed, 3 insertions(+), 396 deletions(-) diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 2d5348bf..0603fd64 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -964,12 +964,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/rf4ce/ctrlm_rf4ce_network.cpp b/src/rf4ce/ctrlm_rf4ce_network.cpp index 91df3fb5..db7a2302 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_); @@ -2934,110 +2931,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!"); @@ -3412,42 +3305,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) { @@ -3525,8 +3382,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_); @@ -3534,23 +3389,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) { @@ -3990,9 +3828,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); } @@ -4127,32 +3963,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 44dd2570..2c48c962 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.h +++ b/src/rf4ce/ctrlm_rf4ce_network.h @@ -636,10 +636,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 43f28c05..808c0f87 100644 --- a/src/voice/ctrlm_voice_obj.cpp +++ b/src/voice/ctrlm_voice_obj.cpp @@ -417,6 +417,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}; @@ -578,7 +579,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); @@ -949,118 +949,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 1fdb0b1964e2193d10835bff6821694dc5ca04ff Mon Sep 17 00:00:00 2001 From: dwolaver <44593664+dwolaver@users.noreply.github.com> Date: Thu, 16 Jul 2026 13:07:43 -0400 Subject: [PATCH 09/16] RDKEMW-4056 : RFC overrides for BLE network config (#52) --- src/ble/ctrlm_ble_network.cpp | 28 ++++++++++++- .../hal/blercu/blercupairingstatemachine.cpp | 28 ++++++------- .../hal/blercu/blercupairingstatemachine.h | 6 +-- src/ble/hal/configsettings/configsettings.cpp | 39 +++++++++++++++++++ src/ble/hal/configsettings/configsettings.h | 6 +-- 5 files changed, 86 insertions(+), 21 deletions(-) diff --git a/src/ble/ctrlm_ble_network.cpp b/src/ble/ctrlm_ble_network.cpp index 64ec4984..a0f37652 100644 --- a/src/ble/ctrlm_ble_network.cpp +++ b/src/ble/ctrlm_ble_network.cpp @@ -2797,7 +2797,33 @@ void ctrlm_obj_network_ble_t::power_state_change(gboolean waking_up) { } void ctrlm_obj_network_ble_t::rfc_retrieved_handler(const ctrlm_rfc_attr_t &attr) { - // TODO - No RFC parameters as of now + XLOGD_INFO("process BLE RFC values"); + + // Process options object + bool disable_voice = false; + if(attr.get_rfc_value(JSON_OBJ_NAME_NETWORK_BLE_OPTIONS JSON_PATH_SEPERATOR JSON_BOOL_NAME_NETWORK_BLE_OPTIONS_DISABLE_VOICE, disable_voice)) { + voice_disabled_ = disable_voice; + XLOGD_INFO("BLE voice support is %s by config", voice_disabled_ ? "disabled" : "enabled"); + } + + auto config = getConfigSettings(); + if (config == nullptr) { + XLOGD_ERROR("config not available"); + return; + } + + json_t *obj = nullptr; + if(!attr.get_rfc_json_value(&obj)) { + XLOGD_ERROR("failed to get RFC json object"); + return; + } + + // Update config settings from RFC json object + bool updated = config->updateFromJson(obj); + if(!updated) { + XLOGD_WARN("no BLE config updates found in RFC"); + } + json_decref(obj); } std::vector ctrlm_obj_network_ble_t::get_controller_obj_list() const { diff --git a/src/ble/hal/blercu/blercupairingstatemachine.cpp b/src/ble/hal/blercu/blercupairingstatemachine.cpp index 0779fb69..8fa38aa5 100644 --- a/src/ble/hal/blercu/blercupairingstatemachine.cpp +++ b/src/ble/hal/blercu/blercupairingstatemachine.cpp @@ -44,11 +44,8 @@ BleRcuPairingStateMachine::BleRcuPairingStateMachine(const shared_ptrdiscoveryTimeout()) - , m_discoveryTimeoutDefault(config->discoveryTimeout()) - , m_pairingTimeout(config->pairingTimeout()) - , m_setupTimeout(config->setupTimeout()) - , m_unpairingTimeout(config->upairingTimeout()) , m_pairingAttempts(0) , m_pairingSuccesses(0) , m_pairingSucceeded(false) @@ -287,6 +284,7 @@ void BleRcuPairingStateMachine::startAutoWithTimeout(int timeoutMs) m_pairingAttempts++; m_pairingSucceeded = false; XLOGD_INFO("Started auto pairing procedure"); + XLOGD_DEBUG("timeouts - discovery <%d ms> pairing <%d ms> setup <%d ms> unpairing <%d ms>", m_discoveryTimeout, m_config->pairingTimeout(), m_config->setupTimeout(), m_config->upairingTimeout()); } @@ -304,7 +302,7 @@ void BleRcuPairingStateMachine::startWithCode(uint8_t pairingCode) return; } - m_discoveryTimeout = m_discoveryTimeoutDefault; + m_discoveryTimeout = m_config->discoveryTimeout(); // use the default discovery timeout for this pairing method m_isAutoPairing = false; // clear the target device @@ -345,6 +343,7 @@ void BleRcuPairingStateMachine::startWithCode(uint8_t pairingCode) m_pairingAttempts++; m_pairingSucceeded = false; XLOGD_INFO("started pairing, searching for device with prefix code %03d or MAC hash 0x%02X", m_pairingCode, m_pairingMacHash); + XLOGD_DEBUG("timeouts - discovery <%d ms> pairing <%d ms> setup <%d ms> unpairing <%d ms>", m_discoveryTimeout, m_config->pairingTimeout(), m_config->setupTimeout(), m_config->upairingTimeout()); } // ----------------------------------------------------------------------------- @@ -360,6 +359,8 @@ void BleRcuPairingStateMachine::startWithMacList(const std::vector & return; } + m_discoveryTimeout = m_config->discoveryTimeout(); // use the default discovery timeout for this pairing method + // clear the target device m_targetAddress.clear(); @@ -389,7 +390,7 @@ void BleRcuPairingStateMachine::startWithMacList(const std::vector & for (const auto &address : macList) { XLOGD_INFO("<%s>", address.toString().c_str()); } - + XLOGD_DEBUG("timeouts - discovery <%d ms> pairing <%d ms> setup <%d ms> unpairing <%d ms>", m_discoveryTimeout, m_config->pairingTimeout(), m_config->setupTimeout(), m_config->upairingTimeout()); } @@ -511,9 +512,9 @@ void BleRcuPairingStateMachine::onStateTransition(int oldState, int newState) } } else if (newState == UnpairingState) { if (oldState == EnablePairableState || oldState == PairingState) { - XLOGD_AUTOMATION_WARN("timed-out in pairing phase (rcu device didn't pair within %dms)", m_pairingTimeout); + XLOGD_AUTOMATION_WARN("timed-out in pairing phase (rcu device didn't pair within %dms)", m_config->pairingTimeout()); } else if (oldState == SetupState) { - XLOGD_AUTOMATION_WARN("timed-out in setup phase (rcu didn't response to all requests within %dms)", m_setupTimeout); + XLOGD_AUTOMATION_WARN("timed-out in setup phase (rcu didn't response to all requests within %dms)", m_config->setupTimeout()); } } @@ -643,7 +644,7 @@ void BleRcuPairingStateMachine::onExitedDiscoverySuperState() void BleRcuPairingStateMachine::onEnteredStoppingDiscoveryState() { // start the pairing timeout timer - m_stateMachine.postDelayedEvent(PairingTimeoutEvent, m_pairingTimeout); + m_stateMachine.postDelayedEvent(PairingTimeoutEvent, m_config->pairingTimeout()); // if we've got to this state it means we have a target device if (m_targetAddress.isNull()) { @@ -708,7 +709,7 @@ void BleRcuPairingStateMachine::onEnteredEnablePairableState() // in pairable mode because we don't know if the previous timeout is long enough for our purposes. // The timeout is set to 5 seconds past the overall time we've given the state machine // to pair with the rcu. - m_adapter->enablePairable(m_pairingTimeout + 5000); + m_adapter->enablePairable(m_config->pairingTimeout() + 5000); if (m_adapter->isPairable()) { // is already pairable so just post the 'enabled' event @@ -748,8 +749,9 @@ void BleRcuPairingStateMachine::onEnteredPairingState() void BleRcuPairingStateMachine::onEnteredSetupState() { // start the setup timeout timer - m_stateMachine.postDelayedEvent(SetupTimeoutEvent, m_setupTimeout); - XLOGD_DEBUG("starting setup timeout timer for %dms", m_setupTimeout); + int timeout = m_config->setupTimeout(); + m_stateMachine.postDelayedEvent(SetupTimeoutEvent, timeout); + XLOGD_DEBUG("starting setup timeout timer for %dms", timeout); } // ----------------------------------------------------------------------------- @@ -781,7 +783,7 @@ void BleRcuPairingStateMachine::onExitedPairingSuperState() void BleRcuPairingStateMachine::onEnteredUnpairingState() { // start the unpairing timeout timer - m_stateMachine.postDelayedEvent(UnpairingTimeoutEvent, m_unpairingTimeout); + m_stateMachine.postDelayedEvent(UnpairingTimeoutEvent, m_config->upairingTimeout()); // if we've got to this state it means we have a target device if (m_targetAddress.isNull()) { diff --git a/src/ble/hal/blercu/blercupairingstatemachine.h b/src/ble/hal/blercu/blercupairingstatemachine.h index f3d18178..2988f198 100644 --- a/src/ble/hal/blercu/blercupairingstatemachine.h +++ b/src/ble/hal/blercu/blercupairingstatemachine.h @@ -192,11 +192,9 @@ class BleRcuPairingStateMachine StateMachine m_stateMachine; + const std::shared_ptr m_config; + int m_discoveryTimeout; - int m_discoveryTimeoutDefault; - int m_pairingTimeout; - int m_setupTimeout; - int m_unpairingTimeout; int m_pairingAttempts; int m_pairingSuccesses; diff --git a/src/ble/hal/configsettings/configsettings.cpp b/src/ble/hal/configsettings/configsettings.cpp index ce8cc3a7..29539642 100644 --- a/src/ble/hal/configsettings/configsettings.cpp +++ b/src/ble/hal/configsettings/configsettings.cpp @@ -200,6 +200,37 @@ std::shared_ptr ConfigSettings::parseJson(json_t *jsonConfig) return std::make_shared(timeouts, std::move(models)); } +// ----------------------------------------------------------------------------- +/*! + Parses a json config file and updates the existing object. Any unrecognized fields are ignored. + + \see defaults() + */ +bool ConfigSettings::updateJson(json_t *jsonConfig) +{ + bool updated = false; + + if (jsonConfig == nullptr || !json_is_object(jsonConfig)) { + XLOGD_WARN("invalid json config"); + return(updated); + } + + // find the timeout params + json_t *timeoutsObj = json_object_get(jsonConfig, "timeouts"); + if (timeoutsObj && json_is_object(timeoutsObj)) { + m_timeOuts = parseTimeouts(timeoutsObj); + updated = true; + } + + // find the model details array + json_t *modelArray = json_object_get(jsonConfig, "models"); + if (modelArray && json_is_array(modelArray)) { + XLOGD_WARN("models cannot be updated"); + } + + return(updated); +} + // ----------------------------------------------------------------------------- /*! Parses a json config file and returns a \l{std::shared_ptr} to a @@ -378,3 +409,11 @@ int ConfigSettings::hidrawWaitLimitTimeout() const return m_timeOuts.hidrawWaitLimitMSecs; } +// ----------------------------------------------------------------------------- +/*! + Returns true if any of the config fields are updated. Otherwise, returns false. + */ +bool ConfigSettings::updateFromJson(json_t *jsonConfig) +{ + return updateJson(jsonConfig); +} diff --git a/src/ble/hal/configsettings/configsettings.h b/src/ble/hal/configsettings/configsettings.h index 5a4d5e9b..c51c9491 100644 --- a/src/ble/hal/configsettings/configsettings.h +++ b/src/ble/hal/configsettings/configsettings.h @@ -48,6 +48,7 @@ class ConfigSettings static std::shared_ptr fromJsonFile(const std::string &filePath); static std::shared_ptr fromJsonBuffer(const char *jsonBuffer); static std::shared_ptr parseJson(json_t *jsonConfig); + bool updateJson(json_t *jsonConfig); struct TimeOuts { int discoveryMSecs; @@ -65,6 +66,7 @@ class ConfigSettings std::vector &&modelDetails); public: + bool updateFromJson(json_t *jsonConfig); int discoveryTimeout() const; int pairingTimeout() const; int setupTimeout() const; @@ -80,11 +82,9 @@ class ConfigSettings static TimeOuts parseTimeouts(json_t *json); private: - const TimeOuts m_timeOuts; + TimeOuts m_timeOuts; const std::vector m_modelDetails; }; -// QDebug operator<<(QDebug dbg, const ConfigSettings &settings); - #endif // !defined(CONFIGSETTINGS_H) From 8e1c5e70001f7467792d918ec244129bf512cd2b Mon Sep 17 00:00:00 2001 From: dwolaver <44593664+dwolaver@users.noreply.github.com> Date: Mon, 20 Jul 2026 12:32:40 -0400 Subject: [PATCH 10/16] RDKEMW-21599 : Control manager crashed on executing tr181 command (#262) --- src/rfc/ctrlm_rfc_attr.cpp | 6 +++--- src/voice/ctrlm_voice_obj.cpp | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/rfc/ctrlm_rfc_attr.cpp b/src/rfc/ctrlm_rfc_attr.cpp index f9e996bb..0e52ee19 100644 --- a/src/rfc/ctrlm_rfc_attr.cpp +++ b/src/rfc/ctrlm_rfc_attr.cpp @@ -70,7 +70,9 @@ void ctrlm_rfc_attr_t::set_rfc_value(const std::string &value) { // Convert to JSON json_t *temp = this->value_json; json_error_t json_error; - this->value_json = json_loads((const char *)decoded_buf, JSON_REJECT_DUPLICATES, &json_error); + this->value_json = json_loadb((const char *)decoded_buf, decoded_buf_len, JSON_REJECT_DUPLICATES, &json_error); + free(decoded_buf); + decoded_buf = NULL; if(this->value_json) { XLOGD_INFO("successfully got JSON from encoded string, alert the listeners"); json_decref(temp); @@ -80,8 +82,6 @@ void ctrlm_rfc_attr_t::set_rfc_value(const std::string &value) { this->value_json = temp; return; // return here, we don't want to call listeners on invalid data } - free(decoded_buf); - decoded_buf = NULL; } else { XLOGD_ERROR("failed to decode base64"); return; // return here, we don't want to call listeners on invalid data diff --git a/src/voice/ctrlm_voice_obj.cpp b/src/voice/ctrlm_voice_obj.cpp index 808c0f87..2bc56102 100644 --- a/src/voice/ctrlm_voice_obj.cpp +++ b/src/voice/ctrlm_voice_obj.cpp @@ -3870,8 +3870,6 @@ xrsr_power_mode_t voice_xrsr_power_map(ctrlm_power_state_t ctrlm_power_state) { } void ctrlm_voice_t::voice_rfc_retrieved_handler(const ctrlm_rfc_attr_t& attr) { - bool enabled = true; - XLOGD_INFO("processing RFC values"); attr.get_rfc_value(JSON_INT_NAME_VOICE_VREX_REQUEST_TIMEOUT, this->prefs.timeout_vrex_connect,0); @@ -3992,6 +3990,7 @@ void ctrlm_voice_t::voice_rfc_retrieved_handler(const ctrlm_rfc_attr_t& attr) { } if(attr.get_rfc_value(JSON_BOOL_NAME_VOICE_FORCE_VOICE_SETTINGS, this->prefs.force_voice_settings) && this->prefs.force_voice_settings) { + bool enabled = true; attr.get_rfc_value(JSON_BOOL_NAME_VOICE_ENABLE, enabled); attr.get_rfc_value(JSON_STR_NAME_VOICE_URL_SRC_PTT, this->prefs.server_url_src_ptt); attr.get_rfc_value(JSON_STR_NAME_VOICE_URL_SRC_FF, this->prefs.server_url_src_ff); @@ -4013,6 +4012,7 @@ void ctrlm_voice_t::voice_rfc_retrieved_handler(const ctrlm_rfc_attr_t& attr) { } void ctrlm_voice_t::vsdk_rfc_retrieved_handler(const ctrlm_rfc_attr_t& attr) { + XLOGD_INFO("processing RFC values"); json_t *obj_vsdk = NULL; if(attr.get_rfc_json_value(&obj_vsdk) && obj_vsdk) { XLOGD_INFO("VSDK values from XCONF, reopening xrsr.."); @@ -4021,7 +4021,12 @@ void ctrlm_voice_t::vsdk_rfc_retrieved_handler(const ctrlm_rfc_attr_t& attr) { } // This is temporary until the VSDK supports receiving a config on the fly this->voice_sdk_close(); - this->voice_sdk_open(obj_vsdk); + if(this->vsdk_config) { + json_decref(this->vsdk_config); + this->vsdk_config = NULL; + } + this->vsdk_config = obj_vsdk; // Transfer ownership + this->voice_sdk_open(this->vsdk_config); this->voice_sdk_update_routes(); // Set init message if read from shared memory @@ -4038,7 +4043,6 @@ void ctrlm_voice_t::vsdk_rfc_retrieved_handler(const ctrlm_rfc_attr_t& attr) { } else { this->voice_init_set(init.c_str(), false); } - json_decref(obj_vsdk); } } From e0a75fdc35092b0f004676a0d4bc68aa677a5bc2 Mon Sep 17 00:00:00 2001 From: dwolaver <44593664+dwolaver@users.noreply.github.com> Date: Wed, 22 Jul 2026 17:27:50 -0400 Subject: [PATCH 11/16] RDKEMW-20831 : remove ctrlm unused IARM calls/events (#258) --- doxygen/build_docs.py | 203 -- doxygen/ctrlm_api_all | 2310 ---------------- doxygen/ctrlm_api_hal | 2315 ---------------- doxygen/ctrlm_api_hal_rf4ce | 2317 ----------------- doxygen/ctrlm_api_ipc | 2314 ---------------- doxygen/ctrlm_api_ipc_device_update | 2316 ---------------- doxygen/ctrlm_api_ipc_rcu | 2316 ---------------- doxygen/ctrlm_api_ipc_voice | 2316 ---------------- doxygen/ctrlm_dox_hal.h | 0 doxygen/ctrlm_dox_hal_btle.h | 0 doxygen/ctrlm_dox_hal_ip.h | 0 doxygen/ctrlm_dox_hal_rf4ce.h | 69 - doxygen/ctrlm_dox_ipc.h | 64 - doxygen/ctrlm_dox_ipc_device_update.h | 68 - doxygen/ctrlm_dox_ipc_rcu.h | 68 - doxygen/ctrlm_dox_ipc_voice.h | 68 - doxygen/iarm/libIARM.h | 112 - doxygen/iarm/libIBus.h | 319 --- include/ctrlm_ipc.h | 362 +-- include/ctrlm_ipc_ble.h | 23 - include/ctrlm_ipc_device_update.h | 270 -- include/ctrlm_ipc_key_codes.h | 4 - include/ctrlm_ipc_rcu.h | 414 --- include/ctrlm_ipc_voice.h | 251 -- src/ctrlm.h | 61 +- src/ctrlm_device_update.cpp | 113 +- src/ctrlm_device_update.h | 7 - src/ctrlm_device_update_iarm.cpp | 236 -- src/ctrlm_main.cpp | 975 +------ src/ctrlm_main_iarm.cpp | 259 +- src/ctrlm_network.cpp | 15 - src/ctrlm_network.h | 1 - src/ctrlm_rcu.cpp | 84 - src/ctrlm_rcu.h | 2 - src/ctrlm_rcu_iarm.cpp | 15 - src/ctrlm_utils.cpp | 37 - src/ctrlm_utils.h | 3 - src/database/ctrlm_database.cpp | 4 - src/database/ctrlm_database.h | 1 - src/rf4ce/ctrlm_rf4ce_network.cpp | 55 +- src/rf4ce/ctrlm_rf4ce_network.h | 1 - src/voice/ctrlm_voice_obj.cpp | 4 +- src/voice/ipc/ctrlm_voice_ipc_iarm_legacy.cpp | 180 +- 43 files changed, 115 insertions(+), 20437 deletions(-) delete mode 100755 doxygen/build_docs.py delete mode 100644 doxygen/ctrlm_api_all delete mode 100644 doxygen/ctrlm_api_hal delete mode 100644 doxygen/ctrlm_api_hal_rf4ce delete mode 100644 doxygen/ctrlm_api_ipc delete mode 100644 doxygen/ctrlm_api_ipc_device_update delete mode 100644 doxygen/ctrlm_api_ipc_rcu delete mode 100644 doxygen/ctrlm_api_ipc_voice delete mode 100644 doxygen/ctrlm_dox_hal.h delete mode 100644 doxygen/ctrlm_dox_hal_btle.h delete mode 100644 doxygen/ctrlm_dox_hal_ip.h delete mode 100644 doxygen/ctrlm_dox_hal_rf4ce.h delete mode 100644 doxygen/ctrlm_dox_ipc.h delete mode 100644 doxygen/ctrlm_dox_ipc_device_update.h delete mode 100644 doxygen/ctrlm_dox_ipc_rcu.h delete mode 100644 doxygen/ctrlm_dox_ipc_voice.h delete mode 100644 doxygen/iarm/libIARM.h delete mode 100644 doxygen/iarm/libIBus.h diff --git a/doxygen/build_docs.py b/doxygen/build_docs.py deleted file mode 100755 index 0e48adbe..00000000 --- a/doxygen/build_docs.py +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/bin/python -########################################################################## -# If not stated otherwise in this file or this component's LICENSE -# file the following copyright and licenses apply: -# -# Copyright 2020 RDK Management -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -########################################################################## - -import os, sys, shutil, tarfile -from subprocess import call -import re - -dir_out = "./output/" - -def docs_gen_all(build_release=False): - release_version = '1' - release_name = 'ctrlm_all_release_' + release_version - header_files = ['ctrlm_hal.h', 'ctrlm_hal_rf4ce.h', 'ctrlm_hal_btle.h', 'ctrlm_hal_ip.h', 'ctrlm_ipc.h', 'ctrlm_ipc_rcu.h', 'ctrlm_ipc_voice.h', 'ctrlm_ipc_key_codes.h', 'ctrlm_ipc_device_update.h'] - cmd = ["doxygen", "ctrlm_api_all"] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def docs_gen_hal(build_release=False): - release_version = '1' - release_name = 'ctrlm_hal_release_' + release_version - header_files = ['ctrlm_hal.h', 'ctrlm_hal_rf4ce.h', 'ctrlm_hal_btle.h', 'ctrlm_hal_ip.h'] - cmd = ["doxygen", "ctrlm_api_hal", "ctrlm_hal_rf4ce.h", "ctrlm_hal_btle.h", "ctrlm_hal_ip.h" ] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def docs_gen_hal_rf4ce(build_release=False): - release_version = release_version_get('ctrlm_hal_rf4ce.h', 'CTRLM_HAL_RF4CE_API_VERSION') - release_name = 'ctrlm_hal_rf4ce_release_' + release_version - header_files = ['ctrlm_hal.h', 'ctrlm_hal_rf4ce.h'] - cmd = ["doxygen", "ctrlm_api_hal_rf4ce" ] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def docs_gen_hal_btle(build_release=False): - release_version = '1' - release_name = 'ctrlm_hal_btle_release_' + release_version - header_files = ['ctrlm_hal.h', 'ctrlm_hal_btle.h'] - cmd = ["doxygen", "ctrlm_api_hal_btle" ] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def docs_gen_hal_ip(build_release=False): - release_version = '1' - release_name = 'ctrlm_hal_ip_release_' + release_version - header_files = ['ctrlm_hal.h', 'ctrlm_hal_ip.h'] - cmd = ["doxygen", "ctrlm_api_hal_ip" ] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def docs_gen_ipc(build_release=False): - release_version = '3' - release_name = 'ctrlm_ipc_release_' + release_version - header_files = ['ctrlm_ipc.h', 'ctrlm_ipc_rcu.h', 'ctrlm_ipc_voice.h', 'ctrlm_ipc_key_codes.h', 'ctrlm_ipc_device_update.h'] - cmd = ["doxygen", "ctrlm_api_ipc" ] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def docs_gen_ipc_device_update(build_release=False): - release_version = '1' - release_name = 'ctrlm_ipc_device_update_release_' + release_version - header_files = ['ctrlm_ipc.h', 'ctrlm_ipc_device_update.h'] - cmd = ["doxygen", "ctrlm_api_ipc_device_update" ] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def docs_gen_ipc_voice(build_release=False): - release_version = '1' - release_name = 'ctrlm_ipc_voice_release_' + release_version - header_files = ['ctrlm_ipc.h', 'ctrlm_ipc_voice.h'] - cmd = ["doxygen", "ctrlm_api_ipc_voice" ] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def docs_gen_ipc_rcu(build_release=False): - release_version = '1' - release_name = 'ctrlm_ipc_rcu_release_' + release_version - header_files = ['ctrlm_ipc.h', 'ctrlm_ipc_rcu.h', 'ctrlm_ipc_key_codes.h'] - cmd = ["doxygen", "ctrlm_api_ipc_rcu" ] - ret = call(cmd) - if build_release: - build_pdf() - package_release(release_name, header_files) - else: - launch_html() - -def launch_html(): - dir_html = os.path.join(dir_out, 'html') - file_html = os.path.join(dir_html, 'index.html') - cmd = ["firefox", file_html ] - ret = call(cmd) - -def build_pdf(): - os.chdir("./output/latex") - cmd = ["pdflatex", "refman.tex" ] - ret = call(cmd) - os.chdir("../..") - -def package_release(release_name, header_files): - dir_html = os.path.join(dir_out, 'html') - dir_latex = os.path.join(dir_out, 'latex') - dir_rel = os.path.join(dir_out, release_name) - dir_rel_html = os.path.join(dir_rel, 'html') - file_pdf = os.path.join(dir_latex, 'refman.pdf') - file_rel_pdf = os.path.join(dir_rel, 'hal_api.pdf') - file_rel_html = os.path.join(dir_rel, 'hal_api.html') - file_rel_tar = os.path.join(dir_out, release_name + '.tar.gz') - - if os.path.isdir(dir_rel): - shutil.rmtree(dir_rel) - - # Create release directory - os.mkdir(dir_rel) - # Copy html files - shutil.copytree(dir_html, dir_rel_html) - - # Create html shortcut - fh = open(file_rel_html, 'w') - fh.write('') - fh.close() - - # Copy pdf file - shutil.copy2(file_pdf, file_rel_pdf) - - # Copy header files - for file in header_files: - shutil.copy2(os.path.join('../include', file), dir_rel) - - # tar up the release - tar = tarfile.open(file_rel_tar, "w:gz") - tar.add(dir_rel, arcname=release_name) - tar.close() - - # Remove the release directory - shutil.rmtree(dir_rel) - -def release_version_get(filename, key): - fh = open(os.path.join('../include', filename), 'r') - contents = fh.read() - fh.close() - - m = re.search('.*' + key + '\s*\((.*)\)', contents) - - return m.group(1) - - -#docs_gen_all() -#docs_gen_hal() -docs_gen_hal_rf4ce(True) -#docs_gen_hal_btle() -#docs_gen_hal_ip() -#docs_gen_ipc() -#docs_gen_ipc_device_update(False) -#docs_gen_ipc_voice() -#docs_gen_ipc_rcu() diff --git a/doxygen/ctrlm_api_all b/doxygen/ctrlm_api_all deleted file mode 100644 index 56797131..00000000 --- a/doxygen/ctrlm_api_all +++ /dev/null @@ -1,2310 +0,0 @@ -# Doxyfile 1.8.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "Control Manager" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = ./output/ - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = NO - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = . ../include - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = ctrlm_dox_ipc.h \ - ctrlm_dox_ipc_rcu.h \ - ctrlm_dox_ipc_voice.h \ - ctrlm_dox_ipc_device_update.h \ - ctrlm_dox_hal.h \ - ctrlm_dox_hal_rf4ce.h \ - ctrlm_dox_hal_ip.h \ - ctrlm_dox_hal_btle.h - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 1 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /