MIP_SDK
latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
|
Go to the documentation of this file.
24 static constexpr
const char*
TYPE =
"Recording";
29 bool sendToDevice(
const uint8_t* data,
size_t length)
override;
84 template<
typename ConnectionType>
101 template<
class... Args>
103 RecordingConnection(new ConnectionType(std::forward<Args>(args)...), recvStream, sendStream)
RecordingConnectionWrapper(std::ostream *recvStream, std::ostream *sendStream, Args &&... args)
Creates a RecordingConnectionWrapper that will write received bytes to recvStream,...
Definition: recording_connection.hpp:102
uint64_t mRecvFileWritten
Definition: recording_connection.hpp:75
uint64_t sendFileBytesWritten() const
Definition: recording_connection.hpp:63
virtual const char * interfaceName() const =0
~RecordingConnectionWrapper() override
Deconstructs the RecordingConnectionWrapper as well as the underlying connection object made in the c...
Definition: recording_connection.hpp:107
virtual uint32_t parameter() const =0
bool connect() override
Definition: recording_connection.hpp:40
RecordingConnection(Connection *connection, std::ostream *recvStream=nullptr, std::ostream *sendStream=nullptr)
Creates a RecordingConnection that will write received bytes to recvStream, and sent bytes to sendStr...
Definition: recording_connection.cpp:20
Template wrapper for a recording connection.
Definition: recording_connection.hpp:85
bool sendToDevice(const uint8_t *data, size_t length) override
Sends bytes to the device.
Definition: recording_connection.cpp:27
bool recvFromDevice(uint8_t *buffer, size_t max_length, unsigned int wait_time_ms, size_t *length_out, EmbeddedTimestamp *timestamp_out) override
Receives bytes from the device.
Definition: recording_connection.cpp:41
Can be used with another connection to communicate with a device, and record the data at the same tim...
Definition: recording_connection.hpp:21
uint64_t recvFileBytesWritten() const
Definition: recording_connection.hpp:58
const char * interfaceName() const override
Definition: recording_connection.hpp:55
C::microstrain_embedded_timestamp EmbeddedTimestamp
Definition: embedded_time.hpp:9
virtual bool disconnect()=0
bool disconnect() override
Definition: recording_connection.hpp:47
bool isConnected() const override
Definition: recording_connection.hpp:32
uint32_t parameter() const override
Definition: recording_connection.hpp:56
virtual bool isConnected() const =0
Represents a type of connection.
Definition: connection.hpp:24
Connection * mConnection
Definition: recording_connection.hpp:69
std::ostream * mRecvFile
Definition: recording_connection.hpp:72
uint64_t mSendFileWritten
Definition: recording_connection.hpp:76
std::ostream * mSendFile
Definition: recording_connection.hpp:73
static constexpr const char * TYPE
Definition: recording_connection.hpp:24
Definition: embedded_time.h:8
~RecordingConnection() override=default