std::expected< void, std::string > captureFrames(const std::string &adapter, std::chrono::milliseconds duration, const FrameSink &sink)
Captures the EtherCAT frames that leave or enter adapter for duration.
Definition capture_linux.cc:32
std::function< void(int64_t timestampNs, std::span< const uint8_t > bytes)> FrameSink
Called for every frame, with nanoseconds since the Unix epoch and the frame from the Ethernet header ...
Definition capture.h:18