Skip to main content

encode_write_ack

Function encode_write_ack 

Source
pub fn encode_write_ack(request: &ModbusRequest) -> Vec<u8> ⓘ
Expand description

PDU acknowledging a write.

FC 5 and 6 echo the request verbatim; FC 15 and 16 echo the starting address and the quantity written. Reconstructed from the parsed request rather than copied from the input bytes, so a malformed echo cannot be produced.