1# Flows 2 3This section documents important code flow paths. 4 5## BMC as PLDM responder 6 7a) PLDM daemon receives PLDM request message from underlying transport (MCTP). 8 9b) PLDM daemon routes message to message handler, based on the PLDM command. 10 11c) Message handler decodes request payload into various field(s) of the request 12message. It can make use of a decode_foo_req() API, and doesn't have to perform 13deserialization of the request payload by itself. 14 15d) Message handler works with the request field(s) and generates response 16field(s). 17 18e) Message handler prepares a response message. It can make use of an 19encode_foo_resp() API, and doesn't have to perform the serialization of the 20response field(s) by itself. 21 22f) The PLDM daemon sends the response message prepared at step e) to the remote 23PLDM device. 24 25## BMC as PLDM requester 26 27a) A BMC PLDM requester app prepares a PLDM request message. There would be 28several requester apps (based on functionality/PLDM remote device). Each of them 29needn't bother with the serialization of request field(s), and can instead make 30use of an encode_foo_req() API. 31 32b) BMC requester app requests PLDM daemon to send the request message to remote 33PLDM device. 34 35c) Once the PLDM daemon receives a corresponding response message, it notifies 36the requester app. 37 38d) The requester app has to work with the response field(s). It can make use of 39a decode_foo_resp() API to deserialize the response message. 40