GizmoBase

gzPipe Class Reference

A named pipe class that implements bi-directional point-to-point communication. More...

#include <gzPipe.h>

Inheritance diagram for gzPipe:

gzThread gzNotifyMaster< gzPipe, gzPipeRecieveDataInterface, gzPipeDataPtr > gzSerializeAdapter gzMutex gzMemoryCheck gzProgramExecution gzReference gzNameInterface gzSharedMemory gzTypeInterface List of all members.

Public Member Functions

 gzPipe (gzPipeControlInterface *pipeControl=NULL)
virtual ~gzPipe ()
gzBool connect (const gzString &name, gzBool create=FALSE, gzPipeConnection connection=GZ_PIPE_GLOBAL, gzULong timeOutRetry=50, const gzString &optionString=GZ_EMPTY_STRING)
 Connect to a named pipe with name pipeName.
gzBool createPipe (const gzUShort port, gzULong timeOutRetry=50)
 Direct create a pipe.
gzBool openPipe (const gzString &address, gzUShort port, gzULong timeOutRetry=50)
 Direct open a pipe.
gzBool isConnected ()
 Returns status if a pipe is connected.
gzVoid disconnect (gzBool waitForRemoteConnection=TRUE)
 Force disconnection of pipe.
gzULong writePipe (gzUByte *adress, gzULong len)
 Write len bytes at adress.
gzULong readPipe (gzUByte *adress, gzULong maxlen, gzBool blocking=TRUE)
 Read max maxlen len bytes to adress.
gzULong pendingBytes ()
 Tell you how many bytes there are pending in the pipe to be read.
virtual gzVoid write_imp (gzUByte data)
virtual gzUByte read_imp ()
virtual gzVoid write_imp (gzUByte *data, gzULong count)
virtual gzULong read_imp (gzUByte *data, gzULong maxcount)
virtual gzULong length_imp ()
 GZ_PROPERTY_GET_EXPORT (gzString, PipeName, 1)
 GZ_PROPERTY_GET_EXPORT (gzString, PipeID, 1)
 GZ_PROPERTY_GET_EXPORT (gzString, RemotePipeID, 1)
 GZ_PROPERTY_GET_EXPORT (gzUShort, PipePort, 1)
 GZ_PROPERTY_GET_EXPORT (gzBool, DirectConnect, 1)

Detailed Description

A named pipe class that implements bi-directional point-to-point communication.

A pipe can either local or global...

Any number of instances can be created...

blah...

Definition at line 154 of file gzPipe.h.


Constructor & Destructor Documentation

gzPipe::gzPipe gzPipeControlInterface pipeControl = NULL  ) 
 

virtual gzPipe::~gzPipe  )  [virtual]
 


Member Function Documentation

gzBool gzPipe::connect const gzString name,
gzBool  create = FALSE,
gzPipeConnection  connection = GZ_PIPE_GLOBAL,
gzULong  timeOutRetry = 50,
const gzString optionString = GZ_EMPTY_STRING
 

Connect to a named pipe with name pipeName.

Set createPipe to TRUE to actually create the pipe.

gzBool gzPipe::createPipe const gzUShort  port,
gzULong  timeOutRetry = 50
 

Direct create a pipe.

gzVoid gzPipe::disconnect gzBool  waitForRemoteConnection = TRUE  ) 
 

Force disconnection of pipe.

gzPipe::GZ_PROPERTY_GET_EXPORT gzBool  ,
DirectConnect  ,
 

gzPipe::GZ_PROPERTY_GET_EXPORT gzUShort  ,
PipePort  ,
 

gzPipe::GZ_PROPERTY_GET_EXPORT gzString  ,
RemotePipeID  ,
 

gzPipe::GZ_PROPERTY_GET_EXPORT gzString  ,
PipeID  ,
 

gzPipe::GZ_PROPERTY_GET_EXPORT gzString  ,
PipeName  ,
 

gzBool gzPipe::isConnected  ) 
 

Returns status if a pipe is connected.

A pipe can be connected/disconnected multiple times.

virtual gzULong gzPipe::length_imp  )  [virtual]
 

Reimplemented from gzSerializeAdapter.

gzBool gzPipe::openPipe const gzString address,
gzUShort  port,
gzULong  timeOutRetry = 50
 

Direct open a pipe.

gzULong gzPipe::pendingBytes  ) 
 

Tell you how many bytes there are pending in the pipe to be read.

virtual gzULong gzPipe::read_imp gzUByte data,
gzULong  maxcount
[virtual]
 

Reimplemented from gzSerializeAdapter.

virtual gzUByte gzPipe::read_imp  )  [virtual]
 

Implements gzSerializeAdapter.

gzULong gzPipe::readPipe gzUByte adress,
gzULong  maxlen,
gzBool  blocking = TRUE
 

Read max maxlen len bytes to adress.

Default to blocking mode TRUE. Returns number of read bytes.

virtual gzVoid gzPipe::write_imp gzUByte data,
gzULong  count
[virtual]
 

Reimplemented from gzSerializeAdapter.

virtual gzVoid gzPipe::write_imp gzUByte  data  )  [virtual]
 

Implements gzSerializeAdapter.

gzULong gzPipe::writePipe gzUByte adress,
gzULong  len
 

Write len bytes at adress.


The documentation for this class was generated from the following file:
Documentation for GizmoBase generated at Wed Feb 20 11:57:58 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond