History log of /openbmc/phosphor-fan-presence/control/actions.hpp (Results 1 – 25 of 28)
Revision Date Author Comments
# 5e15c3ba 20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I3e9e6350864ac267819a4b8d670bef7d3746976e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 61b73296 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I152f141a5e8343b92b5ce81d3ca16eec77b5606b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 3e1bb274 26-May-2020 Matthew Barth <msbarth@us.ibm.com>

control: Clang format updates

Used `format-code.sh` build script to make changes to conform to clang
format.

Tested: Compiled

Change-Id: Ic9d621d7c5647bde0a92c5f17938c9

control: Clang format updates

Used `format-code.sh` build script to make changes to conform to clang
format.

Tested: Compiled

Change-Id: Ic9d621d7c5647bde0a92c5f17938c99deeca0512
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 9ca6065c 10-Feb-2020 Matthew Barth <msbarth@us.ibm.com>

control: Move functions to be templated

While testing the sensor type change from int64 to double, it was found
there were some fan control actions that were not templated to support

control: Move functions to be templated

While testing the sensor type change from int64 to double, it was found
there were some fan control actions that were not templated to support
different data types that could be configured to be used in those
actions. Moving these to be templated allows any supported property type
to be used within these actions.

Tested:
Using different property types result in actions functioning
correctly
No impact to still using an int64 as the data type to these actions

Change-Id: I95274e4a1a4cf2ccacb089416eb01cd42e114caf
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 799cdf74 08-Oct-2019 Matthew Barth <msbarth@us.ibm.com>

Conditionally add/remove events action

A new action to add or remove events based on the state of all members
of a group. When all members of a group match the state given, the
event

Conditionally add/remove events action

A new action to add or remove events based on the state of all members
of a group. When all members of a group match the state given, the
events will be enabled. At any time a member's property state no longer
matches, all the events will be removed.

For example, to enable an event that changes the fan floor table using
different values based on the selected state of the current thermal
mode.

- name: set_speed_boundaries_based_on_ambient
groups:
- name: zone0_control_mode
interface: xyz.openbmc_project.Control.ThermalMode
property:
name: Current
type: std::string
triggers:
- name: init
method: getProperties
handler: setProperty
- name: signal
signal: propertiesChanged
handler: setProperty
actions:
- name: use_events_on_state
property:
value: DEFAULT
type: std::string
events:
- name: default_fan_speed_boundaries
groups:
- name: zone0_ambient
interface: xyz.openbmc_project.Sensor.Value
property:
name: Value
type: int64_t
triggers:
- name: init
method: getProperties
handler: setProperty
- name: signal
signal: propertiesChanged
handler: setProperty
actions:
- name: set_floor_from_average_sensor_value
map:
value:
- 27000: 3500
- 32000: 4600
- 37000: 5200
- 40000: 5800
type: std::map<int64_t, uint64_t>
- name: use_events_on_state
property:
value: CUSTOM
type: std::string
events:
- name: custom_fan_speed_boundaries
groups:
- name: zone0_ambient
interface: xyz.openbmc_project.Sensor.Value
property:
name: Value
type: int64_t
triggers:
- name: init
method: getProperties
handler: setProperty
- name: signal
signal: propertiesChanged
handler: setProperty
actions:
- name: set_floor_from_average_sensor_value
map:
value:
- 27000: 4600
- 32000: 5000
- 37000: 5400
- 40000: 5800
type: std::map<int64_t, uint64_t>

Tested:
Different fan floor events loaded based on thermal mode state

Change-Id: I85a4718e928996d2063e51eb31bfbb45e0e40c0b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 8d06a838 02-Oct-2019 Matthew Barth <msbarth@us.ibm.com>

Update default floor action

Add action to be able to update the default fan floor thru a configured
event.

Tested:
Default floor is updated based on state of group prope

Update default floor action

Add action to be able to update the default fan floor thru a configured
event.

Tested:
Default floor is updated based on state of group property value

Change-Id: I83a4ae313636abbe1e5c8b6ddfc2d5f9d281f844
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 014f07c7 30-May-2019 Matthew Barth <msbarth@us.ibm.com>

Fan floor by median sensor value within a range

Add action to set the floor speed based on sensors from within a defined
valid range and using their median value. The floor speed is sele

Fan floor by median sensor value within a range

Add action to set the floor speed based on sensors from within a defined
valid range and using their median value. The floor speed is selected
from the first map key entry that the median value is less than where 3
or more sensor values are valid. In the case where less than 3 sensor
values are valid, use the highest valid value and default the floor
speed when 0 sensor values are valid.

Tested:
Configured wspoon with this action & correct floor resulted:
Sensor value invalidated outside of range
Single valid ambient sensor
Default floor with no valid sensors(kill ambient service)
Highest value used w/ 2 valid sensors
Middle value used w/ odd number of valid sensors(median)
Average value of middle two valid sensors w/ even number(median)

Change-Id: Ia1599ff13e25dbd7caa7b02c9340cc3e1e9947c6
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 146b7390 08-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Convert event group to a vector of tuples

In preparation for storing each event group member's property state used
within the event's actions, the group type should be converted to a

Convert event group to a vector of tuples

In preparation for storing each event group member's property state used
within the event's actions, the group type should be converted to a
vector of tuples. This vector will allow, if user defines, easier use of
different interfaces and properties on the same path to be used within
the same event group.

Tested:
Generated code for groups reflects vector instead of map
Actions against groups remain unchanged

Change-Id: I9f4bb609de424d9004d43524fd04737a50fb2c6f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# c410ddab 11-Jan-2019 Matthew Barth <msbarth@us.ibm.com>

Add alternate events action

The alternate events action uses a group of properties to determine
whether a default set of events should be used or an alternate set of
events should be

Add alternate events action

The alternate events action uses a group of properties to determine
whether a default set of events should be used or an alternate set of
events should be used. When any of the members of the group do not match
the given property state, the default set of events are used. Once all
members of the group match the given state, the alternate set of events
are used. Each time the events used are to change, the current set of
events are removed prior to loading the replacement set of events.

Tested:
Used the 'WaterCooled' property to trigger using the default or
alternate floor speed events.
Verified fan control memory usage doesnt grow by doing multiple
event switching.

Change-Id: Ib8a4b835bf370894c572ccfa8fdc5a4479ef570f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 122b843f 30-Oct-2018 William A. Kennington III <wak@google.com>

control: Rename Timer -> TimerConf

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
configurat

control: Rename Timer -> TimerConf

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>

show more ...


# e0f67c8b 08-May-2018 Matthew Barth <msbarth@us.ibm.com>

perf: Count state of properties before set speed

Once the number of properties at a given state are at/above the given
number allowed, set the fan speed and stop checking the remaining

perf: Count state of properties before set speed

Once the number of properties at a given state are at/above the given
number allowed, set the fan speed and stop checking the remaining
properties.

Tested:
Action function results are unchanged

Change-Id: Icfd347703c973b12f4b7806ea1ba84056f987253
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# e4338cdb 14-Dec-2017 Matthew Barth <msbarth@us.ibm.com>

Decreases allowed based on all groups

For speed decreases to occur, all sensor groups involved with setting a
net decrease delta must be below their given t-control low values for
th

Decreases allowed based on all groups

For speed decreases to occur, all sensor groups involved with setting a
net decrease delta must be below their given t-control low values for
the associated zone. This handles the case where one or more sensor
groups' temperatures stabilize above their t-control low value, but one
or more other sensor groups' temperatures are below their t-control low
value which would result in speed decrease requests that could
eventually lead to fan speed oscillations.

Resolves openbmc/openbmc#2710

