blob: ffbb4e88e843aa2e5f1bb4c072752307cb717f34 [file] [log] [blame]
Unive Tien7ad45b42025-08-18 06:04:53 +00001#include "firmware_inventory.hpp"
2
3namespace pldm::fw_update
4{
5
6FirmwareInventory::FirmwareInventory(
7 SoftwareIdentifier /*softwareIdentifier*/, const std::string& softwarePath,
8 const std::string& softwareVersion, const std::string& associatedEndpoint,
Unive Tien7ad45b42025-08-18 06:04:53 +00009 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