From 00ec0f9442bb97ef94feb24abc85863a369b647f Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Wed, 1 Jul 2026 16:46:54 -0400 Subject: [PATCH 01/21] RDKEMW-20831 : remove ctrlm unused IARM calls/events --- include/ctrlm_ipc.h | 283 -------------------------------------------- 1 file changed, 283 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index 32d0dea1..a8861d96 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -23,78 +23,6 @@ #include "libIBusDaemon.h" #include "ctrlm_ipc_key_codes.h" -/// @file ctrlm_ipc.h -/// -/// @defgroup CTRLM_IPC_MAIN IARM API - Control Manager -/// @{ -/// -/// @defgroup CTRLM_IPC_MAIN_COMMS Communication Interfaces -/// @defgroup CTRLM_IPC_MAIN_CALLS IARM Remote Procedure Calls -/// @defgroup CTRLM_IPC_MAIN_EVENTS IARM Events -/// @defgroup CTRLM_IPC_MAIN_DEFINITIONS Constants -/// @defgroup CTRLM_IPC_MAIN_ENUMS Enumerations -/// @defgroup CTRLM_IPC_MAIN_STRUCTS Structures -/// -/// @mainpage Control Manager IARM Interface -/// This document describes the interfaces that Control Manager uses to communicate with other components in the system. It exposes -/// functionality to other processes in the system via the IARM bus. The IARM interface provides inter-process communication via Calls -/// and Events. Control Manager supports one or more network devices via a Hardware Abstraction Layer (HAL). The HAL API specifies the -/// method by which a network device communicates with the Control Manager. -/// -/// This manual is divided into the following sections: -/// - @subpage CTRLM_IPC_MAIN_INTRO -/// - @subpage CTRLM_IPC_MAIN_COMMS -/// - @subpage CTRL_MGR -/// - @subpage CTRL_MGR_HAL -/// - @subpage CTRL_MGR_HAL_RF4CE -/// - @subpage CTRL_MGR_HAL_IP -/// - @subpage CTRL_MGR_HAL_BLE -/// -/// @page CTRLM_IPC_MAIN_INTRO Introduction -/// The state of the Control Manager is summarized in the following diagram. -/// -/// @dot -/// digraph CTRLMGR_StateMachine { -/// "INIT" [shape="ellipse", fontname=Helvetica, fontsize=10]; -/// "READY" [shape="ellipse", fontname=Helvetica, fontsize=10]; -/// "TERM" [shape="ellipse", fontname=Helvetica, fontsize=10]; -/// -/// "INIT" -> "INIT" [fontname=Helvetica, fontsize=10,label=" IARM Connect Failed (delay)"]; -/// "INIT" -> "READY" [fontname=Helvetica, fontsize=10,label=" "headlabel="IARM\rConnect",labeldistance=4.5, labelangle=25]; -/// "READY" -> "INIT" [fontname=Helvetica, fontsize=10,label=" IARM\l Disconnect"]; -/// "READY" -> "TERM" [fontname=Helvetica, fontsize=10,label=" Control Manager Exited"]; -/// "READY" -> "READY" [fontname=Helvetica, fontsize=10,label=" Process events and service calls"]; -/// } -/// \enddot -/// -/// -/// Initialization -/// -------------- -/// -/// During initialization, the Control Manager initializes the IARM bus by calling IARM_Bus_Init() using its well known bus name, CTRLM_MAIN_IARM_BUS_NAME. -/// Upon successful initialization, the Control Manager connects to the bus by calling IARM_Bus_Connect().\n -/// If initialization is not completed successfully, the process will sleep for X seconds and retry the initialization procedure. -/// -/// For debug purposes, the Control Manager may register to receive log messages from the IARM bus calling the IARM_Bus_RegisterForLog() function. -/// -/// Termination -/// ----------- -/// -/// Before the Control Manager exits, it unregisters for events, disconnects from the IARM bus and terminates the session by calling IARM_Bus_UnRegisterEventHandler(), IARM_Bus_Disconnect() -/// and IARM_Bus_Term() respectively. -/// -/// Normal Operation -/// ---------------- -/// -/// After successful initialization, the Control Manager will begin processing and generating @link CTRLM_IPC_MAIN_EVENTS events @endlink and @link CTRLM_IPC_MAIN_CALLS remote process calls @endlink (RPC). Periodically, the status of the IARM bus connection is -/// checked by calling IARM_Bus_IsConnected(). If the result is not IARM_RESULT_SUCCESS, the Control Manager will return to the pre-initialized state. -/// -/// @addtogroup CTRLM_IPC_MAIN_DEFINITIONS -/// @{ -/// @brief Macros for constant values used by Control Manager clients -/// @details The Control Manager API provides macros for some parameters which may change in the future. Clients should use -/// these names to allow the client code to function correctly if the values change. - #define CTRLM_MAIN_IARM_BUS_NAME "Ctrlm" ///< Control Manager's IARM Bus Name #define CTRLM_MAIN_IARM_BUS_API_REVISION (16) ///< Revision of the Control Manager Main IARM API @@ -219,16 +147,6 @@ #define CTRLM_WAKEUP_CONFIG_LIST_MAX_SIZE (256) #define CTRLM_RCU_ASSERT_REPORT_MAX_SIZE (128) -/// @} - -/// @addtogroup CTRLM_IPC_MAIN_ENUMS -/// @{ -/// @brief Enumerated Types -/// @details The Control Manager provides enumerated types for logical groups of values. - -/// @brief Remote Procedure Call Results -/// @details The structure for each remote call has a result member which is populated with the result of the operation. This field is only valid -/// when the IARM return code indicates a successful call. typedef enum { CTRLM_IARM_CALL_RESULT_SUCCESS = 0, ///< The requested operation was completed successfully. CTRLM_IARM_CALL_RESULT_ERROR = 1, ///< An error occurred during the requested operation. @@ -239,8 +157,6 @@ typedef enum { CTRLM_IARM_CALL_RESULT_INVALID = 6, ///< Invalid call result value } ctrlm_iarm_call_result_t; -/// @brief Control Manager Properties -/// @details The properties enumeration is used in calls to @link CTRLM_IPC_MAIN_CALLS PropertyGet @endlink and @link CTRLM_IPC_MAIN_CALLS PropertySet@endlink. They are used to get/set values in Control Manager. typedef enum { CTRLM_PROPERTY_BINDING_BUTTON_ACTIVE = 0, ///< (RO) Boolean value indicating whether a front panel button was recently pressed (1) or not (0). CTRLM_PROPERTY_BINDING_SCREEN_ACTIVE = 1, ///< (RW) Boolean value indicating whether the 'Pairing Description Screen' is being displayed (1) or not (0). @@ -261,8 +177,6 @@ typedef enum { CTRLM_PROPERTY_MAX = 16, ///< (NA) Maximum property enumeration value. } ctrlm_property_t; -/// @brief Control Manager Events -/// @details The events enumeration defines a value for each event that can be generated by Control Manager. typedef enum { CTRLM_MAIN_IARM_EVENT_BINDING_BUTTON = 0, ///< Generated when a state change of the binding button status occurs CTRLM_MAIN_IARM_EVENT_BINDING_LINE_OF_SIGHT = 1, ///< Generated when a state change of the line of sight status occurs @@ -305,8 +219,6 @@ typedef enum { CTRLM_MAIN_IARM_EVENT_MAX = 38 ///< Placeholder for the last event (used in registration) } ctrlm_main_iarm_event_t; -/// @brief Remote Control Key Status -/// @details The status of the key. typedef enum { CTRLM_KEY_STATUS_DOWN = 0, ///< Key down CTRLM_KEY_STATUS_UP = 1, ///< Key up @@ -314,8 +226,6 @@ typedef enum { CTRLM_KEY_STATUS_INVALID = 3, ///< Invalid key status } ctrlm_key_status_t; -/// @brief Remote Control Key Source -/// @details The source of the key press, e.g. infrared, rf, etc. typedef enum { CTRLM_KEY_SOURCE_FP = 0, //< Key Source Front Panel CTRLM_KEY_SOURCE_IR, //< Key Source Infrared @@ -323,16 +233,12 @@ typedef enum { CTRLM_KEY_SOURCE_INVALID //< Invalid } ctrlm_key_source_t; -/// @brief Data Access Type -/// @details The type of permission for access to data in Control Manager. typedef enum { CTRLM_ACCESS_TYPE_READ = 0, ///< Read access CTRLM_ACCESS_TYPE_WRITE = 1, ///< Write access CTRLM_ACCESS_TYPE_INVALID = 2 ///< Invalid access type } ctrlm_access_type_t; -/// @brief Network Type -/// @details The Control Manager network type. typedef enum { CTRLM_NETWORK_TYPE_RF4CE = 0, ///< RF4CE Network CTRLM_NETWORK_TYPE_BLUETOOTH_LE = 1, ///< Bluetooth Low Energy Network @@ -341,8 +247,6 @@ typedef enum { CTRLM_NETWORK_TYPE_INVALID = 255 ///< Invalid Network } ctrlm_network_type_t; -/// @brief Controller Unbind Reason -/// @details When a controller binding is removed, the reason is defined by the value in this enumeration. typedef enum { CTRLM_UNBIND_REASON_CONTROLLER = 0, ///< The controller initiated the unbind CTRLM_UNBIND_REASON_TARGET_USER = 1, ///< The target initiated the unbind due to user request @@ -353,8 +257,6 @@ typedef enum { CTRLM_UNBIND_REASON_MAX = 6 ///< Maximum unbind reason value } ctrlm_unbind_reason_t; -/// @brief Pairing Restrictions -/// @details The Control Manager network type. typedef enum { CTRLM_PAIRING_RESTRICT_NONE = 0, ///< No restrictions on pairing CTRLM_PAIRING_RESTRICT_TO_VOICE_REMOTES = 1, ///< Only pair voice remotes @@ -362,8 +264,6 @@ typedef enum { CTRLM_PAIRING_RESTRICT_MAX = 3 ///< Maximum restriction value } ctrlm_pairing_restrict_by_remote_t; -/// @brief Pairing Restrictions -/// @details The Control Manager network type. typedef enum { CTRLM_PAIRING_MODE_BUTTON_BUTTON_BIND = 0, ///< Button Button binding CTRLM_PAIRING_MODE_SCREEN_BIND = 1, ///< Screen binding @@ -371,8 +271,6 @@ typedef enum { CTRLM_PAIRING_MODE_MAX = 3, ///< Maximum pairing mode value } ctrlm_pairing_modes_t; -/// @brief Pairing Restrictions -/// @details The Control Manager network type. typedef enum { CTRLM_BIND_STATUS_SUCCESS, @@ -389,8 +287,6 @@ typedef enum CTRLM_BIND_STATUS_UNKNOWN_FAILURE, } ctrlm_bind_status_t; -/// @brief chime volume settings -/// @details The Control Manager network type. typedef enum { CTRLM_CHIME_VOLUME_LOW, @@ -399,8 +295,6 @@ typedef enum CTRLM_CHIME_VOLUME_INVALID, } ctrlm_chime_volume_t; -/// @brief IR device types -/// @details Types of IR devices supported by Control Manager typedef enum { CTRLM_IR_DEVICE_TV = 0, CTRLM_IR_DEVICE_AMP, @@ -432,16 +326,12 @@ typedef enum { CTRLM_FMR_LEVEL_INVALID } ctrlm_fmr_alarm_level_t; -/// @brief audio capture container settings -/// @details Audio container types typedef enum { CTRLM_AUDIO_CONTAINER_WAV = 0, CTRLM_AUDIO_CONTAINER_NONE = 1, CTRLM_AUDIO_CONTAINER_INVALID = 2 } ctrlm_audio_container_t; -/// @brief Power State Type -/// @details Power Manager sends the current power state and the new power state. This type is used to track the state information. typedef enum { CTRLM_POWER_STATE_STANDBY = 0, //Indicates power state transition CTRLM_POWER_STATE_ON = 1, @@ -466,29 +356,14 @@ typedef enum { CTRLM_RCU_UPGRADE_STATE_INVALID } ctrlm_rcu_upgrade_state_t; -/// @brief Network Id Type -/// @details During initialization, of the HAL network, Control Manager will assign a unique id to the network. It must be used in all -/// subsequent communication with the Control Manager. typedef unsigned char ctrlm_network_id_t; -/// @brief Controller Id Type -/// @details When a controller is paired, the Control Manager will assign an id (typically 48/64 bit MAC address) to the controller. typedef unsigned char ctrlm_controller_id_t; -/// @} -/// @addtogroup CTRLM_IPC_MAIN_STRUCTS -/// @{ -/// @brief Structure definitions -/// @details The Control Manager provides structures that are used in IARM calls and events. - -/// @brief Network Structure -/// @details The information for a network. typedef struct { ctrlm_network_id_t id; ///< identifier of the network ctrlm_network_type_t type; ///< Type of network } ctrlm_network_t; -/// @brief Control Manager Status Structure -/// @details The Control Manager Status structure is used in the CTRLM_MAIN_IARM_CALL_STATUS_GET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< OUT - The result of the operation. @@ -499,15 +374,11 @@ typedef struct { char stb_device_id[CTRLM_MAIN_DEVICE_ID_MAX_LENGTH]; ///< OUT - Device ID obtained from the Set-Top Box } ctrlm_main_iarm_call_status_t; -/// @brief RF Channel Structure -/// @details The diagnostics information for an RF channel. typedef struct { unsigned char number; ///< RF channel number (15, 20 or 25 for RF4CE) unsigned char quality; ///< Quality indicator for this channel } ctrlm_rf_channel_t; -/// @brief RF4CE Network Status Structure -/// @details The RF4CE Network Status structure provided detailed information about the network. typedef struct { char version_hal[CTRLM_MAIN_VERSION_LENGTH]; ///< Software version of the HAL driver unsigned char controller_qty; ///< Number of controllers bound to the target device @@ -519,24 +390,18 @@ typedef struct { char chipset[CTRLM_MAIN_MAX_CHIPSET_LENGTH]; ///< Chipset of the target } ctrlm_network_status_rf4ce_t; -/// @brief Bluetooth LE Network Status Structure -/// @details The Bluetooth LE Network Status structure provided detailed information about the network. typedef struct { char version_hal[CTRLM_MAIN_VERSION_LENGTH]; ///< Software version of the HAL driver unsigned char controller_qty; ///< Number of controllers bound to the target device. ctrlm_controller_id_t controllers[CTRLM_MAIN_MAX_BOUND_CONTROLLERS]; ///< List of controllers bound to the target device } ctrlm_network_status_ble_t; -/// @brief IP Network Status Structure -/// @details The IP Network Status structure provided detailed information about the network. typedef struct { char version_hal[CTRLM_MAIN_VERSION_LENGTH]; ///< Software version of the HAL driver unsigned char controller_qty; ///< Number of controllers bound to the target device. ctrlm_controller_id_t controllers[CTRLM_MAIN_MAX_BOUND_CONTROLLERS]; ///< List of controllers bound to the target device } ctrlm_network_status_ip_t; -/// @brief Network Status Structure -/// @details The Network Status structure is used in the CTRLM_MAIN_IARM_CALL_NETWORK_STATUS_GET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< OUT - Result of the operation @@ -548,8 +413,6 @@ typedef struct { } status; ///< OUT - Union of network status types } ctrlm_main_iarm_call_network_status_t; -/// @brief Property Structure -/// @details The property structure is used in PropertyGet and PropertySet calls. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the operation @@ -558,8 +421,6 @@ typedef struct { unsigned long value; ///< Value for this property } ctrlm_main_iarm_call_property_t; -/// @brief Discovery Config Call Structure -/// @details The Discovery Config Call structure is used in the CTRLM_IARM_CALL_DISCOVERY_CONFIG_SET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the operation @@ -568,8 +429,6 @@ typedef struct { unsigned char require_line_of_sight; ///< Require (1) or do not require (0) line of sight to respond to discovery requests } ctrlm_main_iarm_call_discovery_config_t; -/// @brief Autobind Config Call Structure -/// @details The Autobind Config Call structure is used in the CTRLM_IARM_CALL_AUTOBIND_CONFIG_SET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the operation @@ -579,8 +438,6 @@ typedef struct { unsigned char threshold_fail; ///< Number of unsuccessful pairing attempts required to complete autobinding unsuccessfully } ctrlm_main_iarm_call_autobind_config_t; -/// @brief Precommision Config Call Structure -/// @details The Precommission Config Call structure is used in the CTRLM_IARM_CALL_PRECOMMISSION_CONFIG_SET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the operation @@ -589,9 +446,6 @@ typedef struct { unsigned long long controllers[CTRLM_MAIN_MAX_BOUND_CONTROLLERS]; ///< IEEE Address for precommissioned controllers } ctrlm_main_iarm_call_precommision_config_t; -/// @brief Controller Unbind Call Structure -/// @details This structure provides a method to remove a binding between the target and a controller. For RF4CE controllers, only the target will be unbound since -/// there is no method to wake up the controller to unbind it. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -599,29 +453,21 @@ typedef struct { ctrlm_controller_id_t controller_id; ///< IN - identifier of the controller } ctrlm_main_iarm_call_controller_unbind_t; -/// @brief Structure of Control Manager's Binding Button IARM event -/// @details This event notifies listeners that a state change has occurred in the binding button status. typedef struct { unsigned char api_revision; ///< Revision of this API unsigned char active; ///< Indicates that the binding button status is active (1) or not active (0) } ctrlm_main_iarm_event_binding_button_t; -/// @brief Structure of Control Manager's Binding Line of Sight IARM event -/// @details This event notifies listeners that a state change has occurred in the binding line of sight status. typedef struct { unsigned char api_revision; ///< Revision of this API unsigned char active; ///< Indicates that the binding line of sight status is active (1) or not active (0) } ctrlm_main_iarm_event_binding_line_of_sight_t; -/// @brief Structure of Control Manager's Autobind Line of Sight IARM event -/// @details This event notifies listeners that a state change has occurred in the autobind line of sight status. typedef struct { unsigned char api_revision; ///< Revision of this API unsigned char active; ///< Indicates that the autobind line of sight status is active (1) or not active (0) } ctrlm_main_iarm_event_autobind_line_of_sight_t; -/// @brief Structure of Control Manager's Unbind IARM event -/// @details The unbind Event is generated whenever a controller is removed from the binding table. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< Identifier of network on which the controller is bound @@ -630,8 +476,6 @@ typedef struct { ctrlm_unbind_reason_t reason; ///< Reason that the controller binding was removed } ctrlm_main_iarm_event_controller_unbind_t; -/// @brief Control Manager IR Remote Usage Structure -/// @details The Control Manager Status structure is used in the CTRLM_MAIN_IARM_CALL_IR_REMOTE_USAGE_GET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< OUT - The result of the operation. @@ -648,8 +492,6 @@ typedef struct { unsigned char has_ir_remote_today; ///< OUT - Boolean value indicating remote in IR mode was used the current day } ctrlm_main_iarm_call_ir_remote_usage_t; -/// @brief Control Manager Last Key Info Structure -/// @details The Control Manager Status structure is used in the CTRLM_MAIN_IARM_CALL_LAST_KEY_INFO_GET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< IN - identifier of network on which the controller is bound @@ -663,8 +505,6 @@ typedef struct { char source_name[CTRLM_MAIN_SOURCE_NAME_MAX_LENGTH]; ///< OUT - The source name of the last key press. } ctrlm_main_iarm_call_last_key_info_t; -/// @brief Control Manager Control Service Settings Structure -/// @details The Control Manager Status structure is used in the CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_SET_VALUES call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< The revision of this API. ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -679,8 +519,6 @@ typedef struct { unsigned char ir_command_repeats; ///< The ir command repeats (1 - 10) } ctrlm_main_iarm_call_control_service_settings_t; -/// @brief Control Manager Control Service Can Find My Remote Structure -/// @details The Control Manager Status structure is used in the CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_CAN_FIND_MY_REMOTE call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< The revision of this API. ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -688,9 +526,6 @@ typedef struct { ctrlm_network_type_t network_type; ///< [in] Type of network on which the controller is bound } ctrlm_main_iarm_call_control_service_can_find_my_remote_t; -/// @brief Control Manager Control Service Pairing Mode Structure -/// @details The Control Manager Status structure is used in the CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_START_PAIRING_MODE call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. - typedef struct { unsigned char api_revision; ///< The revision of this API. ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -701,8 +536,6 @@ typedef struct { unsigned int bind_status; ///< OUT - The bind status of the pairing session } ctrlm_main_iarm_call_control_service_pairing_mode_t; -/// @brief Control Manager Pairing Metrics Structure -/// @details The Control Manager Status structure is used in the CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< OUT - The result of the operation. @@ -717,7 +550,6 @@ typedef struct { char last_non_screenbind_remote_type[CTRLM_MAIN_SOURCE_NAME_MAX_LENGTH]; ///< OUT - The last screenbind error remote type } ctrlm_main_iarm_call_pairing_metrics_t; - typedef struct { ctrlm_controller_id_t controller_id; ///< identifier of the controller, used for calls to a specific RCU char ieee_address_str[CTRLM_MAX_PARAM_STR_LEN]; @@ -767,8 +599,6 @@ typedef struct { ctrlm_iarm_call_result_t result; } ctrlm_iarm_call_WriteRcuWakeupConfig_params_t; -/// @brief Chip Status Structure -/// @details The Chip Status structure is used in the CTRLM_MAIN_IARM_CALL_CHIP_STATUS_GET call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< OUT - Result of the operation @@ -776,8 +606,6 @@ typedef struct { unsigned char chip_connected; ///< OUT - 1 - chip connected, 0 - chip disconnected } ctrlm_main_iarm_call_chip_status_t; -/// @brief Control Manager Audio Capture Structure -/// @details The Control Manager Audio Capture structure is used in the CTRLM_MAIN_IARM_CALL_AUDIO_CAPTURE_START call. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ctrlm_iarm_call_result_t result; @@ -792,126 +620,15 @@ typedef struct { ctrlm_power_state_t new_state; } ctrlm_main_iarm_call_power_state_change_t; -/// @brief Control Manager General Thunder IARM IPC Call Structure -/// @details The Control Manager General Thunder IARM IPC Call structure is used by multiple CTRLM_MAIN_IARM calls. See the @link CTRLM_IPC_MAIN_CALLS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API char result[CTRLM_MAIN_IARM_CALL_RESULT_LEN_MAX]; ///< OUT - Result of the operation formatted in JSON char payload[]; ///< IN - Input params specific to RPC formatted in JSON (e.g. Network ID) } ctrlm_main_iarm_call_json_t; -/// @brief Control Manager General Thunder IARM IPC Event Structure -/// @details The Control Manager General Thunder IARM IPC Event structure is used by multiple CTRLM_MAIN_IARM events. See the @link CTRLM_IPC_MAIN_EVENTS Calls@endlink section for more details on invoking this call. typedef struct { unsigned char api_revision; ///< Revision of this API char payload[]; ///< OUT - Result of the operation formmated in JSON } ctrlm_main_iarm_event_json_t; -/// @} - -/// @addtogroup CTRLM_IPC_MAIN_EVENTS Events -/// @{ -/// @brief Broadcast Events accessible via IARM bus -/// @details The iARM bus uses events to broadcast information to interested clients. An event is sent separately to each client. There are no return values for an event and no -/// guarantee that a client will receive the event. Each event has a different argument structure according to the information being transferred to the clients. The -/// Control Manager generates and subscribes to are detailed below. -/// -/// - - - -/// Event Generation (Broadcast) -/// ---------------------------- -/// -/// The Control Manager generates events that can be received by other processes connected to the IARM bus. The following events -/// are registered during initialization: -/// -/// | Bus Name | Event Name | Argument | Description | -/// | :------- | :--------- | :------- | :---------- | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_MAIN_IARM_EVENT_BINDING_BUTTON | ctrlm_main_iarm_event_binding_button_t | Generated when a state change of the binding button status occurs | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_MAIN_IARM_EVENT_BINDING_LINE_OF_SIGHT | ctrlm_main_iarm_event_binding_line_of_sight_t | Generated when a state change of the line of sight status occurs | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_MAIN_IARM_EVENT_AUTOBIND_LINE_OF_SIGHT | ctrlm_main_iarm_event_autobind_line_of_sight_t | Generated when a state change of the autobind line of sight status occurs | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_MAIN_IARM_EVENT_CONTROLLER_UNBIND | ctrlm_main_iarm_event_controller_unbind_t | Generated when a controller binding is removed | -/// -/// IARM events are available on a subscription basis. In order to receive an event, a client must explicitly register to receive the event by calling -/// IARM_Bus_RegisterEventHandler() with the Control Manager bus name, event name and a @link IARM_EventHandler_t handler function @endlink. Events may be generated at any time by the -/// Control Manager. All events are asynchronous. -/// -/// Examples: -/// -/// Register for a Control Manager event: -/// -/// IARM_Result_t result; -/// -/// result = IARM_Bus_RegisterEventHandler(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_MAIN_IARM_EVENT_KEY_PRESS, key_handler_func); -/// if(IARM_RESULT_SUCCESS == result) { -/// // Event registration was set successful -/// } -/// -/// @} -/// -/// @addtogroup CTRLM_IPC_MAIN_CALLS Remote Procedure Calls -/// @{ -/// @brief Remote Calls accessible via IARM bus -/// @details IARM calls are synchronous calls to functions provided by other IARM bus members. Each bus member can register -/// calls using the IARM_Bus_RegisterCall() function. Other members can invoke the call using the IARM_Bus_Call() function. -/// -/// - - - -/// Call Registration -/// ----------------- -/// -/// The Control Manager registers the following calls. -/// -/// | Bus Name | Call Name | Argument | Description | -/// | :------- | :-------- | :------- | :---------- | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_STATUS_GET | ctrlm_main_iarm_call_status_t | Retrieves Control Manager's Status information | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_NETWORK_STATUS_GET | ctrlm_main_iarm_call_network_status_t | Retrieves the specified network's Status information | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_PROPERTY_SET | ctrlm_main_iarm_call_property_t | Sets a property of the Control Manager | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_PROPERTY_GET | ctrlm_main_iarm_call_property_t | Gets a property of the Control Manager | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_UNIQUE_REFERENCE_ID_SET | ctrlm_main_iarm_call_unique_reference_id_t | Sets the unique reference id for the STB | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_AUTOBIND_CONFIG_SET | ctrlm_main_iarm_call_autobind_config_t | Sets the configuration settings for autobind | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_PRECOMMISSION_CONFIG_SET | ctrlm_main_iarm_call_precommision_config_t | Sets the pre-commission settings | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_FACTORY_RESET | ctrlm_main_iarm_call_json_t | Resets settings to factory default for the specified network | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_CONTROLLER_UNBIND | ctrlm_main_iarm_call_controller_unbind_t | Removes a controller from the specified network | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_LAST_KEYPRESS_GET | ctrlm_main_iarm_call_json_t | Returns last key pressed from a controller on a specified network | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_START_PAIRING | ctrlm_main_iarm_call_json_t | Initiates the pairing process for a specified network | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_IARM_CALL_FIND_MY_REMOTE | ctrlm_main_iarm_call_json_t | Initiates find my remote for controllers on a specified network | -/// -/// Examples: -/// -/// Set a Control Manager property: -/// -/// IARM_Result_t result; -/// ctrlm_property_t property; -/// property.name = CTRLM_PROPERTY_CLASS_DESC_LINE_OF_SIGHT; -/// property.value = 1; -/// -/// result = IARM_Bus_Call(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_IARM_CALL_PROPERTY_SET, (void *)&property, sizeof(property)); -/// if(IARM_RESULT_SUCCESS == result && CTRLMGR_RESULT_SUCCESS == property.result) { -/// // Property was set successfully -/// } -/// -/// Get a Control Manager property: -/// -/// IARM_Result_t result; -/// ctrlm_property_t property; -/// property.name = CTRLM_PROPERTY_VALIDATION_MAX_ATTEMPTS; -/// -/// result = IARM_Bus_Call(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_IARM_CALL_PROPERTY_GET, (void *)&property, sizeof(property)); -/// if(IARM_RESULT_SUCCESS == result && CTRLMGR_RESULT_SUCCESS == property.result) { -/// // Property was retrieved successfully -/// } -/// -/// Get Network Status information: -/// -/// IARM_Result_t result; -/// ctrlm_rf_status_t status; -/// -/// result = IARM_Bus_Call(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_IARM_CALL_NETWORK_STATUS_GET, (void *)&status, sizeof(status)); -/// if(IARM_RESULT_SUCCESS == result && CTRLMGR_RESULT_SUCCESS == status.result) { -/// // Process Status -/// } -/// -/// @} - - -/// @} - #endif From 0818ef7e2f1674eb406007c7d396358388d7534c Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Wed, 1 Jul 2026 16:54:19 -0400 Subject: [PATCH 02/21] remove status get iarm call --- src/ctrlm.h | 9 ----- src/ctrlm_main.cpp | 81 --------------------------------------------- src/ctrlm_utils.cpp | 1 - 3 files changed, 91 deletions(-) diff --git a/src/ctrlm.h b/src/ctrlm.h index b5c73f0a..2ddf4a5a 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -81,7 +81,6 @@ typedef enum { // Global messages CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE = CTRLM_MAIN_QUEUE_MSG_TYPE_GLOBAL + 1, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STATUS, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_GET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET, @@ -171,13 +170,6 @@ typedef enum { CTRLM_MAIN_STATUS_REQUEST_ERROR = 2 } ctrlm_main_status_cmd_result_t; -typedef struct { - ctrlm_main_queue_msg_header_t header; - ctrlm_main_iarm_call_status_t * status; - sem_t * semaphore; - ctrlm_main_status_cmd_result_t *cmd_result; -} ctrlm_main_queue_msg_main_status_t; - typedef struct { ctrlm_main_iarm_call_network_status_t *status; sem_t * semaphore; @@ -473,7 +465,6 @@ void ctrlm_event_handler_ir(const char *owner, IAR void ctrlm_quit_main_loop(); gboolean ctrlm_power_state_change(ctrlm_power_state_t power_state); -gboolean ctrlm_main_iarm_call_status_get(ctrlm_main_iarm_call_status_t *status); gboolean ctrlm_main_iarm_call_network_status_get(ctrlm_main_iarm_call_network_status_t *status); gboolean ctrlm_main_iarm_call_property_set(ctrlm_main_iarm_call_property_t *property); void ctrlm_main_iarm_call_property_set_(ctrlm_main_iarm_call_property_t *property); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index a4b38fac..23959e77 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -354,7 +354,6 @@ static void ctrlm_signals_register(void); static void ctrlm_signal_handler(int signal); static gboolean ctrlm_unix_signal_terminate(gpointer user_data); -static void ctrlm_main_iarm_call_status_get_(ctrlm_main_iarm_call_status_t *status); static void ctrlm_main_iarm_call_property_get_(ctrlm_main_iarm_call_property_t *property); static void ctrlm_main_iarm_call_discovery_config_set_(ctrlm_main_iarm_call_discovery_config_t *config); static void ctrlm_main_iarm_call_autobind_config_set_(ctrlm_main_iarm_call_autobind_config_t *config); @@ -2501,17 +2500,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STATUS: { - ctrlm_main_queue_msg_main_status_t *dqm = (ctrlm_main_queue_msg_main_status_t *) msg; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STATUS"); - ctrlm_main_iarm_call_status_get_(dqm->status); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET: { ctrlm_main_queue_msg_main_property_t *dqm = (ctrlm_main_queue_msg_main_property_t *) msg; XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET"); @@ -3225,75 +3213,6 @@ gboolean ctrlm_timeout_systemd_restart_delay(gpointer user_data) { return(FALSE); } -gboolean ctrlm_main_iarm_call_status_get(ctrlm_main_iarm_call_status_t *status) { - if(status == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_status_t *msg = (ctrlm_main_queue_msg_main_status_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_status_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STATUS; - msg->header.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - msg->status = status; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process STATUS_GET request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - -void ctrlm_main_iarm_call_status_get_(ctrlm_main_iarm_call_status_t *status) { - unsigned long index = 0; - errno_t safec_rc = -1; - - if(g_ctrlm.networks.size() > CTRLM_MAIN_MAX_NETWORKS) { - status->network_qty = CTRLM_MAIN_MAX_NETWORKS; - } else { - status->network_qty = g_ctrlm.networks.size(); - } - for(auto const &itr : g_ctrlm.networks) { - status->networks[index].id = itr.first; - status->networks[index].type = itr.second->type_get(); - index++; - } - - status->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - - safec_rc = strcpy_s(status->ctrlm_version, sizeof(status->ctrlm_version), CTRLM_VERSION); - ERR_CHK(safec_rc); - - safec_rc = strcpy_s(status->ctrlm_commit_id, sizeof(status->ctrlm_commit_id), CTRLM_MAIN_COMMIT_ID); - ERR_CHK(safec_rc); - - safec_rc = strncpy_s(status->stb_device_id, sizeof(status->stb_device_id), g_ctrlm.device_id.c_str(), CTRLM_MAIN_DEVICE_ID_MAX_LENGTH - 1); - ERR_CHK(safec_rc); - status->stb_device_id[CTRLM_MAIN_DEVICE_ID_MAX_LENGTH - 1] = '\0'; -} - gboolean ctrlm_main_iarm_call_ir_remote_usage_get(ctrlm_main_iarm_call_ir_remote_usage_t *ir_remote_usage) { if(ir_remote_usage == NULL) { XLOGD_ERROR("NULL parameter"); diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index eb8c7b7e..31189f8c 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -332,7 +332,6 @@ const char *ctrlm_main_queue_msg_type_str(ctrlm_main_queue_msg_type_t type) { case CTRLM_MAIN_QUEUE_MSG_TYPE_BIND_CONFIGURATION_COMPLETE: return("BIND_CONFIGURATION_COMPLETE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_NETWORK_PROPERTY_SET: return("NETWORK_PROPERTY_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE: return("TERMINATE"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STATUS: return("MAIN_STATUS"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET: return("MAIN_PROPERTY_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_GET: return("MAIN_PROPERTY_GET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET: return("MAIN_DISCOVERY_CONFIG_SET"); From 1271bfe6edf0c9ebe4884d7bcd80399ad9050889 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Wed, 1 Jul 2026 17:17:05 -0400 Subject: [PATCH 03/21] remove network status iarm call --- include/ctrlm_ipc.h | 51 ------------------------------ src/ble/ctrlm_ble_network.cpp | 27 ---------------- src/ble/ctrlm_ble_network.h | 1 - src/ctrlm.h | 7 ----- src/ctrlm_main.cpp | 34 -------------------- src/ctrlm_main_iarm.cpp | 52 ------------------------------- src/ctrlm_network.cpp | 17 ---------- src/ctrlm_network.h | 1 - src/rf4ce/ctrlm_rf4ce_network.cpp | 43 ------------------------- src/rf4ce/ctrlm_rf4ce_network.h | 1 - 10 files changed, 234 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index a8861d96..db1e43bf 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -26,8 +26,6 @@ #define CTRLM_MAIN_IARM_BUS_NAME "Ctrlm" ///< Control Manager's IARM Bus Name #define CTRLM_MAIN_IARM_BUS_API_REVISION (16) ///< Revision of the Control Manager Main IARM API -#define CTRLM_MAIN_IARM_CALL_STATUS_GET "Main_StatusGet" ///< Retrieves Control Manager's Status information -#define CTRLM_MAIN_IARM_CALL_NETWORK_STATUS_GET "Main_NetworkStatusGet" ///< Retrieves the network's Status information #define CTRLM_MAIN_IARM_CALL_PROPERTY_SET "Main_PropertySet" ///< Sets a property of the Control Manager #define CTRLM_MAIN_IARM_CALL_PROPERTY_GET "Main_PropertyGet" ///< Gets a property of the Control Manager #define CTRLM_MAIN_IARM_CALL_DISCOVERY_CONFIG_SET "Main_DiscoveryConfigSet" ///< Sets the discovery settings @@ -364,55 +362,6 @@ typedef struct { ctrlm_network_type_t type; ///< Type of network } ctrlm_network_t; -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< OUT - The result of the operation. - unsigned char network_qty; ///< OUT - Number of networks connected to Control Manager - ctrlm_network_t networks[CTRLM_MAIN_MAX_NETWORKS]; ///< OUT - List of networks - char ctrlm_version[CTRLM_MAIN_VERSION_LENGTH]; ///< OUT - Software version of Control Manager - char ctrlm_commit_id[CTRLM_MAIN_COMMIT_ID_MAX_LENGTH]; ///< OUT - Last commit ID of Control Manager - char stb_device_id[CTRLM_MAIN_DEVICE_ID_MAX_LENGTH]; ///< OUT - Device ID obtained from the Set-Top Box -} ctrlm_main_iarm_call_status_t; - -typedef struct { - unsigned char number; ///< RF channel number (15, 20 or 25 for RF4CE) - unsigned char quality; ///< Quality indicator for this channel -} ctrlm_rf_channel_t; - -typedef struct { - char version_hal[CTRLM_MAIN_VERSION_LENGTH]; ///< Software version of the HAL driver - unsigned char controller_qty; ///< Number of controllers bound to the target device - ctrlm_controller_id_t controllers[CTRLM_MAIN_MAX_BOUND_CONTROLLERS]; ///< List of controllers bound to the target device - unsigned short pan_id; ///< PAN Identifier - ctrlm_rf_channel_t rf_channel_active; ///< Current RF channel on which the target is operating - unsigned long long ieee_address; ///< The 64-bit IEEE Address of the target device - unsigned short short_address; ///< Short address (if applicable) - char chipset[CTRLM_MAIN_MAX_CHIPSET_LENGTH]; ///< Chipset of the target -} ctrlm_network_status_rf4ce_t; - -typedef struct { - char version_hal[CTRLM_MAIN_VERSION_LENGTH]; ///< Software version of the HAL driver - unsigned char controller_qty; ///< Number of controllers bound to the target device. - ctrlm_controller_id_t controllers[CTRLM_MAIN_MAX_BOUND_CONTROLLERS]; ///< List of controllers bound to the target device -} ctrlm_network_status_ble_t; - -typedef struct { - char version_hal[CTRLM_MAIN_VERSION_LENGTH]; ///< Software version of the HAL driver - unsigned char controller_qty; ///< Number of controllers bound to the target device. - ctrlm_controller_id_t controllers[CTRLM_MAIN_MAX_BOUND_CONTROLLERS]; ///< List of controllers bound to the target device -} ctrlm_network_status_ip_t; - -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< OUT - Result of the operation - ctrlm_network_id_t network_id; ///< IN - identifier of network - union { - ctrlm_network_status_rf4ce_t rf4ce; ///< OUT - RF4CE network status - ctrlm_network_status_ble_t ble; ///< OUT - BLE network status - ctrlm_network_status_ip_t ip; ///< OUT - IP network status - } status; ///< OUT - Union of network status types -} ctrlm_main_iarm_call_network_status_t; - typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the operation diff --git a/src/ble/ctrlm_ble_network.cpp b/src/ble/ctrlm_ble_network.cpp index f5c316b4..3f147d9b 100644 --- a/src/ble/ctrlm_ble_network.cpp +++ b/src/ble/ctrlm_ble_network.cpp @@ -467,33 +467,6 @@ void ctrlm_obj_network_ble_t::thread_monitor_poll(ctrlm_thread_monitor_response_ // ================================================================================================================================================================== // BEGIN - Process Requests to the network in CTRLM Main thread context // ------------------------------------------------------------------------------------------------------------------------------------------------------------------ -void ctrlm_obj_network_ble_t::req_process_network_status(void *data, int size) { - THREAD_ID_VALIDATE(); - ctrlm_main_queue_msg_main_network_status_t *dqm = (ctrlm_main_queue_msg_main_network_status_t *)data; - - g_assert(dqm); - g_assert(size == sizeof(ctrlm_main_queue_msg_main_network_status_t)); - g_assert(dqm->cmd_result); - - ctrlm_network_status_ble_t *network_status = &dqm->status->status.ble; - errno_t safec_rc = strncpy_s(network_status->version_hal, sizeof(network_status->version_hal), version_get(), CTRLM_MAIN_VERSION_LENGTH - 1); - ERR_CHK(safec_rc); - network_status->version_hal[CTRLM_MAIN_VERSION_LENGTH - 1] = '\0'; - network_status->controller_qty = controllers_.size(); - XLOGD_INFO("HAL Version <%s> Controller Qty %u", network_status->version_hal, network_status->controller_qty); - int index = 0; - for(auto const &itr : controllers_) { - network_status->controllers[index] = itr.first; - index++; - if(index >= CTRLM_MAIN_MAX_BOUND_CONTROLLERS) { - break; - } - } - dqm->status->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - - ctrlm_obj_network_t::req_process_network_status(data, size); -} void ctrlm_obj_network_ble_t::req_process_controller_status(void *data, int size) { THREAD_ID_VALIDATE(); diff --git a/src/ble/ctrlm_ble_network.h b/src/ble/ctrlm_ble_network.h index 73f2c8b9..8a760466 100644 --- a/src/ble/ctrlm_ble_network.h +++ b/src/ble/ctrlm_ble_network.h @@ -142,7 +142,6 @@ class ctrlm_obj_network_ble_t : public ctrlm_obj_network_t { void ind_process_keypress(void *data, int size); void ind_process_rcu_pairing_outcome(void *data, int size); - virtual void req_process_network_status(void *data, int size); virtual void req_process_controller_status(void *data, int size); virtual void req_process_voice_session_begin(void *data, int size); diff --git a/src/ctrlm.h b/src/ctrlm.h index 2ddf4a5a..5266bbcc 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -170,12 +170,6 @@ typedef enum { CTRLM_MAIN_STATUS_REQUEST_ERROR = 2 } ctrlm_main_status_cmd_result_t; -typedef struct { - ctrlm_main_iarm_call_network_status_t *status; - sem_t * semaphore; - ctrlm_main_status_cmd_result_t * cmd_result; -} ctrlm_main_queue_msg_main_network_status_t; - typedef struct { ctrlm_main_iarm_call_chip_status_t *status; sem_t * semaphore; @@ -465,7 +459,6 @@ void ctrlm_event_handler_ir(const char *owner, IAR void ctrlm_quit_main_loop(); gboolean ctrlm_power_state_change(ctrlm_power_state_t power_state); -gboolean ctrlm_main_iarm_call_network_status_get(ctrlm_main_iarm_call_network_status_t *status); gboolean ctrlm_main_iarm_call_property_set(ctrlm_main_iarm_call_property_t *property); void ctrlm_main_iarm_call_property_set_(ctrlm_main_iarm_call_property_t *property); gboolean ctrlm_main_iarm_call_property_get(ctrlm_main_iarm_call_property_t *property); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 23959e77..1fc643a5 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -3400,40 +3400,6 @@ void ctrlm_main_iarm_call_last_key_info_get_(ctrlm_main_iarm_call_last_key_info_ } } -gboolean ctrlm_main_iarm_call_network_status_get(ctrlm_main_iarm_call_network_status_t *status) { - if(status == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_network_status_t msg = {0}; - - sem_init(&semaphore, 0, 0); - - msg.status = status; - msg.status->result = CTRLM_IARM_CALL_RESULT_ERROR; - 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_network_status, &msg, sizeof(msg), NULL, status->network_id); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process NETWORK_STATUS_GET request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - gboolean ctrlm_main_iarm_call_property_set(ctrlm_main_iarm_call_property_t *property) { if(property == NULL) { XLOGD_ERROR("NULL parameter"); diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index db124af4..f4b52537 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -37,8 +37,6 @@ #include "dsMgr.h" #include "dsRpc.h" -static IARM_Result_t ctrlm_main_iarm_call_status_get(void *arg); -static IARM_Result_t ctrlm_main_iarm_call_network_status_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_property_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_property_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_discovery_config_set(void *arg); @@ -73,8 +71,6 @@ static volatile int running = 0; // Array to hold the IARM Calls that will be registered by Control Manager ctrlm_iarm_call_t ctrlm_iarm_calls[] = { - {CTRLM_MAIN_IARM_CALL_STATUS_GET, ctrlm_main_iarm_call_status_get }, - {CTRLM_MAIN_IARM_CALL_NETWORK_STATUS_GET, ctrlm_main_iarm_call_network_status_get }, {CTRLM_MAIN_IARM_CALL_PROPERTY_SET, ctrlm_main_iarm_call_property_set }, {CTRLM_MAIN_IARM_CALL_PROPERTY_GET, ctrlm_main_iarm_call_property_get }, {CTRLM_MAIN_IARM_CALL_DISCOVERY_CONFIG_SET, ctrlm_main_iarm_call_discovery_config_set }, @@ -144,30 +140,6 @@ void ctrlm_main_iarm_terminate(void) { //} } -IARM_Result_t ctrlm_main_iarm_call_status_get(void *arg) { - ctrlm_main_iarm_call_status_t *status = (ctrlm_main_iarm_call_status_t *) arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(status == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(status->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", status->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - status->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO(""); - - if(!ctrlm_main_iarm_call_status_get(status)) { - status->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_ir_remote_usage_get(void *arg) { ctrlm_main_iarm_call_ir_remote_usage_t *ir_remote_usage = (ctrlm_main_iarm_call_ir_remote_usage_t *) arg; @@ -216,30 +188,6 @@ IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_network_status_get(void *arg) { - ctrlm_main_iarm_call_network_status_t *status = (ctrlm_main_iarm_call_network_status_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(status == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(status->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", status->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - status->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO(""); - - if(!ctrlm_main_iarm_call_network_status_get(status)) { - status->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_property_set(void *arg) { ctrlm_main_iarm_call_property_t *property = (ctrlm_main_iarm_call_property_t *)arg; diff --git a/src/ctrlm_network.cpp b/src/ctrlm_network.cpp index 8715c038..7cbd7419 100644 --- a/src/ctrlm_network.cpp +++ b/src/ctrlm_network.cpp @@ -602,23 +602,6 @@ void ctrlm_obj_network_t::req_process_rib_get(void *data, int size) { } } -void ctrlm_obj_network_t::req_process_network_status(void *data, int size) { - ctrlm_main_queue_msg_main_network_status_t *dqm = (ctrlm_main_queue_msg_main_network_status_t *)data; - - g_assert(dqm); - g_assert(size == sizeof(ctrlm_main_queue_msg_main_network_status_t)); - - if(dqm->cmd_result && *dqm->cmd_result == CTRLM_MAIN_STATUS_REQUEST_PENDING) { - XLOGD_WARN("not implemented for %s network", name_get()); - dqm->status->result = CTRLM_IARM_CALL_RESULT_ERROR_NOT_SUPPORTED; - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_ERROR; - } - - if(dqm->semaphore) { - sem_post(dqm->semaphore); - } -} - void ctrlm_obj_network_t::req_process_voice_session_begin(void *data, int size){ XLOGD_WARN("request is not valid for %s network", name_get()); ctrlm_main_queue_msg_voice_session_t *dqm = (ctrlm_main_queue_msg_voice_session_t *)data; diff --git a/src/ctrlm_network.h b/src/ctrlm_network.h index 592e6e84..534c2636 100644 --- a/src/ctrlm_network.h +++ b/src/ctrlm_network.h @@ -252,7 +252,6 @@ class ctrlm_obj_network_t virtual void set_rf_pair_state(ctrlm_rf_pair_state_t rf_pair_state); virtual ctrlm_rf_pair_state_t get_rf_pair_state() const; - virtual void req_process_network_status(void *data, int size); virtual void req_process_chip_status(void *data, int size); virtual void req_process_controller_link_key(void *data, int size); virtual void req_process_controller_status(void *data, int size); diff --git a/src/rf4ce/ctrlm_rf4ce_network.cpp b/src/rf4ce/ctrlm_rf4ce_network.cpp index 85a3caea..db3b3b12 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.cpp +++ b/src/rf4ce/ctrlm_rf4ce_network.cpp @@ -4274,49 +4274,6 @@ void ctrlm_obj_network_rf4ce_t::hal_init_cfm(void *data, int size) { ctrlm_obj_network_t::hal_init_cfm(data, size); } -void ctrlm_obj_network_rf4ce_t::req_process_network_status(void *data, int size) { - ctrlm_main_queue_msg_main_network_status_t *dqm = (ctrlm_main_queue_msg_main_network_status_t *)data; - - g_assert(dqm); - g_assert(size == sizeof(ctrlm_main_queue_msg_main_network_status_t)); - g_assert(dqm->cmd_result); - - ctrlm_network_status_rf4ce_t *status_rf4ce = &dqm->status->status.rf4ce; - errno_t safec_rc = strncpy_s(status_rf4ce->version_hal, sizeof(status_rf4ce->version_hal), version_get(), CTRLM_MAIN_VERSION_LENGTH-1); - ERR_CHK(safec_rc); - status_rf4ce->version_hal[CTRLM_MAIN_VERSION_LENGTH - 1] = '\0'; - safec_rc = strncpy_s(status_rf4ce->chipset, sizeof(status_rf4ce->chipset), chipset_get(), CTRLM_MAIN_MAX_CHIPSET_LENGTH-1); - ERR_CHK(safec_rc); - status_rf4ce->chipset[CTRLM_MAIN_MAX_CHIPSET_LENGTH - 1] = '\0'; - - int index = 0; - for(auto const &itr : controllers_) { - //If the validation result is not success, then this remote has not finished pairing. Do not send it's status. - if(itr.second->validation_result_get() == CTRLM_RF4CE_RESULT_VALIDATION_SUCCESS) { - status_rf4ce->controllers[index] = itr.first; - index++; - if(index >= CTRLM_MAIN_MAX_BOUND_CONTROLLERS) { - break; - } - } else { - XLOGD_WARN("Controller <%u> is pending. Ignoring.", itr.first); - } - } - status_rf4ce->controller_qty = index; - XLOGD_INFO("HAL Version <%s> Controller Qty %u", status_rf4ce->version_hal, status_rf4ce->controller_qty); - pan_id_get(&status_rf4ce->pan_id); - ieee_address_get(&status_rf4ce->ieee_address); - short_address_get(&status_rf4ce->short_address); - ctrlm_rf4ce_rf_channel_info_t rf_channel_info; - rf_channel_info_get(&rf_channel_info); - status_rf4ce->rf_channel_active.number = rf_channel_info.rf_channel_number; - status_rf4ce->rf_channel_active.quality = rf_channel_info.rf_channel_quality; - dqm->status->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - - ctrlm_obj_network_t::req_process_network_status(data, size); -} - void ctrlm_obj_network_rf4ce_t::req_process_chip_status(void *data, int size) { ctrlm_main_queue_msg_main_chip_status_t *dqm = (ctrlm_main_queue_msg_main_chip_status_t *)data; diff --git a/src/rf4ce/ctrlm_rf4ce_network.h b/src/rf4ce/ctrlm_rf4ce_network.h index 10cc771a..fa541e76 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.h +++ b/src/rf4ce/ctrlm_rf4ce_network.h @@ -347,7 +347,6 @@ class ctrlm_obj_network_rf4ce_t : public ctrlm_obj_network_t ctrlm_rib_request_cmd_result_t req_process_rib_export(ctrlm_controller_id_t controller_id, uint8_t identifier, unsigned char index, unsigned char length, unsigned char *data); void req_process_controller_status(void *dqm, int size); void req_process_controller_product_name(void *data, int size); - void req_process_network_status(void *data, int size); void req_process_chip_status(void *data, int size); void req_process_controller_link_key(void *data, int size); void req_process_dpi_control(void *data, int size); From 8db49798421950cc3a6068d9d6530a2f8855a589 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Wed, 1 Jul 2026 17:46:17 -0400 Subject: [PATCH 04/21] remove property get/set iarm calls --- include/ctrlm_ipc.h | 40 --- src/ctrlm.h | 12 +- src/ctrlm_main.cpp | 391 +----------------------------- src/ctrlm_main_iarm.cpp | 44 ---- src/rf4ce/ctrlm_rf4ce_network.cpp | 11 +- 5 files changed, 11 insertions(+), 487 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index db1e43bf..d8169f0e 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -26,7 +26,6 @@ #define CTRLM_MAIN_IARM_BUS_NAME "Ctrlm" ///< Control Manager's IARM Bus Name #define CTRLM_MAIN_IARM_BUS_API_REVISION (16) ///< Revision of the Control Manager Main IARM API -#define CTRLM_MAIN_IARM_CALL_PROPERTY_SET "Main_PropertySet" ///< Sets a property of the Control Manager #define CTRLM_MAIN_IARM_CALL_PROPERTY_GET "Main_PropertyGet" ///< Gets a property of the Control Manager #define CTRLM_MAIN_IARM_CALL_DISCOVERY_CONFIG_SET "Main_DiscoveryConfigSet" ///< Sets the discovery settings #define CTRLM_MAIN_IARM_CALL_AUTOBIND_CONFIG_SET "Main_AutobindConfigSet" ///< Sets the autobind settings @@ -85,14 +84,8 @@ #define CTRLM_MAIN_COMMIT_ID_MAX_LENGTH (48) ///< Maximum length of commit ID string (including null termination) #define CTRLM_MAIN_DEVICE_ID_MAX_LENGTH (24) ///< Maximum length of device ID string (including null termination) -#define CTRLM_PROPERTY_ACTIVE_PERIOD_BUTTON_VALUE_MIN (5000) ///< Minimum active period (in ms) for button binding. -#define CTRLM_PROPERTY_ACTIVE_PERIOD_BUTTON_VALUE_MAX (600000) ///< Maximum active period (in ms) for button binding. #define CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND_VALUE_MIN (5000) ///< Minimum active period (in ms) for screen bind. #define CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND_VALUE_MAX (600000) ///< Maximum active period (in ms) for screen bind. -#define CTRLM_PROPERTY_ACTIVE_PERIOD_ONE_TOUCH_AUTOBIND_VALUE_MIN (5000) ///< Minimum active period (in ms) for screen bind. -#define CTRLM_PROPERTY_ACTIVE_PERIOD_ONE_TOUCH_AUTOBIND_VALUE_MAX (600000) ///< Maximum active period (in ms) for screen bind. -#define CTRLM_PROPERTY_ACTIVE_PERIOD_LINE_OF_SIGHT_VALUE_MIN (5000) ///< Minimum active period (in ms) for line of sight. -#define CTRLM_PROPERTY_ACTIVE_PERIOD_LINE_OF_SIGHT_VALUE_MAX (60000) ///< Maximum active period (in ms) for line of sight. #define CTRLM_PROPERTY_VALIDATION_TIMEOUT_MIN (1000) ///< Validation timeout value minimum (in ms) #define CTRLM_PROPERTY_VALIDATION_TIMEOUT_MAX (45000) ///< Validation timeout value maximum (in ms) @@ -155,26 +148,6 @@ typedef enum { CTRLM_IARM_CALL_RESULT_INVALID = 6, ///< Invalid call result value } ctrlm_iarm_call_result_t; -typedef enum { - CTRLM_PROPERTY_BINDING_BUTTON_ACTIVE = 0, ///< (RO) Boolean value indicating whether a front panel button was recently pressed (1) or not (0). - CTRLM_PROPERTY_BINDING_SCREEN_ACTIVE = 1, ///< (RW) Boolean value indicating whether the 'Pairing Description Screen' is being displayed (1) or not (0). - CTRLM_PROPERTY_BINDING_LINE_OF_SIGHT_ACTIVE = 2, ///< (RO) Boolean value indicating whether the STB has received the Line of Sight remote command and is within the active period. - CTRLM_PROPERTY_AUTOBIND_LINE_OF_SIGHT_ACTIVE = 3, ///< (RO) Boolean value indicating that the STB has received the Autobind Line of Sight remote code and is within the active period. - CTRLM_PROPERTY_ACTIVE_PERIOD_BUTTON = 4, ///< (RW) Active period (in ms) for button binding. - CTRLM_PROPERTY_ACTIVE_PERIOD_LINE_OF_SIGHT = 5, ///< (RW) Active period (in ms) for line of sight. - CTRLM_PROPERTY_VALIDATION_TIMEOUT_INITIAL = 6, ///< (RW) Timeout value (in ms) used for the start of the validation period. - CTRLM_PROPERTY_VALIDATION_TIMEOUT_DURING = 7, ///< (RW) Timeout value (in ms) used during the validation period. - CTRLM_PROPERTY_CONFIGURATION_TIMEOUT = 8, ///< (RW) Timeout value (in ms) used during the configuration period. - CTRLM_PROPERTY_VALIDATION_MAX_ATTEMPTS = 9, ///< (RW) Maximum number of validation attempts. - CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND = 10, ///< (RW) Active period (in ms) for screenbind. - CTRLM_PROPERTY_ACTIVE_PERIOD_ONE_TOUCH_AUTOBIND = 11, ///< (RW) Active period (in ms) for one-touch autobind. - CTRLM_PROPERTY_REMOTE_REVERSE_CMD_ACTIVE = 12, ///< (RW) Boolean value indicating whether the 'Remote Reverse Command' feature is enabled (1) or not (0). - CTRLM_PROPERTY_MAC_POLLING_INTERVAL = 13, ///< (RW) MAC polling polling interval, in milliseconds. - CTRLM_PROPERTY_RCU_REVERSE_CMD_TIMEOUT = 14, ///< (RW) Find My Remote RC response timeout, Factor of CTRLM_PROPERTY_MAC_POLLING_INTERVAL, min 2 - CTRLM_PROPERTY_AUTO_ACK = 15, ///< (RW) Boolean value indicating whether the 'Automatic Packet Acknowledgment' feature is enabled (1) or not (0). - CTRLM_PROPERTY_MAX = 16, ///< (NA) Maximum property enumeration value. -} ctrlm_property_t; - typedef enum { CTRLM_MAIN_IARM_EVENT_BINDING_BUTTON = 0, ///< Generated when a state change of the binding button status occurs CTRLM_MAIN_IARM_EVENT_BINDING_LINE_OF_SIGHT = 1, ///< Generated when a state change of the line of sight status occurs @@ -357,19 +330,6 @@ typedef enum { typedef unsigned char ctrlm_network_id_t; typedef unsigned char ctrlm_controller_id_t; -typedef struct { - ctrlm_network_id_t id; ///< identifier of the network - ctrlm_network_type_t type; ///< Type of network -} ctrlm_network_t; - -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the operation - ctrlm_network_id_t network_id; ///< IN - identifier of network or CTRLM_MAIN_NETWORK_ID_ALL for all networks - ctrlm_property_t name; ///< Property name on which this call will operate - unsigned long value; ///< Value for this property -} ctrlm_main_iarm_call_property_t; - typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the operation diff --git a/src/ctrlm.h b/src/ctrlm.h index 5266bbcc..f0520b76 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -175,13 +175,6 @@ typedef struct { sem_t * semaphore; } ctrlm_main_queue_msg_main_chip_status_t; -typedef struct { - ctrlm_main_queue_msg_header_t header; - ctrlm_main_iarm_call_property_t *property; - sem_t * semaphore; - ctrlm_main_status_cmd_result_t * cmd_result; -} ctrlm_main_queue_msg_main_property_t; - typedef struct { ctrlm_main_queue_msg_header_t header; ctrlm_main_iarm_call_discovery_config_t *config; @@ -459,9 +452,8 @@ void ctrlm_event_handler_ir(const char *owner, IAR void ctrlm_quit_main_loop(); gboolean ctrlm_power_state_change(ctrlm_power_state_t power_state); -gboolean ctrlm_main_iarm_call_property_set(ctrlm_main_iarm_call_property_t *property); -void ctrlm_main_iarm_call_property_set_(ctrlm_main_iarm_call_property_t *property); -gboolean ctrlm_main_iarm_call_property_get(ctrlm_main_iarm_call_property_t *property); +bool ctrlm_main_active_period_screenbind_timeout_set_(uint32_t timeout); + gboolean ctrlm_main_iarm_call_discovery_config_set(ctrlm_main_iarm_call_discovery_config_t *config); gboolean ctrlm_main_iarm_call_autobind_config_set(ctrlm_main_iarm_call_autobind_config_t *config); gboolean ctrlm_main_iarm_call_precommission_config_set(ctrlm_main_iarm_call_precommision_config_t *config); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 1fc643a5..01e9f38f 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -354,7 +354,6 @@ static void ctrlm_signals_register(void); static void ctrlm_signal_handler(int signal); static gboolean ctrlm_unix_signal_terminate(gpointer user_data); -static void ctrlm_main_iarm_call_property_get_(ctrlm_main_iarm_call_property_t *property); static void ctrlm_main_iarm_call_discovery_config_set_(ctrlm_main_iarm_call_discovery_config_t *config); static void ctrlm_main_iarm_call_autobind_config_set_(ctrlm_main_iarm_call_autobind_config_t *config); static void ctrlm_main_iarm_call_precommission_config_set_(ctrlm_main_iarm_call_precommision_config_t *config); @@ -2500,28 +2499,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET: { - ctrlm_main_queue_msg_main_property_t *dqm = (ctrlm_main_queue_msg_main_property_t *) msg; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET"); - ctrlm_main_iarm_call_property_set_(dqm->property); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_GET: { - ctrlm_main_queue_msg_main_property_t *dqm = (ctrlm_main_queue_msg_main_property_t *) msg; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_GET"); - ctrlm_main_iarm_call_property_get_(dqm->property); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET: { ctrlm_main_queue_msg_main_discovery_config_t *dqm = (ctrlm_main_queue_msg_main_discovery_config_t *) msg; XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET"); @@ -3400,373 +3377,19 @@ void ctrlm_main_iarm_call_last_key_info_get_(ctrlm_main_iarm_call_last_key_info_ } } -gboolean ctrlm_main_iarm_call_property_set(ctrlm_main_iarm_call_property_t *property) { - if(property == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_property_t *msg = (ctrlm_main_queue_msg_main_property_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_property_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET; - msg->header.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - msg->property = property; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process PROPERTY_SET request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - -void ctrlm_main_iarm_call_property_set_(ctrlm_main_iarm_call_property_t *property) { - if(property->network_id != CTRLM_MAIN_NETWORK_ID_ALL && !ctrlm_network_id_is_valid(property->network_id)) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("network id - Out of range %u", property->network_id); - return; - } - - switch(property->name) { - case CTRLM_PROPERTY_BINDING_BUTTON_ACTIVE: { - if(property->value == 0) { - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - ctrlm_timeout_destroy(&g_ctrlm.binding_button_timeout_tag); - // If this was a change, fire the IARM event - if (g_ctrlm.binding_button) { - ctrlm_main_iarm_event_binding_button(false); - } - g_ctrlm.binding_button = false; - XLOGD_INFO("BINDING BUTTON "); - } else if(property->value == 1) { - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - ctrlm_timeout_destroy(&g_ctrlm.binding_button_timeout_tag); - // If this was a change, fire the IARM event - if (!g_ctrlm.binding_button) { - ctrlm_main_iarm_event_binding_button(true); - } - g_ctrlm.binding_button = true; - // If screenbind is enabled, disable it - if(g_ctrlm.binding_screen_active == true) { - g_ctrlm.binding_screen_active = false; - XLOGD_INFO("BINDING SCREEN -- Due to entering button button mode"); - } - // Set a timer to stop binding button mode - g_ctrlm.binding_button_timeout_tag = ctrlm_timeout_create(g_ctrlm.binding_button_timeout_val, ctrlm_timeout_binding_button, NULL); - XLOGD_INFO("BINDING BUTTON "); - } else { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("BINDING BUTTON ACTIVE - Invalid parameter 0x%08lX", property->value); - } - break; - } - case CTRLM_PROPERTY_BINDING_SCREEN_ACTIVE: { - if(property->value == 0) { - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - ctrlm_timeout_destroy(&g_ctrlm.screen_bind_timeout_tag); - g_ctrlm.binding_screen_active = false; - XLOGD_INFO("SCREEN BIND STATE "); - } else if(property->value == 1) { - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - ctrlm_timeout_destroy(&g_ctrlm.screen_bind_timeout_tag); - g_ctrlm.binding_screen_active = true; - // If binding button is enabled, disable it - if(g_ctrlm.binding_button == true) { - g_ctrlm.binding_button = false; - XLOGD_INFO("BINDING SCREEN -- Due to entering button button mode"); - } - // Set a timer to stop screen bind mode - g_ctrlm.screen_bind_timeout_tag = ctrlm_timeout_create(g_ctrlm.screen_bind_timeout_val, ctrlm_timeout_screen_bind, NULL); - XLOGD_INFO("SCREEN BIND STATE "); - } else { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("SCREEN BIND STATE - Invalid parameter 0x%08lX", property->value); - } - break; - } - case CTRLM_PROPERTY_BINDING_LINE_OF_SIGHT_ACTIVE: { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_READ_ONLY; - XLOGD_ERROR("BINDING LINE OF SIGHT ACTIVE - Read only"); - break; - } - case CTRLM_PROPERTY_AUTOBIND_LINE_OF_SIGHT_ACTIVE:{ - property->result = CTRLM_IARM_CALL_RESULT_ERROR_READ_ONLY; - XLOGD_ERROR("AUTOBIND LINE OF SIGHT ACTIVE - Read only"); - break; - } - case CTRLM_PROPERTY_ACTIVE_PERIOD_BUTTON: { - if(property->value < CTRLM_PROPERTY_ACTIVE_PERIOD_BUTTON_VALUE_MIN || property->value > CTRLM_PROPERTY_ACTIVE_PERIOD_BUTTON_VALUE_MAX) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("ACTIVE PERIOD BUTTON - Out of range %lu", property->value); - } else { - g_ctrlm.binding_button_timeout_val = property->value; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("ACTIVE PERIOD BUTTON %lu ms", property->value); - } - break; - } - case CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND: { - if(property->value < CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND_VALUE_MIN || property->value > CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND_VALUE_MAX) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("ACTIVE PERIOD SCREENBIND - Out of range %lu", property->value); - } else { - g_ctrlm.screen_bind_timeout_val = property->value; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("ACTIVE PERIOD SCREENBIND %lu ms", property->value); - } - break; - } - case CTRLM_PROPERTY_ACTIVE_PERIOD_ONE_TOUCH_AUTOBIND: { - if(property->value < CTRLM_PROPERTY_ACTIVE_PERIOD_ONE_TOUCH_AUTOBIND_VALUE_MIN || property->value > CTRLM_PROPERTY_ACTIVE_PERIOD_ONE_TOUCH_AUTOBIND_VALUE_MAX) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_TELEMETRY("ACTIVE PERIOD ONE-TOUCH AUTOBIND - Out of range %lu", property->value); - } else { - g_ctrlm.one_touch_autobind_timeout_val = property->value; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("ACTIVE PERIOD ONE-TOUCH AUTOBIND %lu ms", property->value); - } - break; - } - case CTRLM_PROPERTY_ACTIVE_PERIOD_LINE_OF_SIGHT: { - if(property->value < CTRLM_PROPERTY_ACTIVE_PERIOD_LINE_OF_SIGHT_VALUE_MIN || property->value > CTRLM_PROPERTY_ACTIVE_PERIOD_LINE_OF_SIGHT_VALUE_MAX) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("ACTIVE PERIOD LINE OF SIGHT - Out of range %lu", property->value); - } else { - g_ctrlm.line_of_sight_timeout_val = property->value; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("ACTIVE PERIOD LINE OF SIGHT %lu ms", property->value); - } - break; - } - case CTRLM_PROPERTY_VALIDATION_TIMEOUT_INITIAL: { - if(property->value < CTRLM_PROPERTY_VALIDATION_TIMEOUT_MIN || property->value > CTRLM_PROPERTY_VALIDATION_TIMEOUT_MAX) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("VALIDATION TIMEOUT INITIAL - Out of range %lu", property->value); - } else { - ctrlm_validation_timeout_initial_set(property->value); - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("VALIDATION TIMEOUT INITIAL %lu ms", property->value); - } - break; - } - case CTRLM_PROPERTY_VALIDATION_TIMEOUT_DURING: { - if(property->value < CTRLM_PROPERTY_VALIDATION_TIMEOUT_MIN || property->value > CTRLM_PROPERTY_VALIDATION_TIMEOUT_MAX) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("VALIDATION TIMEOUT DURING - Out of range %lu", property->value); - } else { - ctrlm_validation_timeout_subsequent_set(property->value); - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("VALIDATION TIMEOUT DURING %lu ms", property->value); - } - break; - } - case CTRLM_PROPERTY_VALIDATION_MAX_ATTEMPTS: { - if(property->value > CTRLM_PROPERTY_VALIDATION_MAX_ATTEMPTS_MAX) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("VALIDATION MAX ATTEMPTS - Out of range %lu", property->value); - } else { - ctrlm_validation_max_attempts_set(property->value); - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("VALIDATION MAX ATTEMPTS %lu times", property->value); - } - break; - } - case CTRLM_PROPERTY_CONFIGURATION_TIMEOUT: { - if(property->value < CTRLM_PROPERTY_CONFIGURATION_TIMEOUT_MIN || property->value > CTRLM_PROPERTY_CONFIGURATION_TIMEOUT_MAX) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("CONFIGURATION TIMEOUT - Out of range %lu", property->value); - } else { - ctrlm_validation_timeout_configuration_set(property->value); - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("CONFIGURATION TIMEOUT %lu ms", property->value); - } - break; - } - case CTRLM_PROPERTY_AUTO_ACK: { - if(ctrlm_is_production_build()) { - XLOGD_ERROR("AUTO ACK - unable to set in prod build"); - } else { - g_ctrlm.auto_ack = property->value ? true : false; - - if(g_ctrlm.rf4ce_enabled) { - #if CTRLM_HAL_RF4CE_API_VERSION >= 16 - for(auto const &itr : g_ctrlm.networks) { - if(itr.second->type_get() == CTRLM_NETWORK_TYPE_RF4CE) { - itr.second->property_set(CTRLM_HAL_NETWORK_PROPERTY_AUTO_ACK, &g_ctrlm.auto_ack); - } - } - #endif - } - - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("AUTO ACK <%s>", property->value ? "enabled" : "disabled"); - } - break; - } - default: { - XLOGD_ERROR("Invalid Property %d", property->name); - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - } - } -} - -gboolean ctrlm_main_iarm_call_property_get(ctrlm_main_iarm_call_property_t *property) { - if(property == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // Signal completion of the operation - sem_t semaphore; - ctrlm_main_status_cmd_result_t cmd_result = CTRLM_MAIN_STATUS_REQUEST_PENDING; +bool ctrlm_main_active_period_screenbind_timeout_set_(uint32_t timeout) { - // Allocate a message and send it to Control Manager's queue - ctrlm_main_queue_msg_main_property_t *msg = (ctrlm_main_queue_msg_main_property_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_property_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); + if(timeout < CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND_VALUE_MIN || timeout > CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND_VALUE_MAX) { + XLOGD_ERROR("ACTIVE PERIOD SCREENBIND - Out of range %lu", timeout); return(false); } - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_GET; - msg->header.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - msg->property = property; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process PROPERTY_GET request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - -void ctrlm_main_iarm_call_property_get_(ctrlm_main_iarm_call_property_t *property) { - if(property->network_id != CTRLM_MAIN_NETWORK_ID_ALL && !ctrlm_network_id_is_valid(property->network_id)) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("network id - Out of range %u", property->network_id); - return; - } - - switch(property->name) { - case CTRLM_PROPERTY_BINDING_BUTTON_ACTIVE: { - property->value = g_ctrlm.binding_button; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("BINDING BUTTON <%s>", g_ctrlm.binding_button ? "ACTIVE" : "INACTIVE"); - break; - } - case CTRLM_PROPERTY_BINDING_SCREEN_ACTIVE: { - property->value = g_ctrlm.binding_screen_active; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("BINDING SCREEN <%s>", g_ctrlm.binding_screen_active ? "ACTIVE" : "INACTIVE"); - break; - } - case CTRLM_PROPERTY_BINDING_LINE_OF_SIGHT_ACTIVE: { - property->value = g_ctrlm.line_of_sight; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("BINDING LINE OF SIGHT <%s>", g_ctrlm.line_of_sight ? "ACTIVE" : "INACTIVE"); - break; - } - case CTRLM_PROPERTY_AUTOBIND_LINE_OF_SIGHT_ACTIVE: { - property->value = g_ctrlm.autobind; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("AUTOBIND LINE OF SIGHT <%s>", g_ctrlm.autobind ? "ACTIVE" : "INACTIVE"); - break; - } - case CTRLM_PROPERTY_ACTIVE_PERIOD_BUTTON: { - property->value = g_ctrlm.binding_button_timeout_val; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("ACTIVE PERIOD BUTTON %lu ms", property->value); - break; - } - case CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND: { - property->value = g_ctrlm.screen_bind_timeout_val; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("ACTIVE PERIOD SCREENBIND %lu ms", property->value); - break; - } - case CTRLM_PROPERTY_ACTIVE_PERIOD_ONE_TOUCH_AUTOBIND: { - property->value = g_ctrlm.one_touch_autobind_timeout_val; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("ACTIVE PERIOD ONE-TOUCH AUTOBIND %lu ms", property->value); - break; - } - case CTRLM_PROPERTY_ACTIVE_PERIOD_LINE_OF_SIGHT: { - property->value = g_ctrlm.line_of_sight_timeout_val; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("ACTIVE PERIOD LINE OF SIGHT %lu ms", property->value); - break; - } - case CTRLM_PROPERTY_VALIDATION_TIMEOUT_INITIAL: { - property->value = ctrlm_validation_timeout_initial_get(); - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("VALIDATION TIMEOUT INITIAL %lu ms", property->value); - break; - } - case CTRLM_PROPERTY_VALIDATION_TIMEOUT_DURING: { - property->value = ctrlm_validation_timeout_subsequent_get(); - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("VALIDATION TIMEOUT DURING %lu ms", property->value); - break; - } - case CTRLM_PROPERTY_VALIDATION_MAX_ATTEMPTS: { - property->value = ctrlm_validation_max_attempts_get(); - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("VALIDATION MAX ATTEMPTS %lu times", property->value); - break; - } - case CTRLM_PROPERTY_CONFIGURATION_TIMEOUT: { - property->value = ctrlm_validation_timeout_configuration_get(); - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("CONFIGURATION TIMEOUT %lu ms", property->value); - break; - } - case CTRLM_PROPERTY_AUTO_ACK: { - property->value = g_ctrlm.auto_ack; - property->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - XLOGD_INFO("AUTO ACK <%s>", property->value ? "enabled" : "disabled"); - break; - } - default: { - XLOGD_ERROR("Invalid Property %d", property->name); - property->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - } - } + g_ctrlm.screen_bind_timeout_val = timeout; + XLOGD_INFO("ACTIVE PERIOD SCREENBIND %lu ms", timeout); + + return(true); } - gboolean ctrlm_main_iarm_call_discovery_config_set(ctrlm_main_iarm_call_discovery_config_t *config) { if(config == NULL) { XLOGD_ERROR("NULL parameter"); diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index f4b52537..e15517a0 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -37,8 +37,6 @@ #include "dsMgr.h" #include "dsRpc.h" -static IARM_Result_t ctrlm_main_iarm_call_property_set(void *arg); -static IARM_Result_t ctrlm_main_iarm_call_property_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_discovery_config_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_autobind_config_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_precommission_config_set(void *arg); @@ -71,8 +69,6 @@ static volatile int running = 0; // Array to hold the IARM Calls that will be registered by Control Manager ctrlm_iarm_call_t ctrlm_iarm_calls[] = { - {CTRLM_MAIN_IARM_CALL_PROPERTY_SET, ctrlm_main_iarm_call_property_set }, - {CTRLM_MAIN_IARM_CALL_PROPERTY_GET, ctrlm_main_iarm_call_property_get }, {CTRLM_MAIN_IARM_CALL_DISCOVERY_CONFIG_SET, ctrlm_main_iarm_call_discovery_config_set }, {CTRLM_MAIN_IARM_CALL_AUTOBIND_CONFIG_SET, ctrlm_main_iarm_call_autobind_config_set }, {CTRLM_MAIN_IARM_CALL_PRECOMMISSION_CONFIG_SET, ctrlm_main_iarm_call_precommission_config_set }, @@ -188,46 +184,6 @@ IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_property_set(void *arg) { - ctrlm_main_iarm_call_property_t *property = (ctrlm_main_iarm_call_property_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(NULL == property) { - XLOGD_ERROR("NULL Property Argument"); - g_assert(0); - return(IARM_RESULT_INVALID_PARAM); - } - XLOGD_INFO(""); - - if(!ctrlm_main_iarm_call_property_set(property)) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - -IARM_Result_t ctrlm_main_iarm_call_property_get(void *arg) { - ctrlm_main_iarm_call_property_t *property = (ctrlm_main_iarm_call_property_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(NULL == property) { - XLOGD_ERROR("NULL Property Argument"); - g_assert(0); - return(IARM_RESULT_INVALID_PARAM); - } - XLOGD_INFO(""); - - if(!ctrlm_main_iarm_call_property_get(property)) { - property->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_discovery_config_set(void *arg) { ctrlm_main_iarm_call_discovery_config_t *config = (ctrlm_main_iarm_call_discovery_config_t *)arg; diff --git a/src/rf4ce/ctrlm_rf4ce_network.cpp b/src/rf4ce/ctrlm_rf4ce_network.cpp index db3b3b12..82674870 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.cpp +++ b/src/rf4ce/ctrlm_rf4ce_network.cpp @@ -4870,15 +4870,8 @@ void ctrlm_obj_network_rf4ce_t::req_process_start_pairing(void *data, int size) dqm->params->set_result(CTRLM_IARM_CALL_RESULT_SUCCESS, network_id_get()); } else { if(dqm->params->timeout != 0) { // use a timeout - ctrlm_main_iarm_call_property_t property = {}; - property.api_revision = CTRLM_MAIN_IARM_BUS_API_REVISION; - property.result = CTRLM_IARM_CALL_RESULT_INVALID; - property.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - property.name = CTRLM_PROPERTY_ACTIVE_PERIOD_SCREENBIND; - property.value = dqm->params->timeout * 1000; - - ctrlm_main_iarm_call_property_set_(&property); - if (property.result != CTRLM_IARM_CALL_RESULT_SUCCESS) { + + if(!ctrlm_main_active_period_screenbind_timeout_set_(dqm->params->timeout * 1000)) { XLOGD_ERROR("Failed to set ACTIVE PERIOD SCREENBIND property"); set_rf_pair_state(CTRLM_RF_PAIR_STATE_FAILED); dqm->params->set_result(CTRLM_IARM_CALL_RESULT_ERROR, network_id_get()); From 0615c972cf485899c306f5870411ee24fcf27ee5 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Wed, 1 Jul 2026 18:02:40 -0400 Subject: [PATCH 05/21] remove discovery config set iarm call --- include/ctrlm_ipc.h | 8 ----- src/ctrlm.h | 11 ------- src/ctrlm_main.cpp | 72 ----------------------------------------- src/ctrlm_main_iarm.cpp | 28 ---------------- src/ctrlm_utils.cpp | 3 -- 5 files changed, 122 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index d8169f0e..a177af39 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -330,14 +330,6 @@ typedef enum { typedef unsigned char ctrlm_network_id_t; typedef unsigned char ctrlm_controller_id_t; -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the operation - ctrlm_network_id_t network_id; ///< IN - identifier of network or CTRLM_MAIN_NETWORK_ID_ALL for all networks - unsigned char enable; ///< Enable (1) or disable (0) open discovery - unsigned char require_line_of_sight; ///< Require (1) or do not require (0) line of sight to respond to discovery requests -} ctrlm_main_iarm_call_discovery_config_t; - typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the operation diff --git a/src/ctrlm.h b/src/ctrlm.h index f0520b76..c2ebe9bd 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -81,9 +81,6 @@ typedef enum { // Global messages CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE = CTRLM_MAIN_QUEUE_MSG_TYPE_GLOBAL + 1, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_GET, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_FACTORY_RESET, @@ -175,13 +172,6 @@ typedef struct { sem_t * semaphore; } ctrlm_main_queue_msg_main_chip_status_t; -typedef struct { - ctrlm_main_queue_msg_header_t header; - ctrlm_main_iarm_call_discovery_config_t *config; - sem_t * semaphore; - ctrlm_main_status_cmd_result_t * cmd_result; -} ctrlm_main_queue_msg_main_discovery_config_t; - typedef struct { ctrlm_main_queue_msg_header_t header; ctrlm_main_iarm_call_autobind_config_t *config; @@ -454,7 +444,6 @@ gboolean ctrlm_power_state_change(ctrlm_power_state_t bool ctrlm_main_active_period_screenbind_timeout_set_(uint32_t timeout); -gboolean ctrlm_main_iarm_call_discovery_config_set(ctrlm_main_iarm_call_discovery_config_t *config); gboolean ctrlm_main_iarm_call_autobind_config_set(ctrlm_main_iarm_call_autobind_config_t *config); gboolean ctrlm_main_iarm_call_precommission_config_set(ctrlm_main_iarm_call_precommision_config_t *config); gboolean ctrlm_main_iarm_call_factory_reset(ctrlm_main_iarm_call_factory_reset_t *reset); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 01e9f38f..3713f7ef 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -354,7 +354,6 @@ static void ctrlm_signals_register(void); static void ctrlm_signal_handler(int signal); static gboolean ctrlm_unix_signal_terminate(gpointer user_data); -static void ctrlm_main_iarm_call_discovery_config_set_(ctrlm_main_iarm_call_discovery_config_t *config); static void ctrlm_main_iarm_call_autobind_config_set_(ctrlm_main_iarm_call_autobind_config_t *config); static void ctrlm_main_iarm_call_precommission_config_set_(ctrlm_main_iarm_call_precommision_config_t *config); static void ctrlm_main_iarm_call_factory_reset_(ctrlm_main_iarm_call_factory_reset_t *reset); @@ -2499,17 +2498,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET: { - ctrlm_main_queue_msg_main_discovery_config_t *dqm = (ctrlm_main_queue_msg_main_discovery_config_t *) msg; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET"); - ctrlm_main_iarm_call_discovery_config_set_(dqm->config); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET: { ctrlm_main_queue_msg_main_autobind_config_t *dqm = (ctrlm_main_queue_msg_main_autobind_config_t *) msg; XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET"); @@ -3390,66 +3378,6 @@ bool ctrlm_main_active_period_screenbind_timeout_set_(uint32_t timeout) { return(true); } -gboolean ctrlm_main_iarm_call_discovery_config_set(ctrlm_main_iarm_call_discovery_config_t *config) { - if(config == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_discovery_config_t *msg = (ctrlm_main_queue_msg_main_discovery_config_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_discovery_config_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET; - msg->header.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - msg->config = config; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process DISCOVERY_CONFIG_SET request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - -void ctrlm_main_iarm_call_discovery_config_set_(ctrlm_main_iarm_call_discovery_config_t *config) { - if(config->network_id != CTRLM_MAIN_NETWORK_ID_ALL && !ctrlm_network_id_is_valid(config->network_id)) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("network id - Out of range %u", config->network_id); - return; - } - config->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - ctrlm_controller_discovery_config_t discovery_config; - discovery_config.enabled = config->enable ? true : false; - discovery_config.require_line_of_sight = config->require_line_of_sight ? true : false; - - for(auto const &itr : g_ctrlm.networks) { - if(config->network_id == itr.first || config->network_id == CTRLM_MAIN_NETWORK_ID_ALL) { - itr.second->discovery_config_set(discovery_config); - config->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - } - } -} - gboolean ctrlm_main_iarm_call_autobind_config_set(ctrlm_main_iarm_call_autobind_config_t *config) { if(config == NULL) { XLOGD_ERROR("NULL parameter"); diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index e15517a0..60cc0243 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -37,7 +37,6 @@ #include "dsMgr.h" #include "dsRpc.h" -static IARM_Result_t ctrlm_main_iarm_call_discovery_config_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_autobind_config_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_precommission_config_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_controller_unbind(void *arg); @@ -69,7 +68,6 @@ static volatile int running = 0; // Array to hold the IARM Calls that will be registered by Control Manager ctrlm_iarm_call_t ctrlm_iarm_calls[] = { - {CTRLM_MAIN_IARM_CALL_DISCOVERY_CONFIG_SET, ctrlm_main_iarm_call_discovery_config_set }, {CTRLM_MAIN_IARM_CALL_AUTOBIND_CONFIG_SET, ctrlm_main_iarm_call_autobind_config_set }, {CTRLM_MAIN_IARM_CALL_PRECOMMISSION_CONFIG_SET, ctrlm_main_iarm_call_precommission_config_set }, {CTRLM_MAIN_IARM_CALL_CONTROLLER_UNBIND, ctrlm_main_iarm_call_controller_unbind }, @@ -184,32 +182,6 @@ IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_discovery_config_set(void *arg) { - ctrlm_main_iarm_call_discovery_config_t *config = (ctrlm_main_iarm_call_discovery_config_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(NULL == config) { - XLOGD_ERROR("NULL Property Argument"); - g_assert(0); - return(IARM_RESULT_INVALID_PARAM); - } - - if(config->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", config->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - config->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO(""); - - if(!ctrlm_main_iarm_call_discovery_config_set(config)) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_autobind_config_set(void *arg) { ctrlm_main_iarm_call_autobind_config_t *config = (ctrlm_main_iarm_call_autobind_config_t *)arg; diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index 31189f8c..05780dc1 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -332,9 +332,6 @@ const char *ctrlm_main_queue_msg_type_str(ctrlm_main_queue_msg_type_t type) { case CTRLM_MAIN_QUEUE_MSG_TYPE_BIND_CONFIGURATION_COMPLETE: return("BIND_CONFIGURATION_COMPLETE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_NETWORK_PROPERTY_SET: return("NETWORK_PROPERTY_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE: return("TERMINATE"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_SET: return("MAIN_PROPERTY_SET"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PROPERTY_GET: return("MAIN_PROPERTY_GET"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_DISCOVERY_CONFIG_SET: return("MAIN_DISCOVERY_CONFIG_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET: return("MAIN_AUTOBIND_CONFIG_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET: return("MAIN_PRECOMMISSION_CONFIG_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_FACTORY_RESET: return("MAIN_FACTORY_RESET"); From 67e85538c1ee67152f6342456654870221cf0ea2 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Wed, 1 Jul 2026 18:16:19 -0400 Subject: [PATCH 06/21] remove autobind config set iarm call --- include/ctrlm_ipc.h | 12 ------ src/ctrlm.h | 9 ---- src/ctrlm_main.cpp | 94 ----------------------------------------- src/ctrlm_main_iarm.cpp | 25 ----------- src/ctrlm_utils.cpp | 1 - 5 files changed, 141 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index a177af39..252676cc 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -26,9 +26,6 @@ #define CTRLM_MAIN_IARM_BUS_NAME "Ctrlm" ///< Control Manager's IARM Bus Name #define CTRLM_MAIN_IARM_BUS_API_REVISION (16) ///< Revision of the Control Manager Main IARM API -#define CTRLM_MAIN_IARM_CALL_PROPERTY_GET "Main_PropertyGet" ///< Gets a property of the Control Manager -#define CTRLM_MAIN_IARM_CALL_DISCOVERY_CONFIG_SET "Main_DiscoveryConfigSet" ///< Sets the discovery settings -#define CTRLM_MAIN_IARM_CALL_AUTOBIND_CONFIG_SET "Main_AutobindConfigSet" ///< Sets the autobind settings #define CTRLM_MAIN_IARM_CALL_PRECOMMISSION_CONFIG_SET "Main_PrecommissionConfigSet" ///< Sets the pre-commission settings #define CTRLM_MAIN_IARM_CALL_FACTORY_RESET "Main_FactoryReset" ///< Sets the configuration back to factory default #define CTRLM_MAIN_IARM_CALL_CONTROLLER_UNBIND "Main_ControllerUnbind" ///< Removes a binding between the target and the specified controller @@ -330,15 +327,6 @@ typedef enum { typedef unsigned char ctrlm_network_id_t; typedef unsigned char ctrlm_controller_id_t; -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the operation - ctrlm_network_id_t network_id; ///< IN - identifier of network or CTRLM_MAIN_NETWORK_ID_ALL for all networks - unsigned char enable; ///< Enable (1) or disable (0) autobinding. - unsigned char threshold_pass; ///< Number of successful pairing attempts required to complete autobinding successfully - unsigned char threshold_fail; ///< Number of unsuccessful pairing attempts required to complete autobinding unsuccessfully -} ctrlm_main_iarm_call_autobind_config_t; - typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the operation diff --git a/src/ctrlm.h b/src/ctrlm.h index c2ebe9bd..f8b10290 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -81,7 +81,6 @@ typedef enum { // Global messages CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE = CTRLM_MAIN_QUEUE_MSG_TYPE_GLOBAL + 1, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_FACTORY_RESET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROLLER_UNBIND, @@ -172,13 +171,6 @@ typedef struct { sem_t * semaphore; } ctrlm_main_queue_msg_main_chip_status_t; -typedef struct { - ctrlm_main_queue_msg_header_t header; - ctrlm_main_iarm_call_autobind_config_t *config; - sem_t * semaphore; - ctrlm_main_status_cmd_result_t * cmd_result; -} ctrlm_main_queue_msg_main_autobind_config_t; - typedef struct { ctrlm_main_queue_msg_header_t header; ctrlm_main_iarm_call_precommision_config_t *config; @@ -444,7 +436,6 @@ gboolean ctrlm_power_state_change(ctrlm_power_state_t bool ctrlm_main_active_period_screenbind_timeout_set_(uint32_t timeout); -gboolean ctrlm_main_iarm_call_autobind_config_set(ctrlm_main_iarm_call_autobind_config_t *config); gboolean ctrlm_main_iarm_call_precommission_config_set(ctrlm_main_iarm_call_precommision_config_t *config); gboolean ctrlm_main_iarm_call_factory_reset(ctrlm_main_iarm_call_factory_reset_t *reset); gboolean ctrlm_main_iarm_call_controller_unbind(ctrlm_main_iarm_call_controller_unbind_t *unbind); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 3713f7ef..b92a1ba6 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -354,7 +354,6 @@ static void ctrlm_signals_register(void); static void ctrlm_signal_handler(int signal); static gboolean ctrlm_unix_signal_terminate(gpointer user_data); -static void ctrlm_main_iarm_call_autobind_config_set_(ctrlm_main_iarm_call_autobind_config_t *config); static void ctrlm_main_iarm_call_precommission_config_set_(ctrlm_main_iarm_call_precommision_config_t *config); static void ctrlm_main_iarm_call_factory_reset_(ctrlm_main_iarm_call_factory_reset_t *reset); static void ctrlm_main_iarm_call_controller_unbind_(ctrlm_main_iarm_call_controller_unbind_t *unbind); @@ -2498,17 +2497,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET: { - ctrlm_main_queue_msg_main_autobind_config_t *dqm = (ctrlm_main_queue_msg_main_autobind_config_t *) msg; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET"); - ctrlm_main_iarm_call_autobind_config_set_(dqm->config); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET: { ctrlm_main_queue_msg_main_precommision_config_t *dqm = (ctrlm_main_queue_msg_main_precommision_config_t *) msg; XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET"); @@ -3378,88 +3366,6 @@ bool ctrlm_main_active_period_screenbind_timeout_set_(uint32_t timeout) { return(true); } -gboolean ctrlm_main_iarm_call_autobind_config_set(ctrlm_main_iarm_call_autobind_config_t *config) { - if(config == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_autobind_config_t *msg = (ctrlm_main_queue_msg_main_autobind_config_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_autobind_config_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET; - msg->header.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - msg->config = config; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process AUTOBIND_CONFIG_SET request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - -void ctrlm_main_iarm_call_autobind_config_set_(ctrlm_main_iarm_call_autobind_config_t *config) { - if(config->network_id != CTRLM_MAIN_NETWORK_ID_ALL && !ctrlm_network_id_is_valid(config->network_id)) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("network id - Out of range %u", config->network_id); - return; - } - - ctrlm_timeout_destroy(&g_ctrlm.one_touch_autobind_timeout_tag); - - if(config->threshold_pass < CTRLM_AUTOBIND_THRESHOLD_MIN || config->threshold_pass > CTRLM_AUTOBIND_THRESHOLD_MAX) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("threshold pass - Out of range %u", config->threshold_pass); - } else if(config->threshold_fail < CTRLM_AUTOBIND_THRESHOLD_MIN || config->threshold_fail > CTRLM_AUTOBIND_THRESHOLD_MAX) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("threshold fail - Out of range %u", config->threshold_fail); - } else { - // If screenbind is enabled, disable it - if(g_ctrlm.binding_screen_active == true) { - g_ctrlm.binding_screen_active = false; - XLOGD_INFO("BINDING SCREEN -- Due to autobind config being set"); - } - - config->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - - ctrlm_controller_bind_config_t bind_config; - bind_config.mode = CTRLM_PAIRING_MODE_ONE_TOUCH_AUTO_BIND; - bind_config.data.autobind.enable = (config->enable ? true : false); - bind_config.data.autobind.pass_threshold = config->threshold_pass; - bind_config.data.autobind.fail_threshold = config->threshold_fail; - - for(auto const &itr : g_ctrlm.networks) { - if(config->network_id == itr.first || config->network_id == CTRLM_MAIN_NETWORK_ID_ALL) { - itr.second->binding_config_set(bind_config); - config->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - } - } - // Set a timer to stop one touch autobind mode - g_ctrlm.one_touch_autobind_timeout_tag = ctrlm_timeout_create(g_ctrlm.one_touch_autobind_timeout_val, ctrlm_timeout_one_touch_autobind, NULL); - } -} - gboolean ctrlm_main_iarm_call_precommission_config_set(ctrlm_main_iarm_call_precommision_config_t *config) { if(config == NULL) { XLOGD_ERROR("NULL parameter"); diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index 60cc0243..b72cfd8e 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -37,7 +37,6 @@ #include "dsMgr.h" #include "dsRpc.h" -static IARM_Result_t ctrlm_main_iarm_call_autobind_config_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_precommission_config_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_controller_unbind(void *arg); static IARM_Result_t ctrlm_main_iarm_call_ir_remote_usage_get(void *arg); @@ -68,7 +67,6 @@ static volatile int running = 0; // Array to hold the IARM Calls that will be registered by Control Manager ctrlm_iarm_call_t ctrlm_iarm_calls[] = { - {CTRLM_MAIN_IARM_CALL_AUTOBIND_CONFIG_SET, ctrlm_main_iarm_call_autobind_config_set }, {CTRLM_MAIN_IARM_CALL_PRECOMMISSION_CONFIG_SET, ctrlm_main_iarm_call_precommission_config_set }, {CTRLM_MAIN_IARM_CALL_CONTROLLER_UNBIND, ctrlm_main_iarm_call_controller_unbind }, {CTRLM_MAIN_IARM_CALL_IR_REMOTE_USAGE_GET, ctrlm_main_iarm_call_ir_remote_usage_get }, @@ -182,29 +180,6 @@ IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_autobind_config_set(void *arg) { - ctrlm_main_iarm_call_autobind_config_t *config = (ctrlm_main_iarm_call_autobind_config_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(NULL == config) { - XLOGD_ERROR("NULL Property Argument"); - g_assert(0); - return(IARM_RESULT_INVALID_PARAM); - } - if(config->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", config->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - config->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - if(!ctrlm_main_iarm_call_autobind_config_set(config)) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_precommission_config_set(void *arg) { ctrlm_main_iarm_call_precommision_config_t *config = (ctrlm_main_iarm_call_precommision_config_t *)arg; diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index 05780dc1..2fc24e3e 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -332,7 +332,6 @@ const char *ctrlm_main_queue_msg_type_str(ctrlm_main_queue_msg_type_t type) { case CTRLM_MAIN_QUEUE_MSG_TYPE_BIND_CONFIGURATION_COMPLETE: return("BIND_CONFIGURATION_COMPLETE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_NETWORK_PROPERTY_SET: return("NETWORK_PROPERTY_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE: return("TERMINATE"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_AUTOBIND_CONFIG_SET: return("MAIN_AUTOBIND_CONFIG_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET: return("MAIN_PRECOMMISSION_CONFIG_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_FACTORY_RESET: return("MAIN_FACTORY_RESET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROLLER_UNBIND: return("MAIN_CONTROLLER_UNBIND"); From 3dc8b89b54a9e23d9ed985c05a79837f02684e2d Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Thu, 2 Jul 2026 13:51:38 -0400 Subject: [PATCH 07/21] remove precommission config set iarm call --- include/ctrlm_ipc.h | 12 +------ src/ctrlm.h | 9 ----- src/ctrlm_main.cpp | 73 ----------------------------------------- src/ctrlm_main_iarm.cpp | 25 -------------- src/ctrlm_utils.cpp | 1 - 5 files changed, 1 insertion(+), 119 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index 252676cc..5da888af 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -26,7 +26,6 @@ #define CTRLM_MAIN_IARM_BUS_NAME "Ctrlm" ///< Control Manager's IARM Bus Name #define CTRLM_MAIN_IARM_BUS_API_REVISION (16) ///< Revision of the Control Manager Main IARM API -#define CTRLM_MAIN_IARM_CALL_PRECOMMISSION_CONFIG_SET "Main_PrecommissionConfigSet" ///< Sets the pre-commission settings #define CTRLM_MAIN_IARM_CALL_FACTORY_RESET "Main_FactoryReset" ///< Sets the configuration back to factory default #define CTRLM_MAIN_IARM_CALL_CONTROLLER_UNBIND "Main_ControllerUnbind" ///< Removes a binding between the target and the specified controller #define CTRLM_MAIN_IARM_CALL_IR_REMOTE_USAGE_GET "Main_IrRemoteUsageGet" ///< Retrieves the ir remote usage info @@ -42,7 +41,7 @@ #define CTRLM_MAIN_IARM_CALL_AUDIO_CAPTURE_START "Main_AudioCaptureStart" ///< Sends message to xraudio to capture mic data, in specified container #define CTRLM_MAIN_IARM_CALL_AUDIO_CAPTURE_STOP "Main_AudioCaptureStop" ///< Sends message to xraudio to stop capturing mic data #define CTRLM_MAIN_IARM_CALL_POWER_STATE_CHANGE "Main_PowerStateChange" ///< Sends message to xr-speech-router to set power state, download DSP firmware, etc -// IARM calls for the IR Database + #define CTRLM_MAIN_IARM_CALL_IR_CODES "Main_IRCodes" ///< IARM Call to retrieve IR Codes based on type, manufacturer, and model #define CTRLM_MAIN_IARM_CALL_IR_MANUFACTURERS "Main_IRManufacturers" ///< IARM Call to retrieve list of manufacturers, based on (partial) name #define CTRLM_MAIN_IARM_CALL_IR_MODELS "Main_IRModels" ///< IARM Call to retrieve list of models, based on (partial) name @@ -51,7 +50,6 @@ #define CTRLM_MAIN_IARM_CALL_IR_CLEAR_CODE "Main_IRClear" ///< IARM Call to clear all IR Codes from a specified BLE remote #define CTRLM_MAIN_IARM_CALL_IR_INITIALIZE "Main_IRInitialize" ///< IARM Call to initialize the IR database -// For Remote Plugin, only used for BLE currently, refactoring needed in other networks to use this interface #define CTRLM_MAIN_IARM_CALL_GET_RCU_STATUS "Main_GetRcuStatus" ///< IARM Call get the RCU status info (same as what's provided by CTRLM_RCU_IARM_EVENT_RCU_STATUS) #define CTRLM_MAIN_IARM_CALL_START_PAIRING "Main_StartPairing" ///< IARM Call to initiate searching for a remote to pair with #define CTRLM_MAIN_IARM_CALL_START_PAIR_WITH_CODE "Main_StartPairWithCode" ///< IARM Call to initiate searching for a remote to pair with @@ -327,14 +325,6 @@ typedef enum { typedef unsigned char ctrlm_network_id_t; typedef unsigned char ctrlm_controller_id_t; -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the operation - ctrlm_network_id_t network_id; ///< IN - identifier of network or CTRLM_MAIN_NETWORK_ID_ALL for all networks - unsigned long controller_qty; ///< Number of precommissioned controllers - unsigned long long controllers[CTRLM_MAIN_MAX_BOUND_CONTROLLERS]; ///< IEEE Address for precommissioned controllers -} ctrlm_main_iarm_call_precommision_config_t; - typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the IARM call diff --git a/src/ctrlm.h b/src/ctrlm.h index f8b10290..9e819382 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -81,7 +81,6 @@ typedef enum { // Global messages CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE = CTRLM_MAIN_QUEUE_MSG_TYPE_GLOBAL + 1, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_FACTORY_RESET, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROLLER_UNBIND, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_IR_LINE_OF_SIGHT, @@ -171,13 +170,6 @@ typedef struct { sem_t * semaphore; } ctrlm_main_queue_msg_main_chip_status_t; -typedef struct { - ctrlm_main_queue_msg_header_t header; - ctrlm_main_iarm_call_precommision_config_t *config; - sem_t * semaphore; - ctrlm_main_status_cmd_result_t * cmd_result; -} ctrlm_main_queue_msg_main_precommision_config_t; - typedef struct { ctrlm_iarm_call_result_t result; ctrlm_network_id_t network_id; @@ -436,7 +428,6 @@ gboolean ctrlm_power_state_change(ctrlm_power_state_t bool ctrlm_main_active_period_screenbind_timeout_set_(uint32_t timeout); -gboolean ctrlm_main_iarm_call_precommission_config_set(ctrlm_main_iarm_call_precommision_config_t *config); gboolean ctrlm_main_iarm_call_factory_reset(ctrlm_main_iarm_call_factory_reset_t *reset); gboolean ctrlm_main_iarm_call_controller_unbind(ctrlm_main_iarm_call_controller_unbind_t *unbind); gboolean ctrlm_main_iarm_call_ir_remote_usage_get(ctrlm_main_iarm_call_ir_remote_usage_t *ir_remote_usage); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index b92a1ba6..2eaff159 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -354,7 +354,6 @@ static void ctrlm_signals_register(void); static void ctrlm_signal_handler(int signal); static gboolean ctrlm_unix_signal_terminate(gpointer user_data); -static void ctrlm_main_iarm_call_precommission_config_set_(ctrlm_main_iarm_call_precommision_config_t *config); static void ctrlm_main_iarm_call_factory_reset_(ctrlm_main_iarm_call_factory_reset_t *reset); static void ctrlm_main_iarm_call_controller_unbind_(ctrlm_main_iarm_call_controller_unbind_t *unbind); static void ctrlm_main_update_export_controller_list(void); @@ -2497,17 +2496,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET: { - ctrlm_main_queue_msg_main_precommision_config_t *dqm = (ctrlm_main_queue_msg_main_precommision_config_t *) msg; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET"); - ctrlm_main_iarm_call_precommission_config_set_(dqm->config); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_FACTORY_RESET: { ctrlm_main_queue_msg_main_factory_reset_t *dqm = (ctrlm_main_queue_msg_main_factory_reset_t *) msg; XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_FACTORY_RESET"); @@ -3366,67 +3354,6 @@ bool ctrlm_main_active_period_screenbind_timeout_set_(uint32_t timeout) { return(true); } -gboolean ctrlm_main_iarm_call_precommission_config_set(ctrlm_main_iarm_call_precommision_config_t *config) { - if(config == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_precommision_config_t *msg = (ctrlm_main_queue_msg_main_precommision_config_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_precommision_config_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET; - msg->header.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - msg->config = config; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process PRECOMISSION_CONFIG_SET request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - -void ctrlm_main_iarm_call_precommission_config_set_(ctrlm_main_iarm_call_precommision_config_t *config) { - if(config->network_id != CTRLM_MAIN_NETWORK_ID_ALL && !ctrlm_network_id_is_valid(config->network_id)) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("network id - Out of range %u", config->network_id); - return; - } - if(config->controller_qty > CTRLM_MAIN_MAX_BOUND_CONTROLLERS) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; - XLOGD_ERROR("controller qty - Out of range %lu", config->controller_qty); - return; - } - unsigned long index; - - for(index = 0; index < config->controller_qty; index++) { - g_ctrlm.precomission_table[config->controllers[index]] = true; - XLOGD_INFO("Adding 0x%016llX", config->controllers[index]); - } - config->result = CTRLM_IARM_CALL_RESULT_SUCCESS; -} - gboolean ctrlm_main_iarm_call_factory_reset(ctrlm_main_iarm_call_factory_reset_t *reset) { if(reset == NULL) { XLOGD_ERROR("NULL parameter"); diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index b72cfd8e..6d357ed3 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -37,7 +37,6 @@ #include "dsMgr.h" #include "dsRpc.h" -static IARM_Result_t ctrlm_main_iarm_call_precommission_config_set(void *arg); static IARM_Result_t ctrlm_main_iarm_call_controller_unbind(void *arg); static IARM_Result_t ctrlm_main_iarm_call_ir_remote_usage_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg); @@ -67,7 +66,6 @@ static volatile int running = 0; // Array to hold the IARM Calls that will be registered by Control Manager ctrlm_iarm_call_t ctrlm_iarm_calls[] = { - {CTRLM_MAIN_IARM_CALL_PRECOMMISSION_CONFIG_SET, ctrlm_main_iarm_call_precommission_config_set }, {CTRLM_MAIN_IARM_CALL_CONTROLLER_UNBIND, ctrlm_main_iarm_call_controller_unbind }, {CTRLM_MAIN_IARM_CALL_IR_REMOTE_USAGE_GET, ctrlm_main_iarm_call_ir_remote_usage_get }, {CTRLM_MAIN_IARM_CALL_LAST_KEY_INFO_GET, ctrlm_main_iarm_call_last_key_info_get }, @@ -180,29 +178,6 @@ IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_precommission_config_set(void *arg) { - ctrlm_main_iarm_call_precommision_config_t *config = (ctrlm_main_iarm_call_precommision_config_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(NULL == config) { - XLOGD_ERROR("NULL Property Argument"); - g_assert(0); - return(IARM_RESULT_INVALID_PARAM); - } - if(config->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", config->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - config->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - if(!ctrlm_main_iarm_call_precommission_config_set(config)) { - config->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_controller_unbind(void *arg) { ctrlm_main_iarm_call_controller_unbind_t *unbind = (ctrlm_main_iarm_call_controller_unbind_t *)arg; diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index 2fc24e3e..60d4940c 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -332,7 +332,6 @@ const char *ctrlm_main_queue_msg_type_str(ctrlm_main_queue_msg_type_t type) { case CTRLM_MAIN_QUEUE_MSG_TYPE_BIND_CONFIGURATION_COMPLETE: return("BIND_CONFIGURATION_COMPLETE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_NETWORK_PROPERTY_SET: return("NETWORK_PROPERTY_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE: return("TERMINATE"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_PRECOMMISSION_CONFIG_SET: return("MAIN_PRECOMMISSION_CONFIG_SET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_FACTORY_RESET: return("MAIN_FACTORY_RESET"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROLLER_UNBIND: return("MAIN_CONTROLLER_UNBIND"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_TIMEOUT_LINE_OF_SIGHT: return("MAIN_TIMEOUT_LINE_OF_SIGHT"); From 92a6e86afdf20dff21d0415fb539b150b443ecd3 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Thu, 2 Jul 2026 14:04:56 -0400 Subject: [PATCH 08/21] remove can find my remote iarm call --- include/ctrlm_ipc.h | 8 ------ src/ctrlm.h | 9 ------- src/ctrlm_main.cpp | 56 ----------------------------------------- src/ctrlm_main_iarm.cpp | 26 ------------------- src/ctrlm_utils.cpp | 1 - 5 files changed, 100 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index 5da888af..c47916f1 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -33,7 +33,6 @@ #define CTRLM_MAIN_IARM_CALL_LAST_KEYPRESS_GET "Main_LastKeyPressGet" ///< Retrieves the last key press (TODO: replace CTRLM_MAIN_IARM_CALL_LAST_KEY_INFO_GET with this) #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_SET_VALUES "Main_ControlService_SetValues" ///< IARM Call to set control service values #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_GET_VALUES "Main_ControlService_GetValues" ///< IARM Call to get control service values -#define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_CAN_FIND_MY_REMOTE "Main_ControlService_CanFindMyRemote" ///< IARM Call to get control service find my remote #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_START_PAIRING_MODE "Main_ControlService_StartPairingMode" ///< IARM Call to set control service start pairing mode #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_END_PAIRING_MODE "Main_ControlService_EndPairingMode" ///< IARM Call to set control service end pairing mode #define CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET "Main_PairingMetricsGet" ///< Retrieves the stb's pairing metrics @@ -398,13 +397,6 @@ typedef struct { unsigned char ir_command_repeats; ///< The ir command repeats (1 - 10) } ctrlm_main_iarm_call_control_service_settings_t; -typedef struct { - unsigned char api_revision; ///< The revision of this API. - ctrlm_iarm_call_result_t result; ///< Result of the IARM call - unsigned char is_supported; ///< Read only Boolean value to indicate if findMyRemote is supported enable (non-zero) or not supported (zero) - ctrlm_network_type_t network_type; ///< [in] Type of network on which the controller is bound -} ctrlm_main_iarm_call_control_service_can_find_my_remote_t; - typedef struct { unsigned char api_revision; ///< The revision of this API. ctrlm_iarm_call_result_t result; ///< Result of the IARM call diff --git a/src/ctrlm.h b/src/ctrlm.h index 9e819382..28771de0 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -99,7 +99,6 @@ typedef enum { CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_BINDING_SCREEN, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_SET_VALUES, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_GET_VALUES, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_CAN_FIND_MY_REMOTE, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_ONE_TOUCH_AUTOBIND, @@ -253,13 +252,6 @@ typedef struct { ctrlm_main_status_cmd_result_t * cmd_result; } ctrlm_main_queue_msg_main_control_service_settings_t; -typedef struct { - ctrlm_main_queue_msg_header_t header; - ctrlm_main_iarm_call_control_service_can_find_my_remote_t *can_find_my_remote; - sem_t * semaphore; - ctrlm_main_status_cmd_result_t * cmd_result; -} ctrlm_main_queue_msg_main_control_service_can_find_my_remote_t; - typedef struct { ctrlm_main_queue_msg_header_t header; ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing; @@ -435,7 +427,6 @@ gboolean ctrlm_main_iarm_call_pairing_metrics_get(ctrlm_main_iarm_call_pairing_m gboolean ctrlm_main_iarm_call_last_key_info_get(ctrlm_main_iarm_call_last_key_info_t *last_key_info); gboolean ctrlm_main_iarm_call_control_service_set_values(ctrlm_main_iarm_call_control_service_settings_t *settings); gboolean ctrlm_main_iarm_call_control_service_get_values(ctrlm_main_iarm_call_control_service_settings_t *settings); -gboolean ctrlm_main_iarm_call_control_service_can_find_my_remote(ctrlm_main_iarm_call_control_service_can_find_my_remote_t *can_find_my_remote); gboolean ctrlm_main_iarm_call_control_service_start_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); void ctrlm_main_iarm_call_control_service_start_pairing_mode_(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); gboolean ctrlm_main_iarm_call_control_service_end_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 2eaff159..3f63944f 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -2872,21 +2872,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_CAN_FIND_MY_REMOTE: { - ctrlm_main_queue_msg_main_control_service_can_find_my_remote_t *dqm = (ctrlm_main_queue_msg_main_control_service_can_find_my_remote_t *) msg; - ctrlm_main_iarm_call_control_service_can_find_my_remote_t *can_find_my_remote = dqm->can_find_my_remote; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_CAN_FIND_MY_REMOTE"); - obj_net = g_ctrlm.networks[hdr->network_id]; - can_find_my_remote->is_supported = obj_net->is_fmr_supported(); - XLOGD_INFO("Can find My Remote: Supported <%s>", can_find_my_remote->is_supported ? "true" : "false"); - - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE: { ctrlm_main_queue_msg_main_control_service_pairing_mode_t *dqm = (ctrlm_main_queue_msg_main_control_service_pairing_mode_t *) msg; XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE"); @@ -4491,47 +4476,6 @@ gboolean ctrlm_main_iarm_call_control_service_get_values(ctrlm_main_iarm_call_co return(false); } -gboolean ctrlm_main_iarm_call_control_service_can_find_my_remote(ctrlm_main_iarm_call_control_service_can_find_my_remote_t *can_find_my_remote) { - if(can_find_my_remote == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_control_service_can_find_my_remote_t *msg = (ctrlm_main_queue_msg_main_control_service_can_find_my_remote_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_control_service_can_find_my_remote_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_CAN_FIND_MY_REMOTE; - msg->header.network_id = ctrlm_network_id_get(can_find_my_remote->network_type); - msg->can_find_my_remote = can_find_my_remote; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_CAN_FIND_MY_REMOTE request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - gboolean ctrlm_main_iarm_call_control_service_start_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing) { if(pairing == NULL) { XLOGD_ERROR("NULL parameter"); diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index 6d357ed3..8470cfbe 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -42,7 +42,6 @@ static IARM_Result_t ctrlm_main_iarm_call_ir_remote_usage_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_set_values(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_get_values(void *arg); -static IARM_Result_t ctrlm_main_iarm_call_control_service_can_find_my_remote(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_start_pairing_mode(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_end_pairing_mode(void *arg); static IARM_Result_t ctrlm_main_iarm_call_pairing_metrics_get(void *arg); @@ -71,7 +70,6 @@ ctrlm_iarm_call_t ctrlm_iarm_calls[] = { {CTRLM_MAIN_IARM_CALL_LAST_KEY_INFO_GET, ctrlm_main_iarm_call_last_key_info_get }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_SET_VALUES, ctrlm_main_iarm_call_control_service_set_values }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_GET_VALUES, ctrlm_main_iarm_call_control_service_get_values }, - {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_CAN_FIND_MY_REMOTE, ctrlm_main_iarm_call_control_service_can_find_my_remote }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_START_PAIRING_MODE, ctrlm_main_iarm_call_control_service_start_pairing_mode }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_END_PAIRING_MODE, ctrlm_main_iarm_call_control_service_end_pairing_mode }, {CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET, ctrlm_main_iarm_call_pairing_metrics_get }, @@ -355,30 +353,6 @@ IARM_Result_t ctrlm_main_iarm_call_control_service_get_values(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_control_service_can_find_my_remote(void *arg) { - ctrlm_main_iarm_call_control_service_can_find_my_remote_t *can_find_my_remote = (ctrlm_main_iarm_call_control_service_can_find_my_remote_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(NULL == can_find_my_remote) { - XLOGD_ERROR("NULL Can Find My Remote Argument"); - g_assert(0); - return(IARM_RESULT_INVALID_PARAM); - } - if(can_find_my_remote->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", can_find_my_remote->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - can_find_my_remote->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - - if(!ctrlm_main_iarm_call_control_service_can_find_my_remote(can_find_my_remote)) { - can_find_my_remote->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_control_service_start_pairing_mode(void *arg) { ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing = (ctrlm_main_iarm_call_control_service_pairing_mode_t *)arg; diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index 60d4940c..7526e2bd 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -350,7 +350,6 @@ const char *ctrlm_main_queue_msg_type_str(ctrlm_main_queue_msg_type_t type) { case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_BINDING_SCREEN: return("MAIN_STOP_BINDING_SCREEN"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_SET_VALUES: return("CONTROL_SERVICE_SET_VALUES"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_GET_VALUES: return("CONTROL_SERVICE_GET_VALUES"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_CAN_FIND_MY_REMOTE: return("CONTROL_SERVICE_CAN_FIND_MY_REMOTE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE: return("CONTROL_SERVICE_START_PAIRING_MODE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE: return("CONTROL_SERVICE_END_PAIRING_MODE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_EXPORT_CONTROLLER_LIST: return("EXPORT_CONTROLLER_LIST"); From 50696e84b1f672ed0b586bbca75e918c3fb7c79b Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 11:50:22 -0400 Subject: [PATCH 09/21] remove control service start pairing iarm call --- include/ctrlm_ipc.h | 1 - src/ctrlm.h | 2 -- src/ctrlm_main.cpp | 52 ----------------------------------------- src/ctrlm_main_iarm.cpp | 27 --------------------- src/ctrlm_utils.cpp | 1 - 5 files changed, 83 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index c47916f1..d3f353f4 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -33,7 +33,6 @@ #define CTRLM_MAIN_IARM_CALL_LAST_KEYPRESS_GET "Main_LastKeyPressGet" ///< Retrieves the last key press (TODO: replace CTRLM_MAIN_IARM_CALL_LAST_KEY_INFO_GET with this) #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_SET_VALUES "Main_ControlService_SetValues" ///< IARM Call to set control service values #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_GET_VALUES "Main_ControlService_GetValues" ///< IARM Call to get control service values -#define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_START_PAIRING_MODE "Main_ControlService_StartPairingMode" ///< IARM Call to set control service start pairing mode #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_END_PAIRING_MODE "Main_ControlService_EndPairingMode" ///< IARM Call to set control service end pairing mode #define CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET "Main_PairingMetricsGet" ///< Retrieves the stb's pairing metrics #define CTRLM_MAIN_IARM_CALL_CHIP_STATUS_GET "Main_ChipStatusGet" ///< get Chip status diff --git a/src/ctrlm.h b/src/ctrlm.h index 28771de0..be2ddfff 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -99,7 +99,6 @@ typedef enum { CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_BINDING_SCREEN, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_SET_VALUES, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_GET_VALUES, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_ONE_TOUCH_AUTOBIND, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CLOSE_PAIRING_WINDOW, @@ -427,7 +426,6 @@ gboolean ctrlm_main_iarm_call_pairing_metrics_get(ctrlm_main_iarm_call_pairing_m gboolean ctrlm_main_iarm_call_last_key_info_get(ctrlm_main_iarm_call_last_key_info_t *last_key_info); gboolean ctrlm_main_iarm_call_control_service_set_values(ctrlm_main_iarm_call_control_service_settings_t *settings); gboolean ctrlm_main_iarm_call_control_service_get_values(ctrlm_main_iarm_call_control_service_settings_t *settings); -gboolean ctrlm_main_iarm_call_control_service_start_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); void ctrlm_main_iarm_call_control_service_start_pairing_mode_(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); gboolean ctrlm_main_iarm_call_control_service_end_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); void ctrlm_main_iarm_call_control_service_end_pairing_mode_(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 3f63944f..9ec9f316 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -2872,17 +2872,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE: { - ctrlm_main_queue_msg_main_control_service_pairing_mode_t *dqm = (ctrlm_main_queue_msg_main_control_service_pairing_mode_t *) msg; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE"); - ctrlm_main_iarm_call_control_service_start_pairing_mode_(dqm->pairing); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE: { ctrlm_main_queue_msg_main_control_service_pairing_mode_t *dqm = (ctrlm_main_queue_msg_main_control_service_pairing_mode_t *) msg; XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE"); @@ -4476,47 +4465,6 @@ gboolean ctrlm_main_iarm_call_control_service_get_values(ctrlm_main_iarm_call_co return(false); } -gboolean ctrlm_main_iarm_call_control_service_start_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing) { - if(pairing == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_control_service_pairing_mode_t *msg = (ctrlm_main_queue_msg_main_control_service_pairing_mode_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_control_service_pairing_mode_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE; - msg->header.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - msg->pairing = pairing; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - gboolean ctrlm_main_iarm_call_control_service_end_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing) { if(pairing == NULL) { XLOGD_ERROR("NULL parameter"); diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index 8470cfbe..78d2972b 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -42,7 +42,6 @@ static IARM_Result_t ctrlm_main_iarm_call_ir_remote_usage_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_set_values(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_get_values(void *arg); -static IARM_Result_t ctrlm_main_iarm_call_control_service_start_pairing_mode(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_end_pairing_mode(void *arg); static IARM_Result_t ctrlm_main_iarm_call_pairing_metrics_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_voice_session_begin(void *arg); @@ -70,7 +69,6 @@ ctrlm_iarm_call_t ctrlm_iarm_calls[] = { {CTRLM_MAIN_IARM_CALL_LAST_KEY_INFO_GET, ctrlm_main_iarm_call_last_key_info_get }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_SET_VALUES, ctrlm_main_iarm_call_control_service_set_values }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_GET_VALUES, ctrlm_main_iarm_call_control_service_get_values }, - {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_START_PAIRING_MODE, ctrlm_main_iarm_call_control_service_start_pairing_mode }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_END_PAIRING_MODE, ctrlm_main_iarm_call_control_service_end_pairing_mode }, {CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET, ctrlm_main_iarm_call_pairing_metrics_get }, {CTRLM_VOICE_IARM_CALL_SESSION_BEGIN, ctrlm_main_iarm_call_voice_session_begin }, @@ -353,31 +351,6 @@ IARM_Result_t ctrlm_main_iarm_call_control_service_get_values(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_control_service_start_pairing_mode(void *arg) { - ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing = (ctrlm_main_iarm_call_control_service_pairing_mode_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(NULL == pairing) { - XLOGD_ERROR("NULL Pairing Mode Argument"); - g_assert(0); - return(IARM_RESULT_INVALID_PARAM); - } - if(pairing->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", pairing->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - pairing->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO(""); - - if(!ctrlm_main_iarm_call_control_service_start_pairing_mode(pairing)) { - pairing->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_control_service_end_pairing_mode(void *arg) { ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing = (ctrlm_main_iarm_call_control_service_pairing_mode_t *)arg; diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index 7526e2bd..370885b9 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -350,7 +350,6 @@ const char *ctrlm_main_queue_msg_type_str(ctrlm_main_queue_msg_type_t type) { case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_BINDING_SCREEN: return("MAIN_STOP_BINDING_SCREEN"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_SET_VALUES: return("CONTROL_SERVICE_SET_VALUES"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_GET_VALUES: return("CONTROL_SERVICE_GET_VALUES"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_START_PAIRING_MODE: return("CONTROL_SERVICE_START_PAIRING_MODE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE: return("CONTROL_SERVICE_END_PAIRING_MODE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_EXPORT_CONTROLLER_LIST: return("EXPORT_CONTROLLER_LIST"); default: if (type >= CTRLM_MAIN_QUEUE_MSG_TYPE_VENDOR_FIRST && type <= CTRLM_MAIN_QUEUE_MSG_TYPE_VENDOR_LAST) { From 2edd74599bf6830847b177a364bdc8704475005f Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 11:59:26 -0400 Subject: [PATCH 10/21] remove control service end pairing iarm call --- include/ctrlm_ipc.h | 1 - src/ctrlm.h | 2 -- src/ctrlm_main.cpp | 52 ----------------------------------------- src/ctrlm_main_iarm.cpp | 27 --------------------- src/ctrlm_utils.cpp | 1 - 5 files changed, 83 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index d3f353f4..439f1aee 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -33,7 +33,6 @@ #define CTRLM_MAIN_IARM_CALL_LAST_KEYPRESS_GET "Main_LastKeyPressGet" ///< Retrieves the last key press (TODO: replace CTRLM_MAIN_IARM_CALL_LAST_KEY_INFO_GET with this) #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_SET_VALUES "Main_ControlService_SetValues" ///< IARM Call to set control service values #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_GET_VALUES "Main_ControlService_GetValues" ///< IARM Call to get control service values -#define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_END_PAIRING_MODE "Main_ControlService_EndPairingMode" ///< IARM Call to set control service end pairing mode #define CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET "Main_PairingMetricsGet" ///< Retrieves the stb's pairing metrics #define CTRLM_MAIN_IARM_CALL_CHIP_STATUS_GET "Main_ChipStatusGet" ///< get Chip status #define CTRLM_MAIN_IARM_CALL_AUDIO_CAPTURE_START "Main_AudioCaptureStart" ///< Sends message to xraudio to capture mic data, in specified container diff --git a/src/ctrlm.h b/src/ctrlm.h index be2ddfff..8b0806d8 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -99,7 +99,6 @@ typedef enum { CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_BINDING_SCREEN, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_SET_VALUES, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_GET_VALUES, - CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_ONE_TOUCH_AUTOBIND, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CLOSE_PAIRING_WINDOW, CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_BIND_STATUS_SET, @@ -427,7 +426,6 @@ gboolean ctrlm_main_iarm_call_last_key_info_get(ctrlm_main_iarm_call_last_key_in gboolean ctrlm_main_iarm_call_control_service_set_values(ctrlm_main_iarm_call_control_service_settings_t *settings); gboolean ctrlm_main_iarm_call_control_service_get_values(ctrlm_main_iarm_call_control_service_settings_t *settings); void ctrlm_main_iarm_call_control_service_start_pairing_mode_(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); -gboolean ctrlm_main_iarm_call_control_service_end_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); void ctrlm_main_iarm_call_control_service_end_pairing_mode_(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); gboolean ctrlm_main_iarm_call_chip_status_get(ctrlm_main_iarm_call_chip_status_t *status); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 9ec9f316..7b567c64 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -2872,17 +2872,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE: { - ctrlm_main_queue_msg_main_control_service_pairing_mode_t *dqm = (ctrlm_main_queue_msg_main_control_service_pairing_mode_t *) msg; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE"); - ctrlm_main_iarm_call_control_service_end_pairing_mode_(dqm->pairing); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = CTRLM_MAIN_STATUS_REQUEST_SUCCESS; - sem_post(dqm->semaphore); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_BATTERY_MILESTONE_EVENT: { ctrlm_main_queue_msg_rf4ce_battery_milestone_t *dqm = (ctrlm_main_queue_msg_rf4ce_battery_milestone_t *) msg; XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_BATTERY_MILESTONE_EVENT"); @@ -4465,47 +4454,6 @@ gboolean ctrlm_main_iarm_call_control_service_get_values(ctrlm_main_iarm_call_co return(false); } -gboolean ctrlm_main_iarm_call_control_service_end_pairing_mode(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing) { - if(pairing == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // 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_main_control_service_pairing_mode_t *msg = (ctrlm_main_queue_msg_main_control_service_pairing_mode_t *)g_malloc(sizeof(ctrlm_main_queue_msg_main_control_service_pairing_mode_t)); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE; - msg->header.network_id = CTRLM_MAIN_NETWORK_ID_ALL; - msg->pairing = pairing; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result semaphore to be signaled - XLOGD_DEBUG("Waiting for main thread to process CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE request"); - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_MAIN_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - void ctrlm_main_iarm_call_control_service_start_pairing_mode_(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing) { if(pairing->network_id != CTRLM_MAIN_NETWORK_ID_ALL && !ctrlm_network_id_is_valid(pairing->network_id)) { pairing->result = CTRLM_IARM_CALL_RESULT_ERROR_INVALID_PARAMETER; diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index 78d2972b..0c15cf6f 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -42,7 +42,6 @@ static IARM_Result_t ctrlm_main_iarm_call_ir_remote_usage_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_last_key_info_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_set_values(void *arg); static IARM_Result_t ctrlm_main_iarm_call_control_service_get_values(void *arg); -static IARM_Result_t ctrlm_main_iarm_call_control_service_end_pairing_mode(void *arg); static IARM_Result_t ctrlm_main_iarm_call_pairing_metrics_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_voice_session_begin(void *arg); static IARM_Result_t ctrlm_main_iarm_call_voice_session_end(void *arg); @@ -69,7 +68,6 @@ ctrlm_iarm_call_t ctrlm_iarm_calls[] = { {CTRLM_MAIN_IARM_CALL_LAST_KEY_INFO_GET, ctrlm_main_iarm_call_last_key_info_get }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_SET_VALUES, ctrlm_main_iarm_call_control_service_set_values }, {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_GET_VALUES, ctrlm_main_iarm_call_control_service_get_values }, - {CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_END_PAIRING_MODE, ctrlm_main_iarm_call_control_service_end_pairing_mode }, {CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET, ctrlm_main_iarm_call_pairing_metrics_get }, {CTRLM_VOICE_IARM_CALL_SESSION_BEGIN, ctrlm_main_iarm_call_voice_session_begin }, {CTRLM_VOICE_IARM_CALL_SESSION_END, ctrlm_main_iarm_call_voice_session_end }, @@ -351,31 +349,6 @@ IARM_Result_t ctrlm_main_iarm_call_control_service_get_values(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_control_service_end_pairing_mode(void *arg) { - ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing = (ctrlm_main_iarm_call_control_service_pairing_mode_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(NULL == pairing) { - XLOGD_ERROR("NULL Pairing Mode Argument"); - g_assert(0); - return(IARM_RESULT_INVALID_PARAM); - } - if(pairing->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", pairing->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - pairing->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO(""); - - if(!ctrlm_main_iarm_call_control_service_end_pairing_mode(pairing)) { - pairing->result = CTRLM_IARM_CALL_RESULT_ERROR; - } - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_pairing_metrics_get(void *arg) { ctrlm_main_iarm_call_pairing_metrics_t *pairing_metrics = (ctrlm_main_iarm_call_pairing_metrics_t *) arg; diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index 370885b9..b0576434 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -350,7 +350,6 @@ const char *ctrlm_main_queue_msg_type_str(ctrlm_main_queue_msg_type_t type) { case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_STOP_BINDING_SCREEN: return("MAIN_STOP_BINDING_SCREEN"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_SET_VALUES: return("CONTROL_SERVICE_SET_VALUES"); case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_GET_VALUES: return("CONTROL_SERVICE_GET_VALUES"); - case CTRLM_MAIN_QUEUE_MSG_TYPE_MAIN_CONTROL_SERVICE_END_PAIRING_MODE: return("CONTROL_SERVICE_END_PAIRING_MODE"); case CTRLM_MAIN_QUEUE_MSG_TYPE_EXPORT_CONTROLLER_LIST: return("EXPORT_CONTROLLER_LIST"); default: if (type >= CTRLM_MAIN_QUEUE_MSG_TYPE_VENDOR_FIRST && type <= CTRLM_MAIN_QUEUE_MSG_TYPE_VENDOR_LAST) { return("VENDOR SPECIFIC MESSAGE"); From bb424dc1650cd50911ef5e81a5e6a8f4bfb3336e Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 12:21:30 -0400 Subject: [PATCH 11/21] remove chip status iarm call --- include/ctrlm_ipc.h | 8 ------ src/ctrlm.h | 6 ----- src/ctrlm_main.cpp | 28 -------------------- src/ctrlm_main_iarm.cpp | 30 --------------------- src/ctrlm_network.cpp | 15 ----------- src/ctrlm_network.h | 1 - src/rf4ce/ctrlm_rf4ce_network.cpp | 44 ------------------------------- src/rf4ce/ctrlm_rf4ce_network.h | 1 - 8 files changed, 133 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index 439f1aee..143d905b 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -34,7 +34,6 @@ #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_SET_VALUES "Main_ControlService_SetValues" ///< IARM Call to set control service values #define CTRLM_MAIN_IARM_CALL_CONTROL_SERVICE_GET_VALUES "Main_ControlService_GetValues" ///< IARM Call to get control service values #define CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET "Main_PairingMetricsGet" ///< Retrieves the stb's pairing metrics -#define CTRLM_MAIN_IARM_CALL_CHIP_STATUS_GET "Main_ChipStatusGet" ///< get Chip status #define CTRLM_MAIN_IARM_CALL_AUDIO_CAPTURE_START "Main_AudioCaptureStart" ///< Sends message to xraudio to capture mic data, in specified container #define CTRLM_MAIN_IARM_CALL_AUDIO_CAPTURE_STOP "Main_AudioCaptureStop" ///< Sends message to xraudio to stop capturing mic data #define CTRLM_MAIN_IARM_CALL_POWER_STATE_CHANGE "Main_PowerStateChange" ///< Sends message to xr-speech-router to set power state, download DSP firmware, etc @@ -468,13 +467,6 @@ typedef struct { ctrlm_iarm_call_result_t result; } ctrlm_iarm_call_WriteRcuWakeupConfig_params_t; -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< OUT - Result of the operation - ctrlm_network_id_t network_id; ///< IN - identifier of network - unsigned char chip_connected; ///< OUT - 1 - chip connected, 0 - chip disconnected -} ctrlm_main_iarm_call_chip_status_t; - typedef struct { unsigned char api_revision; ctrlm_iarm_call_result_t result; diff --git a/src/ctrlm.h b/src/ctrlm.h index 8b0806d8..12792570 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -162,11 +162,6 @@ typedef enum { CTRLM_MAIN_STATUS_REQUEST_ERROR = 2 } ctrlm_main_status_cmd_result_t; -typedef struct { - ctrlm_main_iarm_call_chip_status_t *status; - sem_t * semaphore; -} ctrlm_main_queue_msg_main_chip_status_t; - typedef struct { ctrlm_iarm_call_result_t result; ctrlm_network_id_t network_id; @@ -427,7 +422,6 @@ gboolean ctrlm_main_iarm_call_control_service_set_values(ctrlm_main_iarm_call_co gboolean ctrlm_main_iarm_call_control_service_get_values(ctrlm_main_iarm_call_control_service_settings_t *settings); void ctrlm_main_iarm_call_control_service_start_pairing_mode_(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); void ctrlm_main_iarm_call_control_service_end_pairing_mode_(ctrlm_main_iarm_call_control_service_pairing_mode_t *pairing); -gboolean ctrlm_main_iarm_call_chip_status_get(ctrlm_main_iarm_call_chip_status_t *status); ctrlm_power_state_t ctrlm_main_get_system_power_state(void); ctrlm_power_state_t ctrlm_main_get_internal_power_state(void); diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 7b567c64..6f070af1 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -3430,34 +3430,6 @@ void ctrlm_main_iarm_call_controller_unbind_(ctrlm_main_iarm_call_controller_unb unbind->result = CTRLM_IARM_CALL_RESULT_SUCCESS; } -gboolean ctrlm_main_iarm_call_chip_status_get(ctrlm_main_iarm_call_chip_status_t *status) { - if(status == NULL) { - XLOGD_ERROR("NULL parameter"); - return(false); - } - XLOGD_INFO(""); - - // Signal completion of the operation - sem_t semaphore; - - // Allocate a message and send it to Control Manager's queue - ctrlm_main_queue_msg_main_chip_status_t msg = {0}; - - sem_init(&semaphore, 0, 0); - - msg.status = status; - msg.status->result = CTRLM_IARM_CALL_RESULT_ERROR; - msg.semaphore = &semaphore; - - ctrlm_main_queue_handler_push(CTRLM_HANDLER_NETWORK, (ctrlm_msg_handler_network_t)&ctrlm_obj_network_t::req_process_chip_status, &msg, sizeof(msg), NULL, status->network_id); - - // Wait for the result semaphore to be signaled - sem_wait(&semaphore); - sem_destroy(&semaphore); - - return(true); -} - #ifdef USE_DEPRECATED_IRMGR void ctrlm_event_handler_ir(const char *owner, IARM_EventId_t event_id, void *data, size_t len) { diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index 0c15cf6f..4fcf9e38 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -46,7 +46,6 @@ static IARM_Result_t ctrlm_main_iarm_call_pairing_metrics_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_voice_session_begin(void *arg); static IARM_Result_t ctrlm_main_iarm_call_voice_session_end(void *arg); 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) @@ -72,7 +71,6 @@ ctrlm_iarm_call_t ctrlm_iarm_calls[] = { {CTRLM_VOICE_IARM_CALL_SESSION_BEGIN, ctrlm_main_iarm_call_voice_session_begin }, {CTRLM_VOICE_IARM_CALL_SESSION_END, ctrlm_main_iarm_call_voice_session_end }, {CTRLM_MAIN_IARM_CALL_START_PAIR_WITH_CODE, ctrlm_main_iarm_call_start_pair_with_code }, - {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 @@ -373,34 +371,6 @@ IARM_Result_t ctrlm_main_iarm_call_pairing_metrics_get(void *arg) { return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_main_iarm_call_chip_status_get(void *arg) { - ctrlm_main_iarm_call_chip_status_t *status = (ctrlm_main_iarm_call_chip_status_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(status == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(status->api_revision != CTRLM_MAIN_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", status->api_revision, CTRLM_MAIN_IARM_BUS_API_REVISION); - status->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO(""); - -#if CTRLM_HAL_RF4CE_API_VERSION < 15 || defined(CTRLM_RF4CE_CHIP_CONNECTIVITY_CHECK_NOT_SUPPORTED) - status->result = CTRLM_IARM_CALL_RESULT_ERROR_NOT_SUPPORTED; -#else - if(!ctrlm_main_iarm_call_chip_status_get(status)) { - status->result = CTRLM_IARM_CALL_RESULT_ERROR; - } -#endif - return(IARM_RESULT_SUCCESS); -} - IARM_Result_t ctrlm_main_iarm_call_voice_session_begin(void *arg) { ctrlm_voice_iarm_call_voice_session_t *params = (ctrlm_voice_iarm_call_voice_session_t *)arg; diff --git a/src/ctrlm_network.cpp b/src/ctrlm_network.cpp index 7cbd7419..67d58923 100644 --- a/src/ctrlm_network.cpp +++ b/src/ctrlm_network.cpp @@ -831,21 +831,6 @@ void ctrlm_obj_network_t::req_process_polling_action_push(void *data, int size) } } -void ctrlm_obj_network_t::req_process_chip_status(void *data, int size) { - ctrlm_main_queue_msg_main_chip_status_t *dqm = (ctrlm_main_queue_msg_main_chip_status_t *)data; - - g_assert(dqm); - g_assert(size == sizeof(ctrlm_main_queue_msg_main_chip_status_t)); - g_assert(dqm->status != NULL); - - XLOGD_WARN("not implemented for %s network", name_get()); - dqm->status->result = CTRLM_IARM_CALL_RESULT_ERROR_NOT_SUPPORTED; - - if(dqm->semaphore) { - sem_post(dqm->semaphore); - } -} - void ctrlm_obj_network_t::req_process_network_managed_upgrade(void *data, int size) { ctrlm_main_queue_msg_network_fw_upgrade_t *dqm = (ctrlm_main_queue_msg_network_fw_upgrade_t *)data; diff --git a/src/ctrlm_network.h b/src/ctrlm_network.h index 534c2636..2dbd069b 100644 --- a/src/ctrlm_network.h +++ b/src/ctrlm_network.h @@ -252,7 +252,6 @@ class ctrlm_obj_network_t virtual void set_rf_pair_state(ctrlm_rf_pair_state_t rf_pair_state); virtual ctrlm_rf_pair_state_t get_rf_pair_state() const; - virtual void req_process_chip_status(void *data, int size); virtual void req_process_controller_link_key(void *data, int size); virtual void req_process_controller_status(void *data, int size); virtual void req_process_controller_product_name(void *data, int size); diff --git a/src/rf4ce/ctrlm_rf4ce_network.cpp b/src/rf4ce/ctrlm_rf4ce_network.cpp index 82674870..c0d7100e 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.cpp +++ b/src/rf4ce/ctrlm_rf4ce_network.cpp @@ -77,8 +77,6 @@ #define CTRLM_RF4CE_REGEX_BLACKOUT_TIME_INCREMENT "(?<=blackout_time_increment=)[0-9]*" #define CTRLM_RF4CE_DPI_FRAME_CONTROL (0x2F) -#define CTRLM_RF4CE_QORVO_BAD_MAC_ADDRESS (0xA5A5A5A5A5A5A5A5llu) -#define CTRLM_RF4CE_QORVO_MAC_ADDRESS_PATTERN (0x00155F0000000000llu) class controller_type_details_t { @@ -4274,48 +4272,6 @@ void ctrlm_obj_network_rf4ce_t::hal_init_cfm(void *data, int size) { ctrlm_obj_network_t::hal_init_cfm(data, size); } -void ctrlm_obj_network_rf4ce_t::req_process_chip_status(void *data, int size) { - ctrlm_main_queue_msg_main_chip_status_t *dqm = (ctrlm_main_queue_msg_main_chip_status_t *)data; - - g_assert(dqm); - g_assert(size == sizeof(ctrlm_main_queue_msg_main_chip_status_t)); - g_assert(dqm->status != NULL); - -#if (CTRLM_HAL_RF4CE_API_VERSION >= 15) -#ifndef CTRLM_RF4CE_CHIP_CONNECTIVITY_CHECK_NOT_SUPPORTED - ctrlm_hal_network_property_network_stats_t network_stats; - network_stats.ieee_address = 0; - ctrlm_hal_result_t result = property_get(CTRLM_HAL_NETWORK_PROPERTY_NETWORK_STATS, (void **)&network_stats); - if(result == CTRLM_HAL_RESULT_SUCCESS) { // Update cache on successful HAL call - // validate MAC address - // Qorvo MAC address range is 00;15;5F:xx;xx;xx;xx;xx. A valid MAC address should match the OUI i.e. MSB 3 bytes with Qorvo/Greenpeak. - // 0xA5 is default value read by SPI FIFO so that will indicate an invalid address if the serial communication is broken with the chip. - if (network_stats.ieee_address == CTRLM_RF4CE_QORVO_BAD_MAC_ADDRESS) { - dqm->status->chip_connected = 0; - XLOGD_ERROR("RF4CE Chip is not connected!"); - } else if ((network_stats.ieee_address & CTRLM_RF4CE_QORVO_MAC_ADDRESS_PATTERN) != CTRLM_RF4CE_QORVO_MAC_ADDRESS_PATTERN) { - dqm->status->chip_connected = 0; - XLOGD_ERROR("Bad Chip MAC address %llu!", network_stats.ieee_address); - } else { - XLOGD_INFO("RF4CE Chip is connected!"); - dqm->status->chip_connected = 1; - } - dqm->status->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - } -#else - dqm->status->chip_connected = 1; - XLOGD_ERROR("RF4CE Chip Connectivity is not supported on this platform!"); - dqm->status->result = CTRLM_IARM_CALL_RESULT_ERROR_NOT_SUPPORTED; -#endif - if(dqm->semaphore) { - sem_post(dqm->semaphore); - } -#else - ctrlm_obj_network_t::req_process_chip_status(data, size); -#endif -} - - void ctrlm_obj_network_rf4ce_t::cs_values_set(const ctrlm_cs_values_t *values, bool db_load) { if(values == NULL) { XLOGD_ERROR("values are NULL"); diff --git a/src/rf4ce/ctrlm_rf4ce_network.h b/src/rf4ce/ctrlm_rf4ce_network.h index fa541e76..7ae3c2d8 100644 --- a/src/rf4ce/ctrlm_rf4ce_network.h +++ b/src/rf4ce/ctrlm_rf4ce_network.h @@ -347,7 +347,6 @@ class ctrlm_obj_network_rf4ce_t : public ctrlm_obj_network_t ctrlm_rib_request_cmd_result_t req_process_rib_export(ctrlm_controller_id_t controller_id, uint8_t identifier, unsigned char index, unsigned char length, unsigned char *data); void req_process_controller_status(void *dqm, int size); void req_process_controller_product_name(void *data, int size); - void req_process_chip_status(void *data, int size); void req_process_controller_link_key(void *data, int size); void req_process_dpi_control(void *data, int size); void req_process_polling_action_push(void *data, int size); From f1ab82de2bd63fad6aac3104c60b4c0b20989797 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 12:36:02 -0400 Subject: [PATCH 12/21] remove start pairing with code iarm call --- include/ctrlm_ipc.h | 1 - src/ctrlm_main_iarm.cpp | 44 ----------------------------------------- 2 files changed, 45 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index 143d905b..65651119 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -48,7 +48,6 @@ #define CTRLM_MAIN_IARM_CALL_GET_RCU_STATUS "Main_GetRcuStatus" ///< IARM Call get the RCU status info (same as what's provided by CTRLM_RCU_IARM_EVENT_RCU_STATUS) #define CTRLM_MAIN_IARM_CALL_START_PAIRING "Main_StartPairing" ///< IARM Call to initiate searching for a remote to pair with -#define CTRLM_MAIN_IARM_CALL_START_PAIR_WITH_CODE "Main_StartPairWithCode" ///< IARM Call to initiate searching for a remote to pair with #define CTRLM_MAIN_IARM_CALL_STOP_PAIRING "Main_StopPairing" ///< IARM Call to cancel an active search for a remote to pair with #define CTRLM_MAIN_IARM_CALL_FIND_MY_REMOTE "Main_FindMyRemote" ///< IARM Call to trigger the Find My Remote alarm on a specified remote #define CTRLM_MAIN_IARM_CALL_WRITE_RCU_WAKEUP_CONFIG "Main_WriteAdvertisingConfig" ///< IARM Call to write the advertising configuration on all connected remotes diff --git a/src/ctrlm_main_iarm.cpp b/src/ctrlm_main_iarm.cpp index 4fcf9e38..22b9461f 100644 --- a/src/ctrlm_main_iarm.cpp +++ b/src/ctrlm_main_iarm.cpp @@ -45,7 +45,6 @@ static IARM_Result_t ctrlm_main_iarm_call_control_service_get_values(void *arg); static IARM_Result_t ctrlm_main_iarm_call_pairing_metrics_get(void *arg); static IARM_Result_t ctrlm_main_iarm_call_voice_session_begin(void *arg); static IARM_Result_t ctrlm_main_iarm_call_voice_session_end(void *arg); -static IARM_Result_t ctrlm_main_iarm_call_start_pair_with_code(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) @@ -70,7 +69,6 @@ ctrlm_iarm_call_t ctrlm_iarm_calls[] = { {CTRLM_MAIN_IARM_CALL_PAIRING_METRICS_GET, ctrlm_main_iarm_call_pairing_metrics_get }, {CTRLM_VOICE_IARM_CALL_SESSION_BEGIN, ctrlm_main_iarm_call_voice_session_begin }, {CTRLM_VOICE_IARM_CALL_SESSION_END, ctrlm_main_iarm_call_voice_session_end }, - {CTRLM_MAIN_IARM_CALL_START_PAIR_WITH_CODE, ctrlm_main_iarm_call_start_pair_with_code }, {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 @@ -452,45 +450,3 @@ IARM_Result_t ctrlm_main_iarm_call_voice_session_end(void *arg) { return(IARM_RESULT_SUCCESS); } - -IARM_Result_t ctrlm_main_iarm_call_start_pair_with_code(void *arg) { - ctrlm_iarm_call_StartPairWithCode_params_t *params = (ctrlm_iarm_call_StartPairWithCode_params_t *)arg; - - if(0 == g_atomic_int_get(&running)) { - XLOGD_ERROR("IARM Call received when IARM component in stopped/terminated state, reply with ERROR"); - return(IARM_RESULT_INVALID_STATE); - } - if(params == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(params->network_id == CTRLM_MAIN_NETWORK_ID_ALL) { - XLOGD_ERROR("Cannot start pair with code for multiple networks"); - return(IARM_RESULT_INVALID_PARAM); - } - - XLOGD_AUTOMATION_INFO("params->network_id = <%d>, params->pair_code = 0x%X", params->network_id, params->pair_code); - - // Signal completion of the operation - sem_t semaphore; - - // Allocate a message and send it to Control Manager's queue - ctrlm_main_queue_msg_pair_with_code_t msg; - errno_t safec_rc = memset_s(&msg, sizeof(msg), 0, sizeof(msg)); - ERR_CHK(safec_rc); - - sem_init(&semaphore, 0, 0); - - msg.params = params; - msg.params->result = CTRLM_IARM_CALL_RESULT_ERROR; - msg.semaphore = &semaphore; - - ctrlm_main_queue_handler_push(CTRLM_HANDLER_NETWORK, (ctrlm_msg_handler_network_t)&ctrlm_obj_network_t::req_process_pair_with_code, &msg, sizeof(msg), NULL, params->network_id); - - // Wait for the result semaphore to be signaled - sem_wait(&semaphore); - sem_destroy(&semaphore); - - return(IARM_RESULT_SUCCESS); -} - From 8772cac8b776d78cee9ef6d6da28ab82246e29f4 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 13:37:46 -0400 Subject: [PATCH 13/21] remove ble log level get/set iarm calls --- include/ctrlm_ipc_ble.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/include/ctrlm_ipc_ble.h b/include/ctrlm_ipc_ble.h index bcfb4b16..62477d64 100644 --- a/include/ctrlm_ipc_ble.h +++ b/include/ctrlm_ipc_ble.h @@ -27,19 +27,6 @@ #define CTRLM_BLE_IARM_BUS_API_REVISION (1) ///< Revision of the BLE IARM API #define CTRLM_BLE_MAX_IRDBS_SUPPORTED (8) ///< IR Protocol characteristic is a single octet containing a bitmask of IRDB values - -union daemon_logging_t { - uint8_t log_levels; - struct bit { - uint8_t fatal : 1; - uint8_t error : 1; - uint8_t warning : 1; - uint8_t milestone : 1; - uint8_t info : 1; - uint8_t debug : 1; - } level; -}; - typedef enum { CTRLM_BLE_RCU_UNPAIR_REASON_NONE = 0, CTRLM_BLE_RCU_UNPAIR_REASON_SFM, @@ -70,13 +57,6 @@ typedef enum { // IARM Calls into ControlMgr ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_network_id_t network_id; ///< IN - Identifier of network - daemon_logging_t logging; ///< IN/OUT - 0x020 Debug, 0x010 Info, 0x008 Milestone, 0x004 Warning, 0x002 Error, 0x001 Fatal - ctrlm_iarm_call_result_t result; ///< OUT - return code of the operation -} ctrlm_iarm_call_BleLogLevels_params_t; - typedef struct { unsigned char api_revision; ctrlm_network_id_t network_id; @@ -125,9 +105,6 @@ typedef struct { // (and ControlMgr must "register" these calls by name, with IARM) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#define CTRLM_BLE_IARM_CALL_GET_DAEMON_LOG_LEVELS "Ble_GetLogLevels" ///< IARM Call to get the logging level of BLE Daemon -#define CTRLM_BLE_IARM_CALL_SET_DAEMON_LOG_LEVELS "Ble_SetLogLevels" ///< IARM Call to set the logging level of BLE Daemon - #define CTRLM_BLE_IARM_CALL_GET_RCU_UNPAIR_REASON "Ble_GetRcuUnpairReason" #define CTRLM_BLE_IARM_CALL_GET_RCU_REBOOT_REASON "Ble_GetRcuRebootReason" #define CTRLM_BLE_IARM_CALL_GET_LAST_WAKEUP_KEY "Ble_GetRcuLastWakeupKey" From 5cd1573bce7332328b32dee994f0513f130ffc97 Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 14:27:56 -0400 Subject: [PATCH 14/21] remove device update iarm calls and events --- include/ctrlm_ipc.h | 8 +- include/ctrlm_ipc_device_update.h | 270 ------------------------------ src/ctrlm_device_update.cpp | 113 +------------ src/ctrlm_device_update.h | 7 - src/ctrlm_device_update_iarm.cpp | 236 -------------------------- src/ctrlm_utils.cpp | 10 -- src/ctrlm_utils.h | 1 - 7 files changed, 11 insertions(+), 634 deletions(-) diff --git a/include/ctrlm_ipc.h b/include/ctrlm_ipc.h index 65651119..01f4f4be 100644 --- a/include/ctrlm_ipc.h +++ b/include/ctrlm_ipc.h @@ -158,10 +158,10 @@ typedef enum { CTRLM_VOICE_IARM_EVENT_SESSION_ABORT = 16, ///< Voice session was aborted (denied) CTRLM_VOICE_IARM_EVENT_SESSION_SHORT = 17, ///< Voice session did not meet minimum duration CTRLM_VOICE_IARM_EVENT_MEDIA_SERVICE = 18, ///< Voice session results in media service event - CTRLM_DEVICE_UPDATE_IARM_EVENT_READY_TO_DOWNLOAD = 19, ///< Indicates that a device has an update available - CTRLM_DEVICE_UPDATE_IARM_EVENT_DOWNLOAD_STATUS = 20, ///< Provides status of a download that is in progress - CTRLM_DEVICE_UPDATE_IARM_EVENT_LOAD_BEGIN = 21, ///< Indicates that a device has started to load an image - CTRLM_DEVICE_UPDATE_IARM_EVENT_LOAD_END = 22, ///< Indicates that a device has completed an image load + CTRLM_DEVICE_UPDATE_IARM_EVENT_READY_TO_DOWNLOAD = 19, ///< deprecated + CTRLM_DEVICE_UPDATE_IARM_EVENT_DOWNLOAD_STATUS = 20, ///< deprecated + CTRLM_DEVICE_UPDATE_IARM_EVENT_LOAD_BEGIN = 21, ///< deprecated + CTRLM_DEVICE_UPDATE_IARM_EVENT_LOAD_END = 22, ///< deprecated CTRLM_RCU_IARM_EVENT_BATTERY_MILESTONE = 23, ///< Indicates that a battery milestone event occured CTRLM_RCU_IARM_EVENT_REMOTE_REBOOT = 24, ///< Indicates that a remote reboot event occured CTRLM_RCU_IARM_EVENT_RCU_REVERSE_CMD_BEGIN = 25, ///< Indicates that a RCU Reverse Command started diff --git a/include/ctrlm_ipc_device_update.h b/include/ctrlm_ipc_device_update.h index 61b08055..e5743819 100644 --- a/include/ctrlm_ipc_device_update.h +++ b/include/ctrlm_ipc_device_update.h @@ -19,51 +19,15 @@ #include "ctrlm_ipc.h" #ifndef _CTRLM_IPC_DEVICEUPDATE_H_ -/// @cond DOXYGEN_IGNORE #define _CTRLM_IPC_DEVICEUPDATE_H_ -/// @endcond -/// @file ctrlm_ipc_device_update.h -/// -/// @defgroup CTRLM_IPC_DEVICE_UPDATE IARM API - Device Update -/// @{ -/// -/// @defgroup CTRLM_IPC_DEVICE_UPDATE_COMMS Communication Interfaces -/// @defgroup CTRLM_IPC_DEVICE_UPDATE_CALLS IARM Remote Procedure Calls -/// @defgroup CTRLM_IPC_DEVICE_UPDATE_EVENTS IARM Events -/// @defgroup CTRLM_IPC_DEVICE_UPDATE_DEFINITIONS Constants -/// @defgroup CTRLM_IPC_DEVICE_UPDATE_ENUMS Enumerations -/// @defgroup CTRLM_IPC_DEVICE_UPDATE_STRUCTS Structures -/// -/// @addtogroup CTRLM_IPC_DEVICE_UPDATE_DEFINITIONS -/// @{ -/// @brief Constant Defintions -/// @details The Control Manager provides definitions for constant values. - -#define CTRLM_DEVICE_UPDATE_IARM_CALL_STATUS_GET "DeviceUpdate_StatusGet" ///< IARM Call to get Device Update Status -#define CTRLM_DEVICE_UPDATE_IARM_CALL_SESSION_GET "DeviceUpdate_SessionGet" ///< IARM Call to get Deivec Update Sessions -#define CTRLM_DEVICE_UPDATE_IARM_CALL_IMAGE_GET "DeviceUpdate_ImageGet" ///< IARM Call to get information about an update image -#define CTRLM_DEVICE_UPDATE_IARM_CALL_DOWNLOAD_INITIATE "DeviceUpdate_DownloadInitiate" ///< IARM Call to initiate a download -#define CTRLM_DEVICE_UPDATE_IARM_CALL_LOAD_INITIATE "DeviceUpdate_LoadInitiate" ///< IARM Call to initiate a load #define CTRLM_DEVICE_UPDATE_IARM_CALL_UPDATE_AVAILABLE "DeviceUpdate_UpdateAvail" ///< IARM Call to indictate update file available to process #define CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION (1) ///< Revision of the Device Update IARM API -#define CTRLM_DEVICE_UPDATE_MAX_IMAGES (50) ///< Maximum number of update images -#define CTRLM_DEVICE_UPDATE_MAX_SESSIONS (50) ///< Maximum number of update sessions #define CTRLM_DEVICE_UPDATE_PATH_LENGTH (512) ///< Maximum length of an update path string -#define CTRLM_DEVICE_UPDATE_ERROR_LENGTH (256) ///< Maximum length of an error string #define CTRLM_DEVICE_UPDATE_VERSION_LENGTH (18) ///< Maximum length of the version string #define CTRLM_DEVICE_UPDATE_DEVICE_NAME_LENGTH (64) ///< Maximum length of a device's name -/// @} - -/// @addtogroup CTRLM_IPC_DEVICE_UPDATE_ENUMS -/// @{ -/// @brief Enumerated Types -/// @details The Control Manager provides enumerated types for logical groups of values. - -/// @brief Device Update Load Types -/// @details An enumeration of the types of load that can be performed. typedef enum { CTRLM_DEVICE_UPDATE_IARM_LOAD_TYPE_DEFAULT = 0, ///< The default load type will be used. CTRLM_DEVICE_UPDATE_IARM_LOAD_TYPE_NORMAL = 1, ///< Allows the caller to defer to a number of seconds in the future as well as a time after inactivity. This setting will drive two other parameters: time_to_load and time_after_inactivity. @@ -74,8 +38,6 @@ typedef enum { CTRLM_DEVICE_UPDATE_IARM_LOAD_TYPE_MAX = 4 ///< Load type maximum value } ctrlm_device_update_iarm_load_type_t; -/// @brief Device Update Load Results -/// @details An enumeration of the result codes that can be returned from the image load operation. typedef enum { CTRLM_DEVICE_UPDATE_IARM_LOAD_RESULT_SUCCESS = 0, ///< The image load completed successfully. CTRLM_DEVICE_UPDATE_IARM_LOAD_RESULT_ERROR_REQUEST = 1, ///< The image load failed due to a request error. @@ -88,48 +50,9 @@ typedef enum { CTRLM_DEVICE_UPDATE_IARM_LOAD_RESULT_MAX = 8 ///< Load result maximum value } ctrlm_device_update_iarm_load_result_t; -/// @brief Device Update Image Types -/// @details An enumeration of the types of images that can be used in device updates. -typedef enum { - CTRLM_DEVICE_UPDATE_IMAGE_TYPE_FIRMWARE = 0, ///< A firmware image - CTRLM_DEVICE_UPDATE_IMAGE_TYPE_AUDIO_DATA = 1, ///< An audio data image - CTRLM_DEVICE_UPDATE_IMAGE_TYPE_OTHER = 2, ///< Other type of image - CTRLM_DEVICE_UPDATE_IMAGE_TYPE_MAX = 3 ///< Image type maximum value -} ctrlm_device_update_image_type_t; - -/// @brief Session Id Type -/// @details Type definition for the session identifier. typedef unsigned char ctrlm_device_update_session_id_t; -/// @brief Image Id Type -/// @details Type definition for the image identifer. typedef unsigned char ctrlm_device_update_image_id_t; -/// @} - -/// @addtogroup CTRLM_IPC_DEVICE_UPDATE_STRUCTS -/// @{ -/// @brief Structure Definitions -/// @details The Control Manager provides structures that are used in IARM calls and events. - -/// @brief Structure of Device Update's Status Get IARM call -/// @details This structure provides information about the status of device update. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the IARM call - unsigned char image_qty; ///< The number of device update images available. - ctrlm_device_update_image_id_t image_ids[CTRLM_DEVICE_UPDATE_MAX_IMAGES]; ///< An array of image id's. Each image id corresponds to a specific download image. - unsigned char session_qty; ///< The number of sessions populated in the session id's array. - ctrlm_device_update_session_id_t session_ids[CTRLM_DEVICE_UPDATE_MAX_SESSIONS]; ///< An array of session id's. Each session id corresponds to a specific download and a specific device. - unsigned char interactive_download; ///< A flag indicating whether interactive downloads are enabled (1) or not (0). - unsigned char interactive_load; ///< A flag indicating whether interactive loads are enabled (1) or not (0). - unsigned char percent_increment; ///< A value from 0-100 indicating the increment at which download status updates events will be generated. - unsigned char load_immediately; ///< A flag indicating whether to load the image immediately (1) or not (0). - unsigned char running; ///< A flag indicating that device update is running (1) or not (0). -} ctrlm_device_update_iarm_call_status_t; - -/// @brief Structure of Device Update's Update Availible IARM call -/// @details This call is made to announce that the xconf CDL script has found and downloaded an update tar file for one or more of our remote controls. The tar file needs to be -/// processed and the update procedure started in order to send the updated binary to the remote when the remote checks in typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -137,31 +60,6 @@ typedef struct { char firmwareNames[CTRLM_DEVICE_UPDATE_PATH_LENGTH]; ///< file names of update files comma delimited } ctrlm_device_update_iarm_call_update_available_t; -/// @brief Structure that describes an update image -/// @details This structure provides additional details about the image that is being used for an update. -typedef struct { - ctrlm_device_update_image_id_t image_id; ///< Identifier of the image - ctrlm_device_update_image_type_t image_type; ///< The type of image - unsigned char force_update; ///< A flag indicating that the image must be updated regardless of software revision (1) or not (0). - unsigned long image_size; ///< The size of the image in bytes. - char device_name[CTRLM_DEVICE_UPDATE_DEVICE_NAME_LENGTH]; ///< The device's name string - char device_class[CTRLM_DEVICE_UPDATE_DEVICE_NAME_LENGTH]; ///< The class of the device ("remotes"). - char image_version[CTRLM_DEVICE_UPDATE_VERSION_LENGTH]; ///< The image's version string - char image_file_path[CTRLM_DEVICE_UPDATE_PATH_LENGTH]; ///< The full path to the image file. -} ctrlm_device_update_image_t; - -/// @brief Structure that describes an update image -/// @details This structure provides additional details about the image that is being used for an update. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the IARM call - ctrlm_device_update_image_id_t image_id; ///< Identifier of the image - ctrlm_device_update_image_t image; ///< The image details -} ctrlm_device_update_iarm_call_image_t; - -/// @brief Structure that describes an update device -/// @details This structure provides additional information about the hardware and software revisions of a device -/// that is being updated. typedef struct { char name[CTRLM_DEVICE_UPDATE_DEVICE_NAME_LENGTH]; ///< The name of the device char version_software[CTRLM_DEVICE_UPDATE_VERSION_LENGTH]; ///< The device's software version string @@ -169,172 +67,4 @@ typedef struct { char version_bootloader[CTRLM_DEVICE_UPDATE_VERSION_LENGTH]; ///< The device's bootloader version string } ctrlm_device_update_device_t; -// Storage of state for a specific Update In Progress (session) -/// @brief Structure of Device Update's Session Get IARM call -/// @details This structure is used in the session get call. The session id field is an input parameter indicating -/// the session to get details for. The rest of the parameters are output when the call is successful. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the IARM call - ctrlm_device_update_session_id_t session_id; ///< The session ID of the download. Corresponds to a specific download and a specific device. - ctrlm_device_update_image_id_t image_id; ///< The identifier of the image that is being used for the update. - ctrlm_device_update_device_t device; ///< Information about the device that is being updated. - unsigned char interactive_download; ///< A flag indicating whether the download is interactive (1) or not (0). - unsigned char interactive_load; ///< A flag indicating whether the load is interactive (1) or not (0). - unsigned char download_percent; ///< The percentage of the download that has been completed in percent (0 - 100). - unsigned char load_complete; ///< A flag indicating whether the load has completed (1) or not (0). - int error_code; ///< An error code associated with the update session. -} ctrlm_device_update_iarm_call_session_t; - -/// @brief Structure of Device Update's Download Initiate IARM call -/// @details This call is made to initiate a download for a particular device. The download can be initiated as a background -/// download (meaning no impact to the device's normal operation) or an immediate download (move data to the device as fast as possible). -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the IARM call - ctrlm_device_update_session_id_t session_id; ///< The session ID of the download. Corresponds to a specific download and a specific device. - unsigned char background_download; ///< Whether the background should be full speed or low speed in the background - unsigned char percent_increment; ///< Specifies the increment at which download status events are generated. If the value is 0x0, then an event will be sent at 0 and 100. If the value is 0xFF, then the default increment will be used. - unsigned char load_image_immediately; ///< Indicates that the image should be loaded immediately after the download is complete. -} ctrlm_device_update_iarm_call_download_params_t; - -/// @brief Structure of Device Update's Load Initiate IARM call -/// @details This call is made to initiate loading of an image for a particular device. The initiator can specify whether to load immediately (this would be expected if -/// the download was immediate), load after a given time and a given amount of inactivity, to poll repeatedly for updated instructions, or to abort an existing download session. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the IARM call - ctrlm_device_update_session_id_t session_id; ///< The session ID of the download. Corresponds to a specific download and a specific device. - ctrlm_device_update_iarm_load_type_t load_type; ///< The type of load to be used for the device - unsigned int time_to_load; ///< The amount of time (in seconds) to wait before loading the image. - unsigned int time_after_inactive; ///< The amount of inactive time (in seconds) to wait before loading the image. -} ctrlm_device_update_iarm_call_load_params_t; - -/// @brief Structure of Device Update's Ready to Download IARM event -/// @details This event is broadcast from the Device Update to inform listeners that a device has an available update. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_device_update_session_id_t session_id; ///< The session ID of the download. Corresponds to a specific download and a specific device. - ctrlm_device_update_image_id_t image_id; ///< The identifier of the image that is being used for the update. - ctrlm_device_update_device_t device; ///< Information about the device that is being updated. -} ctrlm_device_update_iarm_event_ready_to_download_t; - -/// @brief Structure of Device Update's Download Status IARM event -/// @details This event is broadcast from the Device Update to inform listeners of the status of the download. -/// The Device Update sends an initial status with percent complete (0) and a final status with percent complete (100). -/// This will notify listeners of the the beginning and end, respectively of the download. The Device Update will send -/// send status updates at periods defined by the percent increment in the Download Initiate call. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_device_update_session_id_t session_id; ///< The session ID of the download. Corresponds to a specific download and a specific device. - unsigned char percent_complete; ///< The percentage of the download that has completed in percent (0 - 100). -} ctrlm_device_update_iarm_event_download_status_t; - -/// @brief Structure of Device Update's Load Begin IARM event -/// @details This event notifies listeners that the device has started to load the image. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_device_update_session_id_t session_id; ///< The session ID of the download. Corresponds to a specific download and a specific device. -} ctrlm_device_update_iarm_event_load_begin_t; - -/// @brief Structure of Device Update's Load End IARM event -/// @details This event notifies listeners that the load has completed with the following result. Receiving -/// this event ends the update and invalidates the session id. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_device_update_session_id_t session_id; ///< The session ID of the download. Corresponds to a specific download and a specific device. - ctrlm_device_update_iarm_load_result_t result; ///< The result of the load operation. -} ctrlm_device_update_iarm_event_load_end_t; -/// @} - -/// @addtogroup CTRLM_IPC_DEVICE_UPDATE_CALLS -/// @{ -/// @brief Remote Calls accessible via IARM bus -/// @details IARM calls are synchronous calls to functions provided by other IARM bus members. Each bus member can register -/// calls using the IARM_Bus_RegisterCall() function. Other members can invoke the call using the IARM_Bus_Call() function. -/// -/// - - - -/// Call Registration -/// ----------------- -/// -/// The Device Update component of Control Manager registers the following calls. -/// -/// | Bus Name | Call Name | Argument | Description | -/// | :------- | :-------- | :------- | :---------- | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_CALL_STATUS_GET | ctrlm_device_update_iarm_status_t * | Provides information about the status of device update | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_CALL_SESSION_GET | ctrlm_device_update_iarm_session_t * | Provides information about an update session | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_CALL_IMAGE_GET | ctrlm_device_update_iarm_image_t * | Provides information about an update image | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_CALL_DOWNLOAD_INITIATE | ctrlm_device_update_iarm_download_params_t * | Initiates an image download to a device | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_CALL_LOAD_INITIATE | ctrlm_device_update_iarm_load_params_t * | Initiates an image load on a device | -/// -/// Examples: -/// -/// Get Device Update status: -/// -/// IARM_Result_t result; -/// ctrlm_device_update_iarm_status_t status; -/// -/// result = IARM_Bus_Call(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_DEVICE_UPDATE_IARM_CALL_STATUS_GET, (void *)&status, sizeof(status)); -/// if(IARM_RESULT_SUCCESS == result && CTRLM_IARM_CALL_RESULT_SUCCESS == status.result) { -/// // Status was successfully retrieved -/// } -/// -/// Get Device Update session: -/// -/// IARM_Result_t result; -/// ctrlm_device_update_iarm_session_t session; -/// session.session_id = 1; // The session id values are returned from status get call or ready to download event -/// -/// result = IARM_Bus_Call(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_DEVICE_UPDATE_IARM_CALL_SESSION_GET, (void *)&session, sizeof(session)); -/// if(IARM_RESULT_SUCCESS == result && CTRLM_IARM_CALL_RESULT_SUCCESS == session.result) { -/// // Session was retrieved successfully -/// } -/// } -/// -/// @} - -/// @addtogroup CTRLM_IPC_DEVICE_UPDATE_EVENTS -/// @{ -/// @brief Broadcast Events accessible via IARM bus -/// @details The IARM bus uses events to broadcast information to interested clients. An event is sent separately to each client. There are no return values for an event and no -/// guarantee that a client will receive the event. Each event has a different argument structure according to the information being transferred to the clients. The events that the -/// Device Update component in Control Manager generates and subscribes to are detailed below. -/// -/// - - - -/// Event Generation (Broadcast) -/// ---------------------------- -/// -/// The Device Update component generates events that can be received by other processes connected to the IARM bus. The following events -/// are registered during initialization: -/// -/// | Bus Name | Event Name | Argument | Description | -/// | :------- | :--------- | :------- | :---------- | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_EVENT_READY_TO_DOWNLOAD | ctrlm_device_update_iarm_event_ready_to_download_t * | Generated when an update is detected for a device. | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_EVENT_DOWNLOAD_STATUS | ctrlm_device_update_iarm_event_download_status_t * | Generated at 0 and 100 percent and each time a download percent increment is reached. | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_EVENT_LOAD_BEGIN | ctrlm_device_update_iarm_event_load_begin_t * | Generated when a device begins to load an image | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_DEVICE_UPDATE_IARM_EVENT_LOAD_END | ctrlm_device_update_iarm_event_load_end_t * | Generated when a device completes loading an image | -/// -/// IARM events are available on a subscription basis. In order to receive an event, a client must explicitly register to receive the event by calling -/// IARM_Bus_RegisterEventHandler() with the bus name, event name and a @link IARM_EventHandler_t handler function@endlink. Events may be generated at any time by the -/// Device Update component. All events are asynchronous. -/// -/// Examples: -/// -/// Register for a Device Update event: -/// -/// IARM_Result_t result; -/// -/// result = IARM_Bus_RegisterEventHandler(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_DEVICE_UPDATE_IARM_EVENT_DOWNLOAD_STATUS, download_status_handler_func); -/// if(IARM_RESULT_SUCCESS == result) { -/// // Event registration was set successfully -/// } -/// } -/// -/// @} -/// @addtogroup CTRLM_IPC_DEVICE_UPDATE_COMMS -/// @{ -/// @brief Communication Interfaces -/// @details The following diagrams detail the main communication paths for the Device Update component. -/// @} -/// @} #endif diff --git a/src/ctrlm_device_update.cpp b/src/ctrlm_device_update.cpp index 629de02e..a204c1e5 100644 --- a/src/ctrlm_device_update.cpp +++ b/src/ctrlm_device_update.cpp @@ -1745,10 +1745,10 @@ guint16 ctrlm_device_update_rf4ce_image_data_read(ctrlm_network_id_t network_id, session_info->bytes_read_controller += qty_read; guchar percent_complete = (session_info->bytes_read_controller * 100) / image_info->size; if(percent_complete >= session_info->percent_next) { - ctrlm_device_update_iarm_event_download_status(session_info->session_id, percent_complete); + // ctrlm_device_update_iarm_event_download_status(session_info->session_id, percent_complete); session_info->percent_next += session_info->percent_increment; } else if(session_info->bytes_read_controller >= image_info->size) { - ctrlm_device_update_iarm_event_download_status(session_info->session_id, 100); + // ctrlm_device_update_iarm_event_download_status(session_info->session_id, 100); } @@ -1860,7 +1860,7 @@ gboolean ctrlm_device_update_rf4ce_begin(ctrlm_network_id_t network_id, ctrlm_co *session_id_out = g_ctrlm_device_update.rf4ce_sessions[controller_id].session_id; } // Broadcast "ready to download" event - ctrlm_device_update_iarm_event_ready_to_download(g_ctrlm_device_update.rf4ce_sessions[controller_id].session_id); + // ctrlm_device_update_iarm_event_ready_to_download(g_ctrlm_device_update.rf4ce_sessions[controller_id].session_id); } if(g_ctrlm_device_update.prefs.download.interactive && !g_ctrlm_device_update.rf4ce_sessions[controller_id].download_initiated) { // interactive, note that the device is ready and wait for download initiate from update manager service begin_info->when = RF4CE_DEVICE_UPDATE_IMAGE_CHECK_POLL_TIME; @@ -1946,7 +1946,7 @@ void ctrlm_device_update_rf4ce_end(ctrlm_network_id_t network_id, ctrlm_controll ctrlm_device_update_rf4ce_image_info_t *image_info = &(*g_ctrlm_device_update.rf4ce_images)[image_id]; ctrlm_device_update_rf4ce_session_t *session_info = &g_ctrlm_device_update.rf4ce_sessions[controller_id]; - ctrlm_device_update_iarm_event_load_end(session_info->session_id, result); + // ctrlm_device_update_iarm_event_load_end(session_info->session_id, result); ctrlm_device_update_rf4ce_download_complete(session_info); @@ -2030,11 +2030,11 @@ void ctrlm_device_update_rf4ce_load_info(ctrlm_network_id_t network_id, ctrlm_co load_info->when = RF4CE_DEVICE_UPDATE_IMAGE_LOAD_WHEN_INACTIVE; load_info->time = session_info->time_after_inactive; XLOGD_INFO("<%s> Load Image Interactive. When inactive %d seconds", session_info->device_name.c_str(), load_info->time); - ctrlm_device_update_iarm_event_load_begin(session_info->session_id); + // ctrlm_device_update_iarm_event_load_begin(session_info->session_id); } else { load_info->when = RF4CE_DEVICE_UPDATE_IMAGE_LOAD_NOW; XLOGD_INFO("<%s> Load Image Interactive. Now.", session_info->device_name.c_str()); - ctrlm_device_update_iarm_event_load_begin(session_info->session_id); + // ctrlm_device_update_iarm_event_load_begin(session_info->session_id); } } else if(now_local->tm_hour < g_ctrlm_device_update.prefs.load.before_hour) { // the time is between midnight and load_before_hour if(session_info->time_after_inactive > 0) { @@ -2045,7 +2045,7 @@ void ctrlm_device_update_rf4ce_load_info(ctrlm_network_id_t network_id, ctrlm_co load_info->when = RF4CE_DEVICE_UPDATE_IMAGE_LOAD_NOW; XLOGD_INFO("<%s> Load Image Now. Time is %02d:%02d Load before %02d:00", session_info->device_name.c_str(), now_local->tm_hour, now_local->tm_min, g_ctrlm_device_update.prefs.load.before_hour); } - ctrlm_device_update_iarm_event_load_begin(session_info->session_id); + // ctrlm_device_update_iarm_event_load_begin(session_info->session_id); //} else if(0) { // Wait for inactivity period // load_info->when = RF4CE_DEVICE_UPDATE_IMAGE_LOAD_WHEN_INACTIVE; // load_info->time = CTRLM_DEVICE_UPDATE_RF4CE_DEFAULT_LOAD_INACTIVE_TIME; @@ -2119,33 +2119,6 @@ void ctrlm_device_update_rf4ce_notify_reboot(ctrlm_network_id_t network_id, ctrl DEVICE_UPDATE_MUTEX_UNLOCK(); } -gboolean ctrlm_device_update_session_get_by_id(ctrlm_device_update_session_id_t session_id, ctrlm_device_update_iarm_call_session_t *session) { - if(session == NULL) { - return(false); - } - DEVICE_UPDATE_MUTEX_LOCK(); - // Locate the session - for(map::iterator it = g_ctrlm_device_update.rf4ce_sessions.begin(); it != g_ctrlm_device_update.rf4ce_sessions.end(); it++) { - if(it->second.session_id == session_id) { - if(it->second.image_id >= g_ctrlm_device_update.rf4ce_images->size()) { - continue; - } - ctrlm_device_update_device_get_from_session(&it->second, &session->device); - - session->image_id = it->second.image_id; - session->interactive_download = it->second.interactive_download; - session->interactive_load = it->second.interactive_load; - session->download_percent = (it->second.bytes_read_controller * 100) / (*g_ctrlm_device_update.rf4ce_images)[it->second.image_id].size; - session->load_complete = false; - session->error_code = 0; - DEVICE_UPDATE_MUTEX_UNLOCK(); - return(true); - } - } - DEVICE_UPDATE_MUTEX_UNLOCK(); - return(false); -} - gboolean ctrlm_device_update_image_device_get_by_id(ctrlm_device_update_session_id_t session_id, ctrlm_device_update_image_id_t *image_id, ctrlm_device_update_device_t *device) { if(image_id == NULL || device == NULL) { return(false); @@ -2184,78 +2157,6 @@ void ctrlm_device_update_device_get_from_session(ctrlm_device_update_rf4ce_sessi device->name[CTRLM_DEVICE_UPDATE_DEVICE_NAME_LENGTH - 1] = '\0'; } -gboolean ctrlm_device_update_image_get_by_id(ctrlm_device_update_image_id_t image_id, ctrlm_device_update_image_t *image) { - errno_t safec_rc = -1; - DEVICE_UPDATE_MUTEX_LOCK(); - - if(image_id >= g_ctrlm_device_update.rf4ce_images->size() || image == NULL) { - DEVICE_UPDATE_MUTEX_UNLOCK(); - return(false); - } - ctrlm_device_update_rf4ce_image_info_t *image_info = &(*g_ctrlm_device_update.rf4ce_images)[image_id]; - - switch(image_info->image_type) { - case RF4CE_DEVICE_UPDATE_IMAGE_TYPE_FIRMWARE: image->image_type = CTRLM_DEVICE_UPDATE_IMAGE_TYPE_FIRMWARE; break; - case RF4CE_DEVICE_UPDATE_IMAGE_TYPE_AUDIO_DATA_1: image->image_type = CTRLM_DEVICE_UPDATE_IMAGE_TYPE_AUDIO_DATA; break; - default: image->image_type = CTRLM_DEVICE_UPDATE_IMAGE_TYPE_OTHER; break; - } - image->force_update = image_info->force_update; - image->image_size = image_info->size; - safec_rc = strncpy_s(image->device_name, sizeof(image->device_name), image_info->device_name.c_str(), CTRLM_DEVICE_UPDATE_DEVICE_NAME_LENGTH - 1); - ERR_CHK(safec_rc); - safec_rc = strcpy_s(image->device_class, sizeof(image->device_class), "remotes"); - ERR_CHK(safec_rc); - safec_rc = sprintf_s(image->image_version, CTRLM_DEVICE_UPDATE_VERSION_LENGTH, "%u.%u.%u.%u", image_info->version_software.major, image_info->version_software.minor, image_info->version_software.revision, image_info->version_software.patch); - if(safec_rc < EOK) { - ERR_CHK(safec_rc); - } - safec_rc = strncpy_s(image->image_file_path, sizeof(image->image_file_path), image_info->file_path_archive.c_str(), CTRLM_DEVICE_UPDATE_DEVICE_NAME_LENGTH - 1); - ERR_CHK(safec_rc); - - image->device_name[CTRLM_DEVICE_UPDATE_DEVICE_NAME_LENGTH - 1] = '\0'; - - image->image_file_path[CTRLM_DEVICE_UPDATE_PATH_LENGTH - 1] = '\0'; - - DEVICE_UPDATE_MUTEX_UNLOCK(); - - return(true); -} - -gboolean ctrlm_device_update_status_info_get(ctrlm_device_update_iarm_call_status_t *status) { - if(status == NULL) { - return(false); - } - guint32 session_qty = 0; - - DEVICE_UPDATE_MUTEX_LOCK(); - - map::iterator it; - for(it = g_ctrlm_device_update.rf4ce_sessions.begin(); it != g_ctrlm_device_update.rf4ce_sessions.end(); it++) { - status->session_ids[session_qty] = it->second.session_id; - session_qty++; - if(session_qty >= CTRLM_DEVICE_UPDATE_MAX_SESSIONS) { - break; - } - } - - status->session_qty = session_qty; - status->image_qty = g_ctrlm_device_update.rf4ce_images->size(); - if(status->image_qty >= CTRLM_DEVICE_UPDATE_MAX_IMAGES) { - status->image_qty = CTRLM_DEVICE_UPDATE_MAX_IMAGES; - } - for(unsigned long index = 0; index < status->image_qty; index++) { - status->image_ids[index] = index; - } - status->interactive_download = g_ctrlm_device_update.prefs.download.interactive; - status->interactive_load = g_ctrlm_device_update.prefs.load.interactive; - status->percent_increment = g_ctrlm_device_update.prefs.download.percent_increment; - status->load_immediately = g_ctrlm_device_update.prefs.download.load_immediately; - status->running = g_ctrlm_device_update.running; - - DEVICE_UPDATE_MUTEX_UNLOCK(); - return(true); -} - gboolean ctrlm_device_update_interactive_download_start(ctrlm_device_update_session_id_t session_id, gboolean background, guchar percent_increment, gboolean load_immediately) { if(!g_ctrlm_device_update.prefs.download.interactive) { XLOGD_WARN("Interactive Download is Disabled"); diff --git a/src/ctrlm_device_update.h b/src/ctrlm_device_update.h index 04973081..e6e4b953 100644 --- a/src/ctrlm_device_update.h +++ b/src/ctrlm_device_update.h @@ -111,16 +111,9 @@ void ctrlm_device_update_rf4ce_end(ctrlm_network_id_t network_id, ctrlm_cont void ctrlm_device_update_rf4ce_load_info(ctrlm_network_id_t network_id, ctrlm_controller_id_t controller_id, guint16 image_id, rf4ce_device_update_load_info_t *load_info); void ctrlm_device_update_rf4ce_notify_reboot(ctrlm_network_id_t network_id, ctrlm_controller_id_t controller_id, gboolean session_resume); gboolean ctrlm_device_update_is_image_id_valid(ctrlm_device_update_image_id_t image_id); -gboolean ctrlm_device_update_session_get_by_id(ctrlm_device_update_session_id_t session_id, ctrlm_device_update_iarm_call_session_t *session); gboolean ctrlm_device_update_image_device_get_by_id(ctrlm_device_update_session_id_t session_id, ctrlm_device_update_image_id_t *image_id, ctrlm_device_update_device_t *device); -gboolean ctrlm_device_update_image_get_by_id(ctrlm_device_update_image_id_t image_id, ctrlm_device_update_image_t *image); -gboolean ctrlm_device_update_status_info_get(ctrlm_device_update_iarm_call_status_t *status); gboolean ctrlm_device_update_interactive_download_start(ctrlm_device_update_session_id_t session_id, gboolean background, guchar percent_increment, gboolean load_image_immediately); gboolean ctrlm_device_update_interactive_load_start(ctrlm_device_update_session_id_t session_id, ctrlm_device_update_iarm_load_type_t load_type, guint32 time_to_load, guint32 time_after_inactive); -void ctrlm_device_update_iarm_event_ready_to_download(ctrlm_device_update_session_id_t session_id); -void ctrlm_device_update_iarm_event_download_status(ctrlm_device_update_session_id_t session_id, guchar percent_complete); -void ctrlm_device_update_iarm_event_load_begin(ctrlm_device_update_session_id_t session_id); -void ctrlm_device_update_iarm_event_load_end(ctrlm_device_update_session_id_t session_id, ctrlm_device_update_iarm_load_result_t result); gboolean ctrlm_device_update_is_controller_updating(ctrlm_network_id_t network_id, ctrlm_controller_id_t controller_id, bool ignore_load_waiting); gboolean ctrlm_device_update_process_xconf_update(std::string fileLocation); device_update_check_locations_t ctrlm_device_update_check_locations_get(void); diff --git a/src/ctrlm_device_update_iarm.cpp b/src/ctrlm_device_update_iarm.cpp index 5892c7cb..4bd1b041 100644 --- a/src/ctrlm_device_update_iarm.cpp +++ b/src/ctrlm_device_update_iarm.cpp @@ -28,46 +28,12 @@ #include "ctrlm_device_update.h" #include -static IARM_Result_t ctrlm_device_update_status_get(void *arg); -static IARM_Result_t ctrlm_device_update_session_get(void *arg); -static IARM_Result_t ctrlm_device_update_image_get(void *arg); -static IARM_Result_t ctrlm_device_update_download_initiate(void *arg); -static IARM_Result_t ctrlm_device_update_load_initiate(void *arg); static IARM_Result_t ctrlm_device_update_update_available(void *arg); gboolean ctrlm_device_update_init_iarm() { IARM_Result_t rc; XLOGD_INFO(""); - rc = IARM_Bus_RegisterCall(CTRLM_DEVICE_UPDATE_IARM_CALL_STATUS_GET, ctrlm_device_update_status_get); - if(rc != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("CTRLM_DEVICE_UPDATE_IARM_CALL_STATUS_GET %d", rc); - return(false); - } - - rc = IARM_Bus_RegisterCall(CTRLM_DEVICE_UPDATE_IARM_CALL_SESSION_GET, ctrlm_device_update_session_get); - if(rc != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("CTRLM_DEVICE_UPDATE_IARM_CALL_SESSION_GET %d", rc); - return(false); - } - - rc = IARM_Bus_RegisterCall(CTRLM_DEVICE_UPDATE_IARM_CALL_IMAGE_GET, ctrlm_device_update_image_get); - if(rc != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("CTRLM_DEVICE_UPDATE_IARM_CALL_IMAGE_GET %d", rc); - return(false); - } - - rc = IARM_Bus_RegisterCall(CTRLM_DEVICE_UPDATE_IARM_CALL_DOWNLOAD_INITIATE, ctrlm_device_update_download_initiate); - if(rc != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("CTRLM_DEVICE_UPDATE_IARM_CALL_DOWNLOAD_INITIATE %d", rc); - return(false); - } - - rc = IARM_Bus_RegisterCall(CTRLM_DEVICE_UPDATE_IARM_CALL_LOAD_INITIATE, ctrlm_device_update_load_initiate); - if(rc != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("CTRLM_DEVICE_UPDATE_IARM_CALL_LOAD_INITIATE %d", rc); - return(false); - } rc = IARM_Bus_RegisterCall(CTRLM_DEVICE_UPDATE_IARM_CALL_UPDATE_AVAILABLE, ctrlm_device_update_update_available); if(rc != IARM_RESULT_SUCCESS) { XLOGD_ERROR("CTRLM_DEVICE_UPDATE_IARM_CALL_UPDATE_AVAILABLE %d", rc); @@ -121,205 +87,3 @@ IARM_Result_t ctrlm_device_update_update_available(void *arg) { return IARM_RESULT_SUCCESS; } - -IARM_Result_t ctrlm_device_update_status_get(void *arg) { - ctrlm_device_update_iarm_call_status_t *status = (ctrlm_device_update_iarm_call_status_t *) arg; - if(status == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(status->api_revision != CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", status->api_revision, CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION); - status->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO(""); - - if(!ctrlm_device_update_status_info_get(status)) { - XLOGD_ERROR("Error getting status"); - status->result = CTRLM_IARM_CALL_RESULT_ERROR; - } else { - status->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - } - return IARM_RESULT_SUCCESS; -} - -IARM_Result_t ctrlm_device_update_session_get(void *arg) { - ctrlm_device_update_iarm_call_session_t *session = (ctrlm_device_update_iarm_call_session_t *) arg; - if(session == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(session->api_revision != CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", session->api_revision, CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION); - session->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - if(session->session_id == 0) { - XLOGD_ERROR("Invalid session id %u", session->session_id); - session->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - if(!ctrlm_device_update_session_get_by_id(session->session_id, session)) { - XLOGD_ERROR("Session id not found %u", session->session_id); - session->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - - XLOGD_INFO("Found session id %u", session->session_id); - session->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - - return(IARM_RESULT_SUCCESS); -} - -IARM_Result_t ctrlm_device_update_image_get(void *arg) { - ctrlm_device_update_iarm_call_image_t *image = (ctrlm_device_update_iarm_call_image_t *) arg; - if(image == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(image->api_revision != CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", image->api_revision, CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION); - image->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO(""); - - if(!ctrlm_device_update_is_image_id_valid(image->image_id)) { - XLOGD_ERROR("Invalid image id %u", image->image_id); - image->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - - if(!ctrlm_device_update_image_get_by_id(image->image_id, &image->image)) { - XLOGD_ERROR("image not found with image id %u", image->image_id); - image->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO("Found image with image id %u", image->image_id); - image->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - - return(IARM_RESULT_SUCCESS); -} - -IARM_Result_t ctrlm_device_update_download_initiate(void *arg) { - ctrlm_device_update_iarm_call_download_params_t *params = (ctrlm_device_update_iarm_call_download_params_t *) arg; - if(params == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(params->api_revision != CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", params->api_revision, CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION); - params->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - if(params->session_id == 0) { - XLOGD_ERROR("Invalid session id %u", params->session_id); - params->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - - if(!ctrlm_device_update_interactive_download_start(params->session_id, params->background_download, params->percent_increment, params->load_image_immediately)) { - XLOGD_ERROR("unable to start download %u", params->session_id); - params->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO("Session id %u", params->session_id); - params->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - return(IARM_RESULT_SUCCESS); -} - -IARM_Result_t ctrlm_device_update_load_initiate(void *arg) { - ctrlm_device_update_iarm_call_load_params_t *params = (ctrlm_device_update_iarm_call_load_params_t *) arg; - if(params == NULL) { - XLOGD_ERROR("NULL parameter"); - return(IARM_RESULT_INVALID_PARAM); - } - if(params->api_revision != CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", params->api_revision, CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION); - params->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_SUCCESS); - } - if(params->session_id == 0) { - XLOGD_ERROR("Invalid session id %u", params->session_id); - params->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - - switch(params->load_type) { - case CTRLM_DEVICE_UPDATE_IARM_LOAD_TYPE_DEFAULT: - case CTRLM_DEVICE_UPDATE_IARM_LOAD_TYPE_NORMAL: - case CTRLM_DEVICE_UPDATE_IARM_LOAD_TYPE_POLL: - case CTRLM_DEVICE_UPDATE_IARM_LOAD_TYPE_ABORT: - break; - default: - XLOGD_ERROR("Invalid load type %d", params->load_type); - params->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - - if(!ctrlm_device_update_interactive_load_start(params->session_id, params->load_type, params->time_to_load, params->time_after_inactive)) { - XLOGD_ERROR("unable to start download %u", params->session_id); - params->result = CTRLM_IARM_CALL_RESULT_ERROR; - return(IARM_RESULT_SUCCESS); - } - XLOGD_INFO("Session id %u", params->session_id); - params->result = CTRLM_IARM_CALL_RESULT_SUCCESS; - return(IARM_RESULT_SUCCESS); -} - -void ctrlm_device_update_iarm_event_ready_to_download(ctrlm_device_update_session_id_t session_id) { - ctrlm_device_update_iarm_event_ready_to_download_t event = {0}; - event.api_revision = CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION; - event.session_id = session_id; - - if(!ctrlm_device_update_image_device_get_by_id(session_id, &event.image_id, &event.device)) { - XLOGD_ERROR("Session details not found %u", session_id); - return; - } - - XLOGD_INFO("Found session id %u", session_id); - - IARM_Result_t retval = IARM_Bus_BroadcastEvent(CTRLM_MAIN_IARM_BUS_NAME, (IARM_EventId_t) CTRLM_DEVICE_UPDATE_IARM_EVENT_READY_TO_DOWNLOAD, (void *) &event, sizeof(event)); - if(retval != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("Event send error (%i)", retval); - } -} - -void ctrlm_device_update_iarm_event_download_status(ctrlm_device_update_session_id_t session_id, guchar percent_complete) { - ctrlm_device_update_iarm_event_download_status_t event = {0}; - event.api_revision = CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION; - event.session_id = session_id; - event.percent_complete = percent_complete; - XLOGD_INFO("Session Id %u Percent complete %u", session_id, percent_complete); - - IARM_Result_t retval = IARM_Bus_BroadcastEvent(CTRLM_MAIN_IARM_BUS_NAME, (IARM_EventId_t) CTRLM_DEVICE_UPDATE_IARM_EVENT_DOWNLOAD_STATUS, (void *) &event, sizeof(event)); - if(retval != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("Event send error (%i)", retval); - } -} - -void ctrlm_device_update_iarm_event_load_begin(ctrlm_device_update_session_id_t session_id) { - ctrlm_device_update_iarm_event_load_begin_t event = {0}; - event.api_revision = CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION; - event.session_id = session_id; - XLOGD_INFO("Session Id %u", session_id); - - IARM_Result_t retval = IARM_Bus_BroadcastEvent(CTRLM_MAIN_IARM_BUS_NAME, (IARM_EventId_t) CTRLM_DEVICE_UPDATE_IARM_EVENT_LOAD_BEGIN, (void *) &event, sizeof(event)); - if(retval != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("Event send error (%i)", retval); - } -} - -void ctrlm_device_update_iarm_event_load_end(ctrlm_device_update_session_id_t session_id, ctrlm_device_update_iarm_load_result_t result) { - ctrlm_device_update_iarm_event_load_end_t event = {0}; - event.api_revision = CTRLM_DEVICE_UPDATE_IARM_BUS_API_REVISION; - event.session_id = session_id; - event.result = result; - XLOGD_TELEMETRY("Session Id %u Result <%s>", session_id, ctrlm_device_update_iarm_load_result_str(result)); - - IARM_Result_t retval = IARM_Bus_BroadcastEvent(CTRLM_MAIN_IARM_BUS_NAME, (IARM_EventId_t) CTRLM_DEVICE_UPDATE_IARM_EVENT_LOAD_END, (void *) &event, sizeof(event)); - if(retval != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("Event send error (%i)", retval); - } -} diff --git a/src/ctrlm_utils.cpp b/src/ctrlm_utils.cpp index b0576434..c274c2dc 100644 --- a/src/ctrlm_utils.cpp +++ b/src/ctrlm_utils.cpp @@ -738,16 +738,6 @@ const char *ctrlm_device_update_iarm_load_result_str(ctrlm_device_update_iarm_lo return(ctrlm_invalid_return(load_result)); } -const char *ctrlm_device_update_image_type_str(ctrlm_device_update_image_type_t image_type) { - switch(image_type) { - case CTRLM_DEVICE_UPDATE_IMAGE_TYPE_FIRMWARE: return("FIRMWARE"); - case CTRLM_DEVICE_UPDATE_IMAGE_TYPE_AUDIO_DATA: return("AUDIO_DATA"); - case CTRLM_DEVICE_UPDATE_IMAGE_TYPE_OTHER: return("OTHER"); - case CTRLM_DEVICE_UPDATE_IMAGE_TYPE_MAX: return("MAX"); - } - return(ctrlm_invalid_return(image_type)); -} - const char *ctrlm_hal_result_str(ctrlm_hal_result_t result) { switch(result) { case CTRLM_HAL_RESULT_SUCCESS: return("SUCCESS"); diff --git a/src/ctrlm_utils.h b/src/ctrlm_utils.h index baed40e7..66060e7b 100644 --- a/src/ctrlm_utils.h +++ b/src/ctrlm_utils.h @@ -193,7 +193,6 @@ const char *ctrlm_voice_reset_type_str(ctrlm_voice_reset_type_t reset_type); const char *ctrlm_device_update_iarm_load_type_str(ctrlm_device_update_iarm_load_type_t load_type); const char *ctrlm_device_update_iarm_load_result_str(ctrlm_device_update_iarm_load_result_t load_result); -const char *ctrlm_device_update_image_type_str(ctrlm_device_update_image_type_t image_type); const char *ctrlm_bind_status_str(ctrlm_bind_status_t bind_status); const char *ctrlm_close_pairing_window_reason_str(ctrlm_close_pairing_window_reason reason); const char *ctrlm_battery_event_str(ctrlm_rcu_battery_event_t event); From 1b9ff1a2dbe19fef40cc6d7d6d189fcb6a4e4adf Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 14:51:15 -0400 Subject: [PATCH 15/21] remove voice update settings iarm call --- include/ctrlm_ipc_voice.h | 157 +----------------- src/database/ctrlm_database.cpp | 4 - src/database/ctrlm_database.h | 1 - src/voice/ctrlm_voice_obj.cpp | 4 +- src/voice/ipc/ctrlm_voice_ipc_iarm_legacy.cpp | 44 +---- 5 files changed, 4 insertions(+), 206 deletions(-) diff --git a/include/ctrlm_ipc_voice.h b/include/ctrlm_ipc_voice.h index ed96c951..43d19294 100644 --- a/include/ctrlm_ipc_voice.h +++ b/include/ctrlm_ipc_voice.h @@ -21,24 +21,7 @@ #define _CTRLM_IPC_VOICE_H_ #include "ctrlm_ipc.h" -/// @file ctrlm_ipc_voice.h -/// -/// @defgroup CTRLM_IPC_VOICE IARM API - Voice -/// @{ -/// -/// @defgroup CTRLM_IPC_VOICE_COMMS Communication Interfaces -/// @defgroup CTRLM_IPC_VOICE_CALLS IARM Remote Procedure Calls -/// @defgroup CTRLM_IPC_VOICE_EVENTS IARM Events -/// @defgroup CTRLM_IPC_VOICE_DEFINITIONS Constants -/// @defgroup CTRLM_IPC_VOICE_ENUMS Enumerations -/// @defgroup CTRLM_IPC_VOICE_STRUCTS Structures - -/// @addtogroup CTRLM_IPC_VOICE_DEFINITIONS -/// @{ -/// @brief Constant Defintions -/// @details The Control Manager provides definitions for constant values. - -#define CTRLM_VOICE_IARM_CALL_UPDATE_SETTINGS "Voice_UpdateSettings" ///< IARM Call to update settings + #define CTRLM_VOICE_IARM_CALL_SESSION_BEGIN "Voice_SessionBegin" ///< starts a voice streaming session #define CTRLM_VOICE_IARM_CALL_SESSION_END "Voice_SessionEnd" ///< ends a voice streaming session @@ -80,23 +63,12 @@ #define CTRLM_VOICE_SETTINGS_FARFIELD_VREX_SERVER_URL (0x0080) ///< Setting to update the farfield vrex server url string #define CTRLM_VOICE_SETTINGS_MIC_TAP_SERVER_URL (0x0100) ///< Setting to update the microphone tap server url string -/// @} - -/// @addtogroup CTRLM_IPC_VOICE_ENUMS -/// @{ -/// @brief Enumerated Types -/// @details The Control Manager provides enumerated types for logical groups of values. - -/// @brief Voice Session Results -/// @details An enumeration of the overall result for a voice session. typedef enum { CTRLM_VOICE_SESSION_RESULT_SUCCESS = 0, ///< Voice session completed successfully CTRLM_VOICE_SESSION_RESULT_FAILURE = 1, ///< Voice session completed unsuccessfully CTRLM_VOICE_SESSION_RESULT_MAX = 2 ///< Voice session result maximum value } ctrlm_voice_session_result_t; -/// @brief Voice Session End Reasons -/// @details An enumeration of the reasons that cause a voice session to end. typedef enum { CTRLM_VOICE_SESSION_END_REASON_DONE = 0, ///< Session completed normally CTRLM_VOICE_SESSION_END_REASON_TIMEOUT_FIRST_PACKET = 1, ///< Session ended due to timeout on the first audio sample @@ -110,8 +82,6 @@ typedef enum { CTRLM_VOICE_SESSION_END_REASON_MAX = 9 ///< Session End Reason maximum value } ctrlm_voice_session_end_reason_t; -/// @brief Voice Session Abort Reasons -/// @details An enumeration of the reasons that cause a voice session to be aborted. typedef enum { CTRLM_VOICE_SESSION_ABORT_REASON_BUSY = 0, ///< Session aborted because another session in progress CTRLM_VOICE_SESSION_ABORT_REASON_SERVER_NOT_READY = 1, ///< Session aborted because the server cannot be reached @@ -126,8 +96,6 @@ typedef enum { CTRLM_VOICE_SESSION_ABORT_REASON_MAX = 10 ///< Session Abort Reason maximum value } ctrlm_voice_session_abort_reason_t; -/// @brief Voice Internal Errors -/// @details An enumeration of the Voice component's internal error codes. typedef enum { CTRLM_VOICE_INTERNAL_ERROR_NONE = 0, ///< No internal error occurred CTRLM_VOICE_INTERNAL_ERROR_EXCEPTION = 1, ///< An exception generated an internal error @@ -135,8 +103,6 @@ typedef enum { CTRLM_VOICE_INTERNAL_ERROR_MAX = 3 ///< Internal error type maximum value } ctrlm_voice_internal_error_t; -/// @brief Voice Reset Types -/// @details An enumeration of the types of reset that can occur on a controller. typedef enum { CTRLM_VOICE_RESET_TYPE_POWER_ON = 0, ///< Normal power up by inserting batteries CTRLM_VOICE_RESET_TYPE_EXTERNAL = 1, ///< Reset due to an external condition @@ -147,13 +113,6 @@ typedef enum { CTRLM_VOICE_RESET_TYPE_MAX = 6 ///< Reset type maximum value } ctrlm_voice_reset_type_t; -/// @} - -/// @addtogroup CTRLM_IPC_VOICE_STRUCTS -/// @{ -/// @brief Structure Definitions -/// @details The Control Manager provides structures that are used in IARM calls and events. - typedef struct { char name[CTRLM_VOICE_QUERY_STRING_MAX_LENGTH]; ///< The name (null terminated string) for a query char value[CTRLM_VOICE_QUERY_STRING_MAX_LENGTH]; ///< The value (null terminated string) for a query @@ -318,118 +277,4 @@ typedef struct { // End APIs for Thunder Plugin -/// @} -/// -/// @addtogroup CTRLM_IPC_VOICE_CALLS -/// @{ -/// @brief Remote Calls accessible via IARM bus -/// @details IARM calls are synchronous calls to functions provided by other IARM bus members. Each bus member can register -/// calls using the IARM_Bus_RegisterCall() function. Other members can invoke the call using the IARM_Bus_Call() function. -/// -/// ----------------- -/// Call Registration -/// ----------------- -/// -/// The Voice component of Control Manager registers the following calls. -/// -/// | Bus Name | Call Name | Argument | Description | -/// | :------- | :-------- | :------- | :---------- | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_VOICE_IARM_CALL_SETTINGS | ctrlm_voice_iarm_settings_t * | Sets one or more voice configuration settings. | -/// -/// Examples: -/// -/// Get a controller's status: -/// -/// IARM_Result_t result; -/// ctrlm_voice_iarm_settings_t settings; -/// settings.available = (CTRLM_VOICE_SETTINGS_VOICE_ENABLED | CTRLM_VOICE_SETTINGS_VREX_SAT_ENABLED); -/// settings.voice_control_enabled = 1; -/// settings.vrex_sat_enabled = 1; -/// -/// result = IARM_Bus_Call(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_VOICE_IARM_CALL_SETTINGS, (void *)&settings, sizeof(settings)); -/// if(IARM_RESULT_SUCCESS == result && CTRLM_IARM_CALL_RESULT_SUCCESS == settings.result) { -/// // Settings were successfully updated -/// } -/// } -/// -/// @} -/// -/// @addtogroup CTRLM_IPC_VOICE_EVENTS -/// @{ -/// @brief Broadcast Events accessible via IARM bus -/// @details The IARM bus uses events to broadcast information to interested clients. An event is sent separately to each client. There are no return values for an event and no -/// guarantee that a client will receive the event. Each event has a different argument structure according to the information being transferred to the clients. The events that the -/// Remote Control component in Control Manager generates and subscribes to are detailed below. -/// -/// ---------------------------- -/// Event Generation (Broadcast) -/// ---------------------------- -/// -/// The Voice component generates events that can be received by other processes connected to the IARM bus. The following events -/// are registered during initialization: -/// -/// | Bus Name | Event Name | Argument | Description | -/// | :------- | :--------- | :------- | :---------- | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_VOICE_IARM_EVENT_SESSION_BEGIN | ctrlm_voice_iarm_event_session_begin_t * | Generated at the beginning of a voice session | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_VOICE_IARM_EVENT_SESSION_END | ctrlm_voice_iarm_event_session_end_t * | Generated at the end of a voice session | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_VOICE_IARM_EVENT_SESSION_RESULT | ctrlm_voice_iarm_event_session_result_t * | Generated when the result of the voice session is available | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_VOICE_IARM_EVENT_SESSION_STATS | ctrlm_voice_iarm_event_session_stats_t * | Generated when the statistics of the voice session are available | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_VOICE_IARM_EVENT_SESSION_ABORT | ctrlm_voice_iarm_event_session_abort_t * | Generated when a voice session is aborted (denied) | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_VOICE_IARM_EVENT_SESSION_SHORT | ctrlm_voice_iarm_event_session_short_t * | Generated when a short voice session is detected | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_VOICE_IARM_EVENT_MEDIA_SERVICE | ctrlm_voice_iarm_event_media_service_t * | Generated when a media service response is received | -/// -/// IARM events are available on a subscription basis. In order to receive an event, a client must explicitly register to receive the event by calling -/// IARM_Bus_RegisterEventHandler() with the bus name, event name and a @link IARM_EventHandler_t handler function@endlink. Events may be generated at any time by the -/// Voice component. All events are asynchronous. -/// -/// Examples: -/// -/// Register for a Voice event: -/// -/// IARM_Result_t result; -/// -/// result = IARM_Bus_RegisterEventHandler(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_VOICE_IARM_EVENT_SESSION_RESULT, session_result_handler_func); -/// if(IARM_RESULT_SUCCESS == result) { -/// // Event registration was set successfully -/// } -/// } -/// -/// @} -/// -/// @addtogroup CTRLM_IPC_VOICE_COMMS -/// @{ -/// @brief Communication Interfaces -/// @details The following diagrams detail the main communication paths for the Voice component. -/// --------------- -/// Voice Data Flow -/// --------------- -/// -/// @dot -/// digraph CTRL_MGR_VREX { -/// rankdir=LR; -/// "VREX_IDLE" [shape="ellipse", fontname=Helvetica, fontsize=10, label="IDLE"]; -/// "VREX_OPEN" [shape="ellipse", fontname=Helvetica, fontsize=10, label="OPEN"]; -/// "VREX_CLOSE" [shape="ellipse", fontname=Helvetica, fontsize=10, label="CLOSE"]; -/// "VREX_IS_REM_VALID" [shape="diamond", fontname=Helvetica, fontsize=10, label="Is remote\nvalid?"]; -/// "VREX_IS_SVR_AVAIL" [shape="diamond", fontname=Helvetica, fontsize=10, label="Is server\navailable?"]; -/// "VREX_IS_SEND_OK" [shape="diamond", fontname=Helvetica, fontsize=10, label="Is fragment transferred\nto the server?"]; -/// -/// "VREX_IDLE" -> "VREX_IS_REM_VALID" [dir="forward", fontname=Helvetica, fontsize=10,label=" Voice Begin Event Rxd"]; -/// "VREX_IDLE" -> "VREX_IDLE" [dir="forward", fontname=Helvetica, fontsize=10,label=" Voice Fragment/End Event Rxd"]; -/// "VREX_IS_REM_VALID" -> "VREX_IS_SVR_AVAIL" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes"]; -/// "VREX_IS_REM_VALID" -> "VREX_IDLE" [dir="forward", fontname=Helvetica, fontsize=10,label=" No"]; -/// "VREX_IS_SVR_AVAIL" -> "VREX_OPEN" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, open session"]; -/// "VREX_IS_SVR_AVAIL" -> "VREX_IDLE" [dir="forward", fontname=Helvetica, fontsize=10,label=" No"]; -/// "VREX_OPEN" -> "VREX_IS_SEND_OK" [dir="forward", fontname=Helvetica, fontsize=10,label=" Voice Fragment\nEvent Rxd"]; -/// "VREX_IS_SEND_OK" -> "VREX_OPEN" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes"]; -/// "VREX_IS_SEND_OK" -> "VREX_CLOSE" [dir="forward", fontname=Helvetica, fontsize=10,label=" No, end session"]; -/// "VREX_OPEN" -> "VREX_CLOSE" [dir="forward", fontname=Helvetica, fontsize=10,label=" Voice End Event Rxd.\nTransfer status\ncode to server."]; -/// "VREX_CLOSE" -> "VREX_IDLE" [dir="forward", fontname=Helvetica, fontsize=10,label=" Close session."]; -/// { rank=same; "VREX_IS_REM_VALID"; "VREX_IS_SVR_AVAIL"; } -/// { rank=same; "VREX_OPEN"; "VREX_IS_SEND_OK"; } -/// } -/// \enddot -/// @} -/// -/// @} #endif diff --git a/src/database/ctrlm_database.cpp b/src/database/ctrlm_database.cpp index 2e9e6e5c..61b801fa 100644 --- a/src/database/ctrlm_database.cpp +++ b/src/database/ctrlm_database.cpp @@ -591,10 +591,6 @@ void ctrlm_db_device_update_session_id_read(unsigned char *session_id) { *session_id = g_ctrlm_db_global.device_update_session_id; } -void ctrlm_db_voice_settings_write(guchar *data, guint32 length) { - ctrlm_db_write_blob(CTRLM_DB_TABLE_CTRLMGR, CTRLM_DB_VOICE_KEY_SETTINGS, data, length); -} - void ctrlm_db_voice_settings_read(guchar **data, guint32 *length) { ctrlm_db_read_blob(CTRLM_DB_TABLE_CTRLMGR, CTRLM_DB_VOICE_KEY_SETTINGS, data, length); } diff --git a/src/database/ctrlm_database.h b/src/database/ctrlm_database.h index f842c71f..5e1e1704 100644 --- a/src/database/ctrlm_database.h +++ b/src/database/ctrlm_database.h @@ -46,7 +46,6 @@ void ctrlm_db_version_write(int version); void ctrlm_db_version_read(int *version); void ctrlm_db_device_update_session_id_write(unsigned char session_id); void ctrlm_db_device_update_session_id_read(unsigned char *session_id); -void ctrlm_db_voice_settings_write(guchar *data, guint32 length); void ctrlm_db_voice_settings_read(guchar **data, guint32 *length); void ctrlm_db_ir_rf_database_write(ctrlm_key_code_t key_code, guchar *data, guint32 length); void ctrlm_db_ir_rf_database_read(ctrlm_key_code_t key_code, guchar **data, guint32 *length); diff --git a/src/voice/ctrlm_voice_obj.cpp b/src/voice/ctrlm_voice_obj.cpp index c81a629a..c9125da9 100644 --- a/src/voice/ctrlm_voice_obj.cpp +++ b/src/voice/ctrlm_voice_obj.cpp @@ -402,8 +402,6 @@ void ctrlm_voice_t::voice_sdk_close() { bool ctrlm_voice_t::voice_configure_config_file_json(json_t *obj_voice, json_t *json_obj_vsdk, bool local_conf) { json_config conf; - ctrlm_voice_iarm_call_settings_t *voice_settings = NULL; - uint32_t voice_settings_len = 0; std::string init; XLOGD_INFO("Configuring voice"); @@ -553,6 +551,8 @@ bool ctrlm_voice_t::voice_configure_config_file_json(json_t *obj_voice, json_t * ctrlm_db_voice_read_par_voice_status(this->prefs.par_voice_enabled); } else { + ctrlm_voice_iarm_call_settings_t *voice_settings = NULL; + uint32_t voice_settings_len = 0; XLOGD_WARN("Reading voice settings from old style DB"); ctrlm_db_voice_settings_read((guchar **)&voice_settings, &voice_settings_len); if(voice_settings_len == 0) { diff --git a/src/voice/ipc/ctrlm_voice_ipc_iarm_legacy.cpp b/src/voice/ipc/ctrlm_voice_ipc_iarm_legacy.cpp index 88fbd3b0..fbf458ea 100644 --- a/src/voice/ipc/ctrlm_voice_ipc_iarm_legacy.cpp +++ b/src/voice/ipc/ctrlm_voice_ipc_iarm_legacy.cpp @@ -22,25 +22,13 @@ #include "ctrlm_log.h" #include "ctrlm_voice_obj.h" -static IARM_Result_t update_settings(void *arg); - ctrlm_voice_ipc_iarm_legacy_t::ctrlm_voice_ipc_iarm_legacy_t(ctrlm_voice_t *obj_voice) : ctrlm_voice_ipc_t(obj_voice) { this->state = EVENT_ALL; } bool ctrlm_voice_ipc_iarm_legacy_t::register_ipc() const { bool ret = true; - IARM_Result_t rc; // NOTE: The IARM events are registered in ctrlm_main.cpp - - XLOGD_INFO("ServiceManager"); - - XLOGD_INFO("Registering for voice update settings"); - rc = IARM_Bus_RegisterCall(CTRLM_VOICE_IARM_CALL_UPDATE_SETTINGS, update_settings); - if(rc != IARM_RESULT_SUCCESS) { - XLOGD_ERROR("Failed to register %d", rc); - ret = false; - } return(ret); } @@ -162,7 +150,7 @@ bool ctrlm_voice_ipc_iarm_legacy_t::session_end(const ctrlm_voice_ipc_event_sess } // Reset state this->state = EVENT_ALL; - return(ret); + return(ret); } bool ctrlm_voice_ipc_iarm_legacy_t::server_message(const char *message, unsigned long size) { @@ -197,34 +185,4 @@ bool ctrlm_voice_ipc_iarm_legacy_t::session_statistics(const ctrlm_voice_ipc_eve } void ctrlm_voice_ipc_iarm_legacy_t::deregister_ipc() const { - XLOGD_INFO("ServiceManager"); -} - -IARM_Result_t update_settings(void *arg) { - ctrlm_voice_iarm_call_settings_t *voice_settings = (ctrlm_voice_iarm_call_settings_t *)arg; - ctrlm_voice_t *voice_obj = NULL; - - if(voice_settings == NULL) { - XLOGD_ERROR("voice settings NULL"); - return(IARM_RESULT_INVALID_PARAM); - } - - XLOGD_INFO("Rxd CTRLM_VOICE_IARM_EVENT_VOICE_SETTINGS - API Revision %u", voice_settings->api_revision); - - if(voice_settings->api_revision != CTRLM_VOICE_IARM_BUS_API_REVISION) { - XLOGD_INFO("Unsupported API Revision (%u, %u)", voice_settings->api_revision, CTRLM_VOICE_IARM_BUS_API_REVISION); - voice_settings->result = CTRLM_IARM_CALL_RESULT_ERROR_API_REVISION; - return(IARM_RESULT_INVALID_PARAM); - } - - voice_obj = ctrlm_get_voice_obj(); - if(voice_obj) { - if(!voice_obj->voice_configure(voice_settings, true)) { - return(IARM_RESULT_INVALID_PARAM); - } - } else { - return(IARM_RESULT_INVALID_STATE); - } - - return(IARM_RESULT_SUCCESS); } From e90e3616797b5bd767df039ea679606f45e2f55c Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 15:11:08 -0400 Subject: [PATCH 16/21] remove rcu validation finish iarm call --- include/ctrlm_ipc_rcu.h | 413 ---------------------------------------- src/ctrlm_rcu.cpp | 36 ---- src/ctrlm_rcu.h | 1 - src/ctrlm_rcu_iarm.cpp | 8 - 4 files changed, 458 deletions(-) diff --git a/include/ctrlm_ipc_rcu.h b/include/ctrlm_ipc_rcu.h index 4407679f..b83a8b7d 100644 --- a/include/ctrlm_ipc_rcu.h +++ b/include/ctrlm_ipc_rcu.h @@ -21,24 +21,6 @@ #ifndef _CTRLM_IPC_RCU_H_ #define _CTRLM_IPC_RCU_H_ -/// @file ctrlm_ipc_rcu.h -/// -/// @defgroup CTRLM_IPC_RCU IARM API - Remote Control -/// @{ -/// -/// @defgroup CTRLM_IPC_RCU_COMMS Communication Interfaces -/// @defgroup CTRLM_IPC_RCU_CALLS IARM Remote Procedure Calls -/// @defgroup CTRLM_IPC_RCU_EVENTS IARM Events -/// @defgroup CTRLM_IPC_RCU_DEFINITIONS Constants -/// @defgroup CTRLM_IPC_RCU_ENUMS Enumerations -/// @defgroup CTRLM_IPC_RCU_STRUCTS Structures -/// -/// @addtogroup CTRLM_IPC_RCU_DEFINITIONS -/// @{ -/// @brief Constant Defintions -/// @details The Control Manager provides definitions for constant values. - -#define CTRLM_RCU_IARM_CALL_VALIDATION_FINISH "Rcu_ValidationFinish" ///< IARM Call to complete controller validation #define CTRLM_RCU_IARM_CALL_CONTROLLER_STATUS "Rcu_ControllerStatus" ///< IARM Call to get controller information #define CTRLM_RCU_IARM_CALL_CONTROLLER_LINK_KEY "Rcu_ControllerLinkKey" ///< IARM Call to get controller link key #define CTRLM_RCU_IARM_CALL_RIB_REQUEST_GET "Rcu_RibRequestGet" ///< IARM Call to retrieves an attribute from the controller's RIB @@ -101,15 +83,7 @@ #define CTRLM_RCU_RIB_ATTR_LEN_MFG_TEST_RESULT (1) ///< RIB Attribute Length - MFG Security Key Test Rib Result #define CTRLM_RCU_POLLING_RESPONSE_DATA_LEN (5) -/// @} -/// @addtogroup CTRLM_IPC_RCU_ENUMS -/// @{ -/// @brief Enumerated Types -/// @details The Control Manager provides enumerated types for logical groups of values. - -/// @brief RCU Binding Validation Results -/// @details The process of binding a remote control will terminate with one of the results in this enumeration. typedef enum { CTRLM_RCU_VALIDATION_RESULT_SUCCESS = 0, ///< The validation completed successfully. CTRLM_RCU_VALIDATION_RESULT_PENDING = 1, ///< The validation is still pending. @@ -125,8 +99,6 @@ typedef enum { CTRLM_RCU_VALIDATION_RESULT_MAX = 11 ///< Maximum validation result value } ctrlm_rcu_validation_result_t; -/// @brief RCU Configuration Results -/// @details The process of configuring a remote control will terminate with one of the results in this enumeration. typedef enum { CTRLM_RCU_CONFIGURATION_RESULT_SUCCESS = 0, ///< The configuration completed successfully. CTRLM_RCU_CONFIGURATION_RESULT_PENDING = 1, ///< The configuration is still pending. @@ -135,8 +107,6 @@ typedef enum { CTRLM_RCU_CONFIGURATION_RESULT_MAX = 5 ///< Maximum validation result value } ctrlm_rcu_configuration_result_t; -/// @brief RCU RIB Attribute Id's -/// @details The attribute identifier of all supported RIB entries. typedef enum { CTRLM_RCU_RIB_ATTR_ID_PERIPHERAL_ID = 0x00, ///< RIB Attribute - Peripheral Id CTRLM_RCU_RIB_ATTR_ID_RF_STATISTICS = 0x01, ///< RIB Attribute - RF Statistics @@ -183,8 +153,6 @@ typedef enum { CTRLM_RCU_RIB_ATTR_ID_GENERAL_PURPOSE = 0xFF, ///< RIB Attribute - General Purpose } ctrlm_rcu_rib_attr_id_t; -/// @brief RCU Binding Type -/// @details The type of binding that can be performed between a controller and target. typedef enum { CTRLM_RCU_BINDING_TYPE_INTERACTIVE = 0, ///< User initiated binding method CTRLM_RCU_BINDING_TYPE_AUTOMATIC = 1, ///< Automatic binding method @@ -193,8 +161,6 @@ typedef enum { CTRLM_RCU_BINDING_TYPE_INVALID = 4 ///< Invalid binding type } ctrlm_rcu_binding_type_t; -/// @brief RCU Validation Type -/// @details The type of validation that can be performed between a controller and target. typedef enum { CTRLM_RCU_VALIDATION_TYPE_APPLICATION = 0, ///< Application based validation CTRLM_RCU_VALIDATION_TYPE_INTERNAL = 1, ///< Control Manager based validation @@ -205,15 +171,11 @@ typedef enum { CTRLM_RCU_VALIDATION_TYPE_INVALID = 6 ///< Invalid validation type } ctrlm_rcu_validation_type_t; -/// @brief RCU Binding Security Type -/// @details The type of binding security used between the controller and target. typedef enum { CTRLM_RCU_BINDING_SECURITY_TYPE_NORMAL = 0, ///< Normal Security CTRLM_RCU_BINDING_SECURITY_TYPE_ADVANCED = 1 ///< Advanced Security } ctrlm_rcu_binding_security_type_t; -/// @brief RCU Ghost Codes -/// @details The enumeration of ghost codes that can be produced by the controller. XRC spec 11.2.10.1 typedef enum { CTRLM_RCU_GHOST_CODE_VOLUME_UNITY_GAIN = 0, ///< Volume unity gain (vol +/- or mute pressed) CTRLM_RCU_GHOST_CODE_POWER_OFF = 1, ///< Power off pressed @@ -229,8 +191,6 @@ typedef enum { CTRLM_RCU_GHOST_CODE_INVALID = 11 ///< Invalid ghost code } ctrlm_rcu_ghost_code_t; -/// @brief RCU Functions -/// @details The enumeration of functions that can be produced by the controller. typedef enum { CTRLM_RCU_FUNCTION_SETUP = 0, ///< Setup key held for 3 seconds CTRLM_RCU_FUNCTION_BACKLIGHT = 1, ///< <92X> Backlight time where X is on time in seconds @@ -259,8 +219,6 @@ typedef enum { CTRLM_RCU_FUNCTION_INVALID = 24 ///< Invalid function } ctrlm_rcu_function_t; -/// @brief RCU Controller Type -/// @details The type of controller. typedef enum { CTRLM_RCU_CONTROLLER_TYPE_XR2 = 0, CTRLM_RCU_CONTROLLER_TYPE_XR5 = 1, @@ -275,16 +233,12 @@ typedef enum { CTRLM_RCU_CONTROLLER_TYPE_INVALID = 10 } ctrlm_rcu_controller_type_t; -/// @brief RCU IR DB Type -/// @details The type of IR DB in the controller. typedef enum { CTRLM_RCU_IR_DB_TYPE_UEI = 0, CTRLM_RCU_IR_DB_TYPE_REMOTEC = 1, CTRLM_RCU_IR_DB_TYPE_INVALID = 2 } ctrlm_rcu_ir_db_type_t; -/// @brief RCU IR DB State -/// @details The state of IR DB in the controller. typedef enum { CTRLM_RCU_IR_DB_STATE_NO_CODES = 0, CTRLM_RCU_IR_DB_STATE_TV_CODE = 1, @@ -294,9 +248,6 @@ typedef enum { CTRLM_RCU_IR_DB_STATE_INVALID = 5 } ctrlm_rcu_ir_db_state_t; - -/// @brief RCU Battery Event -/// @details The events associate with the battery in the controller. typedef enum { CTRLM_RCU_BATTERY_EVENT_NONE = 0, CTRLM_RCU_BATTERY_EVENT_REPLACED = 1, @@ -309,15 +260,11 @@ typedef enum { CTRLM_RCU_BATTERY_EVENT_INVALID = 8, } ctrlm_rcu_battery_event_t; -/// @brief RCU Reverse Command Type -/// @details An enumeration of the reverse command types. typedef enum { CTRLM_RCU_REVERSE_CMD_FIND_MY_REMOTE = 0, CTRLM_RCU_REVERSE_CMD_REBOOT = 1, } ctrlm_rcu_reverse_cmd_t; -/// @brief RCU Reverse Command Event -/// @details The events associate with the Action performed on the controller. typedef enum { CTRLM_RCU_REVERSE_CMD_SUCCESS = 0, CTRLM_RCU_REVERSE_CMD_FAILURE = 1, @@ -334,14 +281,11 @@ typedef enum { CTRLM_FIND_RCU_FMR_ALERT_DURATION_ID = 2, // unsigned integer alert duration in msec } ctrlm_rcu_find_my_remote_parameter_id_t; -/// @brief RCU Alert flags typedef enum { CTRLM_RCU_ALERT_AUDIBLE = 0x01, CTRLM_RCU_ALERT_VISUAL = 0x02 } ctrlm_rcu_alert_flags_t; -/// @brief RCU DSP Event -/// @details The events associate with the dsp in the controller. typedef enum { CTRLM_RCU_DSP_EVENT_MIC_FAILURE = 1, CTRLM_RCU_DSP_EVENT_SPEAKER_FAILURE = 2, @@ -377,25 +321,6 @@ typedef enum { RCU_POLLING_ACTION_IRRF_STATUS = 0x10 } ctrlm_rcu_polling_action_t; -/// @} - -/// @addtogroup CTRLM_IPC_RCU_STRUCTS -/// @{ -/// @brief Structure Definitions -/// @details The Control Manager provides structures that are used in IARM calls and events. - -/// @brief Structure of Remote Controls's Validation Finish IARM call -/// @details This structure provides information about the completion of a controller validation. -typedef struct { - unsigned char api_revision; ///< Revision of this API - ctrlm_iarm_call_result_t result; ///< Result of the IARM call - ctrlm_network_id_t network_id; ///< The identifier of network on which the controller is bound - ctrlm_controller_id_t controller_id; ///< The identifier of the controller - ctrlm_rcu_validation_result_t validation_result; ///< Result of the validation attempt -} ctrlm_rcu_iarm_call_validation_finish_t; - -/// @brief Controller Status Structure -/// @details This structure contains a controller's diagnostic information. typedef struct { unsigned long long ieee_address; ///< The 64-bit IEEE Address unsigned short short_address; ///< Short address (if applicable) @@ -490,8 +415,6 @@ typedef struct { unsigned char battery_voltage_large_decline_detected; ///< The large decline detected flag for battery voltage } ctrlm_controller_status_t; -/// @brief Structure of Remote Controls's Controller Status IARM call -/// @details This structure provides information about a controller. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -500,8 +423,6 @@ typedef struct { ctrlm_controller_status_t status; ///< Status of the controller } ctrlm_rcu_iarm_call_controller_status_t; -/// @brief Structure of Remote Controls's RIB Request get and set IARM calls -/// @details This structure provides information about a controller's RIB entry. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -513,8 +434,6 @@ typedef struct { char data[CTRLM_RCU_MAX_RIB_ATTRIBUTE_SIZE]; ///< RIB entry's data } ctrlm_rcu_iarm_call_rib_request_t; -/// @brief Structure of Remote Controls's Controller Link Key IARM call -/// @details This stucture provides the controllers link key typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -523,8 +442,6 @@ typedef struct { unsigned char link_key[16]; ///< OUT The link key for the controller } ctrlm_rcu_iarm_call_controller_link_key_t; -/// @brief Structure of Remote Control's Key Press IARM event -/// @details This event notifies listeners that a key event has occurred. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< identifier of network on which the controller is bound @@ -536,8 +453,6 @@ typedef struct { char controller_type[CTRLM_RCU_MAX_USER_STRING_LENGTH]; ///< Remote control's type string } ctrlm_rcu_iarm_event_key_press_t; -/// @brief Structure of Remote Control's Validation Begin IARM event -/// @details This event notifies listeners that a validation attempt has begun. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< identifier of network on which the controller is bound @@ -549,8 +464,6 @@ typedef struct { char controller_type[CTRLM_RCU_MAX_USER_STRING_LENGTH]; ///< Remote control's type string } ctrlm_rcu_iarm_event_validation_begin_t; -/// @brief Structure of Remote Control's Validation End IARM event -/// @details This event notifies listeners that a validation attempt has completed. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< identifier of network on which the controller is bound @@ -562,8 +475,6 @@ typedef struct { char controller_type[CTRLM_RCU_MAX_USER_STRING_LENGTH]; ///< Remote control's type string } ctrlm_rcu_iarm_event_validation_end_t; -/// @brief Structure of Remote Control's Configuration Complete IARM event -/// @details This event notifies listeners that a validation attempt has completed. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< identifier of network on which the controller is bound @@ -575,8 +486,6 @@ typedef struct { ctrlm_controller_status_t status; ///< Remote control's status } ctrlm_rcu_iarm_event_configuration_complete_t; -/// @brief Structure of Remote Control's Setup Key IARM event -/// @details This event notifies listeners that a remote control function event has occurred. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< Identifier of network on which the controller is bound @@ -586,8 +495,6 @@ typedef struct { unsigned long value; ///< Value associated with the function (if applicable) } ctrlm_rcu_iarm_event_function_t; -/// @brief Structure of Remote Control's Ghost Key IARM event -/// @details This event notifies listeners that a ghost code event has occurred. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< Identifier of network on which the controller is bound @@ -597,8 +504,6 @@ typedef struct { unsigned char remote_keypad_config; /// The remote keypad configuration (Has Setup/NumberKeys). } ctrlm_rcu_iarm_event_key_ghost_t; -/// @brief Structure of Remote Control's Ghost Key IARM event -/// @details This event notifies listeners that a ghost code event has occurred. typedef struct { unsigned char api_revision; ///< Revision of this API int controller_id; ///< Identifier of the controller on which the key was pressed @@ -609,8 +514,6 @@ typedef struct { int spare_value; ///< A spare value (sfm needs this extra one) } ctrlm_rcu_iarm_event_control_t; -/// @brief Structure of Remote Control's RIB Entry Access IARM event -/// @details The RIB Entry Access Event uses this structure. See the @link CTRLM_IPC_RCU_EVENTS Events@endlink section for more details on registering to receive this event. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< Identifier of network on which the controller is bound @@ -621,8 +524,6 @@ typedef struct { ctrlm_access_type_t access_type; ///< RIB access type (read/write) } ctrlm_rcu_iarm_event_rib_entry_access_t; -/// @brief Structure of Remote Control's remote reboot IARM event -/// @details This event notifies listeners that a remote rebooot event has occurred. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< Identifier of network on which the controller is bound @@ -634,8 +535,6 @@ typedef struct { unsigned int assert_number; ///< Assert Number when reboot reason is CONTROLLER_REBOOT_ASSERT_NUMBER } ctrlm_rcu_iarm_event_remote_reboot_t; -/// @brief Structure of Remote Control's Battery IARM event -/// @details This event notifies listeners that a DSP event has occurred. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_network_id_t network_id; ///< Identifier of network on which the controller is bound @@ -645,8 +544,6 @@ typedef struct { unsigned char percent; ///< Battery percentage } ctrlm_rcu_iarm_event_battery_t; -/// @brief Structure of Remote Control's remote reboot IARM event -/// @details This event notifies listeners that a remote rebooot event has occurred. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_rcu_validation_result_t validation_result; ///< Result of the validation @@ -658,26 +555,6 @@ typedef struct { unsigned long privacy_time_seconds; } uptime_privacy_info_t; -/// @brief Remote Controller Reverse Command Structure -/// @details Remote Controller Reverse Command structure is used in the CTRLM_MAIN_IARM_CALL_RCU_REVERSE_CMD call. -/// ctrlm_main_iarm_call_rcu_reverse_cmd_t memory structure: -/// -/// size of structure: sizeof (struct ctrlm_main_iarm_call_rcu_reverse_cmd_t) + (param data size) - 1 -/// -/// Find My Remote -/// cmd = CTRLM_RCU_REVERSE_CMD_FIND_MY_REMOTE -/// num_params = 2 -/// -/// parameter id = CTRLM_RCU_FMR_ALERT_FLAGS_ID -/// parameter length 1 byte -/// parameter values CTRLM_RCU_ALERT_AUDIBLE | CTRLM_RCU_ALERT_VISUAL -/// -/// parameter id = CTRLM_FIND_RCU_FMR_ALERT_DURATION_ID -/// parameter length 2 bytes unsigned short -/// parameter values chime diration in milliseconds -/// memory needed: sizeof (ctrlm_main_iarm_call_rcu_reverse_cmd_t) + 2 - - typedef struct { unsigned char param_id; ///< parameter id unsigned long size; ///< parameter size, in bytes @@ -707,8 +584,6 @@ typedef struct { unsigned char result_data[1]; ///< Result Data buffer } ctrlm_rcu_iarm_event_reverse_cmd_t; -/// @brief Structure of Remote HeartBeat response polling action IARM call -/// @details This structure provides information about a controller's HeartBeat response polling action. typedef struct { unsigned char api_revision; ///< Revision of this API ctrlm_iarm_call_result_t result; ///< Result of the IARM call @@ -718,292 +593,4 @@ typedef struct { char data[CTRLM_RCU_POLLING_RESPONSE_DATA_LEN]; ///< IN - Polling data } ctrlm_rcu_iarm_call_rf4ce_polling_action_t; -/// @addtogroup CTRLM_IPC_RCU_CALLS -/// @{ -/// @brief Remote Calls accessible via IARM bus -/// @details IARM calls are synchronous calls to functions provided by other IARM bus members. Each bus member can register -/// calls using the IARM_Bus_RegisterCall() function. Other members can invoke the call using the IARM_Bus_Call() function. -/// -/// - - - -/// Call Registration -/// ----------------- -/// -/// The Device Update component of Control Manager registers the following calls. -/// -/// | Bus Name | Call Name | Argument | Description | -/// | :------- | :-------- | :------- | :---------- | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_CALL_VALIDATION_FINISH | ctrlm_rcu_iarm_validation_finish_t * | Completes the controller validation | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_CALL_CONTROLLER_STATUS | ctrlm_rcu_iarm_controller_status_t * | Provides information about a controller | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_CALL_IR_CODE_SET | ctrlm_rcu_iarm_ir_code_t * | Sets an IR code in the controller | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_CALL_RIB_REQUEST_GET | ctrlm_rcu_iarm_rib_request_t * | Retrieves an attribute from the controller's RIB | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_CALL_RIB_REQUEST_SET | ctrlm_rcu_iarm_rib_request_t * | Sets an attribute in the controller's RIB | -/// -/// Examples: -/// -/// Get a controller's status: -/// -/// IARM_Result_t result; -/// ctrlm_rcu_iarm_controller_status_t status; -/// -/// result = IARM_Bus_Call(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_RCU_IARM_CALL_CONTROLLER_STATUS, (void *)&status, sizeof(status)); -/// if(IARM_RESULT_SUCCESS == result && CTRLM_IARM_CALL_RESULT_SUCCESS == status.result) { -/// // Status was successfully retrieved -/// } -/// -/// Set an attribute in the controller's RIB: -/// -/// IARM_Result_t result; -/// ctrlm_rcu_iarm_rib_request_t request; -/// request.network_id = 0x00; // The network ID -/// request.controller_id = 0x01; // The controller ID -/// request.attribute = CTRLM_RCU_RIB_ATTR_ID_DOWNLOAD_RATE; // The RIB attribute -/// request.index = 0; // The index into the attribute -/// request.length = CTRLM_RCU_RIB_ATTR_LEN_DOWNLOAD_RATE; // The attribute data length -/// request.data[0] = 0; // The attribute data -/// -/// result = IARM_Bus_Call(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_RCU_IARM_CALL_RIB_REQUEST_SET, (void *)&request, sizeof(request)); -/// if(IARM_RESULT_SUCCESS == result && CTRLM_IARM_CALL_RESULT_SUCCESS == request.result) { -/// // RIB attribute was set successfully -/// } -/// } -/// -/// @} - -/// @addtogroup CTRLM_IPC_RCU_EVENTS -/// @{ -/// @brief Broadcast Events accessible via IARM bus -/// @details The IARM bus uses events to broadcast information to interested clients. An event is sent separately to each client. There are no return values for an event and no -/// guarantee that a client will receive the event. Each event has a different argument structure according to the information being transferred to the clients. The events that the -/// Remote Control component in Control Manager generates and subscribes to are detailed below. -/// -/// - - - -/// Event Generation (Broadcast) -/// ---------------------------- -/// -/// The Remote Control component generates events that can be received by other processes connected to the IARM bus. The following events -/// are registered during initialization: -/// -/// | Bus Name | Event Name | Argument | Description | -/// | :------- | :--------- | :------- | :---------- | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_EVENT_KEY_PRESS | ctrlm_rcu_iarm_event_key_press_t * | Generated each time a key event occurs (down, repeat, up) | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_EVENT_VALIDATION_BEGIN | ctrlm_rcu_iarm_event_validation_begin_t * | Generated at the beginning of a validation attempt | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_EVENT_VALIDATION_KEY_UPDATE | ctrlm_rcu_iarm_event_key_press_t * | Generated when the user enters a validation code digit/letter | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_EVENT_VALIDATION_END | ctrlm_rcu_iarm_event_validation_end_t * | Generated at the end of a validation attempt | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_EVENT_KEY_SETUP | ctrlm_rcu_iarm_event_key_setup_t * | Generated when the setup key combo is entered on a controller | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_EVENT_KEY_GHOST | ctrlm_rcu_iarm_event_key_ghost_t * | Generated when a ghost code is received from a controller | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_EVENT_RIB_ACCESS_CONTROLLER | ctrlm_rcu_iarm_event_rib_entry_access_t * | Generated when a controller accesses the RIB | -/// | CTRLM_MAIN_IARM_BUS_NAME | CTRLM_RCU_IARM_EVENT_RCU_STATUS | ctrlm_main_iarm_event_json_t & | Generated when a controller status has been updated by a network | -/// -/// IARM events are available on a subscription basis. In order to receive an event, a client must explicitly register to receive the event by calling -/// IARM_Bus_RegisterEventHandler() with the bus name, event name and a @link IARM_EventHandler_t handler function@endlink. Events may be generated at any time by the -/// Remote Control component. All events are asynchronous. -/// -/// Examples: -/// -/// Register for a Remote Control event: -/// -/// IARM_Result_t result; -/// -/// result = IARM_Bus_RegisterEventHandler(CTRLM_MAIN_IARM_BUS_NAME, CTRLM_RCU_IARM_EVENT_KEY_PRESS, key_press_handler_func); -/// if(IARM_RESULT_SUCCESS == result) { -/// // Event registration was set successfully -/// } -/// } -/// -/// @} -/// -/// @addtogroup CTRLM_IPC_RCU_COMMS -/// @{ -/// @brief Communication Interfaces -/// @details The following diagrams detail the main communication paths for the RCU component. -/// -/// --------------------------------- -/// RF4CE Controller Binding - Normal -/// --------------------------------- -/// -/// The binding procedure between the controller and target (STB) is initiated on the controller. The controller will send out a discovery request -/// and collect the responses. The responses are prioritized (ordered) according to the likelihood that it is the intended target. The controller -/// will attempt to pair and bind with each target once until it has successfully bound to a target, the operation is aborted, or it has exhausted -/// the candidate list. The flow of the binding procedure is shown below. -/// -/// Controller View -/// -/// @dot -/// digraph BINDING_COMMS_CONTROLLER { -/// "UNBOUND" [shape="ellipse", fontname=Helvetica, fontsize=10, label="UNBOUND"]; -/// "IS_DISC_OK" [shape="diamond", fontname=Helvetica, fontsize=10, label="Successful\ndiscovery?"]; -/// "IS_LIST_EMPTY" [shape="diamond", fontname=Helvetica, fontsize=10, label="Is another\ntarget available?"]; -/// "IS_PAIR_OK" [shape="diamond", fontname=Helvetica, fontsize=10, label="Pairing\nsuccess?"]; -/// "IS_VAL_OK" [shape="diamond", fontname=Helvetica, fontsize=10, label="Validation\nsuccess?"]; -/// "BOUND" [shape="ellipse", fontname=Helvetica, fontsize=10, label="BOUND"]; -/// -/// node[shape=none, width=0, height=0, label=""]; -/// {rank=same; a3; a4; a5;} -/// -/// "UNBOUND" -> "IS_DISC_OK" [dir="forward", fontname=Helvetica, fontsize=10,label=" Discovery initiated\non controller"]; -/// "IS_DISC_OK" -> "IS_LIST_EMPTY" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, sort pairing\ntarget list."]; -/// "IS_LIST_EMPTY" -> "IS_PAIR_OK" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, perform\npairing procedure."]; -/// "IS_PAIR_OK" -> "IS_VAL_OK" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, perform\nvalidation procedure."]; -/// "IS_VAL_OK" -> "BOUND" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes"]; -/// -/// {rank=same; UNBOUND; IS_DISC_OK; IS_LIST_EMPTY; IS_PAIR_OK; IS_VAL_OK; BOUND;} -/// {rank=same; b1; b2; b3; b4; b5;} -/// -/// edge[dir=none]; -/// a3 -> a4 -> a5 -/// b1 -> b2 -> b3 -/// a4 -> "IS_PAIR_OK" [fontname=Helvetica, fontsize=10,label=" No, go to next target."]; -/// a5 -> "IS_VAL_OK" [fontname=Helvetica, fontsize=10,label=" No, unpair and go\n to next target."]; -/// b2 -> "IS_DISC_OK" [fontname=Helvetica, fontsize=10,label=" No"]; -/// "IS_LIST_EMPTY" -> b3 [fontname=Helvetica, fontsize=10,label=" No"]; -/// -/// edge[dir=forward]; -/// b1 -> "UNBOUND"; -/// a3 -> "IS_LIST_EMPTY"; -/// } -/// \enddot -/// -/// Target View (Control Manager) -/// -/// @dot -/// digraph BINDING_COMMS_TARGET { -/// node[fontname=Helvetica, fontsize=10]; -/// b1 [shape="ellipse", label="IDLE"]; -/// b2 [shape="diamond", label="Is bind table\lfull or binding\lin progress?"]; -/// b3 [shape="ellipse", label="VALIDATION\lIN PROGRESS"]; -/// b4 [shape="ellipse", label="VALIDATION\lCOMPLETE"]; -/// -/// node[shape=none, width=0, height=0, label=""]; -/// {rank=same; a1, a2, a3; a4;} -/// {rank=same; b1; b2; b3; b4;} -/// {rank=same; c1; c2; c3; c4;} -/// -/// edge[dir=none]; -/// c1 -> c2 -> c3 -> c4 -/// -/// edge[dir=forward, fontname=Helvetica, fontsize=10]; -/// b1 -> b2 [label=" HAL bind validation\l start called"]; -/// b3 -> b3 [label=" Other key pressed\lon this remote"]; -/// b2 -> b3 [label=" No, send IARM validation\l start event"]; -/// a3 -> b3 [dir=none, label=" IARM validation\l complete called"] -/// a3 -> a4 [dir=none] -/// a4 -> b4 -/// -/// edge[dir=none, fontname=Helvetica, fontsize=10]; -/// b1 -> c1 [dir=back]; -/// b2 -> c2 [dir=none, label=" Yes, call HAL bind validation finish (full, pending)"]; -/// b3 -> c3 [dir=none, label=" Infinity or exit key pressed on this remote or collision occurred.\l Broadcast IARM validation complete event\lCall HAL bind validation finish (abort, collision)"]; -/// b4 -> c4 [dir=none, label=" Broadcast IARM validation complete event\l Call HAL validation finish (success, failed, timeout, error)"]; -/// -/// } -/// \enddot -/// -/// ------------------------------------ -/// RF4CE Controller Binding - Automatic -/// ------------------------------------ -/// -/// When the remote control is set to CLIP Discovery mode (setup + D), the controller will attempt to automatically bind without any user interaction required. Several keys on the remote control -/// are designated as autobinding keys (replay, exit, mic, menu, guide, last, info, A, B, C, D). When one of these keys are released, the controller will send the IR code for that key followed by the -/// autobind ghost code. After a brief delay, it will issue a discovery request using a vendor specific device id. If the controller receives more than the required number of responses from a single -/// target, it will attempt to bind with this target. -/// -/// @dot -/// digraph AUTOBIND_COMMS { -/// "UNBOUND" [shape="ellipse", fontname=Helvetica, fontsize=10, label="UNBOUND"]; -/// "DISC_RSP_RXD" [shape="diamond", fontname=Helvetica, fontsize=10, label="Exactly one discovery\nresponse received?"]; -/// "FAIL_LIMIT" [shape="diamond", fontname=Helvetica, fontsize=10, label="Failure count greater\nthan fail threshold?"]; -/// "SUCCESS_LIMIT" [shape="diamond", fontname=Helvetica, fontsize=10, label="Success count greater\nthan pair threshold?"]; -/// "BOUND" [shape="ellipse", fontname=Helvetica, fontsize=10, label="BOUND"]; -/// -/// node[shape=none, width=0, height=0, label=""]; -/// {rank=same; a1; a2; a3;} -/// -/// "UNBOUND" -> "DISC_RSP_RXD" [dir="forward", fontname=Helvetica, fontsize=10,label=" Autobinding key is released.\nSend IR ghost code.\nDelay. Start discovery."]; -/// "DISC_RSP_RXD" -> "SUCCESS_LIMIT" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, increment\nsuccess count"]; -/// "SUCCESS_LIMIT" -> "BOUND" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, complete\nbinding procedure."]; -/// -/// {rank=same; UNBOUND; DISC_RSP_RXD; SUCCESS_LIMIT; BOUND;} -/// {rank=same; b1; FAIL_LIMIT; } -/// {rank=same; c1; c2; } -/// -/// edge[dir=none]; -/// a1 -> a2 -> a3 -/// c1 -> c2 -/// a3 -> SUCCESS_LIMIT [fontname=Helvetica, fontsize=10,label=" No"]; -/// b1 -> FAIL_LIMIT [fontname=Helvetica, fontsize=10,label=" No."]; -/// FAIL_LIMIT -> c2 [fontname=Helvetica, fontsize=10,label=" Yes, set success and\n failure counters to zero."]; -/// c1 -> b1 -/// -/// edge[dir=forward]; -/// DISC_RSP_RXD -> FAIL_LIMIT [fontname=Helvetica, fontsize=10,label=" No, increment\nfailure count."]; -/// b1 -> UNBOUND; -/// a1 -> UNBOUND; -/// } -/// \enddot -/// -/// ------------------------- -/// IP Remote Control Binding -/// ------------------------- -/// -/// The binding procedure between the IP based controller and target (STB) is initiated on the target. The user must navigate to the IP Remote Control -/// configuration screen to listen for incoming pairing requests. While on this screen, ... -/// The flow of the binding procedure is shown below. -/// -/// @dot -/// digraph BINDING_COMMS { -/// "UNBOUND" [shape="ellipse", fontname=Helvetica, fontsize=10, label="UNBOUND"]; -/// "IS_DISC_OK" [shape="diamond", fontname=Helvetica, fontsize=10, label="Devices\nfound?"]; -/// "IS_USER_DONE" [shape="diamond", fontname=Helvetica, fontsize=10, label="Pair\nanother\ncontroller?"]; -/// "IS_PAIR_OK" [shape="diamond", fontname=Helvetica, fontsize=10, label="Pairing\nsuccess?"]; -/// "IS_VAL_OK" [shape="diamond", fontname=Helvetica, fontsize=10, label="Validation\nsuccess?"]; -/// "BOUND" [shape="ellipse", fontname=Helvetica, fontsize=10, label="BOUND"]; -/// -/// node[shape=none, width=0, height=0, label=""]; -/// {rank=same; a3; a4; a5;} -/// -/// "UNBOUND" -> "IS_DISC_OK" [dir="forward", fontname=Helvetica, fontsize=10,label=" User navigates to IP RCU\nconfig screen. Discovery\nrequest sent by controller."]; -/// "IS_DISC_OK" -> "IS_USER_DONE" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, user is presented\nwith controller list."]; -/// "IS_USER_DONE" -> "IS_PAIR_OK" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, perform\npairing procedure\non selected controller."]; -/// "IS_PAIR_OK" -> "IS_VAL_OK" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes, perform\nvalidation procedure."]; -/// "IS_VAL_OK" -> "BOUND" [dir="forward", fontname=Helvetica, fontsize=10,label=" Yes"]; -/// -/// {rank=same; UNBOUND; IS_DISC_OK; IS_USER_DONE; IS_PAIR_OK; IS_VAL_OK; BOUND;} -/// {rank=same; b1; b2; b3; b4; b5;} -/// -/// edge[dir=none]; -/// a3 -> a4 -> a5 -// b1 -> b2 -> b3 -/// a4 -> "IS_PAIR_OK" [fontname=Helvetica, fontsize=10,label=" No"]; -/// a5 -> "IS_VAL_OK" [fontname=Helvetica, fontsize=10,label=" No, unpair\ncontroller."]; -/// -/// edge[dir=forward]; -/// "IS_DISC_OK" -> b2 [fontname=Helvetica, fontsize=10,label=" No, user exited."]; -/// "IS_USER_DONE" -> b3 [fontname=Helvetica, fontsize=10,label=" No, user exited."]; -/// a3 -> "IS_USER_DONE"; -/// } -/// \enddot -/// -/// ------------------------- -/// Controller Key Press Flow -/// ------------------------- -/// -/// Controller key press events are generated when the user presses, holds and releases a key on a bound controller. -/// -/// -/// @dot -/// digraph CTRL_StateMachine { -/// "RCU" [shape="ellipse", fontname=Helvetica, fontsize=10, label="Remote Control"]; -/// "CTRLD" [shape="ellipse", fontname=Helvetica, fontsize=10, label="Control Driver"]; -/// "CTRLM" [shape="ellipse", fontname=Helvetica, fontsize=10, label="Control Manager"]; -/// "IRM" [shape="ellipse", fontname=Helvetica, fontsize=10, label="IR Manager"]; -/// "SVCM" [shape="ellipse", fontname=Helvetica, fontsize=10, label="Service Manager"]; -/// -/// "RCU" -> "CTRLD" [fontname=Helvetica, fontsize=10,label=" User presses, holds or\n releases a key"]; -/// "CTRLD" -> "CTRLM" [fontname=Helvetica, fontsize=10,label=" Key received in driver"]; -/// "CTRLM" -> "IRM" [fontname=Helvetica, fontsize=10,label=" Key Broadcast "]; -/// "CTRLM" -> "SVCM" [fontname=Helvetica, fontsize=10,label=""]; -/// } -/// \enddot -/// @} -/// @} #endif diff --git a/src/ctrlm_rcu.cpp b/src/ctrlm_rcu.cpp index dfbb7677..eeed932b 100644 --- a/src/ctrlm_rcu.cpp +++ b/src/ctrlm_rcu.cpp @@ -40,42 +40,6 @@ void ctrlm_rcu_terminate(void) { ctrlm_rcu_terminate_iarm(); } -gboolean ctrlm_rcu_validation_finish(ctrlm_rcu_iarm_call_validation_finish_t *params) { - -#if 1 // ASYNCHRONOUS - if(!ctrlm_controller_id_is_valid(params->network_id, params->controller_id)) { - XLOGD_ERROR("invalid controller id (%u, %u)", params->network_id, params->controller_id); - return(false); - } - if(params->validation_result >= CTRLM_RCU_VALIDATION_RESULT_MAX) { - XLOGD_ERROR("invalid validation result (%d)", params->validation_result); - return(false); - } - - ctrlm_inform_validation_end(params->network_id, params->controller_id, CTRLM_RCU_BINDING_TYPE_INTERACTIVE, CTRLM_RCU_VALIDATION_TYPE_APPLICATION, params->validation_result, NULL, NULL); - return(true); -#else // synchronous - sem_t semaphore; - ctrlm_validation_end_cmd_result_t cmd_result = CTRLM_VALIDATION_END_CMD_RESULT_PENDING; - - sem_init(&semaphore, 0, 0); - - if(!ctrlm_inform_validation_end(params->network_id, params->controller_id, params->validation_result, &semaphore, &cmd_result)) { - sem_destroy(&semaphore); - return(false); - } - - // Wait for the result semaphore to be signaled - sem_wait(&semaphore); - sem_destroy(&semaphore); - - if(cmd_result == CTRLM_VALIDATION_END_CMD_RESULT_SUCCESS) { - return(true); - } - return(false); -#endif -} - gboolean ctrlm_rcu_controller_status(ctrlm_rcu_iarm_call_controller_status_t *params) { XLOGD_INFO("(%u, %u)", params->network_id, params->controller_id); diff --git a/src/ctrlm_rcu.h b/src/ctrlm_rcu.h index 80cb0bf0..acbe58cb 100644 --- a/src/ctrlm_rcu.h +++ b/src/ctrlm_rcu.h @@ -139,7 +139,6 @@ void ctrlm_rcu_iarm_event_battery_milestone(ctrlm_network_id_t network_id, c void ctrlm_rcu_iarm_event_remote_reboot(ctrlm_network_id_t network_id, ctrlm_controller_id_t controller_id, guchar voltage, controller_reboot_reason_t reason, guint32 assert_number); void ctrlm_rcu_iarm_event_reverse_cmd(ctrlm_network_id_t network_id, ctrlm_controller_id_t controller_id, ctrlm_main_iarm_event_t event, ctrlm_rcu_reverse_cmd_result_t result, int result_data_size, const unsigned char* result_data); -gboolean ctrlm_rcu_validation_finish(ctrlm_rcu_iarm_call_validation_finish_t *params); gboolean ctrlm_rcu_controller_status(ctrlm_rcu_iarm_call_controller_status_t *params); gboolean ctrlm_rcu_rib_request_get(ctrlm_rcu_iarm_call_rib_request_t *params); gboolean ctrlm_rcu_rib_request_set(ctrlm_rcu_iarm_call_rib_request_t *params); diff --git a/src/ctrlm_rcu_iarm.cpp b/src/ctrlm_rcu_iarm.cpp index ca4a0e7c..684d0839 100644 --- a/src/ctrlm_rcu_iarm.cpp +++ b/src/ctrlm_rcu_iarm.cpp @@ -28,7 +28,6 @@ #include "ctrlm_rcu.h" #include "ctrlm_utils.h" -static IARM_Result_t ctrlm_rcu_iarm_call_validation_finish(void *arg); static IARM_Result_t ctrlm_rcu_iarm_call_controller_status(void *arg); static IARM_Result_t ctrlm_rcu_iarm_call_rib_request_get(void *arg); static IARM_Result_t ctrlm_rcu_iarm_call_rib_request_set(void *arg); @@ -42,7 +41,6 @@ typedef struct { } iarm_call_handler_t; static iarm_call_handler_t handlers[] = { - { CTRLM_RCU_IARM_CALL_VALIDATION_FINISH, &ctrlm_rcu_iarm_call_validation_finish }, { CTRLM_RCU_IARM_CALL_CONTROLLER_STATUS, &ctrlm_rcu_iarm_call_controller_status }, { CTRLM_RCU_IARM_CALL_RIB_REQUEST_GET, &ctrlm_rcu_iarm_call_rib_request_get }, { CTRLM_RCU_IARM_CALL_RIB_REQUEST_SET, &ctrlm_rcu_iarm_call_rib_request_set }, @@ -226,12 +224,6 @@ static IARM_Result_t ctrlm_rcu_iarm_call_dispatch(iarm_call_struct* params, gboo return(IARM_RESULT_SUCCESS); } -IARM_Result_t ctrlm_rcu_iarm_call_validation_finish(void *arg) { - ctrlm_rcu_iarm_call_validation_finish_t *params = (ctrlm_rcu_iarm_call_validation_finish_t *) arg; - XLOGD_INFO("(%u, %u) Validation Result <%s>", params->network_id, params->controller_id, ctrlm_rcu_validation_result_str(params->validation_result)); - return ctrlm_rcu_iarm_call_dispatch(params, &ctrlm_rcu_validation_finish); -} - IARM_Result_t ctrlm_rcu_iarm_call_controller_status(void *arg) { ctrlm_rcu_iarm_call_controller_status_t *params = (ctrlm_rcu_iarm_call_controller_status_t *) arg; return ctrlm_rcu_iarm_call_dispatch(params, &ctrlm_rcu_controller_status); From 5cd51ae22ec247515c735ed5d84f86c297829edd Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 15:28:50 -0400 Subject: [PATCH 17/21] remove rcu reverse command iarm call --- include/ctrlm_ipc_rcu.h | 1 - src/ctrlm.h | 1 - src/ctrlm_main.cpp | 17 --------------- src/ctrlm_rcu.cpp | 48 ----------------------------------------- src/ctrlm_rcu.h | 1 - src/ctrlm_rcu_iarm.cpp | 7 ------ 6 files changed, 75 deletions(-) diff --git a/include/ctrlm_ipc_rcu.h b/include/ctrlm_ipc_rcu.h index b83a8b7d..18247c12 100644 --- a/include/ctrlm_ipc_rcu.h +++ b/include/ctrlm_ipc_rcu.h @@ -25,7 +25,6 @@ #define CTRLM_RCU_IARM_CALL_CONTROLLER_LINK_KEY "Rcu_ControllerLinkKey" ///< IARM Call to get controller link key #define CTRLM_RCU_IARM_CALL_RIB_REQUEST_GET "Rcu_RibRequestGet" ///< IARM Call to retrieves an attribute from the controller's RIB #define CTRLM_RCU_IARM_CALL_RIB_REQUEST_SET "Rcu_RibRequestSet" ///< IARM Call to set an attribute in the controller's RIB -#define CTRLM_RCU_IARM_CALL_REVERSE_CMD "Rcu_ReverseCmd" ///< IARM Call to Trigger Remote Controller Action #define CTRLM_RCU_IARM_CALL_RF4CE_POLLING_ACTION "Rcu_Rf4cePollingAction" ///< IARM Call to Send Remote Heartbeat Response Polling Action #define CTRLM_RCU_IARM_BUS_API_REVISION (13) ///< Revision of the RCU IARM API diff --git a/src/ctrlm.h b/src/ctrlm.h index 12792570..d7c8ae6a 100644 --- a/src/ctrlm.h +++ b/src/ctrlm.h @@ -70,7 +70,6 @@ typedef enum { CTRLM_MAIN_QUEUE_MSG_TYPE_BIND_VALIDATION_FAILED_TIMEOUT, CTRLM_MAIN_QUEUE_MSG_TYPE_TERMINATE_VOICE_SESSION, CTRLM_MAIN_QUEUE_MSG_TYPE_CONTROLLER_TYPE_GET, - CTRLM_MAIN_QUEUE_MSG_TYPE_CONTROLLER_REVERSE_CMD, CTRLM_MAIN_QUEUE_MSG_TYPE_RCU_POLLING_ACTION, // End network based messages diff --git a/src/ctrlm_main.cpp b/src/ctrlm_main.cpp index 6f070af1..5d40cd17 100644 --- a/src/ctrlm_main.cpp +++ b/src/ctrlm_main.cpp @@ -2896,23 +2896,6 @@ gpointer ctrlm_main_thread(gpointer param) { } break; } - case CTRLM_MAIN_QUEUE_MSG_TYPE_CONTROLLER_REVERSE_CMD: { - if(ctrlm_main_successful_init_get()) { - ctrlm_main_queue_msg_rcu_reverse_cmd_t *dqm = (ctrlm_main_queue_msg_rcu_reverse_cmd_t *) msg; - ctrlm_controller_status_cmd_result_t cmd_result = CTRLM_CONTROLLER_STATUS_REQUEST_ERROR; - XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_CONTROLLER_REVERSE_CMD"); - cmd_result = obj_net->req_process_reverse_cmd(dqm); - if(dqm->semaphore != NULL && dqm->cmd_result != NULL) { - // Signal the semaphore to indicate that the result is present - *dqm->cmd_result = cmd_result; - sem_post(dqm->semaphore); - } - } else { - // Networks are not ready, push back to the queue, then continue so it's not freed - ctrlm_timeout_create(CTRLM_MAIN_QUEUE_REPEAT_DELAY, ctrlm_message_queue_delay, msg); - } - break; - } case CTRLM_MAIN_QUEUE_MSG_TYPE_AUDIO_CAPTURE_START: { XLOGD_DEBUG("message type CTRLM_MAIN_QUEUE_MSG_TYPE_AUDIO_CAPTURE_START"); ctrlm_main_queue_msg_audio_capture_start_t *start_msg = (ctrlm_main_queue_msg_audio_capture_start_t *)msg; diff --git a/src/ctrlm_rcu.cpp b/src/ctrlm_rcu.cpp index eeed932b..3e7f0a24 100644 --- a/src/ctrlm_rcu.cpp +++ b/src/ctrlm_rcu.cpp @@ -198,54 +198,6 @@ gboolean ctrlm_rcu_controller_link_key(ctrlm_rcu_iarm_call_controller_link_key_t return(false); } -gboolean ctrlm_rcu_reverse_cmd(ctrlm_main_iarm_call_rcu_reverse_cmd_t *params) { - XLOGD_INFO("(%s, %s)", ctrlm_network_type_str(params->network_type).c_str(), ctrlm_controller_name_str(params->controller_id).c_str()); -#if (CTRLM_HAL_RF4CE_API_VERSION < 14) - XLOGD_ERROR("Reverse command is supported with Ctrlm HAL API >= 14"); - return(false); -#endif - - sem_t semaphore; - ctrlm_controller_status_cmd_result_t cmd_result = CTRLM_CONTROLLER_STATUS_REQUEST_PENDING; - - // Allocate a message and send it to Control Manager's queue - unsigned int extra_data = params->total_size - sizeof(ctrlm_main_iarm_call_rcu_reverse_cmd_t); - unsigned int msg_size = sizeof(ctrlm_main_queue_msg_rcu_reverse_cmd_t) + extra_data; - ctrlm_main_queue_msg_rcu_reverse_cmd_t *msg = (ctrlm_main_queue_msg_rcu_reverse_cmd_t *)g_malloc(msg_size); - - if(NULL == msg) { - XLOGD_FATAL("Out of memory"); - g_assert(0); - return(false); - } - - sem_init(&semaphore, 0, 0); - - msg->header.type = CTRLM_MAIN_QUEUE_MSG_TYPE_CONTROLLER_REVERSE_CMD; - msg->header.network_id = ctrlm_network_id_get(params->network_type); - msg->controller_id = params->controller_id; - msg->semaphore = &semaphore; - msg->cmd_result = &cmd_result; - - errno_t safec_rc = memcpy_s(&msg->reverse_command, sizeof(msg->reverse_command) + extra_data, params, params->total_size); - ERR_CHK(safec_rc); - - ctrlm_main_queue_msg_push(msg); - - // Wait for the result to be signaled - sem_wait(&semaphore); - sem_destroy(&semaphore); - - // Return reverse command result - params->cmd_result = msg->reverse_command.cmd_result; - - if(cmd_result == CTRLM_CONTROLLER_STATUS_REQUEST_SUCCESS) { - return(true); - } - return(false); -} - - gboolean ctrlm_rcu_controller_type_get(ctrlm_network_id_t network_id, ctrlm_controller_id_t controller_id, ctrlm_rcu_controller_type_t *type) { XLOGD_INFO("(%u, %u)", network_id, controller_id); diff --git a/src/ctrlm_rcu.h b/src/ctrlm_rcu.h index acbe58cb..7b3729ff 100644 --- a/src/ctrlm_rcu.h +++ b/src/ctrlm_rcu.h @@ -143,7 +143,6 @@ gboolean ctrlm_rcu_controller_status(ctrlm_rcu_iarm_call_controller_status_t *pa gboolean ctrlm_rcu_rib_request_get(ctrlm_rcu_iarm_call_rib_request_t *params); gboolean ctrlm_rcu_rib_request_set(ctrlm_rcu_iarm_call_rib_request_t *params); gboolean ctrlm_rcu_controller_link_key(ctrlm_rcu_iarm_call_controller_link_key_t *params); -gboolean ctrlm_rcu_reverse_cmd(ctrlm_main_iarm_call_rcu_reverse_cmd_t *params); gboolean ctrlm_rcu_controller_type_get(ctrlm_network_id_t network_id, ctrlm_controller_id_t controller_id, ctrlm_rcu_controller_type_t *type); gboolean ctrlm_rcu_rf4ce_polling_action(ctrlm_rcu_iarm_call_rf4ce_polling_action_t *params); diff --git a/src/ctrlm_rcu_iarm.cpp b/src/ctrlm_rcu_iarm.cpp index 684d0839..a28ea82e 100644 --- a/src/ctrlm_rcu_iarm.cpp +++ b/src/ctrlm_rcu_iarm.cpp @@ -32,7 +32,6 @@ static IARM_Result_t ctrlm_rcu_iarm_call_controller_status(void *arg); static IARM_Result_t ctrlm_rcu_iarm_call_rib_request_get(void *arg); static IARM_Result_t ctrlm_rcu_iarm_call_rib_request_set(void *arg); static IARM_Result_t ctrlm_rcu_iarm_call_controller_link_key(void *arg); -static IARM_Result_t ctrlm_rcu_iarm_call_reverse_cmd(void *arg); static IARM_Result_t ctrlm_rcu_iarm_call_rf4ce_polling_action(void *arg); typedef struct { @@ -45,7 +44,6 @@ static iarm_call_handler_t handlers[] = { { CTRLM_RCU_IARM_CALL_RIB_REQUEST_GET, &ctrlm_rcu_iarm_call_rib_request_get }, { CTRLM_RCU_IARM_CALL_RIB_REQUEST_SET, &ctrlm_rcu_iarm_call_rib_request_set }, { CTRLM_RCU_IARM_CALL_CONTROLLER_LINK_KEY, &ctrlm_rcu_iarm_call_controller_link_key }, - { CTRLM_RCU_IARM_CALL_REVERSE_CMD, &ctrlm_rcu_iarm_call_reverse_cmd }, { CTRLM_RCU_IARM_CALL_RF4CE_POLLING_ACTION, &ctrlm_rcu_iarm_call_rf4ce_polling_action } }; @@ -242,11 +240,6 @@ IARM_Result_t ctrlm_rcu_iarm_call_rib_request_set(void *arg) { IARM_Result_t ctrlm_rcu_iarm_call_controller_link_key(void *arg) { ctrlm_rcu_iarm_call_controller_link_key_t *params = (ctrlm_rcu_iarm_call_controller_link_key_t *) arg; return ctrlm_rcu_iarm_call_dispatch(params, &ctrlm_rcu_controller_link_key); - } - -IARM_Result_t ctrlm_rcu_iarm_call_reverse_cmd(void *arg) { - ctrlm_main_iarm_call_rcu_reverse_cmd_t *params = (ctrlm_main_iarm_call_rcu_reverse_cmd_t *) arg; - return ctrlm_rcu_iarm_call_dispatch(params, &ctrlm_rcu_reverse_cmd); } IARM_Result_t ctrlm_rcu_iarm_call_rf4ce_polling_action(void *arg) { From d69fb6fae5cd929a076c78b5adf0267e31f6cedb Mon Sep 17 00:00:00 2001 From: dwolav200 Date: Mon, 6 Jul 2026 15:30:47 -0400 Subject: [PATCH 18/21] remove doxygen scripts --- 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 ---- 18 files changed, 17175 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 -# , /