adapter

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 34 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrDroppedFrame = fmt.Errorf("incoming buffer full")
)

Functions

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 NewGRPCClient

func NewGRPCClient() (*grpc.ClientConn, proto.GocanClient, error)

func NewJust4Trionic

func NewJust4Trionic(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(name string, cfg *gocan.AdapterConfig) (gocan.Adapter, error)

func NewTxbridge

func NewTxbridge(name string) func(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 AdapterInfo

type AdapterInfo struct {
	Name               string
	Description        string
	Capabilities       AdapterCapabilities
	RequiresSerialPort bool
	New                func(*gocan.AdapterConfig) (gocan.Adapter, error)
}

func ListAdapters

func ListAdapters() []AdapterInfo

type BaseAdapter

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

func NewBaseAdapter

func NewBaseAdapter(name string, cfg *gocan.AdapterConfig) BaseAdapter

func (*BaseAdapter) Close

func (base *BaseAdapter) Close()

func (*BaseAdapter) Err

func (base *BaseAdapter) Err() <-chan error

func (*BaseAdapter) Name

func (base *BaseAdapter) Name() string

func (*BaseAdapter) Recv

func (base *BaseAdapter) Recv() <-chan gocan.CANFrame

func (*BaseAdapter) Send

func (base *BaseAdapter) Send() chan<- gocan.CANFrame

func (*BaseAdapter) SetError

func (base *BaseAdapter) SetError(err error)

type Canusb

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

func (*Canusb) Close

func (cu *Canusb) Close() error

func (*Canusb) Connect

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

func (*Canusb) SetFilter

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

type Client

type Client struct {
	BaseAdapter
	// contains filtered or unexported fields
}

func NewClient

func NewClient(adapterName string, cfg *gocan.AdapterConfig) (*Client, error)

func (*Client) Close

func (c *Client) Close() (err error)

func (*Client) Connect

func (c *Client) Connect(gctx context.Context) error

func (*Client) SetFilter

func (c *Client) SetFilter([]uint32) error

type Just4Trionic

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

func (*Just4Trionic) Close

func (a *Just4Trionic) Close() error

func (*Just4Trionic) Connect

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

func (*Just4Trionic) SetFilter

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

type OBDXProWifi

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

func (*OBDXProWifi) Close

func (a *OBDXProWifi) Close() error

func (*OBDXProWifi) Connect

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

func (*OBDXProWifi) SetFilter

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

type SLCan

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

func (*SLCan) Close

func (sl *SLCan) Close() error

func (*SLCan) Connect

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

func (*SLCan) SetFilter

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

type STN

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

func (*STN) Close

func (stn *STN) Close() error

func (*STN) Connect

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

func (*STN) SetFilter

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

type SocketCAN

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

func (*SocketCAN) Close

func (a *SocketCAN) Close() error

func (*SocketCAN) Connect

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

func (*SocketCAN) SetFilter

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

type Template

type Template struct {
	BaseAdapter
}

func (*Template) Close

func (a *Template) Close() error

func (*Template) Connect

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

func (*Template) SetFilter

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

type Txbridge

type Txbridge struct {
	BaseAdapter
	// contains filtered or unexported fields
}

func (*Txbridge) Close

func (tx *Txbridge) Close() error

func (*Txbridge) Connect

func (tx *Txbridge) Connect(ctx context.Context) error

func (*Txbridge) SetFilter

func (tx *Txbridge) SetFilter(filters []uint32) error

type YACA

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

func (*YACA) Close

func (ya *YACA) Close() error

func (*YACA) Connect

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

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