History log of /openbmc/dbus-sensors/src/ExitAirTempSensor.cpp (Results 1 – 25 of 63)
Revision Date Author Comments
# 2aaf7175 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: Ib7af6345a7b9e858700bd81645fe87d9d7e9d0fb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# eacbfdd1 04-Apr-2024 Ed Tanous <ed@tanous.net>

Enable misc-include-cleaner

Change-Id: I22099a0f95b2eb884dec7d95cee0bdd0c159fd1f
Signed-off-by: Ed Tanous <ed@tanous.net>


# 201a1015 03-Apr-2024 Ed Tanous <ed@tanous.net>

Add modernize-redundant-void-arg

Enable this check and fix the failures.

Change-Id: I89b13daf1161be40564367562bb9c8c0c459e1d0
Signed-off-by: Ed Tanous <ed@tanous.net>


# bcb062a0 13-Dec-2023 Matt Simmering <matthew.simmering@intel.com>

Set exitAirSensor to null before creating sensor

If the configuration for the current ExitAirTempSensor is changed the
service will crash because it will re-create its DBus interfaces. To
prevent th

Set exitAirSensor to null before creating sensor

If the configuration for the current ExitAirTempSensor is changed the
service will crash because it will re-create its DBus interfaces. To
prevent this set exitAirSensor to nullptr before creating a new sensor.

Tested:
Change a property of the ExitAirTempSensor to something new to
re-trigger createSensors(), e.g.
busctl set-property xyz.openbmc_project.EntityManager
/xyz/openbmc_project/inventory/system/chassis/R4000_Chassis/Exit_Air_Temp
xyz.openbmc_project.Configuration.ExitAirTempSensor.Thresholds0 Value d 93

Without the fix the service would crash:
with the error: "exitairtempsensor: what(): sd_bus_add_object_vtable:
org.freedesktop.DBus.Error.FileExists: File exists". With the fix the
service doesn't crash and the property change holds.

Change-Id: I288140a8bd7ebb7119726720e0c829f3677a8aca
Signed-off-by: Matt Simmering <matthew.simmering@intel.com>

show more ...


# 597e8423 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: I73acd9daf41b52bcc3f6af9a1c38c5f162ae76b2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 779c96a2 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: I0d10afa582342818b9d90b168f6f39f71ce4e0f4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
[AJ: regenerate using .clang-format from openbmc/docs@f44abd66eca8]
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# 83db50ca 01-Mar-2023 Ed Tanous <edtanous@google.com>

Don't use deprecated asio functions

This code used a number of asio functions that have been deprecated.
This patch replaces them with their new equivalents, and enabled
BOOST_ASIO_NO_DEPRECATED.

C

Don't use deprecated asio functions

This code used a number of asio functions that have been deprecated.
This patch replaces them with their new equivalents, and enabled
BOOST_ASIO_NO_DEPRECATED.

Change-Id: I98bddba4c7d72a53ceca9455429828e60f06c5e0
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 1f978631 28-Feb-2023 Ed Tanous <edtanous@google.com>

Change io_service to io_context

This was renamed a while back in boost to be compliant with the
std::executors proposal.

Change-Id: Ib56544a0a7478990d18fe9e0bbbd8db1e52fa5b8
Signed-off-by: Ed Tanou

Change io_service to io_context

This was renamed a while back in boost to be compliant with the
std::executors proposal.

Change-Id: Ib56544a0a7478990d18fe9e0bbbd8db1e52fa5b8
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# e73bd0a1 24-Jan-2023 Andrew Jeffery <andrew@aj.id.au>

sensors: Align source structure away from anti-patterns

The anti-patterns document comments on source structure, specifically
on placing internal headers in a parallel subtree[1]. dbus-sensors is an

sensors: Align source structure away from anti-patterns

The anti-patterns document comments on source structure, specifically
on placing internal headers in a parallel subtree[1]. dbus-sensors is an
example of violating this anti-pattern, so fix it.

