23#ifndef PROTOCORE_BUS_CAPTURE_H
24#define PROTOCORE_BUS_CAPTURE_H
28#if PC_ENABLE_BUS_CAPTURE
36#define PC_SOCKETCAN_FRAME_LEN 16
39#define PC_CAN_EFF_FLAG 0x80000000u
40#define PC_CAN_RTR_FLAG 0x40000000u
41#define PC_CAN_ERR_FLAG 0x20000000u
50size_t can_to_socketcan(
const CanFrame *f, uint8_t *out,
size_t cap);
53typedef void (*bus_capture_sink_fn)(
const CanFrame *frame);
64bool bus_capture_begin(
int tx_pin,
int rx_pin, uint32_t bitrate, bus_capture_sink_fn sink);
67void bus_capture_poll(
void);
70void bus_capture_end(
void);
Shared CAN 2.0 frame type for the CAN-based industrial codecs (one source of truth).
libpcap file framing - the classic global + per-record headers, link-type agnostic.
User-facing configuration for ProtoCore.