Add device-management infrastructure
We're moving toward having dbus-sensors take over sensor device
lifecycle management from entity-manager; this code (loosely based on
entity-manager's include/devices.hpp and src/overlay.cpp) provides some
general-purpose utilities for instantiating and destroying devices.
This also includes a variant of setupPropertiesChangedMatches() taking
an I2CDeviceTypeMap instead of a span of C strings, so that we can
support both existing sensor daemons and ones that get converted to use
that instead of the simple string arrays they currently employ.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I39fcd0de2c70cd58b4d132cdcae5f82319732dbb
diff --git a/meson.build b/meson.build
index 8b29e64..1b355d5 100644
--- a/meson.build
+++ b/meson.build
@@ -118,6 +118,21 @@
dependencies: [ sdbusplus ],
)
+devicemgmt_a = static_library(
+ 'devicemgmt_a',
+ [
+ 'src/DeviceMgmt.cpp',
+ ],
+ dependencies: default_deps,
+ implicit_include_directories: false,
+ include_directories: 'include',
+)
+
+devicemgmt_dep = declare_dependency(
+ link_with: [ devicemgmt_a ],
+ dependencies: default_deps,
+)
+
pwmsensor_a = static_library(
'pwmsensor_a',
'src/PwmSensor.cpp',