BACnet.Protocol.Services.AtomicReadFile (bacstack v0.1.0)

View Source

This module represents the BACnet Atomic Read File service.

The Atomic Read File service is used to atomically read from a file on a device.

Service Description (ASHRAE 135):

The AtomicReadFile Service is used by a client BACnet-user to perform an open-read-close operation on the contents of the specified file. The file may be accessed as records or as a stream of octets.

Summary

Functions

Whether the service is of type confirmed or unconfirmed.

Converts the given Confirmed Service Request into an Atomic Read File Service.

Get the service name atom.

Get the Confirmed Service request for the given Atomic Read File Service.

Types

t()

@type t() :: %BACnet.Protocol.Services.AtomicReadFile{
  object_identifier: BACnet.Protocol.ObjectIdentifier.t(),
  requested_count: non_neg_integer(),
  start_position: integer(),
  stream_access: boolean()
}

Functions

confirmed?()

@spec confirmed?() :: true

Whether the service is of type confirmed or unconfirmed.

from_apdu(request)

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

Converts the given Confirmed Service Request into an Atomic Read File Service.

get_name()

@spec get_name() :: atom()

Get the service name atom.

to_apdu(service, request_data)

@spec to_apdu(t(), Keyword.t()) ::
  {:ok, BACnet.Protocol.APDU.ConfirmedServiceRequest.t()} | {:error, term()}

Get the Confirmed Service request for the given Atomic Read File Service.

See the BACnet.Protocol.Services.Protocol function documentation for more information.