commit | e090e3ddbf9ffff4826723419fe86ce8b74780c0 | [log] [tgz] |
---|---|---|
author | Deepak Kodihalli <dkodihal@in.ibm.com> | Sat Feb 09 06:06:23 2019 -0600 |
committer | Deepak Kodihalli <dkodihal@in.ibm.com> | Tue Feb 19 08:20:08 2019 -0600 |
tree | c368cf59d256500dc12375bee6107ded60996d06 | |
parent | 95dbfad2242db231793ea17b9057c4aa4c2763b2 [diff] |
Add README Describe code organization in the README. Change-Id: Iaa180fd5663c9f7fa0eba4778cb2ae7bc936a369 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
At a high-level, code in this repository belongs to one of the following three components.
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.
This library provides handlers for incoming PLDM request messages. It provides for a registration as well as a plug-in mechanism. The library is implemented in modern C++, and handles OpenBMC's platform specifics.
The handlers are of the form
Response handler(Request payload, size_t payloadLen)
Source files are named according to the PLDM Type, for eg base.[hpp/cpp], fru.[hpp/cpp], etc.
This is the PLDM daemon application that deals with various aspects of the requester and responder functions, as explained at https://github.com/openbmc/docs/blob/master/designs/pldm-stack.md.
Consider hosting libpldm above in a repo of its own, probably even outside the OpenBMC project? A separate repo would enable something like git submodule.