class KNX::TunnelClient

Defined in:

knx/tunnel_client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(control : Socket::IPAddress, timeout : Time::Span = 3.seconds, max_retries : Int32 = 5, knx : KNX = ::KNX.new(broadcast: false, no_repeat: true)) #

[View source]

Instance Method Detail

def action(address : String, data, **options) #

[View source]
def channel_id : UInt8 #

[View source]
def connect : Nil #

establish comms


[View source]
def connected? : Bool #

[View source]
def control : Socket::IPAddress #

[View source]
def disconnect : Nil #

perform a graceful disconnect


[View source]
def max_retries : Int32 #

[View source]
def max_retries=(max_retries : Int32) #

[View source]
def on_message(&on_message : KNX::CEMI -> ) #

a cEMI frame has been sent from the interface


[View source]
def on_state_change(&on_state_change : Bool, KNX::ConnectionError -> ) #

connected or disconnected state changed


[View source]
def on_transmit(&on_transmit : Bytes -> ) #

send some data to the remote


[View source]
def process(raw_data : Bytes) #

process incoming data


[View source]
def process(packet : KNX::ConnectResponse) #

A new connection has been established


[View source]
def process(packet : KNX::DisconnectRequest) #

[View source]
def process(packet : KNX::ConnectStateRequest) #

[View source]
def process(packet : KNX::DisconnectResponse) #

[View source]
def process(packet : KNX::ConnectStateResponse) #

[View source]
def process(packet : KNX::TunnelRequest) #

[View source]
def process(packet : KNX::TunnelResponse) #

[View source]
def query_state : Nil #

keep alive


[View source]
def queue_size #

[View source]
def request(message : KNX::CEMI) #

perform an action / query


[View source]
def retransmit : Nil #

[View source]
def sequence : UInt8 #

[View source]
def shutdown! : Nil #

perform a hard and fast disconnect, instance is not re-usable


[View source]
def status(address : String, **options) #

[View source]
def timeout : Time::Span #

[View source]
def timeout=(timeout : Time::Span) #

[View source]
def waiting? : Bool #

[View source]