summaryrefslogtreecommitdiffstats
path: root/src/event.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Add constants for tuple fieldsMatt Spinler2018-02-271-1/+1
| | | | | | | | | Add constants for use with std::get. Tested: Run unit tests Change-Id: Ic09c13feeda69d61c98f63d227cae8f08d1bf50e Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Extend storage array to contain additional dataMatt Spinler2018-02-231-3/+4
| | | | | | | | | | | | | | | | | | | This array was originally just an array of objects of type 'any'. This commit changes it to be an array of tuples of type <any, any> to add an extra field for use by anything that needs it. For example, the storage is currently used to store property values, and a future change to the CountCondition class will now also store the result of the comparisons done between the property values and another value specified in the rule YAML. Then, a callback will be able to see the result of whether each property passed the check. Tested: Build and run unit tests Change-Id: I58f32c9f4068b15a02b1ff7f28871161cafebddb Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Implement create function in event managerRatan Gupta2018-02-231-1/+10
| | | | | | | | | Implement the logging event interface. Create the dbus event object based on the event type. Change-Id: Idfa9e5c43f170d904fd25f22d73e0509b1785fc9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Don't take action if the callback is of event typeRatan Gupta2018-02-231-1/+9
| | | | | | | | | | | | | When event call back is called,There could be two context 1) As part of actual D-bus signal 2) During startup of dbus-monitor if event call back is called with context as startup then don't take any action. Corrected the index value to fetch the property name. Change-Id: Ifaae33dc78841c8f771fe3788e75f79d9de6ec12 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add callback contextsRatan Gupta2018-02-221-1/+1
| | | | | | | | | | | | | | | | | Add the notion of a callback context. This enables callbacks to have logic around the conditions they were invoked in. There are two context on which call back can be invoked 1) Startup: during startup all the call backs will be called 2) Signal: As part of condition match on the watched properties. Callback would behave differently based on the context. eg: eventCallback 1) Startup: Don't take any action. 2) Signal: Create the Dbus Object for the event. Change-Id: If455558798ac3e44bbd8a93de0ce1b09d2e308ae Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Initial support for event callbacksRatan Gupta2018-02-201-0/+119
Add parser support for template rendering of events. Also defines the EventBase and Event classes. EventBase is parent of Event. Change-Id: I6b07b415acf510a8437529095bd489c0af73ddf5 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
OpenPOWER on IntegriCloud