commit | 1bb0d387cd238a1d4b8c38c474433ccaada47a22 | [log] [tgz] |
---|---|---|
author | Deepak Kodihalli <dkodihal@in.ibm.com> | Sat Aug 12 02:01:27 2017 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Tue Aug 15 19:29:25 2017 +0000 |
tree | 2034d96ff380e7f20f5405fad129fb1cddd54149 | |
parent | 8b26d353da78858d92c2e0fa814a79e5a6dd29e7 [diff] |
Refactor set sensor handling code 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>
To build this package, do the following steps:
1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make
To full clean the repository again run ./bootstrap.sh clean
.