commit | b6f07c9668f5b7697cbfa1a67a0b169adebc0c65 | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Thu Sep 03 21:49:21 2020 -0500 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Fri Sep 04 02:25:47 2020 -0500 |
tree | dad58ab7baaa4bd3d37988822900c0b901358477 | |
parent | 13e03339543cdc2b6740ed20064fbedd3252d2c9 [diff] |
regulators: Create TemporaryFile class Create class for handling temporary files: * Constructor creates the temporary file * Destructor deletes the temporary file * Provides move constructor and move assignment operator so that class can be stored in containers like std::vector * Throws exception if errors occur creating or deleting the temporary file This class is an enhanced version of the TmpFile class in the test directory. A future commit will delete TmpFile and modify testcases to use TemporaryFile instead. Tested: * Created automated tests for most of the code in the class. * Manually tested some error cases that were difficult to automate. Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ieda58f4d2738dc4f184232936bc082c0d3a93fa0
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", }