commit | 9462e0667fdc6bf32b265fc393e057c1b67d9cbe | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Tue Sep 15 14:39:17 2020 -0500 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Thu Sep 24 23:39:27 2020 +0000 |
tree | 5bba95d2a9563aa00722498194e81693e3ca55bf | |
parent | 6a3fd2c28ee0b1d02f1bef70937521d34ee6e047 [diff] |
FileDescriptor: Add move and close methods Made the following enhancements to the FileDescriptor class: * Moved header file from file.hpp to file_descriptor.hpp to match naming convention used in other files. * Added move constructor and move assignment operator so FileDescriptor objects can be put in containers like std::vector. * Added close() method so users of class can optionally close the descriptor explicitly and check the return code for errors. If not explicitly closed, the descriptor will still be closed by the destructor which ignores errors. * Added automated tests * Added doxygen comments Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I1e05bbb232443ed1a79728768aaaa1efac8707ec
This repository contains applications for configuring and monitoring devices that deliver power to the system.
To build all applications in this repository:
meson build ninja -C build
To clean the repository and remove all build output:
rm -rf build
You can specify meson options to customize the build process. For example, you can specify:
Several applications in this repository require a PSU JSON config to run. The JSON config file provides information for:
There is an example psu.json to describe the necessary configurations.
inventoryPMBusAccessType
defines the pmbus access type, which tells the service which sysfs type to use to read the attributes. The possible values are:/sys/bus/i2c/devices/3-0069/
/sys/bus/i2c/devices/3-0069/hwmon/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/cffps1/
fruConfigs
defines the mapping between the attribute file and the FRU inventory interface and property. The configuration example below indicates that the service will read part_number
attribute file from a directory specified by the above pmbus access type, and assign to PartNumber
property in xyz.openbmc_project.Inventory.Decorator.Asset
interface."fruConfigs": [ { "propertyName": "PartNumber", "fileName": "part_number", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset" } ]
psuDevices
defines the kernel device dir for each PSU in inventory. The configuration example below indicates that powersupply0
's device is located in /sys/bus/i2c/devices/3-0069
."psuDevices": { "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069", }