class BACnet::NPDU

Defined in:

bacnet/npdu.cr

Constant Summary

ENDIAN = ["big"]
KLASS_NAME = [BACnet::NPDU]
PARTS = [{type: "basic", name: version, cls: UInt8, onlyif: nil, verify: nil, value: -> do 1_u8 end, endian: nil}, {type: "bitfield", name: 1, cls: BACnet::NPDU, onlyif: nil, verify: nil}, {type: "group", name: destination, cls: Destination, onlyif: -> do destination_specifier end, verify: nil, value: nil}, {type: "group", name: source, cls: Source, onlyif: -> do source_specifier end, verify: nil, value: nil}, {type: "basic", name: hop_count, cls: UInt8, onlyif: -> do destination_specifier end, verify: nil, value: nil, endian: nil}, {type: "basic", name: network_message_type, cls: UInt8, onlyif: -> do network_layer_message end, verify: nil, value: nil, endian: nil}, {type: "basic", name: vendor_id, cls: UInt16, onlyif: -> do network_layer_message && (network_message_type >= 128_u8) end, verify: nil, value: nil, endian: nil}] of Nil
REMAINING = [] of Nil

Class Method Summary

Macro Summary

Instance Method Summary

Class Method Detail

def self.bit_fields #

[View source]

Macro Detail

macro ba_cnet_apdu_indicator(name, onlyif = nil, verify = nil, value = nil) #

[View source]
macro ba_cnet_npdu(name, onlyif = nil, verify = nil, value = nil) #

[View source]

Instance Method Detail

def __format__ : IO::ByteFormat #

[View source]
def assign_mac(group, address : String) #

[View source]
def broadcast!(send_to : BroadcastType = BroadcastType::Global) #

[View source]
def destination : BACnet::NPDU::Destination #

def destination=(destination : BACnet::NPDU::Destination) #

def destination_address #

[View source]
def destination_address=(address : String | Bytes | Nil) #

[View source]
def destination_broadcast? #

[View source]
def destination_specifier : Bool #

Contains a destination address


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

Contains a destination address


def destination_specifier=(value : Bool) #

Contains a destination address


[View source]
def expecting_reply : Bool #

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

def expecting_reply=(value : Bool) #

[View source]
def expecting_reply? #

[View source]
def hop_count : UInt8 #

def hop_count=(hop_count : UInt8) #

def network_layer_message : Bool #

true == network layer message, message type field is present


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

true == network layer message, message type field is present


def network_layer_message=(value : Bool) #

true == network layer message, message type field is present


[View source]
def network_message_type : UInt8 #

def network_message_type=(network_message_type : UInt8) #

def priority : BACnet::Priority #

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

def priority=(value : BACnet::Priority) #

[View source]
def read_mac(group) #

[View source]
def reserved_1 : UInt8 #

def reserved_1=(reserved_1 : UInt8) #

def reserved_2 : UInt8 #

def reserved_2=(reserved_2 : UInt8) #

def source : BACnet::NPDU::Source #

def source=(source : BACnet::NPDU::Source) #

def source_address #

[View source]
def source_address=(address : String | Bytes | Nil) #

[View source]
def source_specifier : Bool #

Contains a source address


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

Contains a source address


def source_specifier=(value : Bool) #

Contains a source address


[View source]
def vendor_id : UInt16 #

def vendor_id=(vendor_id : UInt16) #

def version : UInt8 #

NPCI


def version=(version : UInt8) #

NPCI