Skip to content

TimeCanFrame

#include <mrx/can/TimeCanFrame.hpp>
struct mrx::can::TimeCanFrame

Stores a complete CAN frame with its capture time and SocketCAN interface name.

The value preserves the complete Qt frame, including frame flags and payload length. Each constructor records the current wall-clock time in milliseconds when the capture value is created.

ReturnNameDescription
qint64timestampMillisecond timestamp captured when the frame wrapper was created.
QCanBusFrameframeComplete Qt frame, including its flags and payload.
QStringinterfaceNameName of the SocketCAN interface that produced the frame.

qint64 timestamp = 0

Millisecond timestamp captured when the frame wrapper was created.

The value is generated using QDateTime::currentMSecsSinceEpoch().


QCanBusFrame frame

Complete Qt frame, including its flags and payload.


QString interfaceName

Name of the SocketCAN interface that produced the frame.

ReturnNameDescription
TimeCanFrameConstructs an empty frame wrapper with a freshly captured timestamp.
TimeCanFrameConstructs a capture value from a complete Qt frame and interface name.

TimeCanFrame()

Constructs an empty frame wrapper with a freshly captured timestamp.


TimeCanFrame(const QCanBusFrame& _frame, const QString& _interfaceName)

Constructs a capture value from a complete Qt frame and interface name.

NameTypeDescription
_frameconst QCanBusFrame&Complete Qt CAN frame to store.
_interfaceNameconst QString&SocketCAN interface that produced the frame.