summaryrefslogtreecommitdiffstats
path: root/src/events.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-04-17 12:22:50 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-15 16:58:22 -0400
commitc5736432ac09d19cd0e513e11082a7637a196829 (patch)
tree913b2ca0f861f74a7effdd4d6999b4ab569c0ddb /src/events.hpp
parentb0b82be89c328ff8205821803592ba08963464ee (diff)
downloadphosphor-dbus-monitor-c5736432ac09d19cd0e513e11082a7637a196829.tar.gz
phosphor-dbus-monitor-c5736432ac09d19cd0e513e11082a7637a196829.zip
Documentation only, no functional change
Added copyrights and comments within headers Change-Id: Iebb17ba34b82a6c80718ad32338105a5245e640c Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'src/events.hpp')
-rw-r--r--src/events.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/events.hpp b/src/events.hpp
index b6de8de..684a0a8 100644
--- a/src/events.hpp
+++ b/src/events.hpp
@@ -9,9 +9,17 @@ namespace dbus
namespace monitoring
{
+/**
+ * @class Event
+ * @brief An item monitoring triggered event
+ * @details An event with an associated list of conditions to check
+ */
class Event : public std::vector<Condition>
{
public:
+ /**
+ * @brief Types of triggers of the event
+ */
enum class Trigger
{
START,
@@ -25,6 +33,12 @@ class Event : public std::vector<Condition>
Event& operator=(Event&&) = delete;
virtual ~Event() = default;
+ /**
+ * @brief Constructs an event with given conditions and trigger
+ *
+ * @param[in] conditions - Conditions for the event
+ * @param[in] t - Type of trigger of the event
+ */
Event(const std::vector<Condition>& conditions,
Trigger t) :
std::vector<Condition>(conditions),
@@ -33,6 +47,7 @@ class Event : public std::vector<Condition>
// Nothing to do here
}
+ /** @brief Event trigger type */
Trigger trigger;
};
@@ -46,6 +61,11 @@ class StartEvent : public Event
StartEvent& operator=(StartEvent&&) = delete;
~StartEvent() = default;
+ /**
+ * @brief Constructs a derived application started event
+ *
+ * @param[in] conditions - Conditions for the event
+ */
explicit StartEvent(const std::vector<Condition>& conditions) :
Event(conditions, Trigger::START)
{
@@ -63,6 +83,12 @@ class SignalEvent : public Event
SignalEvent& operator=(SignalEvent&&) = delete;
~SignalEvent() = default;
+ /**
+ * @brief Constructs a derived Dbus signal event
+ *
+ * @param[in] signature - Dbus object signature
+ * @param[in] conditions - Conditions for the event
+ */
SignalEvent(const char* signature,
const std::vector<Condition>& conditions) :
Event(conditions, Trigger::SIGNAL),
@@ -71,6 +97,7 @@ class SignalEvent : public Event
// Nothing to do here
}
+ /** @brief Dbus object signature */
const char* signature;
};
OpenPOWER on IntegriCloud