[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#placing-internal-headers-in-a-parallel-subtree

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I50ecaddd53fa9c9b7a0441af9de5e60bd94e47c6

show more ...


# 661d4378 27-Oct-2022 Johnathan Mantey <johnathanx.mantey@intel.com>

Identify active sensors via the D-Bus "sensors" service

Upstream modified how sensors are organized on D-Bus. Sensors are now
mapped under the /xyz/openbmc_project/sensors object. Each service
retri

Identify active sensors via the D-Bus "sensors" service

Upstream modified how sensors are organized on D-Bus. Sensors are now
mapped under the /xyz/openbmc_project/sensors object. Each service
retrieves sensor data via a GetManagedObject call.

Tested:

busctl call -j xyz.openbmc_project.$sensor /xyz/openbmc_project/sensors \
org.freedesktop.DBus.ObjectManager GetManagedObjects
ipmitool sdr dump sdrs.bin

Confirmed neither function resulted in an error message in the journal

Change-Id: I3a41ea2c28b34c9e28abe2f16f6c325ec715dd27
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...


# 9b4a20e9 06-Sep-2022 Ed Tanous <edtanous@google.com>

Move to steady_timer

deadline_timer and steady_timer have one important difference, the
former runs off CLOCK_REALTIME, and the later runs off CLOCK_MONOTONIC.
For a long time we've relied on deadli

Move to steady_timer

deadline_timer and steady_timer have one important difference, the
former runs off CLOCK_REALTIME, and the later runs off CLOCK_MONOTONIC.
For a long time we've relied on deadline_timer incorrectly, given that
dbus-sensors does not care in the least about the calendar time, and
only cares about the difference between sensor scans.

Fortunately, this likely has no effect on the behavior of the sensors
most of the time, and in general, in a time change, the clock generally
moves forward, so all timers would immediately expire, scan all sensors,
and move on. phosphor-pid-control is intentionally designed to handle
this case, so it's quite likely that a user would never notice it, and
even if they did, would have to be looking at a debug console the moment
it happened.

The other effect is that in most cases, sensors call clock_gettime more
than they probably need to, which might slow down the performance.

This commit moves all usages of sensor timing to steady_timer, which
should give us more consistent results, and (in theory at least) be
faster. Because of stdlib compliance things, this also has the effect
of us dropping our dependence on boost::posix_time, and move to
std::chrono::duration objects, per the coding standard.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I69f948fb3f0fc0dfd7fd196d26ba46742a3e15a7

show more ...


# 054aad8f 18-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

Remove Configuration interface prefix from utils APIs

This eliminates some repetitive verbosity from daemons that handle a lot
of different sensor types (such as hwmontempsensor and psusensor). It

Remove Configuration interface prefix from utils APIs

This eliminates some repetitive verbosity from daemons that handle a lot
of different sensor types (such as hwmontempsensor and psusensor). It
also positions us to more cleanly use a single data structure for both
existing APIs like GetSensorConfiguration() and
setupPropertiesChangedMatches(), as well as upcoming I2C
device-management support.

Tested: hwmontempsensor and adcsensor on romed8hm3 continue to behave as
they did previously.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I9d80475ca4160c8d2ff0afab942709496d51238d

show more ...


# 6c106d66 17-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

Replace boost string predicate functions with stdlib ones

Now that we're on C++20 we no longer need boost for starts_with() and
ends_with() tests.

Also remove the predicate.hpp #include from files

Replace boost string predicate functions with stdlib ones

Now that we're on C++20 we no longer need boost for starts_with() and
ends_with() tests.

Also remove the predicate.hpp #include from files that weren't actually
using anything from it.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id68a019d5108a4646eb9b5fd18af33d60617e048

show more ...


# 34d7b97f 17-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

Fix copy/paste errors in sensor type interfaces

CFMSensor, IpmbSensor, and MCUTempSensor had been identifying themselves
as ExitAirTemp sensors, presumably due to having been copy/pasted and
incompl

Fix copy/paste errors in sensor type interfaces

CFMSensor, IpmbSensor, and MCUTempSensor had been identifying themselves
as ExitAirTemp sensors, presumably due to having been copy/pasted and
incompletely modified when they were first added.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id725d2fd3d1290b60399b1832e7912cf8a690e39

show more ...


# 72f322f4 12-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

ExitAirTempSensor: Replace iterator pairs with structured bindings

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I9d536105564c725ee29c34ef0162cca6172daa43


# d8c293a3 15-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

Code style fixes for clang-tidy

CI ended up complaining about these in unrelated patches that happened
to touch the same files; rather than clutter up those patches with
completely tangential change

Code style fixes for clang-tidy

CI ended up complaining about these in unrelated patches that happened
to touch the same files; rather than clutter up those patches with
completely tangential changes, let's handle them separately.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Ic5bed1d618380e2ebcf33804e11336b6a0a27b1b

show more ...


# 214d9717 12-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

Refactor PropertiesChanged handler setup

Most sensor daemons had pretty much the same duplicated open-coded
pattern for setting up PropertiesChanged signal matches; introduce a
helper function to re

Refactor PropertiesChanged handler setup

Most sensor daemons had pretty much the same duplicated open-coded
pattern for setting up PropertiesChanged signal matches; introduce a
helper function to reduce the duplication and make things more readable.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I803a21eea2f6d7fc71b50d54bb8fd57a104f3349

show more ...


# 92f8f515 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

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

show more ...


# afd15043 18-Jul-2022 Zev Weiss <zev@bewilderbeest.net>

Use SensorBaseConfigMap where applicable

If we've got a more concise, descriptive name for it, we might as well
use it.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id2f1bd8f983b4e0c

Use SensorBaseConfigMap where applicable

If we've got a more concise, descriptive name for it, we might as well
use it.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id2f1bd8f983b4e0c2ca24b24c9fc9b875f4191f5

show more ...


# 2049bd26 09-Jul-2022 Ed Tanous <edtanous@google.com>

Clang-tidy-14 fixes

Do as the robot commands. All changes made automatically by tidy.

Tested: (Thanks Zhikui)
Downloaded and run on system. Sensors scan normally.

Signed-off-by: Ed Tanous <edtan

Clang-tidy-14 fixes

Do as the robot commands. All changes made automatically by tidy.

Tested: (Thanks Zhikui)
Downloaded and run on system. Sensors scan normally.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I752f37c9e7a95aa3be8e6980ba6e4b2b48b3395a

show more ...


# bb67932a 16-May-2022 Ed Tanous <edtanous@google.com>

Apply LambdaBodyIndentation to dbus-sensors

Per the transform being done in bmcweb, do the same for dbus-sensors.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: If21489607759f3cdf20fad17

Apply LambdaBodyIndentation to dbus-sensors

Per the transform being done in bmcweb, do the same for dbus-sensors.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: If21489607759f3cdf20fad17eede50fb4e228e5e

show more ...


# 3928741a 04-Feb-2022 Andrei Kartashev <a.kartashev@yadro.com>

sensors: don't pass excess conn handler

We don't need to pass connection handler to setInitialProperties method
since it already part of the sensor class.

Tested: no changes in behaviour.
Signed-of

sensors: don't pass excess conn handler

We don't need to pass connection handler to setInitialProperties method
since it already part of the sensor class.

Tested: no changes in behaviour.
Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Change-Id: Icaaccbeaf14e22648a6a1bce381f0f0a606b0ddd

show more ...


# 5667808a 04-Jan-2022 Jayashree Dhanapal <jayashree-d@hcl.com>

Move threshold interfaces to common function

Threshold Hardshutdown and Softshutdown interfaces needs to be
created for sensors. Therefore, created a common function
called getInterface() to access

Move threshold interfaces to common function

Threshold Hardshutdown and Softshutdown interfaces needs to be
created for sensors. Therefore, created a common function
called getInterface() to access all the threshold
interfaces from all the sensors source file and removed
hasCriticalInterface(), hasWarningInterface() functions.

Moreover, threshold interfaces from all the sensor constructor has
been refactored to avoid duplicating functions.

TESTED: Tested on Facebook YosemiteV2 hardware. Verified that the
Warning and Critical interfaces are created and displaying in
dbus objects.

Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
Change-Id: I9c7d049c7d4445d7199bf63d8e729838990880e9

show more ...


# 66558235 09-Nov-2021 Brandon Kim <brandonkim@google.com>

Take out array size for constexpr std::array

C++20 supports initializing array without size using std::to_array

Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: I7f

Take out array size for constexpr std::array

C++20 supports initializing array without size using std::to_array

Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: I7f955ddaf7c4368f364eae6ff401b0916f5cbe6f

show more ...


# da98f095 01-Nov-2021 Zhikui Ren <zhikui.ren@intel.com>

psusensor: fix psu pwm sensor name

Current bug is that psusensor service does not create pwm sensor object
if pid fan configuration has spaces in Name field, like
{
...
"Name

psusensor: fix psu pwm sensor name

Current bug is that psusensor service does not create pwm sensor object
if pid fan configuration has spaces in Name field, like
{
...
"Name" : "PSU$BUS $ADDRESS Fan 1"
"Outputs": [
"Pwm PSU$BUS $ADDRESS Fan 1"
],
...
}

Fix:
Pwm name need to be escaped, which currently replaces " " with "_"
before being passed to CreatePwmSensor in PSUSensor service.
PwmSensor constructor takes the name as is.

Since the escape algorithm may change in the future,
add a helper function escapeName() and update dbus-sensors
to use this helper funtion when sensors are created.
escapeName() currently calls boost replace_all_copy(name," ", "_"),
so it does not introduce functional changes except the bug identified
above.

Tested:
No regression found for existing working sensors.
Sensors are created as before with the same sensor name.

Fix for non-working case works correctly now.
psu pwm sensor name with space are created correctly with the change.
busctl tree xyz.openbmc_project.PSUSensor
...
|-/xyz/openbmc_project/control
| `-/xyz/openbmc_project/control/fanpwm
| |-/xyz/openbmc_project/control/fanpwm/Pwm_PSU17_2_Fan_1
| |-/xyz/openbmc_project/control/fanpwm/Pwm_PSU17_2_Fan_2
...

Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: If3b60f93de324e59cc3d774285c23bf50a6f989c

show more ...


123