Categorygithub.com/ast-dd/socketcan
modulepackage
0.0.0-20210915084953-5cc622877910
Repository: https://github.com/ast-dd/socketcan.git
Documentation: pkg.go.dev

# README

socketcan [WIP]

socketcan provides an interface to a CAN bus to read and write frames. The library is based on the SocketCAN network stack on Linux.

Features

  • supports kernel timestamps for received frames
  • receive and parse error frames
  • CAN filters
  • interfaces:
    • simple io.ReadWriteCloser interface (via os.File)
    • more sophisticated Send and Receive methods to handle out-of-band ( oob) data like timestamps
  • no dependencies beside golang.org/x/sys/unix

# Functions

ParseCanErrors returns the CAN errors from given CAN frame.

# Structs

CanError contains the error information parsed from CAN error frames.
MultipleError implements the error interface and may contain multiple errors.