Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(ifName string) (*Connection, error)
func (Connection) Close ¶
func (i Connection) Close() error
func (Connection) ReadRawFrame ¶
func (i Connection) ReadRawFrame() (nmea.RawFrame, error)
func (Connection) SendFrame ¶
func (i Connection) SendFrame(raw nmea.RawFrame) error
func (Connection) SetReadTimeout ¶
func (i Connection) SetReadTimeout(timeout time.Duration) error
func (Connection) SetSendTimeout ¶
func (i Connection) SetSendTimeout(timeout time.Duration) error
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func NewDevice ¶
func NewDevice(config DeviceConfig) *Device
func (*Device) Initialize ¶
func (*Device) ReadRawMessage ¶
type DeviceConfig ¶
type DeviceConfig struct { // InterfaceName is SocketCAN interface name. // Defaults to: can0 InterfaceName string // ReceiveDataTimeout is to limit amount of time reads can result no data. to timeout the connection when there is no // interaction in bus. This is different from for example serial device readTimeout which limits how much time Read // call blocks but we want to Reads block small amount of time to be able to check if context was cancelled during read // but at the same time we want to be able to detect when there are no coming from bus for excessive amount of time. // Defaults to: 5 seconds ReceiveDataTimeout time.Duration // FastPacketAssembler assembles fast-packet PGN frames to complete messages. // Optional: if not set, messages are directly created out of frames with no assembly FastPacketAssembler nmea.Assembler }
Click to show internal directories.
Click to hide internal directories.