connector

package
v0.1.97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FrameToBytes

func FrameToBytes(frm can.Frame) []byte

Types

type CanBusConnector

type CanBusConnector struct {
	// contains filtered or unexported fields
}

func NewCanBusConnector

func NewCanBusConnector(c *config.ConnectorConfig) (*CanBusConnector, error)

func (*CanBusConnector) Publish

func (r *CanBusConnector) Publish(publisher *nanomsg.Publisher[message.Raw])

func (*CanBusConnector) Subscribe

func (*CanBusConnector) Subscribe(subscriber *nanomsg.Subscriber[message.Raw])

type Connector

type Connector[T nanomsg.Message] interface {
	Publish(publisher *nanomsg.Publisher[T])
	Subscribe(subscriber *nanomsg.Subscriber[T])
}

Connector interface

type HttpConnector

type HttpConnector struct {
	// contains filtered or unexported fields
}

func (*HttpConnector) Publish

func (r *HttpConnector) Publish(publisher *nanomsg.Publisher[message.Raw])

func (*HttpConnector) Subscribe

func (*HttpConnector) Subscribe(subscriber *nanomsg.Subscriber[message.Raw])

type LineConnector

type LineConnector struct {
	// contains filtered or unexported fields
}

LineConnector reads lines from the connection and sends it on the mangos socket

func NewLineConnector

func NewLineConnector(c *config.ConnectorConfig) (*LineConnector, error)

func (*LineConnector) Publish

func (r *LineConnector) Publish(publisher *nanomsg.Publisher[message.Raw])

func (*LineConnector) Subscribe

func (r *LineConnector) Subscribe(subscriber *nanomsg.Subscriber[message.Raw])

type ModbusConnector

type ModbusConnector struct {
	// contains filtered or unexported fields
}

func (*ModbusConnector) Publish

func (m *ModbusConnector) Publish(publisher *nanomsg.Publisher[message.Raw])

func (*ModbusConnector) Subscribe

func (m *ModbusConnector) Subscribe(subscriber *nanomsg.Subscriber[message.Raw])

type UdpListenerConnection

type UdpListenerConnection struct {
	// contains filtered or unexported fields
}

UdpListenerConnection implements the io.ReadWriter interface

func (UdpListenerConnection) Read

func (u UdpListenerConnection) Read(p []byte) (n int, err error)

func (UdpListenerConnection) Write

func (u UdpListenerConnection) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL