summaryrefslogtreecommitdiffstats
path: root/types.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'types.hpp')
-rw-r--r--types.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/types.hpp b/types.hpp
index 260deb5..61f3d68 100644
--- a/types.hpp
+++ b/types.hpp
@@ -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
OpenPOWER on IntegriCloud