nvflare.fuel.f3.cellnet.utils module¶
- encode_payload(message: Message, encoding_key='cn__payload_encoding') int[source]¶
Encode the payload of the specified message.
- Parameters:
message – the message to be encoded
encoding_key – the key name of the encoding property in the message header. If the encoding property is not
header (set in the message)
is (then it means that the message payload has not been encoded. If the property)
set (already)
encoded (then the message payload is already)
done. (and no processing is)
needed (If encoding is)
payload (we will determine the encoding scheme based on the data type of the)
None (- If the payload is)
NONE (encoding scheme is)
bytes (- If the payload data type is like)
BYTES (encoding scheme is)
Otherwise (-)
FOBS (encoding scheme is)
FOBS. (and the payload is serialized with)
Returns: the encoded payload size.