17c183aedSDeepak Kodihalli #pragma once 27c183aedSDeepak Kodihalli 35b8b8ac5SPatrick Venture #include <sdbusplus/message.hpp> 4*cfa96afaSPatrick Williams 5*cfa96afaSPatrick Williams #include <map> 6c9508db8SPatrick Venture #include <string> 7fcb1a256SAlexander Amelkin #include <variant> 87c183aedSDeepak Kodihalli 97c183aedSDeepak Kodihalli namespace ipmi 107c183aedSDeepak Kodihalli { 117c183aedSDeepak Kodihalli namespace vpd 127c183aedSDeepak Kodihalli { 137c183aedSDeepak Kodihalli 147c183aedSDeepak Kodihalli using Path = std::string; 157c183aedSDeepak Kodihalli 167c183aedSDeepak Kodihalli using Property = std::string; 17fcb1a256SAlexander Amelkin /// The Value type represents all types that are possible for a FRU info. 18fcb1a256SAlexander Amelkin /// Most fields in a FRU info are boolean or string. There is also a 19fcb1a256SAlexander Amelkin /// 3-byte timestamp that, being converted to unix time, fits well into 20fcb1a256SAlexander Amelkin /// uint64_t. 21fcb1a256SAlexander Amelkin /// 22fcb1a256SAlexander Amelkin /// However for multirecord area records, there may be other data types, 23fcb1a256SAlexander Amelkin /// not all of which are directly listed in IPMI FRU specification. 24fcb1a256SAlexander Amelkin /// 25fcb1a256SAlexander Amelkin /// Hence, this type lists all types possible for sbdusplus except for 26fcb1a256SAlexander Amelkin /// unixfd, object_path, and signature. 27fcb1a256SAlexander Amelkin using Value = std::variant<bool, uint8_t, uint16_t, int16_t, uint32_t, int32_t, 28fcb1a256SAlexander Amelkin uint64_t, int64_t, double, std::string>; 297c183aedSDeepak Kodihalli using PropertyMap = std::map<Property, Value>; 307c183aedSDeepak Kodihalli 317c183aedSDeepak Kodihalli using Interface = std::string; 327c183aedSDeepak Kodihalli using InterfaceMap = std::map<Interface, PropertyMap>; 337c183aedSDeepak Kodihalli 347c183aedSDeepak Kodihalli using Object = sdbusplus::message::object_path; 357c183aedSDeepak Kodihalli using ObjectMap = std::map<Object, InterfaceMap>; 367c183aedSDeepak Kodihalli 377c183aedSDeepak Kodihalli } // namespace vpd 387c183aedSDeepak Kodihalli } // namespace ipmi 39