summaryrefslogtreecommitdiffstats
path: root/chassis_state_manager.hpp
Commit message (Collapse)AuthorAgeFilesLines
* timer: Replace with sdeventplus/timerWilliam A. Kennington III2018-10-221-11/+13
| | | | | | | | | | | | This is aimed at replacing the ad-hoc timer implementation contained in each of our openbmc daemons, with a single well-tested timer implementation. Tested: Compiled Change-Id: I3e562ab72820442aa137a2d517e476192ea6c1bd Signed-off-by: William A. Kennington III <wak@google.com>
* Add LastStateChangeTime to chassis managerMatt Spinler2018-08-061-0/+31
| | | | | | | | | | | | | | This property is set to the timestamp of the last time the chassis power state changed. It is persisted so it survives reboots. Resolves openbmc/openbmc#3300 Tested: Various incantations of power cycling, reboots, and AC pulls. Change-Id: I19f244e0490bc9b921454e393989a9cbd283e2dd Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Minor power on hours serialization changesMatt Spinler2018-08-061-31/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for the chassis manager class persisting another data member, some changes need to be made to the POH serialization code to make it consistent with saving individual data members in separate files. 1) Remove the load()/save() functions from the Chassis class. Cereal only requires those when archiving a custom object, like when the Host class uses oarchive(*this). 2) Remove the Cereal version define from the Chassis class. That is also only used when a custom object is serialized, and in fact the version wasn't being stored in the serialized data anyway. 3) Rename the POH serialization/deserialization functions to be specifically for the POH counter. These don't affect how or where POH value is persisted. Tested: Verify the POH value still increments and survives reboots. Change-Id: I065e1a24e018b66f284c6a00f9a34d24eaaedc36 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add Chassis POH CounterNagaraju Goruganti2018-05-121-1/+80
| | | | | | | | | | | | | Added 32-bit counter, which shows how many hours the system has been running. The value is a cumulative one and includes all working hours since production. If the chassis state is Powered-on, This will be incremented by one for every hour. It won't get updated when the chassis state is powered-off. Resolves openbmc/openbmc#2979 Change-Id: I18e9bb571d1a6e401b25450168249f70891be665 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Apply clang code format to this state repoAndrew Geissler2018-01-251-89/+87
| | | | | Change-Id: I232af39d8ded90fa3eb37b74d1435ddbf19fffb1 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* chassis: use latest sdbusplus match APIsPatrick Williams2017-05-111-28/+16
| | | | | Change-Id: I1be75ab5af362d683be76afb47d8c411f0f4a4b2 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Remove Chassis power on messages when powering offJosh D. King2017-04-171-0/+12
| | | | | | | | | | | Currently Chassis state services show incorrect states when a target exits. To fix this, a bus call is used on the target to determine its ActiveState. Doing that helps to determine if the target is already powered on and is now powering down. Change-Id: I55bc87fa9ff647212fe545b7edd7df8a85e9e223 Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Use systemd target states to track chassis on/off statesAndrew Geissler2017-02-011-32/+38
| | | | | Change-Id: Id76074cc500fa8d147d3d219af62f8d224881b18 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Call new chassis power targets during on/off requestsAndrew Geissler2017-02-011-0/+9
| | | | | | | | | New targets were introduced recently to support just the power on and off of the chassis (no boot of host). This code change makes use of these new targets. Change-Id: Ibf942a9ed27ccc982a36cd755afdf6171cb5c0a6 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Use pgood signal to keep internal state updatedAndrew Geissler2017-01-131-1/+41
| | | | | Change-Id: I35a2e67afc877488ceb1a0e0255b99b9db792201 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Determine chassis power state on application startupAndrew Geissler2017-01-131-3/+15
| | | | | Change-Id: I406b2a6c7af1e4c26af0e43a432a130c967d84bc Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Initial chassis state management codeAndrew Geissler2017-01-131-0/+50
This is just the basics to get the generated code compiling and to verify the basic dbus interfaces. Change-Id: I335964da456d8173e2ce792c6614770da43303b4 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
OpenPOWER on IntegriCloud