Documentation
¶
Overview ¶
Package can provide utils to connect to a can bus using hardware adapters system
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct { // Transport represent the "logical" communication layer // which can be socketcan on linux, a serial adapater, or your custom transport Transport Transport }
Bus is the main interface to interact with the Transport
type Frame ¶
type Frame struct { // ArbitrationID is the frame identifier ArbitrationID uint32 // DLC represent the size of the data field DLC uint8 // Data is the data to transmit in the frame Data [8]byte }
Frame represent a can frame
type Transport ¶
type Transport interface { // Open a connection Open() error // Close a connection Close() error // Write a frame to connection Write(*Frame) error // ReadChan return the channel for reading frames ReadChan() chan *Frame }
Transport interface can be socketcan, an serial adapter, custom implementation, etc
Directories
¶
Path | Synopsis |
---|---|
examples
|
|
usbcananalyzer
command
|
|
Package transports contain code to load a bus interface from different hardware
|
Package transports contain code to load a bus interface from different hardware |
Click to show internal directories.
Click to hide internal directories.