Documentation ¶
Index ¶
- Constants
- Variables
- func FindDevice() bool
- 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 NewCombi(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewELM327(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewJ2534(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewJ2534FromDLLName(dllPath string) func(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewJust4Trionic(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewKvaser(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(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewTxbridge(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func NewYACA(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
- func Register(adapter *AdapterInfo) error
- type AdapterCapabilities
- type AdapterFunc
- type AdapterInfo
- type Canusb
- type Combi
- func (a *Combi) Close() error
- func (a *Combi) Init(ctx context.Context) error
- func (a *Combi) Name() string
- func (a *Combi) Open(ctx context.Context, mode uint8) error
- func (a *Combi) ReadVersion(ctx context.Context) (error, string)
- func (a *Combi) Recv() <-chan gocan.CANFrame
- func (a *Combi) Send() chan<- gocan.CANFrame
- func (a *Combi) SendCmd(ctx context.Context, tx Packet, rx *Packet) error
- func (a *Combi) SetBitrate(ctx context.Context) error
- func (a *Combi) SetFilter(filters []uint32) error
- type ELM327
- type J2534
- type Just4Trionic
- type Kvaser
- type OBDXProWifi
- type Packet
- type SLCan
- type STN
- type SocketCAN
- type Template
- type Txbridge
- type YACA
Constants ¶
View Source
const ( SystemMsg uint32 = 0x80000000 + iota SystemMsgError SystemMsgDebug SystemMsgWBLReading SystemMsgDataResponse SystemMsgDataRequest SystemMsgWriteResponse )
We have 3 bits allowing 8 different system messages hidden in a 29bit can id stored in a uint32
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 FindDevice ¶
func FindDevice() bool
func FindDevices ¶
func FindDevices() (dev []string)
func GetAdapterMap ¶
func GetAdapterMap() map[string]*AdapterInfo
func NewJ2534FromDLLName ¶
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 NewTemplate(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
func NewTxbridge ¶
func NewTxbridge(cfg *gocan.AdapterConfig) (gocan.Adapter, error)
func Register ¶
func Register(adapter *AdapterInfo) error
Types ¶
type AdapterCapabilities ¶
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 J2534 ¶
func (*J2534) PrintVersions ¶
type Just4Trionic ¶
type Just4Trionic struct {
// contains filtered or unexported fields
}
func (*Just4Trionic) Close ¶
func (a *Just4Trionic) Close() 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 OBDXProWifi ¶
type OBDXProWifi struct {
// contains filtered or unexported fields
}
func (*OBDXProWifi) Close ¶
func (a *OBDXProWifi) Close() 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.