MIP_SDK
v3.0.0
MicroStrain Communications Library for embedded systems
|
Go to the documentation of this file.
3 #include "../connection.hpp"
24 static constexpr
auto TYPE =
"Recording";
29 bool sendToDevice(
const uint8_t* data,
size_t length)
override;
82 template<
typename ConnectionType>
91 template<
class... Args>
RecordingConnectionWrapper(std::ostream *recvStream, std::ostream *sendStream, Args &&... args)
Creates a RecordingConnectionWrapper that will write received bytes to recvStream,...
Definition: recording_connection.hpp:92
uint64_t mRecvFileWritten
Definition: recording_connection.hpp:73
uint64_t sendFileBytesWritten() const
Definition: recording_connection.hpp:61
~RecordingConnection()=default
virtual const char * interfaceName() const =0
virtual uint32_t parameter() const =0
static constexpr auto TYPE
Definition: recording_connection.hpp:24
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:15
Template wrapper for a recording connection.
Definition: recording_connection.hpp:83
bool sendToDevice(const uint8_t *data, size_t length) override
Sends bytes to the device.
Definition: recording_connection.cpp:22
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:36
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:56
~RecordingConnectionWrapper()
Deconstructs the RecordingConnectionWrapper as well as the underlying connection object made in the c...
Definition: recording_connection.hpp:95
const char * interfaceName() const override
Definition: recording_connection.hpp:53
C::microstrain_embedded_timestamp EmbeddedTimestamp
Definition: embedded_time.hpp:9
virtual bool disconnect()=0
bool disconnect() override
Definition: recording_connection.hpp:46
bool isConnected() const override
Definition: recording_connection.hpp:32
uint32_t parameter() const override
Definition: recording_connection.hpp:54
virtual bool isConnected() const =0
Represents a type of connection.
Definition: connection.hpp:25
Connection * mConnection
Definition: recording_connection.hpp:67
std::ostream * mRecvFile
Definition: recording_connection.hpp:70
uint64_t mSendFileWritten
Definition: recording_connection.hpp:74
std::ostream * mSendFile
Definition: recording_connection.hpp:71
Definition: embedded_time.h:8