Can be used with another connection to communicate with a device, and record the data at the same time.  
 More...
#include <recording_connection.hpp>
|  | 
|  | 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 sendStream.  More... 
 | 
|  | 
|  | ~RecordingConnection () override=default | 
|  | 
| bool | sendToDevice (const uint8_t *data, size_t length) override | 
|  | Sends bytes to the device.  More... 
 | 
|  | 
| 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.  More... 
 | 
|  | 
| bool | isConnected () const override | 
|  | 
| bool | connect () override | 
|  | 
| bool | disconnect () override | 
|  | 
| const char * | interfaceName () const override | 
|  | 
| uint32_t | parameter () const override | 
|  | 
| uint64_t | recvFileBytesWritten () const | 
|  | 
| uint64_t | sendFileBytesWritten () const | 
|  | 
|  | Connection () | 
|  | 
| virtual | ~Connection () | 
|  | 
| bool | sendBufferToDevice (microstrain::ConstU8ArrayView data) | 
|  | 
| bool | recvBufferFromDevice (microstrain::U8ArrayView buffer, unsigned int wait_time_ms, size_t *length_out, EmbeddedTimestamp *timestamp_out) | 
|  | 
| bool | recvFromDeviceAndUpdateUint8ArrayView (microstrain::U8ArrayView &buffer, unsigned int wait_time_ms, EmbeddedTimestamp *timestamp_out) | 
|  | 
| const char * | type () const | 
|  | 
|  | 
| static constexpr const char * | TYPE = "Recording" | 
|  | 
| static constexpr const char * | TYPE = "None" | 
|  | 
◆ RecordingConnection()
      
        
          | microstrain::connections::RecordingConnection::RecordingConnection | ( | Connection * | connection, | 
        
          |  |  | std::ostream * | recvStream = nullptr, | 
        
          |  |  | std::ostream * | sendStream = nullptr | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
    | connection | Connection object that will actually communicate with the device |  | recvStream | The stream to write to when bytes are received. Null if received bytes should not be written to a stream |  | sendStream | The stream to write to when bytes are sent. Null if sent bytes should not be written to a stream |  
 
 
 
◆ ~RecordingConnection()
  
  | 
        
          | microstrain::connections::RecordingConnection::~RecordingConnection | ( |  | ) |  |  | overridedefault | 
 
 
◆ sendToDevice()
  
  | 
        
          | bool microstrain::connections::RecordingConnection::sendToDevice | ( | const uint8_t * | data, |  
          |  |  | size_t | length |  
          |  | ) |  |  |  | overridevirtual | 
 
 
◆ recvFromDevice()
  
  | 
        
          | bool microstrain::connections::RecordingConnection::recvFromDevice | ( | uint8_t * | buffer, |  
          |  |  | size_t | max_length, |  
          |  |  | unsigned int | wait_time_ms, |  
          |  |  | size_t * | length_out, |  
          |  |  | EmbeddedTimestamp * | timestamp_out |  
          |  | ) |  |  |  | overridevirtual | 
 
- Parameters
- 
  
    | buffer | Buffer to store the received data in |  | max_length | Max number of bytes that can be read. Should be at most the length of buffer. |  | wait_time_ms | Time to wait for data in milliseconds. |  | length_out | Number of bytes actually read. |  | timestamp_out | Timestamp of when the data was received |  
 
Implements microstrain::Connection.
 
 
◆ isConnected()
  
  | 
        
          | bool microstrain::connections::RecordingConnection::isConnected | ( |  | ) | const |  | inlineoverridevirtual | 
 
 
◆ connect()
  
  | 
        
          | bool microstrain::connections::RecordingConnection::connect | ( |  | ) |  |  | inlineoverridevirtual | 
 
 
◆ disconnect()
  
  | 
        
          | bool microstrain::connections::RecordingConnection::disconnect | ( |  | ) |  |  | inlineoverridevirtual | 
 
 
◆ interfaceName()
  
  | 
        
          | const char* microstrain::connections::RecordingConnection::interfaceName | ( |  | ) | const |  | inlineoverridevirtual | 
 
 
◆ parameter()
  
  | 
        
          | uint32_t microstrain::connections::RecordingConnection::parameter | ( |  | ) | const |  | inlineoverridevirtual | 
 
 
◆ recvFileBytesWritten()
  
  | 
        
          | uint64_t microstrain::connections::RecordingConnection::recvFileBytesWritten | ( |  | ) | const |  | inline | 
 
 
◆ sendFileBytesWritten()
  
  | 
        
          | uint64_t microstrain::connections::RecordingConnection::sendFileBytesWritten | ( |  | ) | const |  | inline | 
 
 
◆ TYPE
  
  | 
        
          | constexpr const char* microstrain::connections::RecordingConnection::TYPE = "Recording" |  | staticconstexpr | 
 
 
◆ mConnection
  
  | 
        
          | Connection* microstrain::connections::RecordingConnection::mConnection |  | protected | 
 
 
◆ mRecvFile
  
  | 
        
          | std::ostream* microstrain::connections::RecordingConnection::mRecvFile |  | protected | 
 
 
◆ mSendFile
  
  | 
        
          | std::ostream* microstrain::connections::RecordingConnection::mSendFile |  | protected | 
 
 
◆ mRecvFileWritten
  
  | 
        
          | uint64_t microstrain::connections::RecordingConnection::mRecvFileWritten = 0 |  | protected | 
 
 
◆ mSendFileWritten
  
  | 
        
          | uint64_t microstrain::connections::RecordingConnection::mSendFileWritten = 0 |  | protected | 
 
 
The documentation for this class was generated from the following files: