Description of file IO messages

Read Message Format

Table 1. Read Request

OffsetTypeNameDescription
0uint8HandleThis field is a handle that is used to identify PLDM command type.
1enum8OptionThis field is a read option is used to identify the read file option.
See Table 3 for the option.
2:3uint16LengthThe length in bytes N of data being sent in this part in the ReadInfo field.
Variableuint8ReadInfoPortion of reading information.
There will be different reading information according to different ReadOption.
See Table 4 and Table 5 for details

Table 2. Read response

OffsetTypeNameDescription
0intCompletionCodevalue: { PLDM_SUCCESS, PLDM_ERROR_INVALID_DATA, PLDM_ERROR_INVALID_LENGTH }
Variableuint8ReadResponsePortion of reading response.
There will be different reading response according to different ReadOption.
See Table 6 and Table 7 for details

Table 3. Option of message type

ValueNameDescription
0x00ReadFileAttributeGet file size and checksum
0x01ReadFileDataGet file data

Table 4. ReadInfo Definition when ReadOption is ReadFileAttribute in message type

OffsetTypeNameDescription
0--No request data

Table 5. ReadInfo Definition when ReadOption is ReadFileData in message type

OffsetTypeNameDescription
0uint8TransferFlagThe transfer flag that indiates what part of the transfer this request represents.
Possible values: {Start=0x01, Middle=0x02, End=0x04, StartAndEnd=0x05}
1:2uint16OffsetOffset in read file.

Table 6. ReadResponse Definition when ReadOption is ReadFileAttribute in message type

OffsetTypeNameDescription
0:1uint16SizeThis field indicates the size of the entire file, in bytes.
2:5uint32ChecksumThis field indicates the checksum of the entire file.

Table 7. ReadResponse Definition when ReadOption is ReadFileData in message type

OffsetTypeNameDescription
0uint8TransferFlagThe transfer flag that indiates what part of the transfer this response represents.
Possible values: {Start=0x01, Middle=0x02, End=0x04, StartAndEnd=0x05}
1:2uint16OffsetOffset in read file.
Variableuint8FileDataFile data can be up to 255 bytes.