Alexander Hansen | 0119cd7 | 2025-01-14 14:15:39 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <cstdint> |
| 4 | #include <string> |
| 5 | |
| 6 | /* This class represents the device software configuration we get from |
| 7 | * entity-manager via dbus. Each Code Updater can create its own configuration |
| 8 | * class that inherits from this to store additional properties from their |
| 9 | * device configuration, like bus/address/... |
| 10 | */ |
| 11 | class DeviceConfig |
| 12 | { |
| 13 | public: |
| 14 | DeviceConfig(uint32_t vendorIANA, const std::string& compatible, |
| 15 | const std::string& configType, const std::string& name); |
| 16 | |
| 17 | // https://gerrit.openbmc.org/c/openbmc/docs/+/74653 |
| 18 | // properties from the configuration |
| 19 | const uint32_t vendorIANA; // "0x0000A015", 4 bytes as per PLDM spec |
| 20 | |
| 21 | const std::string |
| 22 | compatibleHardware; // e.g. |
| 23 | // "com.meta.Hardware.Yosemite4.MedusaBoard.CPLD.LCMX02_2000HC" |
| 24 | |
| 25 | // 'Name' field from the EM config |
| 26 | const std::string configName; |
| 27 | |
| 28 | // 'Type' field from the EM config |
| 29 | const std::string configType; |
| 30 | }; |