blob: e59b5ba29b1f56c0a052091b7c7e9c3f18c42dac [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,
9 const Descriptors& /*descriptors*/, const ComponentInfo& /*componentInfo*/,
10 SoftwareVersionPurpose purpose) :
11 softwarePath(softwarePath),
12 association(this->bus, this->softwarePath.c_str()),
13 version(this->bus, this->softwarePath.c_str(),
14 SoftwareVersion::action::defer_emit)
15{
16 this->association.associations(
17 {{"running", "ran_on", associatedEndpoint.c_str()}});
18 this->version.version(softwareVersion.c_str());
19 this->version.purpose(purpose);
20 this->version.emit_added();
21}
22
23} // namespace pldm::fw_update