pub fn encode_request(
txn_id: u16,
req: &ClientRequest,
transport_type: TransportType,
) -> Result<Vec<u8, MAX_ADU_FRAME_LEN>, MbusError>Expand description
Encodes a ClientRequest into a complete ADU frame using the given txn_id.
For serial-only function codes (FC 07 / 08 / 0B / 0C / 11) the txn_id is
passed through but the serial ADU format does not include it on the wire.