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 | |
| 47 | }//namespce sensor |
| 48 | }//namespace ipmi |