Property Value packages a property reference (identifier + optional array
index) together with the value to be written (or that was read). It is the
basic payload element inside WritePropertyMultiple, ReadPropertyMultiple
results, and several action / event parameter structures.
The optional priority field is only meaningful when the target property is
commandable. If omitted on a write, the device uses the default priority
defined for that object type (usually 8 for many objects).
BACnet Specification References
- Used heavily in
WritePropertyMultiple-Request(15.10) and the corresponding ACK / error structures. - Also appears inside
BACnet.Protocol.ActionCommand,BACnet.Protocol.NotificationParameters,BACnet.Protocol.EventParameters, etc. - The
property_valuefield is typed asABSTRACT-SYNTAX.&Typein the ASN.1, which in this library is represented asApplicationTags.Encoding.t().
Examples (Doc Test)
iex> pv = %PropertyValue{
...> property_identifier: :present_value,
...> property_array_index: nil,
...> property_value: {:real, 42.5},
...> priority: 8
...> }
iex> pv.priority
8See Also
BACnet.Protocol.ActionCommandBACnet.Protocol.ApplicationTags.EncodingBACnet.Protocol.WritePropertyMultiple
Summary
Types
(property id + optional array index + value + optional priority) tuple used in WritePropertyMultiple and several action/event structures.
Functions
Encodes a BACnet property value into application tags encoding.
Encode a list of property values into application tag-encoded property values.
Parse application tag-encoded property value into a struct.
Parse application tag-encoded property values into a list of structs.
Validates whether the given property value is in form valid.
Types
@type t() :: %BACnet.Protocol.PropertyValue{ priority: 1..16 | nil, 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()] }
(property id + optional array index + value + optional priority) tuple used in WritePropertyMultiple and several action/event structures.
Functions
@spec encode(t(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encodes a BACnet property value into application tags encoding.
@spec encode_all([t()], Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encode a list of property values into application tag-encoded property values.
@spec parse(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, {t(), rest :: BACnet.Protocol.ApplicationTags.encoding_list()}} | {:error, term()}
Parse application tag-encoded property value into a struct.
@spec parse_all(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, [t()]} | {:error, term()}
Parse application tag-encoded property values into a list of structs.
Validates whether the given property value is in form valid.
It only validates the struct is valid as per type specification.