BACnet.Protocol.Services.Ack.AtomicWriteFileAck (bacstack v0.1.0-dev.1)

Copy Markdown View Source

The Atomic Write File Acknowledgment is the response to a successful Atomic Write File service request.

It returns the file position (in octets for stream access, or record count for record access) at which the next write should begin if the client wishes to continue writing the file in subsequent requests. This allows clients to reliably resume or append to files even after partial writes.

Summary

Types

t()

The response to an Atomic Write File request, indicating the new file position.

Types

t()

@type t() :: %BACnet.Protocol.Services.Ack.AtomicWriteFileAck{
  start_position: integer(),
  stream_access: boolean()
}

The response to an Atomic Write File request, indicating the new file position.

Functions

from_apdu(ack)

@spec from_apdu(BACnet.Protocol.APDU.ComplexACK.t()) :: {:ok, t()} | {:error, term()}

Converts a received BACnet.Protocol.APDU.ComplexACK APDU into a struct.

to_apdu(ack, invoke_id \\ 0)

@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.AtomicWriteFileAck struct.