|
MIP_SDK
v4.0.0
MicroStrain Communications Library for embedded systems
|
Represents a type of connection. More...
#include <connection.hpp>
Public Member Functions | |
| Connection () | |
| virtual | ~Connection () |
| virtual bool | sendToDevice (const uint8_t *data, size_t length)=0 |
| Sends bytes to the device. More... | |
| virtual bool | recvFromDevice (uint8_t *buffer, size_t max_length, unsigned int wait_time_ms, size_t *length_out, EmbeddedTimestamp *timestamp_out)=0 |
| Receives bytes from the device. More... | |
| 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) |
| virtual bool | isConnected () const =0 |
| virtual bool | connect ()=0 |
| virtual bool | disconnect ()=0 |
| const char * | type () const |
| virtual const char * | interfaceName () const =0 |
| virtual uint32_t | parameter () const =0 |
Static Public Attributes | |
| static constexpr const char * | TYPE = "None" |
Protected Attributes | |
| const char * | mType |
The following methods are pure virtual and must be implemented by a derived class:
bool sendToDevice(const uint8_t* data, size_t length) bool recvFromDevice(uint8_t* buffer, size_t maxLength, unsigned int wait_time_ms, size_t* lengthOut, EmbeddedTimestamp* timestampOut)
|
inline |
|
inlinevirtual |
|
pure virtual |
| data | The data to send to the device |
| length | Length of data in bytes |
Implemented in microstrain::connections::TcpConnection, microstrain::connections::RecordingConnection, and microstrain::connections::SerialConnection.
|
pure virtual |
| 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 |
Implemented in microstrain::connections::TcpConnection, microstrain::connections::RecordingConnection, and microstrain::connections::SerialConnection.
|
inline |
|
inline |
|
inline |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
|
pure virtual |
|
pure virtual |
|
staticconstexpr |
|
protected |
1.8.17