summaryrefslogtreecommitdiffstats
path: root/sensordatahandler.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Move util.cpp/util.hpp to libipmidVernon Mauery2019-03-251-1/+1
| | | | | | | | | | | | | | | | These are functions that are used widely by ipmid providers, so it makes sense to put them in libipmi.so (the library that all providers must link against). Tested-by: use nm to inspect the binaries to see that the symbols are in the expected library. arm-openbmc-linux-gnueabi-nm libipmid.so.0.0.0 \ | grep getDbusObject 0001063c T _ZN4ipmi13getDbusObjectERN9sdbusplus.... Change-Id: I1221f807f2711c5301c5574623564ea1ae48a437 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Create libipmid and libipmid-hostWilliam A. Kennington III2019-02-071-1/+1
| | | | | | | | | | | | | | | | | | | This starts a transition to common ipmid libraries that providers can link against. It will allow for a cleaner separation between common ipmid functionality and daemon type specific code. This is needed so we can resolve all of the symbols in the providers at link time instead of discovering bad linkage by building and running a full ipmi daemon. In future commits libraries will be packaged for libipmid and libipmid-host which provide all of the symbols used by the current set of ipmid providers. This is the first step, it just separates and renames the headers. Legacy symlinks are still kept around for compatability. It also adds stub libraries so that external users can start linking as intended. Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd Signed-off-by: William A. Kennington III <wak@google.com>
* Convert variant usage to std interfaceWilliam A. Kennington III2018-10-181-2/+6
| | | | | | | | | | | | | This is just a refactoring to use the c++17 std::variant interfaces instead of the mapbox::variant specific ones. We should be able to use mapbox::variant and std::variant interchangeably now. Tested: Built against sdbusplus with mapbox::variant and sbusplus using std::variant. Both variant compile and test out. Change-Id: I6fbaad3d12dd34968db6a10f3d74a65e07d0f0cc Signed-off-by: William A. Kennington III <wak@google.com>
* replaced c headers with cpp where applicablePatrick Venture2018-09-251-4/+5
| | | | | Change-Id: I23a70eb540ccde5d2aba467426769feffb07b516 Signed-off-by: Patrick Venture <venture@google.com>
* rename headers to match stylePatrick Venture2018-09-251-3/+2
| | | | | | | | | | | | | | | | | | Moving headers from ".h" to ".hpp" Reworked the header inclusion a bit so that host-ipmid is treated as a library, and local headers aren't. renamed apphandler.h => apphandler.hpp renamed chassishandler.h => chassishandler.hpp renamed globalhandler.h => globalhandler.hpp renamed sensorhandler.h => sensorhandler.hpp renamed storageaddsel.h => storageaddsel.hpp renamed storagehandler.h => storagehandler.hpp renamed systemintfcmds.h => systemintfcmds.hpp Change-Id: I9d4ce3dd57e2e996800f9020a10cc10cdf2c3914 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-09-071-46/+38
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* sensor: Fix set sensor reading for analog sensorsTom Joseph2018-03-161-15/+9
| | | | | | | Tested: Set temperature sensor to sensor object Change-Id: I77b8dcd6f298ca7b09aac475c2e8da4af5825940 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Refactor get sensor reading commandTom Joseph2018-03-011-4/+7
| | | | | | | | Use the functor in the generated yaml to get the sensor reading for analog sensors. Change-Id: I2535cd5015096c3e1e2baa5f9a865fc6b27e6875 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Add support for multiple sensor naming patternTom Joseph2018-01-301-0/+54
| | | | | Change-Id: Ibf58d4a4f5a2783a9152f4b5f685e28ef527c5e2 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Map dbus info to sensor's reading fieldTom Joseph2017-09-141-0/+37
| | | | | Change-Id: I3e35bf78260b1fa29e992b00279f2dd166cd2fe1 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Add function to support sensor with readingAssertion typeTom Joseph2017-09-141-0/+34
| | | | | | | | readingAssertion is special type where the entire assert bitfield serves as the value or reading. Change-Id: Iaddbe846e04d2a53cff69d71670a96ccc66636a8 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Add function to map dbus info to reading fieldTom Joseph2017-09-141-0/+10
| | | | | | | | | For sensor's with reading type eventData2, the eventdata2 field is mapped to the reading field in the get sensor reading command response. Change-Id: I9ad85ddb48d6c273a22e476e29ea9bbb34c13e24 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensor: Add function to map dbus info to assertion statusTom Joseph2017-09-141-0/+49
| | | | | Change-Id: I30aae9abd7905ae3299856d798d41e10859fed7f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensorhandler: support setting analog sensorsEmily Shaffer2017-09-131-0/+36
| | | | | | | | | | | | | | | | | | Refactor YAML format to denote mutability of sensors. Sensors which expect different formats for reads and writes should present two entries in the sensor YAML, one with the read interface and one with the write interface. Sensors which share a format for both reads and writes may present only one entry in the YAML with both readable and writable enums specified. If a sensor receives a write which has an interface of Sensor.Value, the "Set" message is sent via DBus to the path provided in the YAML. The previous codepath is maintained. Change-Id: I292f95b6fe936de759fd65ce72c842a1bfe66448 Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Patrick Venture <venture@google.com>
* Refactor set sensor handling codeDeepak Kodihalli2017-08-151-57/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | A summary of the changes: - Do not generate per sensor type code to update d-bus objects corresponding to sensors. Function to update d-bus objects based on standard sensor event types, such as assertion, event data, are now generic functions - the need not be generated per sensor or per sensor type. - There's a special case where the assertion is treated as a reading (i.e read the entire assertion field as-is). In this case, code needs to be generated per sensor because the type of the mapped d-bus property can vary. In this case have a generic template function, and generate minimal code like so: inline ipmi_ret_t readingAssertion(const SetSensorReadingReq& cmdData, const Info& sensorInfo) { // Corresponding d-bus property is uint32_t return set::readingAssertion<uint32_t>(cmdData, sensorInfo); } - Make sensor-example.yaml succinct. - Make the code in writesensor.mako.cpp more pythonic. Change-Id: I84415ca6e3f756bbb51a90e290539eb086a7f78b Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Fixed undefined reference while startingDhruvaraj Subhashchandran2017-08-071-1/+1
| | | | | Change-Id: I611a82ace75ac175f0127b4ee0fd586280f04f8a Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* IPMI: Virtual sensor support in host ipmidDhruvaraj Subhashchandran2017-08-041-0/+150
Resolves openbmc/openbmc#1608 Change-Id: Id76446061fd0fa6dc3dead702538e424293af7ce Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
OpenPOWER on IntegriCloud