History log of /openbmc/phosphor-fan-presence/control/json/event.cpp (Results 1 – 25 of 29)
Revision Date Author Comments
# 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 ...


# c3eb7b3c 25-Apr-2022 Matt Spinler <spinler@us.ibm.com>

control: Add 'events' section to dump

Add an events section to the fan control dump that contains all of the
configured events with their contained action and group names.

Signed-off-by: Matt Spinl

control: Add 'events' section to dump

Add an events section to the fan control dump that contains all of the
configured events with their contained action and group names.

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

show more ...


# e6fc210a 07-Apr-2022 Matt Spinler <spinler@us.ibm.com>

control: Add event name to the action unique name

The unique name of an action was previously just <action name>-ID, where
ID was unique number. When there are multiple instances of an action,
it c

control: Add event name to the action unique name

The unique name of an action was previously just <action name>-ID, where
ID was unique number. When there are multiple instances of an action,
it can be difficult to tell which action is being referred to when it
shows up in the fan control dump in either the flight recorder or zones
section.

To fix this, add the name of the owning event to the action's name so
now it's <action name>-ID(event name). Here is an example from the fan
control dump now:

"floor_holds": {
"count_state_floor-4(Non-active OCCs)": 18000,
"mapped_floor-64(Fan floors)": 11200
}

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

show more ...


# d1f97f43 29-Oct-2021 Matt Spinler <spinler@us.ibm.com>

control: Add power on/off triggers

Add two new classes of triggers: powerOn and powerOff. They are only
called during the power on and power off state changes, respectively.

They behave the same a

control: Add power on/off triggers

Add two new classes of triggers: powerOn and powerOff. They are only
called during the power on and power off state changes, respectively.

They behave the same as the existing init trigger.

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

show more ...


# 3695ac30 06-Oct-2021 Matthew Barth <msbarth@us.ibm.com>

control: Correct reloading groups.json thru SIGHUP

When providing a SIGHUP, the groups.json was not getting reloaded due to
being a pure static method. This changes that method to load the
groups.js

control: Correct reloading groups.json thru SIGHUP

When providing a SIGHUP, the groups.json was not getting reloaded due to
being a pure static method. This changes that method to load the
groups.json if not already loaded and requested to load the groups.json
which is the default.

All of available groups are now saved off during a SIGHUP and restored
if the groups.json or events.json fail to be reloaded. If there are no
failures in reloading neither the groups.json nor the events.json, the
newly loaded groups.json is used instead.

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

show more ...


# cd6f3798 30-Sep-2021 Matthew Barth <msbarth@us.ibm.com>

control: Pass event groups when enabling triggers

The `init` and `signal` triggers need to use the event groups when
retrieving group member values and subscribing to signals respectively.
This is t

control: Pass event groups when enabling triggers

