CARMA C++
sza::util::PipeQueue Class Reference

A class to encapsulate a pipe. More...

#include <carma/szautil/PipeQueue.h>

Inheritance diagram for sza::util::PipeQueue:
sza::util::Pipe

Public Member Functions

 PipeQueue ()
 Constructor. More...
 
PipeState read (void *buffer, size_t nbyte, long timeout=PIPE_NOWAIT)
 Read from the pipe. More...
 
PipeState write (void *buffer, size_t nbyte, long timeout=PIPE_NOWAIT)
 Write to the pipe. More...
 
 ~PipeQueue ()
 Destructor. More...
 
- Public Member Functions inherited from sza::util::Pipe
int fd ()
 Return the file descriptor associated with this pipe. More...
 
 Pipe ()
 Constructor. 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...
 
int writeFd ()
 
virtual void writePipe (void *buffer, size_t nbyte, long timeout)
 Write to the pipe. More...
 
virtual ~Pipe ()
 Destructor. More...
 

Public Attributes

MsgQueue messages_
 
Mutex queueGuard_
 

Additional Inherited Members

- Protected Member Functions inherited from sza::util::Pipe
void getTimeOfDay (struct timespec *ts)
 Get the current time of day. More...
 
- Protected Attributes inherited from sza::util::Pipe
pthread_mutex_t guard_
 A mutex guard for the pipe. More...
 
bool guardIsReady_
 True when the guard mutex has been initialized. More...
 
size_t nread_
 The number of bytes in buffer[]. More...
 
PipeFd readfd_
 File descriptor corresponding to the read end of the pipe. More...
 
char unread_ [PIPE_BUF]
 
PipeFd writefd_
 File descriptor corresponding to the write end of the pipe. More...
 

Detailed Description

A class to encapsulate a pipe.

Definition at line 22 of file PipeQueue.h.

Constructor & Destructor Documentation

sza::util::PipeQueue::PipeQueue ( )

Constructor.

Exceptions
Exception
sza::util::PipeQueue::~PipeQueue ( )

Destructor.

Exceptions
Exception

Member Function Documentation

PipeState sza::util::PipeQueue::read ( void *  buffer,
size_t  nbyte,
long  timeout = PIPE_NOWAIT 
)
virtual

Read from the pipe.

Exceptions
Exception

Reimplemented from sza::util::Pipe.

PipeState sza::util::PipeQueue::write ( void *  buffer,
size_t  nbyte,
long  timeout = PIPE_NOWAIT 
)
virtual

Write to the pipe.

Exceptions
Exception

Reimplemented from sza::util::Pipe.


The documentation for this class was generated from the following file: