Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDriver ¶
func RegisterDriver(drv Driver)
Types ¶
type Device ¶
type Device interface { Read([]Msg) (n int, err error) // Writes a message into the driver transmit buffer. // The ownership of the message will not be taken. WriteMsg(*Msg) error // As an alternative to WriteMsg, Write can be used // if more than one message should be handed over // to the driver at once (if the driver is able to do that). Write([]Msg) (n int, err error) ID() string Name() Name Version() Version Close() error }
The Device interface gives access to a CAN Device. Read and Write calls will block if no messages are available to be read or if the transmit buffer of the driver is full.
type Flags ¶
type Flags int
Message Flags.
func (Flags) ExtFrame ¶
Reports whether the message contains an 29 bit wide, extended indentifier, or a standard 11 bit wide identifier.
type Msg ¶
type Msg struct { Id uint32 // The CAN message identifier Flags Len int Data [8]byte Tx struct { Delayµs int // The driver shall delay this message. } Rx struct { Time Time // Timestamp } }
Definition of a CAN Message.
type Termination ¶
type Termination bool
type Unversioned ¶
type Unversioned struct{}
func (Unversioned) Name ¶
func (Unversioned) Name() Name
func (Unversioned) Version ¶
func (Unversioned) Version() Version
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
A helper package for the various CAN driver interface packages.
|
A helper package for the various CAN driver interface packages. |
all
Convenience package that registers all known drivers.
|
Convenience package that registers all known drivers. |
canrpc
Package canrpc implements net/rpc client and server objects.
|
Package canrpc implements net/rpc client and server objects. |
socketcan
Module
|
|
Click to show internal directories.
Click to hide internal directories.