History log of /openbmc/phosphor-led-manager/manager/json-parser.hpp (Results 1 – 16 of 16)
Revision Date Author Comments
# 405ea286 22-Aug-2024 George Liu <liuxiwei@ieisystem.com>

clang-tidy: Enable readability-const-return-type check

Checks for functions with a const-qualified return type and
recommends removal of the const keyword. Such use of const is usually
superfluous,

clang-tidy: Enable readability-const-return-type check

Checks for functions with a const-qualified return type and
recommends removal of the const keyword. Such use of const is usually
superfluous, and can prevent valuable compiler optimizations. Does
not (yet) fix trailing return types.

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: Ifff7541c95d7881d8c6407b20c906ec7eb13abf1

show more ...


# c0f7a8b4 23-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

manager: include config-validator.hpp always

There was an issue with

phosphor::led::validateConfigV1(systemLedMap);

being not included when using meson option

use-json

as false (yaml config), si

manager: include config-validator.hpp always

There was an issue with

phosphor::led::validateConfigV1(systemLedMap);

being not included when using meson option

use-json

as false (yaml config), since it was transitively included
by manager/json-parser.hpp

Directly including it should fix the issue.

Change-Id: I056cd524ff255e4409844f74bd7755ab5ee857d6
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 638d1487 21-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

config: error on invalid configuration

Since the default led priority is no longer 'Blink', the priority now
has to be explicitly defined when using either group priority or led
priority.

If a conf

config: error on invalid configuration

Since the default led priority is no longer 'Blink', the priority now
has to be explicitly defined when using either group priority or led
priority.

If a configuration does not define the priority, the configuration is
invalid and in the yaml case, phosphor-led-manager should fail to build,
in the json case, the process should exit due to the configuration
error.

The config validation has been extracted into it's own file and made
separate from json config parsing.

So every config will go through the same validation even if its been
created via yaml.

Change-Id: Ifda65942b0768d6c0d3b25076f7a1236b46b3d9f
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 4d44a55e 24-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

config: allow led priority to be Off

This makes the configuration more flexible and eliminates the edge case.

I don't see why this should not be possible.

Change-Id: I28e33535539b3214e18d781631465

config: allow led priority to be Off

This makes the configuration more flexible and eliminates the edge case.

I don't see why this should not be possible.

Change-Id: I28e33535539b3214e18d7816314656df5d3c370e
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 55badf79 24-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

manager: led priority is optional

The default priority was "Blink" but now the priority is optional.

This helps to implement group priority.
So if someone wants to use group priority they can do so

manager: led priority is optional

The default priority was "Blink" but now the priority is optional.

This helps to implement group priority.
So if someone wants to use group priority they can do so, without the
default led priority getting in the way.

The led priority can still be assigned as "Blink" explicitly if needed.

Change-Id: I9336487bcc2edc0b3308ee76eb5330b8222b7f25
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 7ba70c82 23-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

config: implement group priority

Enable group priority.

Change-Id: I1777906e60d07420835ede904785071ee308c307
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>


# d0f80506 23-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

manager: refactor loadJsonConfigV1 function

Extract 2 functions to have a 1:1 mapping between the json object being
parsed and the function doing the parsing.

This will also enable testing these fu

manager: refactor loadJsonConfigV1 function

Extract 2 functions to have a 1:1 mapping between the json object being
parsed and the function doing the parsing.

This will also enable testing these functions individually and allow for
easy expansion of the config parser.

Change-Id: I0475c582aeac11538ec2d81c86fcf3819d9a220d
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 5d92f423 18-Jul-2023 George Liu <liuxiwei@inspur.com>

Remove declared ledGroups variables from json-parser.hpp

Since not all companies use ledManager to enable `use-json` by
default, the declaration of ledGroups should not be defined in
the json-parser

Remove declared ledGroups variables from json-parser.hpp

Since not all companies use ledManager to enable `use-json` by
default, the declaration of ledGroups should not be defined in
the json-parser.hpp file.
Here we use hard-coded way to declare ledGroups.

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

show more ...


# 25255212 17-Jul-2023 George Liu <liuxiwei@inspur.com>

Remove declared DBus variables from meson

For defined DBus variables (eg: DBus name, DBus object path),
we prefer to define them in the code rather than in the meson file

Signed-off-by: George Liu

Remove declared DBus variables from meson

For defined DBus variables (eg: DBus name, DBus object path),
we prefer to define them in the code rather than in the meson file

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

show more ...


# 65bf3d94 07-Jun-2022 George Liu <liuxiwei@inspur.com>

Update clang-format

remove empty lines

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


# 158b2c14 17-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

led-layout: use common types everywhere

Rather than scattered map and set typedefs, centralize the two common
structures into 'ledlayout.hpp': ActionSet, GroupMap. Use them
everywhere where previou

led-layout: use common types everywhere

Rather than scattered map and set typedefs, centralize the two common
structures into 'ledlayout.hpp': ActionSet, GroupMap. Use them
everywhere where previous raw maps and sets were used.

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

show more ...


# f2044037 17-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

switch map to unordered_map

Generally, unordered_maps should be preferred over map because they have
faster access times (O(1)) and tend to allocate less dynamic memory. We
do not rely on ordered i

switch map to unordered_map

Generally, unordered_maps should be preferred over map because they have
faster access times (O(1)) and tend to allocate less dynamic memory. We
do not rely on ordered iteration in any current use of maps, so it is
safe to do a full replace.

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

show more ...


# ed80e885 17-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

action: use PDI type

Rather than define our own enumeration for the LED Actions,
reuse the one from Led.Physical's dbus interface.

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

action: use PDI type

Rather than define our own enumeration for the LED Actions,
reuse the one from Led.Physical's dbus interface.

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

show more ...


# 73ff9ad6 16-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

json: enable JSON schema versioning

In a future commit I'm going to introduce a new JSON schema
("version 2"), so set the ground-work for that here. There are
capabilities that are unable to be exp

json: enable JSON schema versioning

In a future commit I'm going to introduce a new JSON schema
("version 2"), so set the ground-work for that here. There are
capabilities that are unable to be expressed in the current format, such
as prioritization of two groups both have Blink settings but at
different rates, but we want to retain backwards compatibility to any
existing configs.

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

show more ...


# 7217c035 16-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

led-manager: add CLI11 option and config loading

To facilitate localized testing of JSON config loading, add an option
that allows the configuration to be directly passed, rather than try to
determi

led-manager: add CLI11 option and config loading

To facilitate localized testing of JSON config loading, add an option
that allows the configuration to be directly passed, rather than try to
determine it from entity-manager config off dbus.

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

show more ...


# 953315d2 16-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

manager: move code to subdirectory

The root has become pretty cluttered. Move code for the primary
manager application to a subdirectory.

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

manager: move code to subdirectory

The root has become pretty cluttered. Move code for the primary
manager application to a subdirectory.

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

show more ...