Encodes Dimse.Pdu structs into binary iodata for transmission.
Produces iodata (not flat binaries) to avoid unnecessary copying. The caller
can pass the result directly to :gen_tcp.send/2 which accepts iodata.
Implements the wire format defined in PS3.8 Section 9.3.
Usage
iodata = Dimse.Pdu.Encoder.encode(%Dimse.Pdu.AssociateRq{...})
:ok = :gen_tcp.send(socket, iodata)
Summary
Functions
Encodes a PDU struct into iodata.