An Access Specification (also called Read Access Specification or Write Access Specification depending on context) describes a set of properties belonging to a single object that should be read or written together.
It consists of an Object Identifier plus a list of Property references. Each
property reference can name a specific property (with optional array index),
or use one of the special values :all, :required, or :optional
when reading. These special values instruct the server to return (or accept) all properties,
only the required properties for that object type, or only the optional ones.
Access Specifications are the fundamental building block of the Read Property Multiple and Write Property Multiple services. They allow a client to request or modify many properties across many objects in a single message while still grouping the properties logically by their owning object. This dramatically reduces the number of individual service requests needed for bulk configuration or polling.
Summary
Types
Specifies an object and a list of properties (or special keywords) for Read/Write Property Multiple.
Functions
Encodes a BACnet Read/Write Access Specification into BACnet application tags encoding.
Parses a BACnet Read/Write Access Specification from BACnet application tags encoding.
Validates whether the given access specification is in form valid.
Types
@type t() :: %BACnet.Protocol.AccessSpecification{ object_identifier: BACnet.Protocol.ObjectIdentifier.t(), properties: [ BACnet.Protocol.AccessSpecification.Property.t() | :all | :required | :optional ] }
Specifies an object and a list of properties (or special keywords) for Read/Write Property Multiple.
Functions
@spec encode(t(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encodes a BACnet Read/Write Access Specification into BACnet application tags encoding.
@spec parse(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, {t(), rest :: BACnet.Protocol.ApplicationTags.encoding_list()}} | {:error, term()}
Parses a BACnet Read/Write Access Specification from BACnet application tags encoding.
Validates whether the given access specification is in form valid.
It only validates the struct is valid as per type specification.
Be aware, this function does not know whether it is a read or write access specification, thus it can't verify if the special property identifiers (atoms) are as per BACnet specification. Only read supports the special property identifiers.