1*7ad45b40SUnive Tien #include "firmware_inventory.hpp"
2*7ad45b40SUnive Tien
3*7ad45b40SUnive Tien namespace pldm::fw_update
4*7ad45b40SUnive Tien {
5*7ad45b40SUnive Tien
FirmwareInventory(SoftwareIdentifier,const std::string & softwarePath,const std::string & softwareVersion,const std::string & associatedEndpoint,const Descriptors &,const ComponentInfo &,SoftwareVersionPurpose purpose)6*7ad45b40SUnive Tien FirmwareInventory::FirmwareInventory(
7*7ad45b40SUnive Tien SoftwareIdentifier /*softwareIdentifier*/, const std::string& softwarePath,
8*7ad45b40SUnive Tien const std::string& softwareVersion, const std::string& associatedEndpoint,
9*7ad45b40SUnive Tien const Descriptors& /*descriptors*/, const ComponentInfo& /*componentInfo*/,
10*7ad45b40SUnive Tien SoftwareVersionPurpose purpose) :
11*7ad45b40SUnive Tien softwarePath(softwarePath),
12*7ad45b40SUnive Tien association(this->bus, this->softwarePath.c_str()),
13*7ad45b40SUnive Tien version(this->bus, this->softwarePath.c_str(),
14*7ad45b40SUnive Tien SoftwareVersion::action::defer_emit)
15*7ad45b40SUnive Tien {
16*7ad45b40SUnive Tien this->association.associations(
17*7ad45b40SUnive Tien {{"running", "ran_on", associatedEndpoint.c_str()}});
18*7ad45b40SUnive Tien this->version.version(softwareVersion.c_str());
19*7ad45b40SUnive Tien this->version.purpose(purpose);
20*7ad45b40SUnive Tien this->version.emit_added();
21*7ad45b40SUnive Tien }
22*7ad45b40SUnive Tien
23*7ad45b40SUnive Tien } // namespace pldm::fw_update
24