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

Copy Markdown View Source

The Read Property Acknowledgment is the successful response returned when a client issues a Read Property service request.

It carries the object identifier of the object that was read, the specific property identifier (which may be a standard named property or a vendor extension), an optional array index when the property is an array element, and the actual value of the property encoded using BACnet application tags.

This acknowledgment is one of the most frequently exchanged messages in a typical BACnet system. Because Read Property is a confirmed service, the server must return either this acknowledgment or an Error APDU.

Summary

Types

t()

The successful response to a Read Property request, containing the property value.

Types

t()

@type t() :: %BACnet.Protocol.Services.Ack.ReadPropertyAck{
  object_identifier: BACnet.Protocol.ObjectIdentifier.t(),
  property_array_index: non_neg_integer() | nil,
  property_identifier:
    BACnet.Protocol.Constants.property_identifier() | non_neg_integer(),
  property_value:
    BACnet.Protocol.ApplicationTags.Encoding.t()
    | [BACnet.Protocol.ApplicationTags.Encoding.t()]
}

The successful response to a Read Property request, containing the property value.

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.ReadPropertyAck struct.

This is used by a server when responding to a Read Property service request. The invoke_id must match the invoke ID from the original request.