13 Pipe(
const std::string& pipeName,
size_t size = 65536 * 128,
bool newBlockingRt =
false,
bool newBlockingNonRt =
false);
26 bool setup(
const std::string& pipeName = defaultName,
size_t size = 65536 * 128,
bool newBlockingRt =
false,
bool newBlockingNonRt =
false);
47 template<
typename T>
bool writeNonRt(
const T& data);
51 template<
typename T>
bool writeNonRt(T* ptr,
size_t count);
55 template<
typename T>
bool writeRt(
const T& data);
59 template<
typename T>
bool writeRt(T* ptr,
size_t count);
63 template<
typename T> ssize_t
readNonRt(T & dest);
67 template<
typename T> ssize_t
readNonRt(T* dest,
size_t count);
71 template<
typename T> ssize_t
readRt(T & dest);
75 template<
typename T> ssize_t
readRt(T* dest,
size_t count);
77 bool _writeNonRt(
void* ptr,
size_t size);
78 bool _writeRt(
void* ptr,
size_t size);
79 ssize_t _readRtNonRt(
void* ptr,
size_t size,
bool rt);
80 ssize_t _readNonRt(
void* ptr,
size_t size);
81 ssize_t _readRt(
void* ptr,
size_t size);
82 static std::string defaultName;
88 double timeoutMsRt = 0;
89 double timeoutMsNonRt = 0;
90 bool blockingRt =
false;
91 bool blockingNonRt =
false;
101 size_t size = count *
sizeof(*data);
102 return _writeNonRt((
void*)data, size);
112 size_t size = count *
sizeof(*ptr);
113 return _writeRt((
void*)ptr, size);
123 ssize_t ret = _readRt((
void*)dest, count *
sizeof(*dest));
125 return ret /
sizeof(*dest);
137 ssize_t ret = _readNonRt((
void*)dest, count *
sizeof(*dest));
139 return ret /
sizeof(*dest);
bool writeNonRt(const T &data)
Definition: Pipe.h:94
void setTimeoutMsRt(double timeoutMs)
Definition: Pipe.cpp:78
void setTimeoutMsNonRt(double timeoutMs)
Definition: Pipe.cpp:83
void setBlockingRt(bool blocking)
Definition: Pipe.cpp:46
ssize_t readNonRt(T &dest)
Definition: Pipe.h:130
ssize_t readRt(T &dest)
Definition: Pipe.h:116
void setBlockingNonRt(bool blocking)
Definition: Pipe.cpp:62
bool setup(const std::string &pipeName=defaultName, size_t size=65536 *128, bool newBlockingRt=false, bool newBlockingNonRt=false)
Definition: Pipe.cpp:13
bool writeRt(const T &data)
Definition: Pipe.h:105