Accumulator for receiving multi-section / multi-segment files during IEC 60870-5-101/104
file transfers (CS101_IFileReceiver in cs101_file_service.h).
Summary
Functions
Appends a received segment to section nos (1-based section number).
Returns the ordered list of section binaries.
Reconstructs the complete file binary in section order (1..N).
Types
@type t() :: %IEC60870.FileService.Receiver{ ca: non_neg_integer(), data: binary(), expected_length: non_neg_integer(), ioa: non_neg_integer(), name: String.t() | nil, nof: non_neg_integer(), on_finished: (t(), :ok | {:error, term()} -> any()) | nil, sections: %{optional(pos_integer()) => binary()} }
Functions
@spec new( non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer(), keyword() ) :: t()
@spec put_segment(t(), pos_integer(), non_neg_integer(), binary()) :: t()
Appends a received segment to section nos (1-based section number).
Returns the ordered list of section binaries.
Reconstructs the complete file binary in section order (1..N).