gotelem/can/frame.go
2023-04-15 15:41:51 -05:00

28 lines
445 B
Go

package can
type Frame struct {
ID uint32
Data []uint8
Kind Kind
}
//go:generate stringer -output=frame_kind.go -type Kind
type Kind uint8
const (
SFF Kind = iota // Standard Frame Format
EFF // Extended Frame
RTR // remote transmission requests
ERR // Error frame.
)
// for routing flexibility
type CanSink interface {
Send(Frame) error
}
type CanSource interface {
Recv() (*Frame, error)
}