class BACnet::Object

Defined in:

bacnet/object.cr

Constant Summary

AFTER_DESERIALIZE = [] of Nil
BEFORE_SERIALIZE = [] of Nil
ENDIAN = ["big"]
KLASS_NAME = [BACnet::Object]
PARTS = [{type: "bitfield", name: 3, cls: BACnet::Object, onlyif: nil, verify: nil, endian: IO::ByteFormat::BigEndian}, {type: "basic", name: ext_tag, cls: UInt8, onlyif: -> do short_tag == 15_u8 end, verify: nil, value: nil, endian: nil}, {type: "basic", name: uint8_length, cls: UInt8, onlyif: -> do uint3_length == 5_u8 end, verify: nil, value: nil, endian: nil}, {type: "basic", name: uint16_length, cls: UInt16, onlyif: -> do (uint3_length == 5_u8) && (uint8_length == 254_u8) end, verify: nil, value: nil, endian: nil}, {type: "basic", name: uint32_length, cls: UInt32, onlyif: -> do (uint3_length == 5_u8) && (uint8_length == 255_u8) end, verify: nil, value: nil, endian: nil}, {type: "bytes", name: data, cls: Slice(UInt8), onlyif: nil, verify: nil, length: -> do length end, value: nil}] of Nil
REMAINING = [] of Nil
STRING_ENCODING = {0_u8 => "UTF-8", 1_u8 => "UTF-16BE", 2_u8 => "EUC-JISX0213", 3_u8 => "UCS-4BE", 4_u8 => "UCS-2BE", 5_u8 => "ISO8859-1"}

Class Method Summary

Instance Method Summary

Class Method Detail

def self.bit_fields #

[View source]

Instance Method Detail

def __format__ : IO::ByteFormat #

A group or bit_field captures the endianness at its declaration point, so declaring endian after one would silently leave it system-endian. Fail loudly.


[View source]
def closing? #

[View source]
def context_specific : Bool #

[View source]
def context_specific=(context_specific : UInt8) #

def context_specific=(value : Bool) #

[View source]
def data : Bytes #

def data=(data : Bytes) #

def ext_tag : UInt8 #

def ext_tag=(ext_tag : UInt8) #

def inspect(io : IO) : Nil #
Description copied from class Reference

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>

[View source]
def is_null? #

[View source]
def length #

[View source]
def length=(size : Int) #

[View source]
def objects : Array(Object | Objects) #

[View source]
def opening? #

[View source]
def set_character_string(value : String, encoding : UInt8 = 0_u8) #

a character string is the string data prefixed with its encoding, see STRING_ENCODING. NOTE:: #set_value with a string builds an octet string


[View source]
def set_value(value, context_specific : Bool = false, tag : Int | Nil = nil) #

[View source]
def short_tag : UInt8 #

def short_tag=(short_tag : UInt8) #

def tag #

[View source]
def tag=(value : Int) #

[View source]
def to_bit_string #

[View source]
def to_bool #

[View source]
def to_date #

[View source]
def to_encoded_string #

[View source]
def to_f32 #

[View source]
def to_f64 #

[View source]
def to_i #

[View source]
def to_i16 #

[View source]
def to_i32 #

[View source]
def to_i64 #

[View source]
def to_i8 #

[View source]
def to_object_id #

[View source]
def to_property_id #

[View source]
def to_s(io) #

[View source]
def to_string #

[View source]
def to_time #

[View source]
def to_u16 #

[View source]
def to_u32 #

[View source]
def to_u64 #

[View source]
def to_u8 #

[View source]
def uint16_length : UInt16 #

def uint16_length=(uint16_length : UInt16) #

def uint32_length : UInt32 #

def uint32_length=(uint32_length : UInt32) #

def uint3_length : UInt8 #

if context specific then the length will be set to 6


def uint3_length=(uint3_length : UInt8) #

if context specific then the length will be set to 6


def uint8_length : UInt8 #

def uint8_length=(uint8_length : UInt8) #

def value #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def value=(var) #

ameba:disable Metrics/CyclomaticComplexity


[View source]