A class to encapsulate a pipe.
More...
#include <carma/szautil/Pipe.h>
|
struct | PipeFd |
| Define a struct to encapsulate a file descriptor associated with either end of a pipe. More...
|
|
|
int | fd () |
| Return the file descriptor associated with this pipe. More...
|
|
| Pipe () |
| Constructor. More...
|
|
virtual PipeState | read (void *buffer, size_t nbyte, long timeout=0) |
| Read from the pipe. More...
|
|
int | readFd () |
|
virtual void | readPipe (void *buffer, size_t nbyte, long timeout) |
| Read from the pipe. More...
|
|
fd_set | rfds () |
| Return an intialized set of readable file descriptors associated with this queue. More...
|
|
virtual PipeState | write (void *buffer, size_t nbyte, long timeout=0) |
| Write to the pipe. More...
|
|
int | writeFd () |
|
virtual void | writePipe (void *buffer, size_t nbyte, long timeout) |
| Write to the pipe. More...
|
|
virtual | ~Pipe () |
| Destructor. More...
|
|
A class to encapsulate a pipe.
Definition at line 49 of file Pipe.h.
sza::util::Pipe::Pipe |
( |
| ) |
|
virtual sza::util::Pipe::~Pipe |
( |
| ) |
|
|
virtual |
int sza::util::Pipe::fd |
( |
| ) |
|
Return the file descriptor associated with this pipe.
void sza::util::Pipe::getTimeOfDay |
( |
struct timespec * |
ts | ) |
|
|
protected |
Get the current time of day.
Used by read/writePipe() for timeouts.
- Exceptions
-
virtual PipeState sza::util::Pipe::read |
( |
void * |
buffer, |
|
|
size_t |
nbyte, |
|
|
long |
timeout = 0 |
|
) |
| |
|
virtual |
virtual void sza::util::Pipe::readPipe |
( |
void * |
buffer, |
|
|
size_t |
nbyte, |
|
|
long |
timeout |
|
) |
| |
|
virtual |
Read from the pipe.
- Exceptions
-
fd_set sza::util::Pipe::rfds |
( |
| ) |
|
Return an intialized set of readable file descriptors associated with this queue.
virtual PipeState sza::util::Pipe::write |
( |
void * |
buffer, |
|
|
size_t |
nbyte, |
|
|
long |
timeout = 0 |
|
) |
| |
|
virtual |
virtual void sza::util::Pipe::writePipe |
( |
void * |
buffer, |
|
|
size_t |
nbyte, |
|
|
long |
timeout |
|
) |
| |
|
virtual |
Write to the pipe.
- Exceptions
-
pthread_mutex_t sza::util::Pipe::guard_ |
|
protected |
A mutex guard for the pipe.
Definition at line 108 of file Pipe.h.
bool sza::util::Pipe::guardIsReady_ |
|
protected |
True when the guard mutex has been initialized.
Definition at line 120 of file Pipe.h.
size_t sza::util::Pipe::nread_ |
|
protected |
The number of bytes in buffer[].
Definition at line 185 of file Pipe.h.
PipeFd sza::util::Pipe::readfd_ |
|
protected |
File descriptor corresponding to the read end of the pipe.
Definition at line 165 of file Pipe.h.
PipeFd sza::util::Pipe::writefd_ |
|
protected |
File descriptor corresponding to the write end of the pipe.
Definition at line 170 of file Pipe.h.
The documentation for this class was generated from the following file: