History log of /openbmc/phosphor-fan-presence/control/json/actions/mapped_floor.cpp (Results 1 – 14 of 14)
Revision Date Author Comments
# 64b5ac20 04-Apr-2025 Anwaar Hadi <anwaar.hadi@ibm.com>

Move the control application to lg2

Update the logging API used for files in phosphor-fan-presence/control
from the older phosphor::logging::log to the more recent lg2::log.

Tested:
* Verified jour

Move the control application to lg2

Update the logging API used for files in phosphor-fan-presence/control
from the older phosphor::logging::log to the more recent lg2::log.

Tested:
* Verified journal traces worked correctly in simulation.
* Modified json to force various property errors and verified
correct key/value pairs in the journalctl output.

Change-Id: If1ac33b90abe2a9baae6f3cc788863bd514fa80e
Signed-off-by: Anwaar Hadi <anwaar.hadi@ibm.com>

show more ...


# 4fa67aa1 03-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: If152304b21dd2daaa2f79255a4f98218615efb05
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

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

show more ...


# dfddd648 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

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

show more ...


# 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 ...


# fbf4703f 17-Jul-2023 Patrick Williams <patrick@stwcx.xyz>

use std::format instead of fmt::format

The std::format is sufficient for the uses in this repository except
for in one file (override_fan_target.cpp, since P2286 isn't supported
by GCC yet). Switch

use std::format instead of fmt::format

The std::format is sufficient for the uses in this repository except
for in one file (override_fan_target.cpp, since P2286 isn't supported
by GCC yet). Switch to std::format whenever possible.

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

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 ...


# 1a555607 08-Dec-2022 Matt Spinler <spinler@us.ibm.com>

control: mapped_floor: Add conditions

Add the concept of a condition to the mapped_floor action such that it
will only run if the condition is met. If the condition isn't met, the
run() function wi

control: mapped_floor: Add conditions

Add the concept of a condition to the mapped_floor action such that it
will only run if the condition is met. If the condition isn't met, the
run() function will just exit immediately.

A condition is created by placing the following in the JSON:

* condition_group
- The name of the group that has the property the condition
will use. For now, it must be a single member group.
* condition_value
- The value the property has to be to meet the condition.
* condition_op
- Either 'equal' or 'not_equal', where the property has to
either be equal to or not equal to the condition value.

For example, the following says the single member of the 'cpu 0' group
must have its Model property be equal to "1234" for the action to run:

{
"groups": [{
"name": "cpu 0",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset",
"property": { "name": "Model" }
}
...
],
...
"name": "mapped_floor",
"key_group": "ambient temp",
"condition_group": "cpu 0",
"condition_value": "1234",
"condition_op": "equal",
...
}

If a condition is present but isn't met, the action will remove its
floor hold if it has one to support the case of the condition property
changing values.

Change-Id: I3ede20efd334e2c5292a441c089534420959c7bc
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# b2e9a4fc 13-Jun-2022 Mike Capps <mikepcapps@gmail.com>

meson support: remove code warnings 2

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.
to keep the review

meson support: remove code warnings 2

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.
to keep the review size manageable, this commit contains only control
changes (plus one in sensor-monitor).

Change-Id: Ie20f1d9028add4b605e4cc9fb230940710365706
Signed-off-by: Mike Capps <mikepcapps@gmail.com>

show more ...


# 76ef2013 03-Feb-2022 Matt Spinler <spinler@us.ibm.com>

control: mapped_floor: Add default floors

Add support for two optional default floor values in the mapped floor
action. The first is action wide, and the second is key value wide.
These would be ch

control: mapped_floor: Add default floors

Add support for two optional default floor values in the mapped floor
action. The first is action wide, and the second is key value wide.
These would be chosen in certain situations when a normal floor can't be
calculated.

Default floor at action level:
{
"name": "mapped_floor",
"key_group": "ambient_temp",
"default_floor": 2000, <---
...
}

Default floor at key value level:
{
"key": 27,
"default_floor": 3000, <---
"floors": [
...
]
}

The key level default floor would be selected when no other floor value
could be found within that that key's tables.

The action level default floor would be used when a key table couldn't
be found based on the actual key value, or when a key level default
floor would have been used but it wasn't supplied.

The default floor from the zone will be used when no other default floor
is provided at the key level or action level.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I740220a97477e9a4fb16cdc54c91f86c99c8b461

show more ...


# a17d5cc0 02-Feb-2022 Matt Spinler <spinler@us.ibm.com>

control: mapped_floor: Support floor offset param

Add support to the mapped floor action to read the name of an optional
floor offset parameter from the JSON. If it's there, then any time a
floor i

control: mapped_floor: Support floor offset param

Add support to the mapped floor action to read the name of an optional
floor offset parameter from the JSON. If it's there, then any time a
floor is calculated it will add that offset to the floor value before
setting it. This is added at the level of the key value, so that
particular offset is only applied to floors found in that section.

For example, if
"key": 27,
"floor_offset_parameter": "floor_altitude_offset",
...

is in the JSON config, it will add whatever value is in the
floor_altitude_offset parameter to the floor value it calculates when
that key value is valid.

This allows one to do something like set an floor offset based on the
current altitude.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I39ab6287a6948058981aed1cdbae5e91aade80d9

show more ...


# f0723ee3 08-Nov-2021 Matt Spinler <spinler@us.ibm.com>

control: mapped_floor: Allow missing parameters

If the mapped_floor actions is configured to use a parameter, and that
parameter is missing, then simply skip that floor table entry and
continue on i

control: mapped_floor: Allow missing parameters

If the mapped_floor actions is configured to use a parameter, and that
parameter is missing, then simply skip that floor table entry and
continue on instead of forcing the floor to the default.

Other actions may remove the parameter from the manager when it no
longer applies, such as when there are no PCIe cards present so the
floor doesn't need to depend on PCIe cards.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia4a01e36c57c1731c0bb0fa245a2ec46e1522dec

show more ...


# b884865b 26-Oct-2021 Matt Spinler <spinler@us.ibm.com>

control: mapped_floor: use setFloorHold

Start using Zone::setFloorHold() in the MappedFloor action. This way
other actions, or other instances of this action, can also set the floor
without worryin

control: mapped_floor: use setFloorHold

Start using Zone::setFloorHold() in the MappedFloor action. This way
other actions, or other instances of this action, can also set the floor
without worrying about undercutting each other.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ie55341d183894819b72819ad58a4a786a7ffb405

show more ...


# c981bb5b 21-Sep-2021 Matt Spinler <spinler@us.ibm.com>

control: Mapped floor action can use parameters

Previously, the mapped floor action could only set floor values based on
group property values. This commit adds support to be able to use a
manager

control: Mapped floor action can use parameters

Previously, the mapped floor action could only set floor values based on
group property values. This commit adds support to be able to use a
manager parameter instead of a floor value.

For example:

"floors": [
{
"parameter": "pcie_floor_index",
"floors": [
{
"value": 1,
"floor": 2000
}
...
}
...

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I874fa0f0c6b9befd74a095c31b893c5435b08abe

show more ...


# 848799f9 01-Jul-2021 Matt Spinler <spinler@us.ibm.com>

control: Create MappedFloor action

This action can be used to set a floor value based on 2 or more groups
having values within certain ranges, where the key group chooses the set
of tables in which

control: Create MappedFloor action

This action can be used to set a floor value based on 2 or more groups
having values within certain ranges, where the key group chooses the set
of tables in which to check the remaining group values.

For example, with the following JSON:

{
"name": "mapped_floor",
"key_group": "ambient_temp",
"fan_floors": [
{
"key": 27,
"floors": [
{
"group": "altitude",
"floors": [
{
"value": 5000,
"floor": 2000
},
{
"value": 7000,
"floor": 6000
}
]
},
{
"group": "power_mode",
"floors": [
{
"value": "PowerSave",
"floor": 3000
},
{
"value": "MaximumPerformance",
"floor": 5000
}
]
}
]
}
]
}

If the ambient_temp group has a value less than 27, then it looks up the
values for the altitude and power_mode groups, where for altitude, since
it's numeric, it will use a <= operator, and for power_mode, since it's
a string, it will use an == operator when comparing to the values in the
JSON. It will then choose the largest floor value between the altitude
and power_mode results.

There are several scenarios that result in a default floor being set.

Full action documentation is in the class header file.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8e0ff3a97ff73dd20018473c1993b2e043276099

show more ...