blob: e59b5ba29b1f56c0a052091b7c7e9c3f18c42dac [file] [log] [blame]
#include "firmware_inventory.hpp"
namespace pldm::fw_update
{
FirmwareInventory::FirmwareInventory(
SoftwareIdentifier /*softwareIdentifier*/, const std::string& softwarePath,
const std::string& softwareVersion, const std::string& associatedEndpoint,
const Descriptors& /*descriptors*/, const ComponentInfo& /*componentInfo*/,
SoftwareVersionPurpose purpose) :
softwarePath(softwarePath),
association(this->bus, this->softwarePath.c_str()),
version(this->bus, this->softwarePath.c_str(),
SoftwareVersion::action::defer_emit)
{
this->association.associations(
{{"running", "ran_on", associatedEndpoint.c_str()}});
this->version.version(softwareVersion.c_str());
this->version.purpose(purpose);
this->version.emit_added();
}
} // namespace pldm::fw_update