summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* std::variant: Fixup apply_visitor callsWilliam A. Kennington III2018-11-122-2/+2
| | | | | | | | These should be std::visit compatible instead of the custom mapbox apply_visitor. Change-Id: I32098c02bda5a3699abace919426a6e4b9c8ae9c Signed-off-by: William A. Kennington III <wak@google.com>
* Move all floats to doublesPatrick Venture2018-11-1129-184/+167
| | | | | | | | | The code was developed initially around a pid loop implemented using floats. Therefore, the code was converting back and forth between double for sensor values as inputs and outputs from this PID loop. Change-Id: I2d2919e1165103040729c9f16bb84fde3dd6b81b Signed-off-by: Patrick Venture <venture@google.com>
* build: cleanup MakefilePatrick Venture2018-11-091-12/+25
| | | | | | | Cleanup the Makefile w.r.t spaces and tabs. Change-Id: I62b4aadc1ecc0874ce31941dbc0ab557ec8c8b50 Signed-off-by: Patrick Venture <venture@google.com>
* build: Add -flto to CXXFLAGSPatrick Venture2018-11-091-2/+4
| | | | | | | Add -flto to CXXFLAGS to allow build optimization. Change-Id: Id840a1bc41c8975d1bf3e64e06c4c470b8a6db2d Signed-off-by: Patrick Venture <venture@google.com>
* build: fixup urlPatrick Venture2018-11-021-1/+1
| | | | | | | Fixup url in configure.ac to point to issues page. Change-Id: Ife6a259cfd830c03d24ffc333dc3780aab8531df Signed-off-by: Patrick Venture <venture@google.com>
* dbusconfiguration: Protect against partial configJames Feist2018-11-011-1/+1
| | | | | | | | | | | | A zone details config is also required along with a zone configuration or we'll end up crashing. Check for both. Tested-by: Removed Zone Details Config and daemon halted correctly. Change-Id: Icf3775eb4130fcf2683e12b272fb2051b0eb809f Signed-off-by: James Feist <james.feist@linux.intel.com>
* cleanup: drop obsolete is_method_error checksPatrick Venture2018-10-313-23/+11
| | | | | | | is_method_error is obsolete from sdbusplus. Change-Id: Ia3fb76dd2f4a14eca51b3cfbcd50427b36d946b3 Signed-off-by: Patrick Venture <venture@google.com>
* manager: use pass by reference by defaultPatrick Venture2018-10-302-2/+2
| | | | | | | Even thought the string must be copied, pass by reference. Change-Id: I48113237f342279e3f266bbda6e54d770afd2afc Signed-off-by: Patrick Venture <venture@google.com>
* style: misc camel casingPatrick Venture2018-10-304-19/+19
| | | | | | | Miscellaneous camel casing. Change-Id: I90f7ab36448ad7c6a8e22677345d9d15591a64d5 Signed-off-by: Patrick Venture <venture@google.com>
* style: rename main globals per stylePatrick Venture2018-10-305-21/+21
| | | | | | | Rename the main global variables per openbmc style. Change-Id: I9de8cf841304f24238ae0275b6904f4926a6892d Signed-off-by: Patrick Venture <venture@google.com>
* style: s/getMinThermalRpmSetPt/getMinThermalRPMSetpoint/gPatrick Venture2018-10-303-6/+6
| | | | | | | Rename method per openbmc style guide. Change-Id: Ia861028452020ccefd463415093b5fb11f929ea4 Signed-off-by: Patrick Venture <venture@google.com>
* zone: use const reference consistentlyPatrick Venture2018-10-302-4/+4
| | | | | | | | | In this case, the string is copied and placed into the vector's pointer list, so it's not necessary to be passed by const reference. However, for consistency it's a harmless change. Change-Id: I5c02e98b4789e18bc9a6756bdd8c5184ad12a232 Signed-off-by: Patrick Venture <venture@google.com>
* performance: fixup missing const reference in zonePatrick Venture2018-10-303-4/+4
| | | | | | | | | Zone::getSensor is passed directly to the Sensor Manager getSensor which takes the parameter by reference. Make it use an explicit const reference at both layers. Change-Id: I4895ea2935d20b73b88d33972e44b9ac557cd988 Signed-off-by: Patrick Venture <venture@google.com>
* style: use system path for dbus headersPatrick Venture2018-10-302-2/+2
| | | | | | | Use system path for dbus headers. Change-Id: I08088eb0932de738fc410104c28847aaf78d95bd Signed-off-by: Patrick Venture <venture@google.com>
* style: s/getZoneId/getZoneID/gPatrick Venture2018-10-304-4/+4
| | | | | | | | Acronyms are meant to be in the same case within their part of the camel case name. Change-Id: I9e55d4419617a35b0f3a85f3d55543c8fc9bd76f Signed-off-by: Patrick Venture <venture@google.com>
* dbus: dbuswrite: add try/catch block on callsPatrick Venture2018-10-301-6/+23
| | | | | | | | The dbus calls can now except, therefore add try/catch blocks and report the errors. Change-Id: I8cae2576922fa9316065ef048e674beb48a58e88 Signed-off-by: Patrick Venture <venture@google.com>
* sensors: throw build time exceptions on failurePatrick Venture2018-10-301-3/+13
| | | | | | | Throw build time exceptions on failure. Change-Id: I7f873e15d0827b2424b9a1cfb6b494546952f1aa Signed-off-by: Patrick Venture <venture@google.com>
* errors: add exception for build time failurePatrick Venture2018-10-302-0/+21
| | | | | | | Add a specific exception for build-time failures. Change-Id: I1e6189ca256398d6995d4d0e0127846e1a7249a9 Signed-off-by: Patrick Venture <venture@google.com>
* dbus: dbuswrite: use factory to catch errorsPatrick Venture2018-10-303-14/+59
| | | | | | | | Add factories for creating DbusWrite and DbusWritePercent objects and use these factories. Change-Id: Iad222d4bf6c1fdf561daa4ba9d88a6644c0a5965 Signed-off-by: Patrick Venture <venture@google.com>
* dbus: passive: move exception checking into factoryPatrick Venture2018-10-304-32/+35
| | | | | | | | Move the exception checking into the factory to remove possibility of exception during construction. Change-Id: I22922f23247c0579ee2a3411b5c8cede44fe324c Signed-off-by: Patrick Venture <venture@google.com>
* dbus: util: add missing try/catch blockPatrick Venture2018-10-301-6/+11
| | | | | | | Add missing try/catch block to getProperties. Change-Id: Ie1f08f496dc529432df620879416e8bddb2e7d5c Signed-off-by: Patrick Venture <venture@google.com>
* pid: add missing override specifiersPatrick Venture2018-10-301-4/+4
| | | | | | | | | | | | | | | | | | [pid/controller.hpp:18] -> [pid/pidcontroller.hpp:28]: (style) The function 'inputProc' overrides a function in a base class but is not marked with a 'override' specifier. [pid/controller.hpp:20] -> [pid/pidcontroller.hpp:30]: (style) The function 'outputProc' overrides a function in a base class but is not marked with a 'override' specifier. [pid/controller.hpp:22] -> [pid/pidcontroller.hpp:32]: (style) The function 'process' overrides a function in a base class but is not marked with a 'override' specifier. [pid/controller.hpp:24] -> [pid/pidcontroller.hpp:34]: (style) The function 'getID' overrides a function in a base class but is not marked with a 'override' specifier. Change-Id: I29a6bbe644a5f7aad933eb49e7b6f7fdc6e33f19 Signed-off-by: Patrick Venture <venture@google.com>
* pid: stepwisecontroller: add missing overridePatrick Venture2018-10-301-1/+1
| | | | | | | | | [pid/controller.hpp:24] -> [pid/stepwisecontroller.hpp:35]: (style) The function 'getID' overrides a function in a base class but is not marked with a 'override' specifier. Change-Id: I27f0853e24f6b25aa50f701ce5fad1ea989b618c Signed-off-by: Patrick Venture <venture@google.com>
* style: function names should be lower camelPatrick Venture2018-10-3024-77/+77
| | | | | | | Fix function names to be lower camel. Change-Id: I145e1f4c03d7740bc1525dcffbdce2f78fd61075 Signed-off-by: Patrick Venture <venture@google.com>
* dbus: util: add missing try/catch blockPatrick Venture2018-10-303-6/+19
| | | | | | | Add try/catch block around ObjectMapper call failures. Change-Id: I5a2a7a8c1049ea16cebe8b87a509bf5104e432ab Signed-off-by: Patrick Venture <venture@google.com>
* style: member functions should be lower camelPatrick Venture2018-10-3032-154/+154
| | | | | | | Rename member functions to be lower camel instead of snake case. Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5 Signed-off-by: Patrick Venture <venture@google.com>
* style: fixup naming of structuresPatrick Venture2018-10-3011-25/+27
| | | | | | | Fixup naming of structures to UpperCamel. Change-Id: I6a9bf0b954298089c85d3362e86cd95b3fc5b944 Signed-off-by: Patrick Venture <venture@google.com>
* dbusconfiguration: lower cpu cycles while waitingJames Feist2018-10-291-0/+1
| | | | | | | | | | Put in a wait() Tested-by: Ran on a system without config, noticed lower cpu cycles Change-Id: I7e59db2bd2f7d7a8fd8695a6277dfed1a86b8ab3 Signed-off-by: James Feist <james.feist@linux.intel.com>
* dbusconfiguration: Fix mapper callJames Feist2018-10-251-1/+1
| | | | | | | | | | Our downstream version of the cpp mapper allowed an empty path for GetSubTree, change this to root "/". Tested-by: Configuration loads with both mappers Change-Id: I206d2deaf9bb54acda15eccb778633f10398098a Signed-off-by: James Feist <james.feist@linux.intel.com>
* cleanup: move from copy and pointer to just const referencePatrick Venture2018-10-236-19/+20
| | | | | | | | | Originally code passed the object by value, and then later by pointer to that copy. Convert the code to be more performant by using a const reference at all layers of access for this object. Change-Id: Icdf0dfdb54d8adc29af4d05d841533626a484921 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: rename variable per openbmc stylePatrick Venture2018-10-231-2/+2
| | | | | | | Rename PIDConfig to pidConfig per OpenBMC style guide. Change-Id: I41c431b7162af6c49f4a43adb548f0b6ed04e3dc Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: apply constness to read-only iteratorsPatrick Venture2018-10-2310-31/+33
| | | | | | | Apply const to read-only iterators to indicate intent more clearly. Change-Id: Ic14304c69361da203d3d3a900180bd54346acc87 Signed-off-by: Patrick Venture <venture@google.com>
* ipmi: drop is_method_error callPatrick Venture2018-10-151-4/+0
| | | | | | | Drop is_method_error() call that is extraneous. Change-Id: I2ae8b2adb9576321df0cf10310c4242fad0801aa Signed-off-by: Patrick Venture <venture@google.com>
* [dbus-passive] Add threshold fan failureJames Feist2018-10-1511-3/+287
| | | | | | | | | | | | | | When a threshold is crossed for a monitored sensor, assert fan failure. Tested-by: Changed a sensor threshold so that its current reading made the threshold asserted and noticed via print messages that the sensor went into failure state. Also noticed fans ramp. Wrote unit test to verify sensor can move in and out of error state correctly. Change-Id: I83182536e4874eaba97f3f1d48d53ac110fba833 Signed-off-by: James Feist <james.feist@linux.intel.com>
* dbus: set inclusion to local-first searchPatrick Venture2018-10-142-4/+6
| | | | | | | Use local-first search for local headers. Change-Id: Ib9094836c6b2932804d0d46ca8eaad0e1e4259e4 Signed-off-by: Patrick Venture <venture@google.com>
* dbus: transition to find_ifPatrick Venture2018-10-131-6/+9
| | | | | | | | [dbus/dbusconfiguration.cpp:58]: (style) Consider using std::find_if algorithm instead of a raw loop. Change-Id: I6fdabecc027addfc6f843a4b5f4621a61db39c2d Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: reduce scope of variablesPatrick Venture2018-10-135-14/+9
| | | | | | | Various things caught by cppcheck that are non-critical. Change-Id: I495453c84bc15788b85036a163ee36b0ac601fa1 Signed-off-by: Patrick Venture <venture@google.com>
* gitignore: add missing itemsPatrick Venture2018-10-131-0/+2
| | | | | | | Add libtool and test-suite.log to .gitignore. Change-Id: I2fad979a849b6b24f546dba89088ea1b8d63ef5f Signed-off-by: Patrick Venture <venture@google.com>
* build: check for experimental/filesystemPatrick Venture2018-10-111-1/+1
| | | | | | | Check for experimental/filesystem instead of experimental/any Change-Id: Icf6556f9f6988cc14c70db4d0c367f246fdc802a Signed-off-by: Patrick Venture <venture@google.com>
* Stop using mapbox namespace directlyJames Feist2018-10-113-21/+21
| | | | | | | | | | | sdbusplus is transitioning to std::variant, the sdbusplus::message::variant_ns will be changed to std and should move over correctly, but mapbox will be deleted. Tested-by: It built Change-Id: I25672cef16a6c75ae2f3619d319ade1eb063a98b Signed-off-by: James Feist <james.feist@linux.intel.com>
* docs: Cleanup of Design DocPatrick Venture2018-10-111-21/+21
| | | | | | | | The google-drive -> markdown added those reference points and they are not needed and show up. This removes them. Change-Id: If7ab88a08b048e78b4cd8a2159e7e56180bd55a3 Signed-off-by: Patrick Venture <venture@google.com>
* docs: Ported Design Doc to OpenBMCPatrick Venture2018-10-102-1/+319
| | | | | | | | | This is a port of the original Google Design Document for Swampd, now phosphor-pid-control. This document needs updates to match the latest changes pertaining to dbus configuration. Change-Id: Idcef393d06547b108655d08236b1949c04b7367b Signed-off-by: Patrick Venture <venture@google.com>
* [dbus-writer] limit d-bus trafficJames Feist2018-10-082-1/+13
| | | | | | | | | | | Limit d-bus traffic by only sending updates, instead of every value. Tested-by: used d-bus monitor and noticed significantly reduced messages. Change-Id: Ie677feaedab4e9ebb14950392b9588d4d82c0058 Signed-off-by: James Feist <james.feist@linux.intel.com>
* [dbusconfiguration] Allow partial configurationsJames Feist2018-10-061-99/+124
| | | | | | | | | | | | | | | In a few cases (cpu sensors, etc.) we can add sensor during runtime, that aren't an error to be missing when the system is off, or are optional (add-in cards). Add a dbus match to restart on sensors added, and don't add configurations that are missing a sensor. Tested-by: Turned on debug, noticed on cpu sensors being added daemon restarted correctly. Also noticed daemon didn't crash with no configuration. Change-Id: Ide0bd03c12e380e5aad56b1da06e34a5fc5cdb9f Signed-off-by: James Feist <james.feist@linux.intel.com>
* Add James Feist as a reviewerJames Feist2018-10-051-0/+1
| | | | | Change-Id: I16a727daca3b90bdc52c9651c6aa07ef8d869a3e Signed-off-by: James Feist <james.feist@linux.intel.com>
* Fix dbus configured buildJames Feist2018-09-261-2/+2
| | | | | | | | | | | | | | | | configureDbus is an AC_DEFINE that gets set in config.h. CONFIGURE_DBUS is only a AM_CONDITIONAL that does not get propagated to source. Rename the variable so that hopefully both builds work. Tested-by: Navigated to oe-workdir and looked at config.h with both --enable-configure-dbus set and not set and noticed CONFIGURE_DBUS being switched from 1 to 0. Also used a #error in the CONFIGURE_DBUS block and noticed it being set when appropriate. Change-Id: I248cd4b88a29b8e31df853c3709b8f648994b696 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Add hysteresis to stepwise controllerJames Feist2018-09-217-3/+133
| | | | | | | | Tested-by: Ran on platform monitoring output and wrote unit test Change-Id: I74a1d21544c1a9cb4c1cb26dd4a353cbff0442d0 Signed-off-by: James Feist <james.feist@linux.intel.com>
* build: configureDbus replacing linked objectsPatrick Venture2018-09-202-3/+10
| | | | | | | | | | The external references to the configurations are provided by the dbusconfiguration.cpp. Make including this configured. Tested: Now platform without dbus configuration properly configures zone. Change-Id: I97646141aa5672afaadd5346152dfbb07557b2d9 Signed-off-by: Patrick Venture <venture@google.com>
* build: fix conditionalPatrick Venture2018-09-201-1/+1
| | | | | | | | Automake conditional depth cannot use tab characters. Tested: Verified the generated objects are now compiled by default. Change-Id: I1de4cc74e9bf3380159dd07463b817bf460f81e0 Signed-off-by: Patrick Venture <venture@google.com>
* ipmi: add iana header for openbmc oenPatrick Venture2018-09-191-6/+4
| | | | | | | Add the iana header that exposes the openbmc oen. Change-Id: I232b23967853c305202d29adadfaa4a088f01e38 Signed-off-by: Patrick Venture <venture@google.com>
OpenPOWER on IntegriCloud