The Atomic Read File Acknowledgment is the response to a successful Atomic Read File service request.
It can return either stream-based data (a contiguous block of octets from a
file starting at a given position) or record-based data (a sequence of
individual records). The stream_access flag and the presence of
record_count distinguish between the two access methods.
The acknowledgment also indicates whether the end of the file has been
reached (eof). This service is the basic building block for reading files
stored in BACnet File objects.
Summary
Types
The response to an Atomic Read File request, containing the read data and end-of-file flag.
Functions
Converts a received BACnet.Protocol.APDU.ComplexACK APDU into a struct.
Constructs a BACnet.Protocol.APDU.ComplexACK APDU from a
BACnet.Protocol.Services.Ack.AtomicReadFileAck struct.
Types
@type t() :: %BACnet.Protocol.Services.Ack.AtomicReadFileAck{ data: (stream_based :: binary()) | (record_based :: [binary()]), eof: boolean(), record_count: non_neg_integer() | nil, start_position: integer(), stream_access: boolean() }
The response to an Atomic Read File request, containing the read data and end-of-file flag.
If stream_access is nil, then record access is used and record_count is not nil.
Functions
@spec from_apdu(BACnet.Protocol.APDU.ComplexACK.t()) :: {:ok, t()} | {:error, term()}
Converts a received BACnet.Protocol.APDU.ComplexACK APDU into a struct.
@spec to_apdu(t(), 0..255) :: {:ok, BACnet.Protocol.APDU.ComplexACK.t()} | {:error, term()}
Constructs a BACnet.Protocol.APDU.ComplexACK APDU from a
BACnet.Protocol.Services.Ack.AtomicReadFileAck struct.
Used by a server when responding to an Atomic Read File request.