Ratan Gupta | 0065905 | 2017-02-23 17:29:08 +0530 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | |
| 5 | #include <map> |
| 6 | #include <string> |
| 7 | |
| 8 | #include <sdbusplus/server.hpp> |
| 9 | |
| 10 | namespace ipmi |
| 11 | { |
| 12 | namespace sensor |
| 13 | { |
| 14 | |
| 15 | using Offset = uint8_t; |
| 16 | using Value = sdbusplus::message::variant<bool, int64_t, std::string>; |
| 17 | |
| 18 | struct Values |
| 19 | { |
| 20 | Value assert; |
| 21 | Value deassert; |
| 22 | }; |
| 23 | |
| 24 | using OffsetValueMap = std::map<Offset,Values>; |
| 25 | |
| 26 | using DbusProperty = std::string; |
| 27 | using DbusPropertyMap = std::map<DbusProperty,OffsetValueMap>; |
| 28 | |
| 29 | using DbusInterface = std::string; |
| 30 | using DbusInterfaceMap = std::map<DbusInterface,DbusPropertyMap>; |
| 31 | |
| 32 | using InstancePath = std::string; |
| 33 | using Type = uint8_t; |
| 34 | using ReadingType = uint8_t; |
| 35 | |
| 36 | struct Info |
| 37 | { |
| 38 | Type sensorType; |
| 39 | InstancePath sensorPath; |
| 40 | ReadingType sensorReadingType; |
| 41 | DbusInterfaceMap sensorInterfaces; |
| 42 | }; |
| 43 | |
| 44 | using Id = uint8_t; |
| 45 | using IdInfoMap = std::map<Id,Info>; |
| 46 | |
Tom Joseph | be703f7 | 2017-03-09 12:34:35 +0530 | [diff] [blame] | 47 | using PropertyMap = std::map<DbusProperty, Value>; |
| 48 | |
| 49 | using InterfaceMap = std::map<DbusInterface, PropertyMap>; |
| 50 | |
| 51 | using Object = sdbusplus::message::object_path; |
| 52 | using ObjectMap = std::map<Object, InterfaceMap>; |
| 53 | |
Tom Joseph | dd78a1d | 2017-05-05 11:04:29 +0530 | [diff] [blame] | 54 | struct SelData |
| 55 | { |
| 56 | Id sensorID; |
| 57 | Type sensorType; |
| 58 | ReadingType eventReadingType; |
| 59 | Offset eventOffset; |
| 60 | }; |
| 61 | |
| 62 | using InventoryPath = std::string; |
| 63 | |
| 64 | using InvObjectIDMap = std::map<InventoryPath, SelData>; |
| 65 | |
Ratan Gupta | 0065905 | 2017-02-23 17:29:08 +0530 | [diff] [blame] | 66 | }//namespce sensor |
| 67 | }//namespace ipmi |