diff options
Diffstat (limited to 'types.hpp')
-rw-r--r-- | types.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -27,6 +27,11 @@ using ObjectTree = std::map<DbusObjectPath, using InterfaceList = std::vector<std::string>; +using DbusInterfaceMap = std::map<DbusInterface, PropertyMap>; + +using ObjectValueTree = + std::map<sdbusplus::message::object_path, DbusInterfaceMap>; + namespace sensor { @@ -183,6 +188,34 @@ using InventoryPath = std::string; using InvObjectIDMap = std::map<InventoryPath, SelData>; +enum class ThresholdMask +{ + NON_CRITICAL_LOW_MASK = 0x01, + CRITICAL_LOW_MASK = 0x02, + NON_CRITICAL_HIGH_MASK = 0x08, + CRITICAL_HIGH_MASK = 0x10, +}; + +enum class ThresholdIndex +{ + NON_CRITICAL_LOW_IDX = 0, + CRITICAL_LOW_IDX = 1, + NON_RECOVERABLE_LOW_IDX = 2, + NON_CRITICAL_HIGH_IDX = 3, + CRITICAL_HIGH_IDX = 4, + NON_RECOVERABLE_HIGH_IDX = 5, +}; + +struct ThresholdLevel +{ + std::string property; + ThresholdMask maskValue; + ThresholdIndex idx; +}; + +using SensorThresholds = std::vector<ThresholdLevel>; +using Thresholds = std::map<std::string, SensorThresholds>; + }// namespace sensor namespace network |