canframe

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

View Source
const FRAME_MAX_DATA_LEN = 8
View Source
const LINUX_FRAME_LEN = 16

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	// ID is the CAN ID
	ID uint32 `json:"id,omitempty"`
	// payload data.
	Data []byte `json:"data,omitempty"`
	// Whether a extended frame or not.
	IsExtended bool `json:"is_extended,omitempty"`
	// Whether a remote frame or not.
	IsRemote bool `json:"is_remote,omitempty"`
	// Whether a error frame or not.
	IsError bool `json:"is_error,omitempty"`
}

func (*Frame) Marshal

func (f *Frame) Marshal() ([]byte, error)

func (*Frame) Unmarshal

func (f *Frame) Unmarshal(bs []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL