gotelem/can/frame.go

28 lines
445 B
Go
Raw Normal View History

2023-04-15 15:03:35 +00:00
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 {
2023-04-15 20:41:51 +00:00
Recv() (*Frame, error)
2023-04-15 15:03:35 +00:00
}