Skip to content

RDKEMW-17968: irdb store manufac model info#240

Open
egalla204 wants to merge 9 commits into
developfrom
feature/RDKEMW-17968_irdb-store-manufac-model-info
Open

RDKEMW-17968: irdb store manufac model info#240
egalla204 wants to merge 9 commits into
developfrom
feature/RDKEMW-17968_irdb-store-manufac-model-info

Conversation

@egalla204

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 5, 2026 17:21
@egalla204
egalla204 requested a review from a team as a code owner June 5, 2026 17:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds manufacturer/model metadata plumbing to the IRDB programming flow so ControlMgr can persist and surface the device’s make/model alongside the programmed IR code set IDs.

Changes:

  • Extend IR programming request data to carry manufacturer and model from IRDB lookup through to network programming.
  • Persist manufacturer/model for TV and AVR in both the IR RF DB storage and per-controller DB attributes, and expose them in BLE controller status/logging.
  • Add database read/write helpers and load/store integration for the new fields.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/network/ctrlm_ir_rf_db.h Extends add_irdb_codes API to accept manufacturer/model and adds new stored fields.
src/network/ctrlm_ir_rf_db.cpp Stores/clears manufacturer/model with IR code IDs, prints them in debug, and loads/stores them to DB.
src/irdb/ctrlm_irdb_interface.h Adds manufacturer/model to the main-queue IR programming message and updates private _program_ir_codes signature.
src/irdb/ctrlm_irdb_interface.cpp Caches last manufacturer/model from entry-id lookup and forwards it into IR programming requests.
src/database/ctrlm_database.h Declares DB helpers for reading/writing TV/AVR manufacturer/model.
src/database/ctrlm_database.cpp Implements DB helpers and adds new keys for manufacturer/model persistence.
src/ctrlm_controller.h Adds controller API + DB-backed attributes to store IRDB manufacturer/model per device type.
src/ctrlm_controller.cpp Implements manufacturer/model persistence and loads/stores the new attributes.
src/ble/ctrlm_ble_network.cpp Passes manufacturer/model into IR RF DB programming and persists it on the controller object.
src/ble/ctrlm_ble_controller.cpp Prints stored IRDB manufacturer/model in BLE controller status output.

Comment thread src/network/ctrlm_ir_rf_db.h Outdated
Comment thread src/network/ctrlm_ir_rf_db.h Outdated
* @reutrn True if the entries were added to the IRRF Database, False otherwise.
*/
bool add_irdb_codes(ctrlm_irdb_ir_code_set_t *ir_codes);
bool add_irdb_codes(ctrlm_irdb_ir_code_set_t *ir_codes, const std::string &manufacturer = "", const std::string &model = "");
@egalla204
egalla204 marked this pull request as draft June 11, 2026 18:01
@egalla204
egalla204 marked this pull request as ready for review July 20, 2026 13:46
Copilot AI review requested due to automatic review settings July 20, 2026 13:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

src/rf4ce/ctrlm_rf4ce_network.cpp:4263

  • RF4CE IR programming path isn't propagating the newly added manufacturer/model (and also doesn't pass vendor info) into the IR RF DB or the controller attributes. As a result, RF4CE controllers won't persist manufacturer/model and the IR RF DB may store vendor info as defaults (0/empty). Update this to use dqm->manufacturer, dqm->model, and dqm->vendor_info like the BLE path does, and persist manufacturer/model on the controller.
         XLOGD_INFO("Setting IR Codes on Controller %u", dqm->controller_id);
         unsigned char status[1] = {IR_RF_DATABASE_STATUS_DB_DOWNLOAD_YES | IR_RF_DATABASE_STATUS_FORCE_DOWNLOAD};
         ir_rf_database_.add_irdb_codes(dqm->ir_codes);
         XLOGD_INFO("\n%s", this->ir_rf_database_.to_string(true).c_str());
         controllers_[dqm->controller_id]->rf4ce_rib_set_target(CTRLM_RF4CE_RIB_ATTR_ID_IR_RF_DATABASE_STATUS, CTRLM_RF4CE_RIB_ATTR_INDEX_GENERAL, CTRLM_RF4CE_RIB_ATTR_LEN_IR_RF_DATABASE_STATUS, status);
         controllers_[dqm->controller_id]->irdb_entry_id_name_set(CTRLM_IRDB_DEV_TYPE_TV, ir_rf_database_.get_tv_ir_code_id());
         controllers_[dqm->controller_id]->irdb_entry_id_name_set(CTRLM_IRDB_DEV_TYPE_AVR, ir_rf_database_.get_avr_ir_code_id());
         this->ir_rf_database_.store_db();

Comment on lines +90 to +92
if (this->value.empty()) {
XLOGD_DEBUG("value is empty for db key <%s>", this->get_name().c_str());
} else if(blob.from_string(this->value)) {
Comment on lines +84 to +91
void ctrlm_db_tv_manufacturer_write(const std::string manufacturer);
void ctrlm_db_tv_manufacturer_read(std::string &manufacturer);
void ctrlm_db_tv_model_write(const std::string model);
void ctrlm_db_tv_model_read(std::string &model);
void ctrlm_db_avr_manufacturer_write(const std::string manufacturer);
void ctrlm_db_avr_manufacturer_read(std::string &manufacturer);
void ctrlm_db_avr_model_write(const std::string model);
void ctrlm_db_avr_model_read(std::string &model);
Comment on lines +667 to +668
auto ids_itr = m_last_entry_ids.find(type);
if(ids_itr != m_last_entry_ids.end() && std::find(ids_itr->second.begin(), ids_itr->second.end(), id) != ids_itr->second.end()) {
for(const auto &entry : type_codes.second) {
entry_ids.push_back(entry.id);
}
m_last_entry_ids[type_codes.first] = entry_ids;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants