| commit | cab9f9bb09536c1f4c213c7affe07ad9c52bb949 | [log] [tgz] |
|---|---|---|
| author | Alexander Hansen <alexander.hansen@9elements.com> | Tue Aug 19 14:34:24 2025 +0200 |
| committer | Alexander Hansen <alexander.hansen@9elements.com> | Tue Aug 26 10:07:08 2025 +0200 |
| tree | 7f88bf102f5611d5064837bbcc6dbb93bb27c730 | |
| parent | 72442dea7ac2297518f8b0a337b1b05ccccebb32 [diff] |
clang-tidy: NOLINT reserved identifiers
fix clang-tidy error in CI. Experienced this error on an unrelated code
change [1]
```
/data0/jenkins/workspace/ci-repository/openbmc/libpldm/include/libpldm/firmware_update.h:2298:8: error: declaration uses identifier 'pldm__package_header_information', which is a reserved identifier [bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,-warnings-as-errors]
2298 | struct pldm__package_header_information {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pldm_package_header_information
2299 | pldm_uuid package_header_identifier;
2300 | uint8_t package_header_format_revision;
2301 | uint8_t package_release_date_time[PLDM_TIMESTAMP104_SIZE];
2302 | uint16_t component_bitmap_bit_length;
2303 | uint8_t package_version_string_type;
2304 |
2305 | /** A field pointing to the package version string in the provided package data */
2306 | struct variable_field package_version_string;
2307 | };
2308 | /* TODO: Deprecate the other struct pldm_package_header_information, remove, drop typedef */
2309 | typedef struct pldm__package_header_information
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pldm_package_header_information
```
References:
[1] https://jenkins.openbmc.org/job/ci-repository/115058//console
Change-Id: I3e9dee5e266ee734f86039fc08dc28983d48c267
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
This is a library which deals with the encoding and decoding of PLDM messages. It should be possible to use this library by projects other than OpenBMC, and hence certain constraints apply to it:
Source files are named according to the PLDM Type, for eg base.[h/c], fru.[h/c], etc.
Given a PLDM command "foo", the library will provide the following API: For the Requester function:
encode_foo_req() - encode a foo request decode_foo_resp() - decode a response to foo
For the Responder function:
decode_foo_req() - decode a foo request encode_foo_resp() - encode a response to foo
The library also provides API to pack and unpack PLDM headers.
libpldm is configured and built using meson. Python's pip or pipx can be used to install a recent version on your machine:
pipx install meson
Once meson is installed:
meson setup build && meson compile -C build
meson test -C build
libpldmComponents of the library ABI[^1] (loosely, functions) are separated into three categories:
[^1]: "library API + compiler ABI = library ABI"
Applications depending on libpldm should aim to only use functions from the stable category. However, this may not always be possible. What to do when required functions fall into the deprecated or testing categories is discussed in CONTRIBUTING.
libpldm is maintained with the expectation that users move between successive releases when upgrading. This constraint allows the library to reintroduce types and functions of the same name in subsequent releases in the knowledge that there are no remaining users of previous definitions. While strategies are employed to avoid breaking existing APIs unnecessarily, the library is still to reach maturity, and we must allow for improvements to be made in the design.