socketcan

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: BSD-3-Clause Imports: 6 Imported by: 1

README

golang-socketcan

fork from https://github.com/atuleu/golang-socketcan

Documentation

Index

Constants

View Source
const (
	CAN_EFF_MASK uint32 = unix.CAN_EFF_MASK
	CAN_SFF_MASK uint32 = unix.CAN_SFF_MASK
	CAN_RTR_FLAG uint32 = unix.CAN_RTR_FLAG
	CAN_EFF_FLAG uint32 = unix.CAN_EFF_FLAG
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CanFrame

type CanFrame struct {
	ID       uint32
	Dlc      byte
	Data     []byte
	Extended bool
	RTR      bool
}

type RawInterface

type RawInterface struct {
	// contains filtered or unexported fields
}

func NewCanItf

func NewCanItf(ifName string) (*RawInterface, error)

func (*RawInterface) AddfilterPass

func (itf *RawInterface) AddfilterPass(recv_ids []uint, len uint) error

func (*RawInterface) Close

func (itf *RawInterface) Close() error

func (*RawInterface) Receive

func (itf *RawInterface) Receive() (CanFrame, error)

func (*RawInterface) Send

func (itf *RawInterface) Send(f CanFrame) error

Jump to

Keyboard shortcuts

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