#pragma once #include #include #include #include #include #include #include #include #include namespace pldm { using eid = uint8_t; using UUID = std::string; using Request = std::vector; using Response = std::vector; using Command = uint8_t; /** @brief MCTP Endpoint Medium type in string * Reserved for future purpose */ using MctpMedium = std::string; /** @brief Type definition of MCTP Network Index. * uint32_t is used as defined in MCTP Endpoint D-Bus Interface */ using NetworkId = uint32_t; /** @brief Type definition of MCTP interface information between two endpoints. * eid : Endpoint EID in byte. Defined to match with MCTP D-Bus * interface * UUID : Endpoint UUID which is used to different the endpoints * MctpMedium: Endpoint MCTP Medium info (Resersed) * NetworkId: MCTP network index */ using MctpInfo = std::tuple; /** @brief Type defined for list of MCTP interface information */ using MctpInfos = std::vector; /** * In `Table 2 - Special endpoint IDs` of DSP0236. * EID from 1 to 7 is reserved EID. So the start valid EID is 8 */ #define MCTP_START_VALID_EID 8 #define PLDM_PLATFORM_GETPDR_MAX_RECORD_BYTES 1024 namespace dbus { using ObjectPath = std::string; using Service = std::string; using Interface = std::string; using Interfaces = std::vector; using Property = std::string; using PropertyType = std::string; using Value = std::variant>; using PropertyMap = std::map; using InterfaceMap = std::map; using ObjectValueTree = std::map; } // namespace dbus namespace fw_update { // Descriptor definition using DescriptorType = uint16_t; using DescriptorData = std::vector; using VendorDefinedDescriptorTitle = std::string; using VendorDefinedDescriptorData = std::vector; using VendorDefinedDescriptorInfo = std::tuple; using Descriptors = std::map>; using DescriptorMap = std::unordered_map; // Component information using CompClassification = uint16_t; using CompIdentifier = uint16_t; using CompKey = std::pair; using CompClassificationIndex = uint8_t; using ComponentInfo = std::map; using ComponentInfoMap = std::unordered_map; // PackageHeaderInformation using PackageHeaderSize = size_t; using PackageVersion = std::string; using ComponentBitmapBitLength = uint16_t; using PackageHeaderChecksum = uint32_t; // FirmwareDeviceIDRecords using DeviceIDRecordCount = uint8_t; using DeviceUpdateOptionFlags = std::bitset<32>; using ApplicableComponents = std::vector; using ComponentImageSetVersion = std::string; using FirmwareDevicePackageData = std::vector; using FirmwareDeviceIDRecord = std::tuple; using FirmwareDeviceIDRecords = std::vector; // ComponentImageInformation using ComponentImageCount = uint16_t; using CompComparisonStamp = uint32_t; using CompOptions = std::bitset<16>; using ReqCompActivationMethod = std::bitset<16>; using CompLocationOffset = uint32_t; using CompSize = uint32_t; using CompVersion = std::string; using ComponentImageInfo = std::tuple; using ComponentImageInfos = std::vector; enum class ComponentImageInfoPos : size_t { CompClassificationPos = 0, CompIdentifierPos = 1, CompComparisonStampPos = 2, CompOptionsPos = 3, ReqCompActivationMethodPos = 4, CompLocationOffsetPos = 5, CompSizePos = 6, CompVersionPos = 7, }; } // namespace fw_update namespace pdr { using EID = uint8_t; using TerminusHandle = uint16_t; using TerminusID = uint8_t; using SensorID = uint16_t; using EntityType = uint16_t; using EntityInstance = uint16_t; using ContainerID = uint16_t; using StateSetId = uint16_t; using CompositeCount = uint8_t; using SensorOffset = uint8_t; using EventState = uint8_t; using TerminusValidity = uint8_t; //!< Subset of the State Set that is supported by a effecter/sensor using PossibleStates = std::set; //!< Subset of the State Set that is supported by each effecter/sensor in a //!< composite efffecter/sensor using CompositeSensorStates = std::vector; using EntityInfo = std::tuple; using SensorInfo = std::tuple>; } // namespace pdr } // namespace pldm