Change-Id: I382de5d3f9c3e631a332d49dfcb06e705ff6fc17
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 0decd1bd 24-Oct-2017 Matthew Barth <msbarth@us.ibm.com>

Set fan speed on missing owner action

Sets the zone's fan speeds to a given speed when any service owner
associated with an event group is missing. Once all the services are
function

Set fan speed on missing owner action

Sets the zone's fan speeds to a given speed when any service owner
associated with an event group is missing. Once all the services are
functional and providing the event data again, active fan speed changes
are allowed.

Change-Id: I318f6114c8d0392432c421f803db07a4683d1097
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 98726c45 17-Oct-2017 Matthew Barth <msbarth@us.ibm.com>

Set floor to default on missing owner action

An action to set the fan floor speed to the defined default fan floor
speed when any services associated to a given group of sensors have

Set floor to default on missing owner action

An action to set the fan floor speed to the defined default fan floor
speed when any services associated to a given group of sensors have
terminated. Once those services are functional and providing the
sensors, the fan floor is allowed to be set normally again.

i.e.) For fan floor speeds based on an ambient sensor, if the service
providing the ambient temperature value from the sensor terminates, the
default floor for the zone is used as the fan floor speed.

Change-Id: I2d58cc9b31051e6b8e5e798c0a736f58f5efe5b1
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 2a646c5f 05-Oct-2017 Matthew Barth <msbarth@us.ibm.com>

Action that creates/starts a timer

Another action is provided to the timer and is performed when the timer
expires.

Change-Id: Ie6a06b0d56272a158d74bf03287183f07f00aed8
Sign

Action that creates/starts a timer

Another action is provided to the timer and is performed when the timer
expires.

Change-Id: Ie6a06b0d56272a158d74bf03287183f07f00aed8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# b280bfa4 15-Sep-2017 Matthew Barth <msbarth@us.ibm.com>

Create set request speed base action function

This action function is intended to allow the base request speed to be
set to the max value from a group of properties. The base request spe

Create set request speed base action function

This action function is intended to allow the base request speed to be
set to the max value from a group of properties. The base request speed
is the base speed used in requesting a new target speed. By default, the
base request speed is the current target speed.

For example, this action can be used to set the base request speed used
in calculating a new target speed to be based on the max tach feedback
speed from a group of fans instead of the current target speed.

Adding this action function requires the other non-template functions to
also be slightly modified due to linker errors.

Change-Id: Ibbe9b33678b10cb49466174088a587b27bf56d62
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 60b00766 15-Aug-2017 Matthew Barth <msbarth@us.ibm.com>

Updates enabling zone active fan control

A zone is actively controlling its fan speeds when all groups subscribed
to allow active control are set to true. The zone keeps a list of these

Updates enabling zone active fan control

A zone is actively controlling its fan speeds when all groups subscribed
to allow active control are set to true. The zone keeps a list of these
groups and their active allow state, if at anytime an action (or
precondition) sets a group's active state to false, any dynamic set
speed requests do not occur. Only requests to set the zone's fans to
full speed is allowed.

Related to this, the zone's target speed should only be updated when a
requested speed is successfully set.

Change-Id: Iec6f15346fee5a6c6046d5b00e949e46aef400b9
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 172f3936 14-Aug-2017 Matthew Barth <msbarth@us.ibm.com>

Add factor parameter to inc/dec action functions

The factor parameter is used to correctly determine the increase or
decrease speed delta based on sensor inputs that have a scale. To get

Add factor parameter to inc/dec action functions

The factor parameter is used to correctly determine the increase or
decrease speed delta based on sensor inputs that have a scale. To get
the net speed delta change, the factor is applied to the difference in
sensor value and the defined state at which a speed change should be
requested.

Change-Id: I2aaa8f6b294b38d1f38238593dd851c3a205eb7a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# bc651609 10-Aug-2017 Matthew Barth <msbarth@us.ibm.com>

Handle any missing properties for actions

