README.md: Fix MD014 warnings

The following warnings are generated by using markdownlint analysis:
```
MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ ./phosphor-led-manager --con..."]
```
Refer to markdown-lint [1] to fix MD014
[1]: https://github.com/updownpress/markdown-lint/blob/master/rules/014-commands-show-output.md

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: If8a9428dfc69b788fe780651ac8ab275a188ee9b
1 file changed
tree: c3b72000406d5e89620319be5901b4830ae6b37b
  1. configs/
  2. example/
  3. fault-monitor/
  4. manager/
  5. scripts/
  6. subprojects/
  7. test/
  8. .clang-format
  9. .gitignore
  10. .linter-ignore
  11. .shellcheck
  12. led.yaml
  13. LICENSE
  14. meson.build
  15. meson.options
  16. OWNERS
  17. pyproject.toml
  18. README.md
  19. utils.cpp
  20. utils.hpp
README.md

phosphor-led-manager

This project manages LED groups on dbus. Sometimes many LEDs must be driven together to indicate some system state.

For example, there can be multiple identify LEDs. When the user wants to identify the system, they should all light up together.

Configuration

The configuration can happen via json or yaml.

Configuration Example (JSON)

This is our configuration file. It describes 2 LEDs for the 'enclosure_identify' group, with their respective states and duty cycles.

{
  "leds": [
    {
      "group": "enclosure_identify",
      "members": [
        {
          "Name": "pca955x_front_sys_id0",
          "Action": "On",
          "DutyOn": 50,
          "Period": 0,
          "Priority": "Blink"
        },
        {
          "Name": "led_rear_enc_id0",
          "Action": "On",
          "DutyOn": 50,
          "Period": 0,
          "Priority": "Blink"
        }
      ]
    }
  ]
}

Then start the program with

~# ./phosphor-led-manager --config example.json

Dbus interface

When starting the program, our LED group shows up on dbus. Usually there will be many more groups.

$ busctl tree xyz.openbmc_project.LED.GroupManager
`- /xyz
  `- /xyz/openbmc_project
    `- /xyz/openbmc_project/led
      `- /xyz/openbmc_project/led/groups
        `- /xyz/openbmc_project/led/groups/enclosure_identify


$ busctl introspect xyz.openbmc_project.LED.GroupManager /xyz/openbmc_project/led/groups/enclosure_identify
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Led.Group       interface -         -            -
.Asserted                           property  b         false        emits-change writable

In the above output, the usual org.freedesktop.* interfaces have been removed to keep it readable.

We can now drive the entire group by setting it's 'Asserted' property on dbus.

$ busctl set-property \
xyz.openbmc_project.LED.GroupManager \
/xyz/openbmc_project/led/groups/enclosure_identify \
xyz.openbmc_project.Led.Group Asserted b true

The program can then use the xyz.openbmc_project.Led.Physical dbus interface exposed by phosphor-led-sysfs to set each LED state.

How to Build

meson setup build
cd build
ninja