| Unive Tien | 7ad45b4 | 2025-08-18 06:04:53 +0000 | [diff] [blame] | 1 | #include "firmware_inventory.hpp" |
| 2 | |
| 3 | namespace pldm::fw_update |
| 4 | { |
| 5 | |
| 6 | FirmwareInventory::FirmwareInventory( |
| 7 | SoftwareIdentifier /*softwareIdentifier*/, const std::string& softwarePath, |
| 8 | const std::string& softwareVersion, const std::string& associatedEndpoint, |
| Unive Tien | 7ad45b4 | 2025-08-18 06:04:53 +0000 | [diff] [blame] | 9 | SoftwareVersionPurpose purpose) : |
| 10 | softwarePath(softwarePath), |
| 11 | association(this->bus, this->softwarePath.c_str()), |
| 12 | version(this->bus, this->softwarePath.c_str(), |
| 13 | SoftwareVersion::action::defer_emit) |
| 14 | { |
| 15 | this->association.associations( |
| 16 | {{"running", "ran_on", associatedEndpoint.c_str()}}); |
| 17 | this->version.version(softwareVersion.c_str()); |
| 18 | this->version.purpose(purpose); |
| 19 | this->version.emit_added(); |
| 20 | } |
| 21 | |
| 22 | } // namespace pldm::fw_update |