class

BACnet::Object

Inherits BinData < Reference < Object

Constants

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 methods

bit_fields
Source

Instance methods

__format__

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.

Source
closing?
Source
context_specific
Source
context_specific=(context_specific : UInt8)
context_specific=(value : Bool)
Source
data
data=(data : Bytes)
ext_tag
ext_tag=(ext_tag : UInt8)
inspect(io : IO) : Nil

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>
Source
is_null?
Source
length
Source
length=(size : Int)
Source
objects
Source
opening?
Source
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

Source
set_value(value, context_specific : Bool = false, tag : Int | Nil = nil)
Source
short_tag
short_tag=(short_tag : UInt8)
tag=(value : Int)
Source
to_bit_string
Source
to_bool
Source
to_date
Source
to_encoded_string
Source
to_f32
Source
to_f64
Source
to_i
Source
to_i16
Source
to_i32
Source
to_i64
Source
to_i8
Source
to_object_id
Source
to_property_id
Source
to_s(io)
Source
to_string
Source
to_time
Source
to_u16
Source
to_u32
Source
to_u64
Source
to_u8
Source
uint16_length
uint16_length=(uint16_length : UInt16)
uint32_length
uint32_length=(uint32_length : UInt32)
uint3_length

if context specific then the length will be set to 6

uint3_length=(uint3_length : UInt8)

if context specific then the length will be set to 6

uint8_length
uint8_length=(uint8_length : UInt8)
value

ameba:disable Metrics/CyclomaticComplexity

Source
value=(var)

ameba:disable Metrics/CyclomaticComplexity

Source