pub struct Tag {
pub number: u8,
pub class: TagClass,
pub length: u32,
pub is_opening: bool,
pub is_closing: bool,
}Expand description
A decoded BACnet tag header.
Fields§
§number: u8Tag number: datatype for application tags, field index for context tags.
class: TagClassTag class (application or context).
length: u32Content length in bytes. For application booleans, this holds the raw L/V/T value (0 = false, nonzero = true) with no content octets.
is_opening: boolWhether this is a context-specific opening tag (L/V/T = 6).
is_closing: boolWhether this is a context-specific closing tag (L/V/T = 7).
Implementations§
Source§impl Tag
impl Tag
Sourcepub fn is_boolean_true(&self) -> bool
pub fn is_boolean_true(&self) -> bool
Check if this is an application boolean tag with value true.
Per Clause 20.2.3, application-tagged booleans encode the value in the tag’s L/V/T field with no content octets.
Sourcepub fn is_context(&self, number: u8) -> bool
pub fn is_context(&self, number: u8) -> bool
Check if this is a context tag matching the given number (not opening/closing).
Sourcepub fn is_opening_tag(&self, number: u8) -> bool
pub fn is_opening_tag(&self, number: u8) -> bool
Check if this is an opening tag matching the given number.
Sourcepub fn is_closing_tag(&self, number: u8) -> bool
pub fn is_closing_tag(&self, number: u8) -> bool
Check if this is a closing tag matching the given number.