inventory.rotor: add nominal characteristics for fan rotors
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic4d488ce0c6712a20d2bab165686cb06bf68e358
diff --git a/gen/xyz/openbmc_project/Inventory/Item/Rotor/meson.build b/gen/xyz/openbmc_project/Inventory/Item/Rotor/meson.build
new file mode 100644
index 0000000..7332595
--- /dev/null
+++ b/gen/xyz/openbmc_project/Inventory/Item/Rotor/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Inventory/Item/Rotor__cpp'.underscorify(),
+ input: [ meson.source_root() / 'xyz/openbmc_project/Inventory/Item/Rotor.interface.yaml', ],
+ output: [ 'server.cpp', 'server.hpp', 'client.hpp', ],
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'cpp',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.source_root(),
+ 'xyz/openbmc_project/Inventory/Item/Rotor',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/Inventory/Item/meson.build b/gen/xyz/openbmc_project/Inventory/Item/meson.build
index 220de10..145bba2 100644
--- a/gen/xyz/openbmc_project/Inventory/Item/meson.build
+++ b/gen/xyz/openbmc_project/Inventory/Item/meson.build
@@ -282,6 +282,21 @@
build_by_default: true,
)
+subdir('Rotor')
+generated_others += custom_target(
+ 'xyz/openbmc_project/Inventory/Item/Rotor__markdown'.underscorify(),
+ input: [ meson.source_root() / 'xyz/openbmc_project/Inventory/Item/Rotor.interface.yaml', ],
+ output: [ 'Rotor.md' ],
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'markdown',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.source_root(),
+ 'xyz/openbmc_project/Inventory/Item/Rotor',
+ ],
+ build_by_default: true,
+)
+
subdir('StorageController')
generated_others += custom_target(
'xyz/openbmc_project/Inventory/Item/StorageController__markdown'.underscorify(),
diff --git a/xyz/openbmc_project/Inventory/Item/Rotor.interface.yaml b/xyz/openbmc_project/Inventory/Item/Rotor.interface.yaml
new file mode 100644
index 0000000..4f8d931
--- /dev/null
+++ b/xyz/openbmc_project/Inventory/Item/Rotor.interface.yaml
@@ -0,0 +1,20 @@
+description: >
+ Implement to provide Rotor attributes.
+ This interface should be at the same object path as a Fan for single-rotor
+ fans or as a set of sub-path for multi-rotor fan design.
+
+properties:
+ - name: NominalVoltage
+ type: double
+ description: >
+ The nominal voltage of the fan in mV.
+
+ - name: NominalCurrent
+ type: double
+ description: >
+ The nominal maximum current of the fan in mA.
+
+ - name: NominalRPM
+ type: double
+ description: >
+ The nominal speed of the fan in RPMs.