1 #include "firmware_inventory.hpp"
2
3 namespace pldm::fw_update
4 {
5
FirmwareInventory(SoftwareIdentifier,const std::string & softwarePath,const std::string & softwareVersion,const std::string & associatedEndpoint,const Descriptors &,const ComponentInfo &,SoftwareVersionPurpose purpose)6 FirmwareInventory::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
24