adapter

package
v0.0.0-...-38c50d4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 27 Imported by: 3

Documentation

Index

Constants

View Source
const (
	OBDLinkSX = "OBDLink SX"
	OBDLinkEX = "OBDLink EX"
	STN1170   = "STN1170"
	STN2120   = "STN2120"
)

Variables

View Source
var (
	ErrDroppedFrame = fmt.Errorf("your computer is to slow, dropped incoming frame")
)

Functions

func FindDevice

func FindDevice() bool

func FindDevices

func FindDevices() (dev []string)

func GetAdapterMap

func GetAdapterMap() map[string]*AdapterInfo

func List

func List() []string

func New

func New(adapterName string, cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewCanusb

func NewCanusb(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewCombi

func NewCombi(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewELM327

func NewELM327(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewJ2534

func NewJ2534(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewJ2534FromDLLName

func NewJ2534FromDLLName(dllPath string) func(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewJust4Trionic

func NewJust4Trionic(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewKvaser

func NewKvaser(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewOBDXProWifi

func NewOBDXProWifi(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewSLCan

func NewSLCan(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewSTN

func NewSTN(name string) func(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewSocketCAN

func NewSocketCAN(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewSocketCANFromDevName

func NewSocketCANFromDevName(dev string) func(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewTemplate

func NewTemplate(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewYACA

func NewYACA(cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func Register

func Register(adapter *AdapterInfo) error

Types

type AdapterCapabilities

type AdapterCapabilities struct {
	HSCAN bool
	SWCAN bool
	KLine bool
}

type AdapterFunc

type AdapterFunc func(*gocan.AdapterConfig) (gocan.Adapter, error)

type AdapterInfo

type AdapterInfo struct {
	Name               string
	Description        string
	Capabilities       AdapterCapabilities
	RequiresSerialPort bool
	New                AdapterFunc
}

func ListAdapters

func ListAdapters() []AdapterInfo

type Canusb

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

func (*Canusb) Close

func (cu *Canusb) Close() error

func (*Canusb) Init

func (cu *Canusb) Init(ctx context.Context) error

func (*Canusb) Name

func (cu *Canusb) Name() string

func (*Canusb) Recv

func (cu *Canusb) Recv() <-chan gocan.CANFrame

func (*Canusb) Send

func (cu *Canusb) Send() chan<- gocan.CANFrame

func (*Canusb) SetFilter

func (cu *Canusb) SetFilter(filters []uint32) error

type Combi

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

func (*Combi) Close

func (a *Combi) Close() error

func (*Combi) Init

func (a *Combi) Init(ctx context.Context) error

func (*Combi) Name

func (a *Combi) Name() string

func (*Combi) Open

func (a *Combi) Open(ctx context.Context, mode uint8) error

func (*Combi) ReadVersion

func (a *Combi) ReadVersion(ctx context.Context) (error, string)

func (*Combi) Recv

func (a *Combi) Recv() <-chan gocan.CANFrame

func (*Combi) Send

func (a *Combi) Send() chan<- gocan.CANFrame

func (*Combi) SendCmd

func (a *Combi) SendCmd(ctx context.Context, tx Packet, rx *Packet) error

func (*Combi) SetBitrate

func (a *Combi) SetBitrate(ctx context.Context) error

func (*Combi) SetFilter

func (a *Combi) SetFilter(filters []uint32) error

type ELM327

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

func (*ELM327) Close

func (stn *ELM327) Close() error

func (*ELM327) Init

func (stn *ELM327) Init(ctx context.Context) error

func (*ELM327) Name

func (stn *ELM327) Name() string

func (*ELM327) Recv

func (stn *ELM327) Recv() <-chan gocan.CANFrame

func (*ELM327) Send

func (stn *ELM327) Send() chan<- gocan.CANFrame

func (*ELM327) SetFilter

func (stn *ELM327) SetFilter(filters []uint32) error

type J2534

type J2534 struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*J2534) Close

func (ma *J2534) Close() error

func (*J2534) Init

func (ma *J2534) Init(ctx context.Context) error

func (*J2534) Name

func (ma *J2534) Name() string

func (*J2534) PrintVersions

func (ma *J2534) PrintVersions() error

func (*J2534) Recv

func (ma *J2534) Recv() <-chan gocan.CANFrame

func (*J2534) Send

func (ma *J2534) Send() chan<- gocan.CANFrame

func (*J2534) SetFilter

func (ma *J2534) SetFilter(filters []uint32) error

type Just4Trionic

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

func (*Just4Trionic) Close

func (a *Just4Trionic) Close() error

func (*Just4Trionic) Init

func (a *Just4Trionic) Init(ctx context.Context) error

func (*Just4Trionic) Name

func (a *Just4Trionic) Name() string

func (*Just4Trionic) Recv

func (a *Just4Trionic) Recv() <-chan gocan.CANFrame

func (*Just4Trionic) Send

func (a *Just4Trionic) Send() chan<- gocan.CANFrame

func (*Just4Trionic) SetFilter

func (a *Just4Trionic) SetFilter(filters []uint32) error

type Kvaser

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

func (*Kvaser) Close

func (a *Kvaser) Close() error

func (*Kvaser) Init

func (a *Kvaser) Init(ctx context.Context) error

func (*Kvaser) Name

func (a *Kvaser) Name() string

func (*Kvaser) Recv

func (a *Kvaser) Recv() <-chan gocan.CANFrame

func (*Kvaser) Send

func (a *Kvaser) Send() chan<- gocan.CANFrame

func (*Kvaser) SetFilter

func (a *Kvaser) SetFilter(filters []uint32) error

type OBDXProWifi

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

func (*OBDXProWifi) Close

func (a *OBDXProWifi) Close() error

func (*OBDXProWifi) Init

func (a *OBDXProWifi) Init(ctx context.Context) error

func (*OBDXProWifi) Name

func (a *OBDXProWifi) Name() string

func (*OBDXProWifi) Recv

func (a *OBDXProWifi) Recv() <-chan gocan.CANFrame

func (*OBDXProWifi) Send

func (a *OBDXProWifi) Send() chan<- gocan.CANFrame

func (*OBDXProWifi) SetFilter

func (a *OBDXProWifi) SetFilter(filters []uint32) error

type Packet

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

type SLCan

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

func (*SLCan) Close

func (sl *SLCan) Close() error

func (*SLCan) Init

func (sl *SLCan) Init(ctx context.Context) error

func (*SLCan) Name

func (sl *SLCan) Name() string

func (*SLCan) Recv

func (sl *SLCan) Recv() <-chan gocan.CANFrame

func (*SLCan) Send

func (sl *SLCan) Send() chan<- gocan.CANFrame

func (*SLCan) SetFilter

func (sl *SLCan) SetFilter(filters []uint32) error

type STN

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

func (*STN) Close

func (stn *STN) Close() error

func (*STN) Init

func (stn *STN) Init(ctx context.Context) error

func (*STN) Name

func (stn *STN) Name() string

func (*STN) Recv

func (stn *STN) Recv() <-chan gocan.CANFrame

func (*STN) Send

func (stn *STN) Send() chan<- gocan.CANFrame

func (*STN) SetFilter

func (stn *STN) SetFilter(filters []uint32) error

type SocketCAN

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

func (*SocketCAN) Close

func (a *SocketCAN) Close() error

func (*SocketCAN) Init

func (a *SocketCAN) Init(ctx context.Context) error

func (*SocketCAN) Name

func (a *SocketCAN) Name() string

func (*SocketCAN) Recv

func (a *SocketCAN) Recv() <-chan gocan.CANFrame

func (*SocketCAN) Send

func (a *SocketCAN) Send() chan<- gocan.CANFrame

func (*SocketCAN) SetFilter

func (a *SocketCAN) SetFilter(uint32s []uint32) error

type Template

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

func (*Template) Close

func (a *Template) Close() error

func (*Template) Init

func (a *Template) Init(ctx context.Context) error

func (*Template) Name

func (a *Template) Name() string

func (*Template) Recv

func (a *Template) Recv() <-chan gocan.CANFrame

func (*Template) Send

func (a *Template) Send() chan<- gocan.CANFrame

func (*Template) SetFilter

func (a *Template) SetFilter(filters []uint32) error

type YACA

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

func (*YACA) Close

func (ya *YACA) Close() error

func (*YACA) Init

func (ya *YACA) Init(ctx context.Context) error

func (*YACA) Name

func (ya *YACA) Name() string

func (*YACA) Recv

func (ya *YACA) Recv() <-chan gocan.CANFrame

func (*YACA) Send

func (ya *YACA) Send() chan<- gocan.CANFrame

func (*YACA) SetFilter

func (ya *YACA) SetFilter(filters []uint32) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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