39#include "blocxx/BLOCXX_config.h"
50 if (strcmp(direction,
"in") == 0)
54 if (strcmp(direction,
"out") == 0)
64 const char* direction)
68 , m_error_action(
IOIFC::E_RETURN_ON_ERROR)
76 , m_error_action(
IOIFC::E_RETURN_ON_ERROR)
virtual void initBuffers()
virtual int write(const void *dataOut, int dataOutLen, ErrorAction errorAsException=E_RETURN_ON_ERROR)=0
Write a specified number of bytes to the device that is exposing the IOIFC interface.
virtual int read(void *dataIn, int dataInLen, ErrorAction errorAsException=E_RETURN_ON_ERROR)=0
Read a specified number of bytes from the device that is exposing the IOIFC interface.
virtual int buffer_to_device(const char *c, int n)
Writes the buffer to the "device".
virtual int buffer_from_device(char *c, int n)
Fill the buffer from the "device".
std::streambuf * tie(std::streambuf *tied_buf)
std::streambuf * m_tied_buf
IOIFCStreamBuffer(IOIFC *dev, int bufSize, const char *direction) BLOCXX_DEPRECATED
void setErrorAction(IOIFC::ErrorAction error_action)
virtual ~IOIFCStreamBuffer()
IOIFC::ErrorAction m_error_action