Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NK2_KEEPALIVE = []byte("HI") NK2_CONNECT_REQ = []byte{0x50, 0x48, 0x4f, 0x45, 0x4e, 0x49, 0x58, 0x2d, 0x44, 0x42, 0x20, 0x4e, 0x0a} NK2_CONNECT_RESP = []byte{0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x0a} NK2_HEADER = []byte{0x4e, 0x4b, 0x32} NK_STATUS_RESP = []byte{0x05, 0x0B} NK_MULTI_STATUS_REQ = []byte{0x50, 0x41, 0x53, 0x32, 0x00, 0x11, 0x4e, 0x4b, 0x32, 0x00, 0xfe, 0x02, 0x08, 0x00, 0x00, 0x00, 0x47, 0xff, 0xff, 0xff, 0xff, 0xc7, 0x08} NK_MULTI_STATUS_RESP = []byte{0x03, 0xe1} )
Functions ¶
This section is empty.
Types ¶
type CrosspointRequest ¶
type CrosspointRequest struct {
Source uint16
Destination uint16
Level Level
Address TBusAddress
}
func (*CrosspointRequest) Packet ¶
func (xpt *CrosspointRequest) Packet() ([]byte, error)
GenerateXPTRequest Just returns payload to send to router to close xpt
type Destination ¶
type Destination = uint16
type RouteUpdate ¶
type StatusUpdate ¶
type TBusAddress ¶
type TBusAddress = uint8
type TBusGateway ¶
A IPS is an implementation of the protocol interface with the NK Routing system via an NK-NET or NK-IPS
func NewGateway ¶
func NewGateway(ip net.IP, log zerolog.Logger, onRouteUpdate func(RouteUpdate), onStatusUpdate func(StatusUpdate)) *TBusGateway
func (*TBusGateway) Disconnect ¶
func (tbus *TBusGateway) Disconnect()
func (*TBusGateway) Route ¶
func (tbus *TBusGateway) Route(address TBusAddress, level Level, destination uint16, source uint16) error
Click to show internal directories.
Click to hide internal directories.