History log of /openbmc/phosphor-fan-presence/control/json/group.cpp (Results 1 – 8 of 8)
Revision Date Author Comments
# c2c2db7d 07-Apr-2022 Matt Spinler <spinler@us.ibm.com>

control: Don't cache non-group properties

The code was previously adding every single D-Bus
path/interface/property of a service when Manager::addObjects() was
being used to cache D-Bus property val

control: Don't cache non-group properties

The code was previously adding every single D-Bus
path/interface/property of a service when Manager::addObjects() was
being used to cache D-Bus property values. This was resulting in a lot
of extra items in the cache that fan control would never use.

To fix this, create a single static set of all of the D-Bus paths from
all of the Group objects, which would be the master list of all the
D-Bus paths fan control would ever care about. Then, only add a
path/interface/property to the cache if that path is in that set.

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

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


# e6d1f781 14-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Extract bus object from config argument pack

All configured objects require a reference to the sdbusplus bus object
except Group objects, so instead of pass the reference twice to the
get t

control: Extract bus object from config argument pack

All configured objects require a reference to the sdbusplus bus object
except Group objects, so instead of pass the reference twice to the
get the configured objects, extract the bus from the argument pack.

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

show more ...


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

control: Copy everything in Group copy constructor

Initially, only what was parsed by the original Group objects was
copied, but a change in how the events setup the groups on actions
require that e

control: Copy everything in Group copy constructor

Initially, only what was parsed by the original Group objects was
copied, but a change in how the events setup the groups on actions
require that everything get copied. Improvements in this area will be
looked into after the base JSON support is merged.

Change-Id: If1a101cc186524d418d45dcc689e7ce5d53441b6
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 ...


# bfd7e1b7 04-Feb-2021 Matthew Barth <msbarth@us.ibm.com>

control: Extend actions from the config base object

Make actions also be base config objects to allow profiles to be defined
on an action. This also provides the parsing of variable values from the

control: Extend actions from the config base object

Make actions also be base config objects to allow profiles to be defined
on an action. This also provides the parsing of variable values from the
JSON of a configured action.

Included in this commit is an action parsing error exception class that
actions will use when a required attribute fails to be parsed from the
JSON for the given action.

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

show more ...


# 391ade08 15-Jan-2021 Matthew Barth <msbarth@us.ibm.com>

control: Add creating config object without a dbus object

For those configuration objects that do not need a dbus object, create
them using a similar method without requiring a dbus object to be giv

control: Add creating config object without a dbus object

For those configuration objects that do not need a dbus object, create
them using a similar method without requiring a dbus object to be given.
Updated each object to correctly reflect their current need of a dbus
object which was driven by moving the creation of the available group
objects to within the event.

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

show more ...


# dfd4a058 02-Sep-2020 Matthew Barth <msbarth@us.ibm.com>

control: Group configuration parsing

Groups are a list of dbus object paths that are to be used within
one-or-more configured fan control events. For fan control, groups are
generally comprised of o

control: Group configuration parsing

Groups are a list of dbus object paths that are to be used within
one-or-more configured fan control events. For fan control, groups are
generally comprised of one-or-more temperature sensors or inventory
objects that exist on the same base object path and implement the same
interface and property to be used in a configured fan control event.
The interface and property to be used on the members of the group are
given within each event.

ex.)
> Group made up of 4 fan inventory objects:

"name": "air_cooled_zone0_fans",
"description": "Group of fan inventory objects for air cooled zone 0",
"type": "/xyz/openbmc_project/inventory",
"members": [
"/system/chassis/motherboard/fan0",
"/system/chassis/motherboard/fan1",
"/system/chassis/motherboard/fan2",
"/system/chassis/motherboard/fan3"
]

> Event using this group that sets fans to 10500 RPMS when 1 of the
> fans in the group is changes to not present:

"name": "missing_fans_before_high_speed_air",
"groups": [
{
"name": "air_cooled_zone0_fans",
"interface": "xyz.openbmc_project.Inventory.Item",
"property": {
"name": "Present",
"type": "bool"
}
}],
"triggers": [
{
"name": "signal",
"signal": "propertiesChanged",
"handler": "setProperty"
}],
"actions": [
{
"name": "count_state_before_speed",
"count": 1,
"property": {
"value": false,
"type": "bool"
},
"speed": {
"value": 10500,
"type": "uint64_t"
}
}]

Tested:
Group objects created for each entry in "groups.json"
A "groups.json" configuration is required
Members are parsed and stored within the group object
Service name is optional and stored in the group object when given

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

show more ...