RDKEMW-17968: irdb store manufac model info#240
Open
egalla204 wants to merge 9 commits into
Open
Conversation
There was a problem hiding this comment.
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
manufacturerandmodelfrom 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. |
| * @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
marked this pull request as draft
June 11, 2026 18:01
There was a problem hiding this comment.
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, anddqm->vendor_infolike 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.