Documentation
¶
Index ¶
- Constants
- Variables
- func FindDevices() (dev []string)
- func GetAdapterMap() map[string]*AdapterInfo
- func List() []string
- func New(adapterName string, cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewCanusb(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewELM327(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewGRPCClient() (*grpc.ClientConn, proto.GocanClient, error)
- func NewJust4Trionic(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewOBDXProWifi(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewSLCan(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewSTN(name string) func(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewSocketCAN(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewSocketCANFromDevName(dev string) func(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewTemplate(name string, cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewTxbridge(name string) func(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewYACA(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func Register(adapter *AdapterInfo) error
- type AdapterCapabilities
- type AdapterInfo
- type BaseAdapter
- type Canusb
- type Client
- type ELM327
- type Just4Trionic
- type OBDXProWifi
- type SLCan
- type STN
- type SocketCAN
- type Template
- type Txbridge
- type UnboundedChan
- type YACA
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 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 NewSocketCAN ¶
func NewSocketCAN(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
func NewSocketCANFromDevName ¶
func NewTemplate ¶
func NewTxbridge ¶
func Register ¶
func Register(adapter *AdapterInfo) error
Types ¶
type AdapterCapabilities ¶
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 }
type Client ¶
type Client struct { BaseAdapter // contains filtered or unexported fields }
type ELM327 ¶
type ELM327 struct { BaseAdapter // contains filtered or unexported fields }
type Just4Trionic ¶
type Just4Trionic struct { BaseAdapter // contains filtered or unexported fields }
func (*Just4Trionic) Close ¶
func (a *Just4Trionic) Close() 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) SetFilter ¶
func (a *OBDXProWifi) SetFilter(filters []uint32) error
type SLCan ¶
type SLCan struct { BaseAdapter // contains filtered or unexported fields }
type STN ¶
type STN struct { BaseAdapter // contains filtered or unexported fields }
type SocketCAN ¶
type SocketCAN struct { BaseAdapter // contains filtered or unexported fields }
type Template ¶
type Template struct {
BaseAdapter
}
type Txbridge ¶
type Txbridge struct { BaseAdapter // contains filtered or unexported fields }
type UnboundedChan ¶
type UnboundedChan[T any] struct { // contains filtered or unexported fields }
UnboundedChan is a channel with an unbounded buffer for caching Func objects. A channel must be closed via Close method.
func NewUnboundedChan ¶
func NewUnboundedChan[T any]() *UnboundedChan[T]
NewUnboundedChan returns a unbounded channel with unlimited capacity.
func (*UnboundedChan[T]) In ¶
func (ch *UnboundedChan[T]) In() chan<- T
In returns the send channel of the given channel, which can be used to send values to the channel.
func (*UnboundedChan[T]) Out ¶
func (ch *UnboundedChan[T]) Out() <-chan T
Out returns the receive channel of the given channel, which can be used to receive values from the channel.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.