Motion Master 6.0.0-alpha.111
Next-generation motion control software
Loading...
Searching...
No Matches
capture.h File Reference

The platform step of the capture: every EtherCAT frame on an adapter, with the time the kernel gave it, for a bounded time. More...

#include <chrono>
#include <cstdint>
#include <expected>
#include <functional>
#include <span>
#include <string>
Include dependency graph for capture.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mm
 
namespace  mm::capture
 

Typedefs

using mm::capture::FrameSink = std::function< void(int64_t timestampNs, std::span< const uint8_t > bytes)>
 Called for every frame, with nanoseconds since the Unix epoch and the frame from the Ethernet header on. Called on the capturing thread, in time order.
 

Functions

std::expected< void, std::string > mm::capture::captureFrames (const std::string &adapter, std::chrono::milliseconds duration, const FrameSink &sink)
 Captures the EtherCAT frames that leave or enter adapter for duration.
 

Detailed Description

The platform step of the capture: every EtherCAT frame on an adapter, with the time the kernel gave it, for a bounded time.