DIMSE message assembly from P-DATA-TF fragments.
A DIMSE message consists of a command set (always one P-DATA fragment with the command flag set) followed by zero or one data sets (one or more P-DATA fragments with the command flag cleared). Messages may span multiple P-DATA-TF PDUs when the data exceeds the negotiated max PDU length.
Fragment Assembly Rules (PS3.7 Section 6.3.1)
- A command set is carried in PDVs with
is_command: true - The last command fragment has
is_last: true - If
CommandDataSetType != 0x0101, a data set follows - Data set fragments have
is_command: false - The last data fragment has
is_last: true - All fragments for a message use the same presentation context ID
Summary
Functions
Fragments a DIMSE message into P-DATA-TF PDUs respecting max PDU length.
Types
@type t() :: %Dimse.Message{ command: map() | nil, context_id: pos_integer() | nil, data: binary() | nil }
Functions
@spec fragment(map(), binary() | nil, pos_integer(), pos_integer()) :: [ Dimse.Pdu.PDataTf.t() ]
Fragments a DIMSE message into P-DATA-TF PDUs respecting max PDU length.
Returns a list of Dimse.Pdu.PDataTf structs ready for encoding.