BACnetNameValue is a structure used primarily for the Tags property
(of type BACnetARRAY of BACnetNameValue) that exists on nearly every
standardized BACnet object type (ASHRAE 135-2016 Clause 12.x and Annex Y).
Each entry associates a name (CharacterString) with an optional value. When the value is absent the tag is considered a "semantic tag". To allow tag names to be concatenated, tag names shall not contain semicolon characters (ASHRAE 135-2016 Y.1.4).
Simple tag names, e.g., exhaust, are reserved for definition by ASHRAE.
Tag names defined by organizations other than ASHRAE shall use a prefix to ensure uniqueness.
This prefix shall be either:
- A reversed registered DNS name, followed by a period character. e.g.,
com.example., or - A BACnet vendor identifier in decimal, followed by a dash character. e.g.,
555-
The value, when present, is limited to any primitive BACnet datatype.
ASN.1 (ASHRAE 135-2016)
BACnetNameValue ::= SEQUENCE {
name [0] CharacterString,
value ABSTRACT-SYNTAX.&Type OPTIONAL
-- value is limited to primitive datatypes
}
Summary
Functions
Encodes a BACnetNameValue into application tags encoding.
Parses a BACnetNameValue from application tags encoding (context tagged elements).
Returns true if the NameValue struct contains a valid name and (optionally) a well-formed value of a supported type.
Types
@type t() :: %BACnet.Protocol.NameValue{ name: String.t(), value: BACnet.Protocol.ApplicationTags.Encoding.t() | nil }
A single BACnetNameValue entry.
Only primitive Encoding is allowed as value,
otherwise the value is absent (nil).
Functions
@spec encode(t(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encodes a BACnetNameValue into application tags encoding.
@spec parse(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, {t(), rest :: BACnet.Protocol.ApplicationTags.encoding_list()}} | {:error, term()}
Parses a BACnetNameValue from application tags encoding (context tagged elements).
Returns true if the NameValue struct contains a valid name and (optionally) a well-formed value of a supported type.