Update getting a property value from the zone's cache to throw an
exception when not found. Handle these exceptions appropriately for each
a

Handle any missing properties for actions

Update getting a property value from the zone's cache to throw an
exception when not found. Handle these exceptions appropriately for each
action where it gets each property value of a group.

Change-Id: Icbc0b04f492d3680de77dbe3f27cabf7504ce6b4
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 0ce99d8b 22-Jun-2017 Matthew Barth <msbarth@us.ibm.com>

Support speed decrease events

A net decrease speed action determines the net decrease delta from each
group member's property value and requests a speed decrease of that
delta from t

Support speed decrease events

A net decrease speed action determines the net decrease delta from each
group member's property value and requests a speed decrease of that
delta from the current target speed.

From all the requests for a speed decrease on a zone, only the lowest
net decrease is used from all the groups subscribed to decrease a zone's
speed. The new target speed is only decreased when no increase requests
exist and the resulting target is above the zone's floor speed,
otherwise the floor speed is set as the new target.

Resolves openbmc/openbmc#1626

Change-Id: Iaefa7b25c3f44691dd3ca4084bfddd3c1a504de9
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 240397b9 22-Jun-2017 Matthew Barth <msbarth@us.ibm.com>

Process speed increase requests

Speed increases are made providing a target speed delta. The increase is
made when the delta is higher than the current increase that may be
occurring

Process speed increase requests

Speed increases are made providing a target speed delta. The increase is
made when the delta is higher than the current increase that may be
occurring. When no increase is currently happening, the increase delta
requested is accepted. All resulting target increases will not go above
a defined ceiling speed.

Change-Id: Ia19c71a023cf5b897d5ba92974ff98451f34d5a3
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 24623523 21-Jun-2017 Matthew Barth <msbarth@us.ibm.com>

Add zone net increase set speed action

The net increase speed action provides the ability to determine what the
net delta the zone's fan speeds should be updated by from their current

Add zone net increase set speed action

The net increase speed action provides the ability to determine what the
net delta the zone's fan speeds should be updated by from their current
target speed.

Change-Id: Ib463e5ed4836bebf906cea27ea5788d826ec9c38
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# e0ca13eb 13-Jun-2017 Matthew Barth <msbarth@us.ibm.com>

Enable setting/adjusting fan ceiling speed

Set the default ceiling to be what's given as full speed and adjust the
ceiling speed based on an average of a given set of sensor values.

Enable setting/adjusting fan ceiling speed

Set the default ceiling to be what's given as full speed and adjust the
ceiling speed based on an average of a given set of sensor values.

The ceiling is chosen from a given map's key transition values. The map
consists of key, value pairs where each key is the sensor value
transition point and the value is the ceiling speed for when that
transition occurs. The previous key value is needed to determine the
direction in which to chose the appropriate ceiling speed allowing a
buffer zone between ceiling changes if defined to.

Resolves openbmc/openbmc#1628

Change-Id: I7c9c553b5d0c3219c51b563aec7dd5d5f090916b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 4af419cd 12-Jun-2017 Matthew Barth <msbarth@us.ibm.com>

Allow floor speed changes based on sensor values

Given a group of sensor values, the average of those sensor values will
be used in selecting the floor speed for the zone. Each time the

Allow floor speed changes based on sensor values

Given a group of sensor values, the average of those sensor values will
be used in selecting the floor speed for the zone. Each time the speed
is set/updated, any speed requested lower than the current floor will be
overwritten with the floor speed to not allow speeds below the floor.

Change-Id: I4c8e8a2cd66892b9fdc2bc5643e907adddff51f8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 9e741ed0 02-Jun-2017 Matthew Barth <msbarth@us.ibm.com>

Properties stored of different types

Allow properties stored for processing events to be of types other than
bool

Change-Id: Ie1dde5aca562c9958bdff6fa3d1b19d3154b2c6d
Signed

Properties stored of different types

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>

show more ...


12