Include monitoring removed sensors for re-adding

When a sensor returns a defined return code causing it to be removed
during the monitoring loop, it should be re-added once the sensor is
successfully read not producing any of the defined return codes. Once
the sensor is re-added, it is erased from the removed list of sensors.
When a sensor continues to return a defined return code, it remains in
the removed sensor list and is attempted to be added after each
completion of the monitoring loop.

Tested:
    Verify sensor is removed when return code received during monitoring
    Sensor object added after successful read with no return codes

Change-Id: Id286d4b1f1e11e1148ad4182dd9726d3c348c9de
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
1 file changed
tree: 9cd3968f3225594c8bd3ad4d3320068fe57b189f
  1. msl/
  2. test/
  3. .gitignore
  4. argument.cpp
  5. argument.hpp
  6. bootstrap.sh
  7. configure.ac
  8. env.cpp
  9. env.hpp
  10. fan_pwm.cpp
  11. fan_pwm.hpp
  12. fan_speed.cpp
  13. fan_speed.hpp
  14. hwmon.hpp
  15. interface.hpp
  16. LICENSE
  17. mainloop.cpp
  18. mainloop.hpp
  19. Makefile.am
  20. readd.cpp
  21. README.iio.md
  22. README.md
  23. sensorset.cpp
  24. sensorset.hpp
  25. sysfs.cpp
  26. sysfs.hpp
  27. targets.hpp
  28. thresholds.hpp
  29. timer.cpp
  30. timer.hpp
  31. util.hpp
README.md

Exposes generic hwmon entries as DBus objects.

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.

D-Bus bus names

To enable the use of Linux features like cgroups prioritization and
udev/systemd control, one instance of phosphor-hwmon is intended to
be run per hwmon sysfs class instance.

This requires an algorithm for selecting a stable, well-known D-Bus busname.

The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is an autoconf
configurable prefix (BUSNAME_PREFIX, xyz.openbmc_project by default),
ID is a std::hash of the /sys/devices path backing the hwmon class
instance, and N is the implemented phosphor-hwmon D-Bus API version.