History log of /openbmc/phosphor-power/power-supply/record_manager.hpp (Results 1 – 13 of 13)
Revision Date Author Comments
# 48781aef 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: If66f68c96df4baf8dc07abf8729a3cb7657e932d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 86433ae8 28-Feb-2023 George Liu <liuxiwei@inspur.com>

power-supply: Fix warning by cppcheck

style: Class 'RecordManager' has a constructor with 1 argument that
is not explicit. [noExplicitConstructor]
RecordManager(size_t maxRec):RecordManager(maxRec,

power-supply: Fix warning by cppcheck

style: Class 'RecordManager' has a constructor with 1 argument that
is not explicit. [noExplicitConstructor]
RecordManager(size_t maxRec):RecordManager(maxRec, LAST_SEQUENCE_ID)
^

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I794f90968beb5ead2fb9612eb5a02284bcbfa659

show more ...


# 0c9a33d6 13-Sep-2021 Adriana Kobylak <anoo@us.ibm.com>

clang updates

The openbmc CI was recently updated to clang-12 which requires some
formatting updates to the code:
https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be048242690

clang updates

The openbmc CI was recently updated to clang-12 which requires some
formatting updates to the code:
https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be0482426908bb5497fad08

Make those updates and refresh the clang-format file with the one from
docs:
https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format

Change-Id: Ieb3626526373a053ec84431e7560003f229f338d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 01779a6a 16-May-2020 Andrew Geissler <geissonator@yahoo.com>

include needed file for runtime_error

Upstream yocto appears to have removed a free include that provided the
def of the std::runtime_error. This causes compile failures when
bringing in the new yoc

include needed file for runtime_error

Upstream yocto appears to have removed a free include that provided the
def of the std::runtime_error. This causes compile failures when
bringing in the new yocto.

Change-Id: I0d38ee2426999f6807b1d8f1f968bc3adb158dfe
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# c60b9751 16-May-2020 Andrew Geissler <geissonator@yahoo.com>

include needed file for 64 bit defs

Upstream yocto appears to have removed a free include that provided the
def of the int64_t/uint64_t typedefs. This causes compile failures when
bringing in the ne

include needed file for 64 bit defs

Upstream yocto appears to have removed a free include that provided the
def of the int64_t/uint64_t typedefs. This causes compile failures when
bringing in the new yocto.

Change-Id: I0407ee4fc0f20ceb85a1502a45bcd735b8a5dc14
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

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 ...


# 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>


# cab48342 13-Jun-2018 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: I8af78

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: I8af789c1e0fef9938baced40315b525199636601
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 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: I7a395568dcdce89b5f3e4b6a73d58dc84

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 the raw record, vali

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 includes the average an

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 from linear form

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 over 30 second

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 ...