RNS::KISSInterface
Inherits RNS::Interface < Reference < Object
KISS TNC interface for serial port communication. Ports RNS/Interfaces/KISSInterface.py using POSIX termios + KISS framing.
Constants
BITRATE_GUESS = 1200_i64
DEFAULT_IFAC_SIZE = 8
MAX_CHUNK = 32768
PARITY_EVEN = :even
PARITY_NONE = :none
PARITY_ODD = :odd
Constructors
new(configuration : Hash(String, String), inbound_callback : Proc(Bytes, Interface, Nil) | Nil = nil)
Config hash constructor (normal usage)
new(name : String, port : String, speed : Int32 = 9600, databits : Int32 = 8, parity_str : String = "N", stopbits : Int32 = 1, open_port : Bool = true, preamble : Int32 = 350, txtail : Int32 = 20, persistence : Int32 = 64, slottime : Int32 = 20, flow_control : Bool = false, beacon_interval : Int32 | Nil = nil, beacon_data : String = "", inbound_callback : Proc(Bytes, Interface, Nil) | Nil = nil)
Explicit params constructor (for testing without opening port)
Class methods
Instance methods
beacon_data
Sourceclose_port
Sourceconfigure_device
Sourcedatabits
Sourcedo_open_port
Sourcefirst_tx
Sourceflow_control_locked
Sourceflow_control_timeout
Sourceinterface_ready
Sourcepacket_queue
Sourceparity
Sourcepersistence
Sourceport
Sourceport_open?
Sourceprocess_outgoing(data : Bytes)
Send data out through the interface. Subclasses must implement this.
process_queue
Sourcereconnect_port
Sourcerunning?
Sourceshould_ingress_limit?
Determine when an interface should activate ingress limiting. Subclasses may override for different behavior.
slottime
Sourcespeed
Sourcestopbits
Sourceteardown
Tear down the interface, releasing any resources (sockets, fibers, etc.). Subclasses should override to close their specific resources.
timeout
Sourceto_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
txtail
Source