History log of /openbmc/witherspoon-pfault-analysis/power-supply/record_manager.cpp (Results 1 – 8 of 8)
Revision Date Author Comments
# b7ed5773 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I3edadffec0ea11e0a52d9b060167e9a9a38f1972
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 2c4fbc4c 26-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

clang-format: update to latest version

Pick up latest .clang-format file from the docs repository.
Fix formatting on all files.
Minor compile fixes due to GCC10 and sdbusplus changes

clang-format: update to latest version

Pick up latest .clang-format file from the docs repository.
Fix formatting on all files.
Minor compile fixes due to GCC10 and sdbusplus changes.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie1f7a4e59b6cf015310effef50d558ff59731024

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>


# c3414388 18-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add functions to return the averages and maximums

Add functions to return the input history in a format
that can be used to write the D-Bus properties.

Change-Id: I7a395568dcdce

Add functions to return the averages and maximums

Add functions to return the input history in a format
that can be used to write the D-Bus properties.

Change-Id: I7a395568dcdce89b5f3e4b6a73d58dc84adaaa7c
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 8168d280 18-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add function to handle a new input history record

This function will take a raw input power history
record and add it to the record manager cache.

The record manager will parse

Add function to handle a new input history record

This function will take a raw input power history
record and add it to the record manager cache.

The record manager will parse the raw record, validate
its sequence ID, and place it in the front of its
internal queue. It prunes its queue if it needs to
or clears it out if the sequence ID is out of order.

Change-Id: I25eca05f30b45ae97801ff99a083cc8fd97a688a
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 28fa1b6b 18-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add functions to parse an input history record

The code will take a 5 byte raw record that comes from
the power supply and create an instance of a Record
out of it. A Record include

Add functions to parse an input history record

The code will take a 5 byte raw record that comes from
the power supply and create an instance of a Record
out of it. A Record includes the average and maximum
power values, the sequence ID, and a timestamp.

Change-Id: I9dec5fd3de2ae2c6275a1407bcec4717557ffe86
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# e710d189 18-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add function to convert from linear format

The average and maximum power values are returned from the
power supply in Watts specified in linear format. The values
must be converted

Add function to convert from linear format

The average and maximum power values are returned from the
power supply in Watts specified in linear format. The values
must be converted from linear format to be useful. The value
will be converted to an integer, keeping the units as Watts.

Linear format is a 16 bit value made up of 5 bits of exponent
followed by 11 bits of mantissa, where the value is:
X = mantissa * 2^exponent

These values are specified as two's complement, and technically
may be negative, though there isn't really a reason for a power
supply to specify negative power values. The code will support
them anyway for completeness, and to be helpful to future code
that may need to for sure.

Change-Id: I2cde529ed4355e173c8a3ecff2865f2c350ad61e
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# d7abf367 18-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add history::RecordManager class

This class will manage the records for the input power
history that has to be maintained on D-Bus. This includes
the average power and maximum power

Add history::RecordManager class

This class will manage the records for the input power
history that has to be maintained on D-Bus. This includes
the average power and maximum power over 30 second intervals.

The actual power values come from the power supply, and the
PowerSupply class will pass that data to this class every time
it is read, which is faster than the data actually changes since
it only changes every 30s. This class will only save new data
when it has changed.

If there is new data available, this class will let the caller
know that it should then ask for the D-Bus property values for
the maximum and average power values, which are each arrays with
entries made up of timestamps along with the values.

This commit just includes some base functionality. The rest will
come in future commits.

Change-Id: I1e521ba2ff7f733376b769ffa0d7053a0231d732
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...