The `init` and `signal` triggers need to use the event groups when
retrieving group member values and subscribing to signals respectively.
This is the first step towards fixing that actions are optional on
events and the design direction that `init` and `signal` triggers will
use the event groups (which may or may not be the same as the groups on
same event's actions) when populating/updating the cached state of all
the group members.

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

show more ...


# 5fb52686 29-Sep-2021 Matthew Barth <msbarth@us.ibm.com>

control: No longer append action groups to event groups

Prior to this change, groups configured on any event action would get
appended to the configured event groups resulting in the set of groups
t

control: No longer append action groups to event groups

Prior to this change, groups configured on any event action would get
appended to the configured event groups resulting in the set of groups
that would trigger the event action. Instead, event groups are used to
trigger event actions(and used within the actions) if-and-only-if there
are no groups configured on the event actions. When groups are
configured on an event action, only those groups are used within the
event action and the event groups are what's used to trigger the
actions.

So now, an event may be configured to be triggered by a set of groups
separately from which groups are used within the actions. To have the
event groups that trigger the event also included in the processing of
its actions, the same group can be listed along with additional groups
directly on the action within the event. Of course, if the event groups
that trigger the event are also what should be used in the event
actions, then no groups should be given on the actions.

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

show more ...


# e386fbb2 30-Jun-2021 Matthew Barth <msbarth@us.ibm.com>

control: Make setting groups public and static

There could be a need for actions to determine a list of groups to use,
so make setting the groups available for actions to use. For example,
the timer

control: Make setting groups public and static

There could be a need for actions to determine a list of groups to use,
so make setting the groups available for actions to use. For example,
the timer_based_actions action could have groups configured on the list
of actions that it runs when its timer expires. These groups need to be
checked against the active profiles and set on the list of actions.

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

show more ...


# b6ebac86 21-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Remove manager parameter from create trigger function

The pointer to the manager object is no longer needed when creating a
trigger since its provided when the trigger is enabled.

Change-I

control: Remove manager parameter from create trigger function

The pointer to the manager object is no longer needed when creating a
trigger since its provided when the trigger is enabled.

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

show more ...


# 54b5a24f 21-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Store/use trigger enable functions on events

Create and store trigger enablement functions on the events based on the
trigger's configuration so that they can be enabled separately from whe

control: Store/use trigger enable functions on events

Create and store trigger enablement functions on the events based on the
trigger's configuration so that they can be enabled separately from when
the event is created. This will allow actions that load events to be
able to be parsed and then enabled when the action determines that the
events should be enabled. It also supports the use of SIGHUP to reload
the event configuration since the events JSON configuration must
successfully be loaded before the newly created events can be enabled in
place of the currently enabled events.

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

show more ...


# 619dc0f2 20-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Remove JSON event precondition support

Event preconditions are essentially specialized actions that load events
after a certain condition is met. JSON configured fan control will just
utili

control: Remove JSON event precondition support

Event preconditions are essentially specialized actions that load events
after a certain condition is met. JSON configured fan control will just
utilize actions that are configured & created to enable or disable
events based on some state.

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

show more ...


# c8bde4aa 19-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Optimize loading/configuring event groups

The available groups configured can statically be loaded within the
event object since each event instance will configure its specific set
of group

control: Optimize loading/configuring event groups

The available groups configured can statically be loaded within the
event object since each event instance will configure its specific set
of groups from what's available.

Event actions use groups configured on the event or include groups
configured on the action directly with those configured on the event.
This can be done in a single function to setup the groups.

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

show more ...


# 9403a217 17-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Switch to using static instance of bus

Update main to use the static reference of the bus from
util::SDBusPlus.getBus() and have each object that needs the bus call
that same util::SDBusPlu

control: Switch to using static instance of bus

Update main to use the static reference of the bus from
util::SDBusPlus.getBus() and have each object that needs the bus call
that same util::SDBusPlus.getBus() function to retrieve the same static
reference.

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

show more ...


# a8ea091e 03-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Correct which json object used in event actions

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


# 0620be79 14-Apr-2021 Matthew Barth <msbarth@us.ibm.com>

control: Add event trigger creation

Event triggers are created by the events JSON configuration given a
trigger class name. That class name is used to lookup the associated
function in order to crea

control: Add event trigger creation

Event triggers are created by the events JSON configuration given a
trigger class name. That class name is used to lookup the associated
function in order to create the trigger by that class name. Triggers are
not required to be kept around/stored on the event, so that ability was
removed.

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

show more ...


# d4bd0ae5 14-Apr-2021 Matthew Barth <msbarth@us.ibm.com>

control: Provide pointer to manager object to events

To setup triggers on events, a pointer to the manager where service and
property states are stored is needed.

Change-Id: Ic6e2ca81c83f4cfacf01b9

control: Provide pointer to manager object to events

To setup triggers on events, a pointer to the manager where service and
property states are stored is needed.

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

show more ...


# 46b34485 06-Apr-2021 Matthew Barth <msbarth@us.ibm.com>

control: Set groups & zones on event actions

Configure and set the groups to be used per action of an event along
with setting the list of zones the action should be run against. Groups
configured o

control: Set groups & zones on event actions

Configure and set the groups to be used per action of an event along
with setting the list of zones the action should be run against. Groups
configured on an action are appended to the event's configured groups.
This is intended to allow a shared set of groups across all actions of
an event and then include additional groups specific to the action.
Also, zones configured on an action result in only those zones being
used by the action whereas when no zones are configured on the action,
all of the available zones to the event are used.

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

show more ...


# 9f1632e5 31-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Provide zones to the events

The event actions need the zone(s) to run the event's configured
action(s) against. The YAML based configs did not support configuring
which zone(s) to run any p

control: Provide zones to the events

The event actions need the zone(s) to run the event's configured
action(s) against. The YAML based configs did not support configuring
which zone(s) to run any particular action within an event against.
A follow up commit will package the zone(s) an action should run against
and provide that directly to the action, eliminating the need to store
that for the trigger callbacks.

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

show more ...


# 776ca563 31-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Add event actions

Generate the action objects and add them to the event.

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


# 0206c728 30-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Create config key check function

Move the configuration/profile check to include groups into events to a
function that can be used by other configurations that also need to do
this check. U

control: Create config key check function

Move the configuration/profile check to include groups into events to a
function that can be used by other configurations that also need to do
this check. Update the check to include a fan within a zone to use this
function.

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

show more ...


# e5578602 30-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Use Group objects in events

Use the generated Group objects in configured events. Group objects are
temporarily generated from the `groups.json` configuration and passed to
each event. When

control: Use Group objects in events

Use the generated Group objects in configured events. Group objects are
temporarily generated from the `groups.json` configuration and passed to
each event. When the event is generated from its JSON configuration, the
group(s) its configured to use in the event are first copied from the
list of Group objects and then populated with the remaining details for
the group configuration that's provided in the event. Groups to be used
in the event must either have no profiles restricting their use or have
a profile that matches the event's profile where that profile is also
active.

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

show more ...


12