summaryrefslogtreecommitdiffstats
path: root/src/data_types.hpp
Commit message (Collapse)AuthorAgeFilesLines
* update .clang-formatPatrick Venture2018-09-041-4/+8
| | | | | | | | Added the header inclusion order to the .clang-format file generated these changes. Change-Id: I4f51a20f469de431ee6a5ba78e3f4da39c980fab Signed-off-by: Patrick Venture <venture@google.com>
* Add SNMP event callback for error notificationMarri Devender Rao2018-06-051-0/+8
| | | | | | | | | | | | Added callback support for SNMP events. Parse the callback message and raise SNMP trap Clients specify the object paths to watch and callbacks to invoke in the config yaml. Change-Id: I105652f65e4e1c5354c934c88e4d59866540f71c Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Enable clang-formatBrad Bishop2018-03-291-24/+14
| | | | | | | Fix up errors and enable clang-format during CI builds. Change-Id: I4176b81f8b85a287af9354165e09ff66aeb9fb29 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add constants for tuple fieldsMatt Spinler2018-02-271-1/+10
| | | | | | | | | 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-2/+3
| | | | | | | | | | | | | | | | | | | 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>
* Add callback contextsRatan Gupta2018-02-221-0/+6
| | | | | | | | | | | | | | | | | 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/+4
| | | | | | | | | 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>
* Add getBusName() utility function to SDBusPlusMatt Spinler2017-11-141-0/+4
| | | | | | | | Add a function to SDBusPlus to get the D-Bus bus name for an object path and interface. Change-Id: I7d7a533c7430fcf42e1e0f6a21a2453e6c8197ea Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Remove dead codeBrad Bishop2017-06-281-19/+0
| | | | | | | Remove a number of unused files. Change-Id: If7e40d2be7eb3f5d84538a3c86f911df268a1f34 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add printf format utilityBrad Bishop2017-06-191-0/+15
| | | | | | | | Add a template for obtaining a format string at build for a built-in C++ type. Change-Id: I8e5d26d4481b3ddafb5ffddbb058a1c75b3a2257 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add property watchesBrad Bishop2017-06-191-0/+11
| | | | | | | | | Property watches cache DBus property values given an externally supplied index of property names and paths, in an externally supplied storage location. Change-Id: I155081da88c3ab0e4f6a13b012fc9719203b1888 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add C++ type aliasesBrad Bishop2017-05-231-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | Add convenience type aliases for working with references: RefKeyMap: A map with references as keys. TupleRefMap: A map with a tuple of references as keys. RefVector: A vector or references. TupleOfRefs: A tuple of references. Add DBus related convenience type aliases: MapperPath: The Phosphor mapper currently uses a std::string for object paths. This is a bug and will someday be switched to sdbusplus::message::object_path. Add an alias for easy refactoring. InterfacesAdded: The C++ type for the org.freedesktop.DBus.ObjectManager.InterfacesAdded signal argument. PropertiesChanged: The C++ type for the org.freedesktop.DBus.Properties.PropertiesChanged signal argument. GetObject: The C++ type for the xyz.openbmc_project.ObjectMapper.GetMethod method response. Change-Id: I719aa7c610b3312ce8e52825cb07b33a348bf896 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Documentation only, no functional changeMatthew Barth2017-05-151-0/+4
| | | | | | | Added copyrights and comments within headers Change-Id: Iebb17ba34b82a6c80718ad32338105a5245e640c Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add item group monitoring data type frameworkMatthew Barth2017-05-071-0/+29
Include supported data types for item groups: --Start event trigger --Signal event trigger --A countAtOrAbove condition --A log_error action Change-Id: I1ae5ba60e4d9c06155885d52d98a44b31fd73207 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
OpenPOWER on IntegriCloud