summaryrefslogtreecommitdiffstats
path: root/control/types.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove timer in favor of sdeventplus/utility/timerWilliam A. Kennington III2019-02-051-5/+9
| | | | | | | | | | | This removes the custom timer implementation and moves to the sdeventplus utility. Functionally this should make no change Tested: Built and run through the unit test suite. Change-Id: Ib7ee90d489d5db72496aaaca91c3cf5490ad47d6 Signed-off-by: William A. Kennington III <wak@google.com>
* control: Rename Timer -> TimerConfWilliam A. Kennington III2018-10-311-4/+4
| | | | | | | | | | | | It is confusing to read some of the type definitions that deal with timers when Timer could mean a timer instantiation or a set of timer configuration parameters. This change disambiguates the two types. Tested: Built and run through unit tests. Change-Id: I9dd6b47886747d56a86b6a50eb9a74a331d0a1fe Signed-off-by: William A. Kennington III <wak@google.com>
* control: Alias TimerType locallyWilliam A. Kennington III2018-10-311-1/+2
| | | | | | | | | | | This is needed for a future commit that removes the local phosphor::util::Timer implementation. Tested: Built and run through unit tests. Change-Id: I8ea3399fec8761055d4a0d94fb9ea91fd34040ea Signed-off-by: William A. Kennington III <wak@google.com>
* Add target interface for fan controlLei YU2018-02-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Current fan control assumes the use of the FanSpeed interface for fan targets. For fans controlled by pwm, FanPwm interface is added. This commit adds "target_interface" config parameter, so that user can specify the interface for the fan targets. E.g. - inventory: /system/chassis/motherboard/fan0 cooling_zone: 0 cooling_profile: air sensors: - fan0 target_interface: xyz.openbmc_project.Control.FanPwm The config is optional and defaults to FanSpeed, so the current code will not be affected. Tested: Use this config on Romulus, ensures the fan control sets target on FanPwm interface and works fine. Change-Id: I73adccaa770d657b5d7aaeb307917f89588524de Signed-off-by: Lei YU <mine260309@gmail.com>
* Support properties of type stringMatthew Barth2018-01-291-1/+3
| | | | | | | | | | | | Properties used within set speed events may be of type string to trigger an action. These should be handled where the defined type attribute is given as 'std::string' and a parsed value is an instance of python str type. Resolves openbmc/openbmc#292 Change-Id: Ib188e7abc212062a1c61950abaa28434a4726521 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add timer event managementMatthew Barth2017-11-171-2/+5
| | | | | | | | | | Events defined to have timers require the ability to find a timer, add a timer to the event, and removing a timer event entirely. These event timers are intended to allow actions based on the event to be delayed or recurring based on the timer defined. Change-Id: Ieaf26f031c5e5aac9472e92354bfb76392642cb4 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add timer type for set speed event timersMatthew Barth2017-11-171-1/+3
| | | | | | | | This is the first step towards allowing timer driven and/or wrapped actions where the timer interval and type will be defined by the user. Change-Id: If008fda5a2b73117e869f93223e0bfe61290f858 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Set/update a service name owner for a groupMatthew Barth2017-11-171-0/+4
| | | | | | | | | Adds a service name associated with a group when the group or given service name is not found within the map of services otherwise updates the service name owner associated with the group. Change-Id: I602ddaa7e06e354e01ea70d6c5c0a45e74a14e99 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Update event initializationMatthew Barth2017-11-171-5/+6
| | | | | | | | | | | | | | | | Using a null dbus message to the event signal will perform the necessary steps to initialize the event parameters using the given signal handler's function directly. i.e.) In the case for subscribing to PropertiesChanged signals, initially the given property must be read. When the PropertiesChanged signal struct is given a null message, it finds the property, reads the value, and then can perform the given signal handler function directly. This produces the same functional path as receiving a PropertiesChanged signal containing the property value within the message. Change-Id: I35575cfff66eb0305156be786cb1f5536d42bb1c Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Generate selected match strings and signalsMatthew Barth2017-11-071-3/+3
| | | | | | | | | The available matches and their associated signals are now listed within the events yaml and can be added to the list of matches to register for per event. Change-Id: I65f657038afe7c68a421adb4820ea09e275be06d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Support a list of actions for a set speed eventMatthew Barth2017-09-181-4/+4
| | | | | | | | | | Each set speed event will contain a list of one-to-many actions to perform for the given event group's property. This reduces the amount of code generated and properly handles property changed events against the group. Change-Id: If2b8c0d0b8ecf6e1c974c43d96e1c6e9e952022b Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add timer option to run set speed event actionsMatthew Barth2017-08-161-1/+10
| | | | | | | | | | | For groups within set speed events where the property values of the group may not signal its action to occur, an optional timer may be added to the event. This timer is configured as a repeating timer on the interval provided where upon timer expiration, the event's action is run. Change-Id: I4cbe8a0ab1b734bfc7828706a6515af7f6d78b52 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Remove set speed eventMatthew Barth2017-08-071-0/+7
| | | | | | | | | Allows the complete removal of a set speed event from the zone. This is done when any precondition defined for the event to be active is not met any longer. Change-Id: Idbec357f76f0fd7db9107e8c9d3e00461872c528 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Initial updates to support preconditionsMatthew Barth2017-08-041-1/+12
| | | | | | | | | | | | Any defined preconditions for a set speed event must be satisfied prior to configuring the event parameters for fan control. These preconditions will accept a list of group entries that include the value the group's property must be to have the precondition met for that group. Once all preconditions are met, the set speed event will be initialized and become active. Change-Id: Ia5555be55c5937c891af527bea63da1546655b2f Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add increase & decrease timer values in secondsMatthew Barth2017-07-061-2/+6
| | | | | | | | | | | | | | | | | Support setting the increase delay time(in seconds) for each zone from the zone yaml file. Speed increases use a delay type timer where the amount of time given delays additional increase requests from happening until the fans within the zone reach the highest net increase in speeds. Support setting the decrease interval time(in seconds) for each zone from the zone yaml file. Since decreasing is done on an interval, a decrease interval time of zero disables the decrease interval timer causing no decreases in speed to occur. Speed decreases use an interval type timer to decrease the fan speeds within the zone when no speed increase requests exist on the given time interval. Change-Id: I88334a313b6e2820b768fa7e3f1cb65887f29258 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add default floor speed supportMatthew Barth2017-06-261-3/+5
| | | | | Change-Id: Id2d3b362e79e7a8c2330181f68ae11e43f84e2fd Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Properties stored of different typesMatthew Barth2017-06-261-0/+2
| | | | | | | | Allow properties stored for processing events to be of types other than bool Change-Id: Ie1dde5aca562c9958bdff6fa3d1b19d3154b2c6d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Evaluate conditions to determine zoneGunnar Mills2017-06-261-2/+15
| | | | | Change-Id: Idb825b27ecf98503ddc2405a0cafc30c644efc71 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Use updated match methods for signal callbacksMatthew Barth2017-06-051-4/+0
| | | | | | | | Attach the event handler callback function to the match along with generating the match string using the new match methods Change-Id: I7595d65cbc615f29db60e2a65534ee5b635d6f96 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add setting zone speed actionMatthew Barth2017-05-311-2/+16
| | | | | | | | Enable an action to be defined that sets the zone to a given speed when a number of properties are set to a given value Change-Id: I5252a20a24bdb14dee63080f2c08b080c82ad7e8 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add property changed signal handlerMatthew Barth2017-05-311-1/+17
| | | | | | | | Enable the control application to handle property changed signals to set or update a cached set of these properties Change-Id: Ib84ffe1e801ee7dd85d17fdbb122d124d307dbd3 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Fan control: Add types for use with generated dataMatt Spinler2017-04-261-0/+34
Change-Id: I9cb2037dc459516f577fc2bff91cccafea539eff Signed-off-by: Matt Spinler <spinler@us.ibm.com>
OpenPOWER on IntegriCloud