psu: Introduce the PowerSupply class
The Power Supply Manager (PSUManager) class will need a list of power
supplies to work with. Create these via the PowerSupply class.
Update Power Supply Manager to call the initialization function, and
update the power state.
Update clearFaults() to go through the list of power supplies and call
their individual clearFaults() functions.
Update the power supply manager analyze() function to go through the
list of power supplies and call their analyze() function.
Update the power supply manager updateInventory() function to call the
updateInventory() function in each power supply in the list.
Update the meson.build file to include the header files in the parent
directory, and link with the library containing the utility functions
the binary will need to use.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: I743180d47f1b25d34c7e7001b64a6197905b86ff
diff --git a/phosphor-power-supply/meson.build b/phosphor-power-supply/meson.build
index c1fcb1f..b6fb80f 100644
--- a/phosphor-power-supply/meson.build
+++ b/phosphor-power-supply/meson.build
@@ -2,8 +2,14 @@
executable(
'phosphor-psu-monitor',
'main.cpp',
+ 'psu_manager.cpp',
dependencies: [
sdbusplus,
sdeventplus,
],
- install: true)
+ include_directories: '..',
+ install: true,
+ link_with: [
+ libpower,
+ ]
+)