| 68345d13 | 20-Dec-2025 |
Shawn McCarney <shawnmm@us.ibm.com> |
pseq: Add chassis status monitoring options
Add new JSON element to define which types of chassis status monitoring are required (if any) for the phosphor-power-sequencer application.
Update JSON c
pseq: Add chassis status monitoring options
Add new JSON element to define which types of chassis status monitoring are required (if any) for the phosphor-power-sequencer application.
Update JSON configuration file parser to support the new element. Update effected test cases.
Add the monitoring options to the Chassis class and related test cases.
Tested: * Ran automated tests
Change-Id: Id5b9b443212e901f2473c29c21bb95663cd0a5d0 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
| b0f94e07 | 12-Dec-2025 |
Shawn McCarney <shawnmm@us.ibm.com> |
Chassis status monitor class
Create a chassis status monitor class that can be used by multiple applications in this repository.
Support monitoring the following chassis properties: * Present * Ava
Chassis status monitor class
Create a chassis status monitor class that can be used by multiple applications in this repository.
Support monitoring the following chassis properties: * Present * Available * Enabled * Last requested power state * Power good (pgood) * Chassis input power status * Power supply power status
Specify which properties to monitor when creating an instance of this class.
Listen for the following D-Bus signals for these properties: * NameOwnerChanged * InterfacesAdded * PropertiesChanged
Tested: * Ran automated tests * Manually tested all methods in simulation: * Tested getting all properties when class is created * Tested getting properties in NameOwnerChanged callback * Tested getting properties in InterfacesAdded callback * Tested getting properties in PropertiesChanged callback
Change-Id: I3558b98769525cfedc44361eb6fccb2bccd74a40 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
| 8873f428 | 06-Nov-2025 |
Shawn McCarney <shawnmm@us.ibm.com> |
json_parser_utils: Add parseUint16
Add new parseUint16() function to the json_parser_utils namespace. The function parses a uint16_t value within a JSON element.
Tested: * Ran automated test cases.
json_parser_utils: Add parseUint16
Add new parseUint16() function to the json_parser_utils namespace. The function parses a uint16_t value within a JSON element.
Tested: * Ran automated test cases.
Change-Id: Id7c7c63f7a944a1910818927c3c70cb579f07dbd Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
| f1845c06 | 04-Nov-2025 |
Shawn McCarney <shawnmm@us.ibm.com> |
json_parser_utils: Add variable support
Enhance the json_parser_utils functions to support optional usage of variables in JSON values.
Variables are specified using the syntax `${variable_name}`.
json_parser_utils: Add variable support
Enhance the json_parser_utils functions to support optional usage of variables in JSON values.
Variables are specified using the syntax `${variable_name}`.
Variable values are specified in an optional new parameter to the parsing functions. Parsing functions will replace the variable with the corresponding variable value.
Example: ``` { "inventory_path": "/xyz/openbmc_project/inventory/system/chassis${chassis_number}" } ```
Tested: * Ran automated test cases.
Change-Id: Ib8f5d9b27ccc96ca9d16eb9a044321233f81ba18 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
| 38f85004 | 31-Oct-2025 |
Shawn McCarney <shawnmm@us.ibm.com> |
Create common json_parser_utils functions
Create a json_parser_utils namespace containing common functions for parsing JSON.
Extract the common functions from the JSON parsing code in the phosphor-
Create common json_parser_utils functions
Create a json_parser_utils namespace containing common functions for parsing JSON.
Extract the common functions from the JSON parsing code in the phosphor-regulators and phosphor-power-sequencer applications. Both applications have some identical parsing functions.
Create a common ConfigFileParserError class. The phosphor-regulators and phosphor-power-sequencer applications both have an identical version of this exception class.
Extract the common test cases from the two applications and put them in a common location as well.
Summary: * Common JSON parsing functions in phosphor-power-sequencer/src/config_file_parser.* and phosphor-regulators/src/config_file_parser.* moved to json_parser_utils.* * Common test cases in phosphor-power-sequencer/test/config_file_parser_tests.cpp and phosphor-regulators/test/config_file_parser_tests.cpp moved to test/json_parser_utils_tests.cpp * phosphor-power-sequencer/src/config_file_parser_error.hpp and phosphor-regulators/src/config_file_parser_error.hpp replaced with config_file_parser_error.hpp * phosphor-power-sequencer/test/config_file_parser_error_tests.cpp and phosphor-regulators/test/config_file_parser_error_tests.cpp replaced with test/config_file_parser_error_tests.cpp
Tested: * Ran automated test cases.
Change-Id: I35074c5e42d9e89def41ba8e729fe11c54ed8d27 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
| b93d6ebe | 08-Jun-2025 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy:test suppress self-move warning
This test intentionally performs a self-move assignment to observe how the FileDescriptor class handles such cases. While this is undefined behavior in C++
clang-tidy:test suppress self-move warning
This test intentionally performs a self-move assignment to observe how the FileDescriptor class handles such cases. While this is undefined behavior in C++, the warning is suppressed locally using Clang diagnostic pragmas to allow the test to compile and run.
Change-Id: I4213d23fcb41afc5d4af9c5f1b2b36f9ffb06d7c Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| 516e22fe | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: Ie0fb147f556c18eb226736dd9b688afba5636a9b Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| 3828e951 | 07-Aug-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
Move format_utils.hpp to root directory
Move format_utils.hpp to the root directory of this repository so that it serves as common code. Change the namespace to reflect the directory change. Move
Move format_utils.hpp to root directory
Move format_utils.hpp to the root directory of this repository so that it serves as common code. Change the namespace to reflect the directory change. Move automated tests to the test directory for common code.
Change-Id: Id1af4b8f6da3e3b4f86231599a19d70ca6164f12 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
| de5434d8 | 22-May-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
Create TemporarySubDirectory class
Create class that automatically creates and deletes a temporary subdirectory.
The subdirectory will be located beneath the system temporary directory (such as /tm
Create TemporarySubDirectory class
Create class that automatically creates and deletes a temporary subdirectory.
The subdirectory will be located beneath the system temporary directory (such as /tmp).
Change-Id: Id14d33b47658f144ad17c6741ec36f58492a88e2 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
| 5f51444d | 04-Jan-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
Move TemporaryFile class to root directory
Source code that is shared across applications is located in the root directory of the phosphor-power repository.
The TemporaryFile class was originally c
Move TemporaryFile class to root directory
Source code that is shared across applications is located in the root directory of the phosphor-power repository.
The TemporaryFile class was originally created for the phosphor-regulators application. However it is general purpose and is now needed by the phosphor-power-sequencer application.
Move the TemporaryFile class to the root directory. Update C++ files that use the TemporaryFile class since it is now in a different namespace. Update affected meson.build files.
Change-Id: I6d18080d2436a5da87b7ab51ac003c503caa36a3 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
| 5c6a693e | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I37fcb391dcb215a86a60c26f7512f6ccb8312dc4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 81e554c8 | 31-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
tests: adjust self-copy tests
There are a couple tests which attempt to copy an object onto itself via a `std::move`. GCC 13 catches this as a "move onto self" and flags it as an error. Rather tha
tests: adjust self-copy tests
There are a couple tests which attempt to copy an object onto itself via a `std::move`. GCC 13 catches this as a "move onto self" and flags it as an error. Rather than use the `std::move`, perform a static_cast into an r-value reference so that the same copy-constructor is called as if the std::move were successfully used.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I097889578492b1a3ab456e8cb21a668aa0855be4
show more ...
|
| 9462e066 | 15-Sep-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
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
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
show more ...
|
| dc8e9312 | 14-Feb-2020 |
Brandon Wyman <bjwyman@gmail.com> |
Add OE-SDK option to Meson
Add option to enable oe-sdk which will setup linker arguments to allow for building and running tests with the x86 SDK.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> C
Add OE-SDK option to Meson
Add option to enable oe-sdk which will setup linker arguments to allow for building and running tests with the x86 SDK.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I8279b7d862e29235d2d4eae39405cc35a51b762f
show more ...
|
| ab093328 | 09-Oct-2019 |
Lei YU <mine260309@gmail.com> |
Refactor: rename namespace witherspoon to phosphor
This repo now becomes phosphor-power, rename namespace witherspoon to phosphor to make it generic.
Signed-off-by: Lei YU <mine260309@gmail.com> Ch
Refactor: rename namespace witherspoon to phosphor
This repo now becomes phosphor-power, rename namespace witherspoon to phosphor to make it generic.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: Icb9f8a7c33065add99f2bf42ed55745a28fa0424
show more ...
|
| b3853e2d | 03-Sep-2019 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
build: drop autotools
With previously added support for building with meson/ninja autotools support is no longer required.
Change-Id: I80654ada9d099a57447ded73da71f39293cd2f0a Signed-off-by: Brad B
build: drop autotools
With previously added support for building with meson/ninja autotools support is no longer required.
Change-Id: I80654ada9d099a57447ded73da71f39293cd2f0a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
| 39b370a5 | 02-Sep-2019 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
build: add support for building with meson
Follow the OpenBMC herd and support a more modern, more comprehensible, more performant build framework.
To build using meson: meson build ninja -C bu
build: add support for building with meson
Follow the OpenBMC herd and support a more modern, more comprehensible, more performant build framework.
To build using meson: meson build ninja -C build ninja -C build install
Maintained support for: Configurable dbus parameters: INPUT_HISTORY_BUSNAME_ROOT= -> -Dinput-history-busname-root= INPUT_HISTORY_SENSOR_ROOT = -> -Dinput-history-sensor-root= UCD90160 support: UCD90160_DEF_YAML_FILE= -> -Ducd90160-yaml= --enable-turn-off-ucd90160-access = -> -Ducd90160-access=
Added -Dtests to match de-facto OpenBMC meson usage conventions.
Dropped UCD90160_DEF_OUTPUT_DIR. Much like the destination of intermediate artifacts like object files are not configurable, the location of the generated UCD definition file should not be configurable either.
Dropped support for --enable-oe-sdk rpath munging. This was a workaround for broken oe sdks that don't figure out the correct rpath when running make check or ninja test.
Tested by building with both meson and autotools and then compared build artifacts from each build system: generated source code is the same generated binaries have the same symbols
Ran existing unit tests (which passed) using ninja test.
Change-Id: Iac80ba1fe5c2d01abe0e0a95e0bec03b8b828ef5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
| f0f02b9a | 25-Oct-2018 |
Matt Spinler <spinler@us.ibm.com> |
Start using .clang-format
Used the one from docs/style/cpp.
Change-Id: I3bdc2b353bf18a437266b362d8205b8463a9ce2b Signed-off-by: Matt Spinler <spinler@us.ibm.com> |
| 2f135445 | 18-Sep-2017 |
Matt Spinler <spinler@us.ibm.com> |
Add testcases for NamesValues
Change-Id: I61c52f2a196a32dbd4d03a2ccafa2b94414f7555 Signed-off-by: Matt Spinler <spinler@us.ibm.com> |