VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkSocketCommunicator Class Reference

Process communication using Sockets. More...

#include <vtkSocketCommunicator.h>

Inheritance diagram for vtkSocketCommunicator:
[legend]
Collaboration diagram for vtkSocketCommunicator:
[legend]

Public Types

typedef vtkCommunicator Superclass
 
- Public Types inherited from vtkCommunicator
enum  Tags {
  BROADCAST_TAG = 10, GATHER_TAG = 11, GATHERV_TAG = 12, SCATTER_TAG = 13,
  SCATTERV_TAG = 14, REDUCE_TAG = 15, BARRIER_TAG = 16
}
 
enum  StandardOperations {
  MAX_OP, MIN_OP, SUM_OP, PRODUCT_OP,
  LOGICAL_AND_OP, BITWISE_AND_OP, LOGICAL_OR_OP, BITWISE_OR_OP,
  LOGICAL_XOR_OP, BITWISE_XOR_OP
}
 
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkSocketCommunicatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void CloseConnection ()
 
virtual int ConnectTo (const char *hostName, int port)
 
int GetIsConnected ()
 
virtual void SetNumberOfProcesses (int num)
 
virtual void Barrier ()
 
int Handshake ()
 
int ServerSideHandshake ()
 
int ClientSideHandshake ()
 
bool HasBufferredMessages ()
 
virtual int WaitForConnection (int port)
 
virtual int WaitForConnection (vtkServerSocket *socket, unsigned long msec=0)
 
virtual int GetSwapBytesInReceivedData ()
 
virtual int SendVoidArray (const void *data, vtkIdType length, int type, int remoteHandle, int tag)
 
virtual int ReceiveVoidArray (void *data, vtkIdType length, int type, int remoteHandle, int tag)
 
virtual int BroadcastVoidArray (void *data, vtkIdType length, int type, int srcProcessId)
 
virtual int GatherVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int destProcessId)
 
virtual int GatherVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int type, int destProcessId)
 
virtual int ScatterVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int srcProcessId)
 
virtual int ScatterVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int type, int srcProcessId)
 
virtual int AllGatherVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type)
 
virtual int AllGatherVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int type)
 
virtual int ReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int operation, int destProcessId)
 
virtual int ReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, Operation *operation, int destProcessId)
 
virtual int AllReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int operation)
 
virtual int AllReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, Operation *operation)
 
virtual void SetPerformHandshake (int)
 
virtual void PerformHandshakeOn ()
 
virtual void PerformHandshakeOff ()
 
virtual int GetPerformHandshake ()
 
virtual void SetLogStream (ostream *stream)
 
virtual ostream * GetLogStream ()
 
virtual int LogToFile (const char *name)
 
virtual int LogToFile (const char *name, int append)
 
virtual void SetReportErrors (int)
 
virtual int GetReportErrors ()
 
virtual vtkClientSocketGetSocket ()
 
void SetSocket (vtkClientSocket *)
 
virtual int GetIsServer ()
 
void BufferCurrentMessage ()
 
- Public Member Functions inherited from vtkCommunicator
vtkCommunicatorNewInstance () const
 
int Receive (vtkDataObject *data, int remoteHandle, int tag)
 
vtkDataObjectReceiveDataObject (int remoteHandle, int tag)
 
int Receive (vtkDataArray *data, int remoteHandle, int tag)
 
virtual int GetNumberOfProcesses ()
 
virtual int GetLocalProcessId ()
 
int Send (vtkDataObject *data, int remoteHandle, int tag)
 
int Send (vtkDataArray *data, int remoteHandle, int tag)
 
int Send (const int *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const unsigned int *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const short *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const unsigned short *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const long *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const unsigned long *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const unsigned char *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const char *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const signed char *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const float *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const double *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const vtkMultiProcessStream &stream, int remoteId, int tag)
 
int Receive (int *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (unsigned int *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (short *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (unsigned short *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (long *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (unsigned long *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (unsigned char *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (char *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (signed char *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (float *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (double *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (vtkMultiProcessStream &stream, int remoteId, int tag)
 
virtual vtkIdType GetCount ()
 
int Broadcast (int *data, vtkIdType length, int srcProcessId)
 
int Broadcast (unsigned int *data, vtkIdType length, int srcProcessId)
 
int Broadcast (short *data, vtkIdType length, int srcProcessId)
 
int Broadcast (unsigned short *data, vtkIdType length, int srcProcessId)
 
int Broadcast (long *data, vtkIdType length, int srcProcessId)
 
int Broadcast (unsigned long *data, vtkIdType length, int srcProcessId)
 
int Broadcast (unsigned char *data, vtkIdType length, int srcProcessId)
 
int Broadcast (char *data, vtkIdType length, int srcProcessId)
 
int Broadcast (signed char *data, vtkIdType length, int srcProcessId)
 
int Broadcast (float *data, vtkIdType length, int srcProcessId)
 
int Broadcast (double *data, vtkIdType length, int srcProcessId)
 
int Broadcast (vtkDataObject *data, int srcProcessId)
 
int Broadcast (vtkDataArray *data, int srcProcessId)
 
int Broadcast (vtkMultiProcessStream &stream, int srcProcessId)
 
int Gather (const int *sendBuffer, int *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const short *sendBuffer, short *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const long *sendBuffer, long *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const char *sendBuffer, char *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const float *sendBuffer, float *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const double *sendBuffer, double *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
 
int GatherV (const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdTypeArray *recvLengths, vtkIdTypeArray *offsets, int destProcessId)
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
 
int GatherV (vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *recvData, int destProcessId)
 
int Scatter (const int *sendBuffer, int *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const short *sendBuffer, short *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const long *sendBuffer, long *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const char *sendBuffer, char *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const float *sendBuffer, float *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const double *sendBuffer, double *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId)
 
int ScatterV (const int *sendBuffer, int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const short *sendBuffer, short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const long *sendBuffer, long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const float *sendBuffer, float *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const double *sendBuffer, double *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int AllGather (const int *sendBuffer, int *recvBuffer, vtkIdType length)
 
int AllGather (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length)
 
int AllGather (const short *sendBuffer, short *recvBuffer, vtkIdType length)
 
int AllGather (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length)
 
int AllGather (const long *sendBuffer, long *recvBuffer, vtkIdType length)
 
int AllGather (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length)
 
int AllGather (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length)
 
int AllGather (const char *sendBuffer, char *recvBuffer, vtkIdType length)
 
int AllGather (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length)
 
int AllGather (const float *sendBuffer, float *recvBuffer, vtkIdType length)
 
int AllGather (const double *sendBuffer, double *recvBuffer, vtkIdType length)
 
int AllGather (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
 
int AllGatherV (const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
 
int Reduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId)
 
int Reduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation, int destProcessId)
 
int AllReduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation)
 
int AllReduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation)
 
virtual int ComputeGlobalBounds (int processorId, int numProcesses, vtkBoundingBox *bounds, int *rightHasBounds=0, int *leftHasBounds=0, int hasBoundsTag=288402, int localBoundsTag=288403, int globalBoundsTag=288404)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkSocketCommunicatorNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSocketCommunicatorSafeDownCast (vtkObjectBase *o)
 
static int GetVersion ()
 
- Static Public Member Functions inherited from vtkCommunicator
static int IsTypeOf (const char *type)
 
static vtkCommunicatorSafeDownCast (vtkObjectBase *o)
 
static void SetUseCopy (int useCopy)
 
static int GetParentProcessor (int pid)
 
static int GetLeftChildProcessor (int pid)
 
static int MarshalDataObject (vtkDataObject *object, vtkCharArray *buffer)
 
static int UnMarshalDataObject (vtkCharArray *buffer, vtkDataObject *object)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkSocketCommunicator ()
 
 ~vtkSocketCommunicator ()
 
int SendTagged (const void *data, int wordSize, int numWords, int tag, const char *logName)
 
int ReceiveTagged (void *data, int wordSize, int numWords, int tag, const char *logName)
 
int ReceivePartialTagged (void *data, int wordSize, int numWords, int tag, const char *logName)
 
int ReceivedTaggedFromBuffer (void *data, int wordSize, int numWords, int tag, const char *logName)
 
void FixByteOrder (void *data, int wordSize, int numWords)
 
void LogTagged (const char *name, const void *data, int wordSize, int numWords, int tag, const char *logName)
 
int CheckForErrorInternal (int id)
 
- Protected Member Functions inherited from vtkCommunicator
int WriteDataArray (vtkDataArray *object)
 
int ReadDataArray (vtkDataArray *object)
 
 vtkCommunicator ()
 
 ~vtkCommunicator ()
 
int SendElementalDataObject (vtkDataObject *data, int remoteHandle, int tag)
 
int ReceiveDataObject (vtkDataObject *data, int remoteHandle, int tag, int type=-1)
 
int ReceiveElementalDataObject (vtkDataObject *data, int remoteHandle, int tag)
 
int ReceiveMultiBlockDataSet (vtkMultiBlockDataSet *data, int remoteHandle, int tag)
 
int GatherV (vtkDataArray *sendArray, vtkDataArray *recvArray, vtkSmartPointer< vtkDataArray > *recvArrays, int destProcessId)
 
int GatherVElementalDataObject (vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *receiveData, int destProcessId)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkClientSocketSocket
 
int SwapBytesInReceivedData
 
int RemoteHas64BitIds
 
int PerformHandshake
 
int IsServer
 
int ReportErrors
 
ofstream * LogFile
 
ostream * LogStream
 
bool BufferMessage
 
- Protected Attributes inherited from vtkCommunicator
int MaximumNumberOfProcesses
 
int NumberOfProcesses
 
int LocalProcessId
 
vtkIdType Count
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Attributes inherited from vtkCommunicator
static int UseCopy
 

Detailed Description

Process communication using Sockets.

This is a concrete implementation of vtkCommunicator which supports interprocess communication using BSD style sockets. It supports byte swapping for the communication of machines with different endianness.

Warning
Communication between 32 bit and 64 bit systems is not fully supported. If a type does not have the same length on both systems, this communicator can not be used to transfer data of that type.
See also
vtkCommunicator vtkSocketController
Events:
vtkCommand::WrongTagEvent
Tests:
vtkSocketCommunicator (Tests)

Definition at line 62 of file vtkSocketCommunicator.h.

Member Typedef Documentation

Definition at line 66 of file vtkSocketCommunicator.h.

Constructor & Destructor Documentation

vtkSocketCommunicator::vtkSocketCommunicator ( )
protected
vtkSocketCommunicator::~vtkSocketCommunicator ( )
protected

Member Function Documentation

static vtkSocketCommunicator* vtkSocketCommunicator::New ( )
static
static int vtkSocketCommunicator::IsTypeOf ( const char *  type)
static
virtual int vtkSocketCommunicator::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkCommunicator.

static vtkSocketCommunicator* vtkSocketCommunicator::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkSocketCommunicator::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkCommunicator.

vtkSocketCommunicator* vtkSocketCommunicator::NewInstance ( ) const
void vtkSocketCommunicator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::WaitForConnection ( int  port)
virtual

Wait for connection on a given port. These methods return 1 on success, 0 on error.

virtual int vtkSocketCommunicator::WaitForConnection ( vtkServerSocket socket,
unsigned long  msec = 0 
)
virtual

Wait for connection on a given port. These methods return 1 on success, 0 on error.

virtual void vtkSocketCommunicator::CloseConnection ( )
virtual

Close a connection.

virtual int vtkSocketCommunicator::ConnectTo ( const char *  hostName,
int  port 
)
virtual

Open a connection to host.

virtual int vtkSocketCommunicator::GetSwapBytesInReceivedData ( )
virtual

Returns 1 if bytes must be swapped in received ints, floats, etc

int vtkSocketCommunicator::GetIsConnected ( )

Is the communicator connected?.

virtual void vtkSocketCommunicator::SetNumberOfProcesses ( int  num)
virtual

Set the number of processes you will be using.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::SendVoidArray ( const void *  data,
vtkIdType  length,
int  type,
int  remoteHandle,
int  tag 
)
virtual

Performs the actual communication. You will usually use the convenience Send functions defined in the superclass.

Implements vtkCommunicator.

virtual int vtkSocketCommunicator::ReceiveVoidArray ( void *  data,
vtkIdType  length,
int  type,
int  remoteHandle,
int  tag 
)
virtual

Performs the actual communication. You will usually use the convenience Send functions defined in the superclass.

Implements vtkCommunicator.

virtual void vtkSocketCommunicator::Barrier ( )
virtual

This class foolishly breaks the conventions of the superclass, so this overload fixes the method.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::BroadcastVoidArray ( void *  data,
vtkIdType  length,
int  type,
int  srcProcessId 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::GatherVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
int  destProcessId 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::GatherVVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  sendLength,
vtkIdType recvLengths,
vtkIdType offsets,
int  type,
int  destProcessId 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::ScatterVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
int  srcProcessId 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::ScatterVVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType sendLengths,
vtkIdType offsets,
vtkIdType  recvLength,
int  type,
int  srcProcessId 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::AllGatherVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::AllGatherVVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  sendLength,
vtkIdType recvLengths,
vtkIdType offsets,
int  type 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::ReduceVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
int  operation,
int  destProcessId 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::ReduceVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
Operation operation,
int  destProcessId 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::AllReduceVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
int  operation 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual int vtkSocketCommunicator::AllReduceVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
Operation operation 
)
virtual

This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work. These just give errors instead.

Reimplemented from vtkCommunicator.

virtual void vtkSocketCommunicator::SetPerformHandshake ( int  )
virtual

Set or get the PerformHandshake ivar. If it is on, the communicator will try to perform a handshake when connected. It is on by default.

virtual void vtkSocketCommunicator::PerformHandshakeOn ( )
virtual

Set or get the PerformHandshake ivar. If it is on, the communicator will try to perform a handshake when connected. It is on by default.

virtual void vtkSocketCommunicator::PerformHandshakeOff ( )
virtual

Set or get the PerformHandshake ivar. If it is on, the communicator will try to perform a handshake when connected. It is on by default.

virtual int vtkSocketCommunicator::GetPerformHandshake ( )
virtual

Set or get the PerformHandshake ivar. If it is on, the communicator will try to perform a handshake when connected. It is on by default.

virtual void vtkSocketCommunicator::SetLogStream ( ostream *  stream)
virtual

Get/Set the output stream to which communications should be logged. This is intended as a debugging feature.

virtual ostream* vtkSocketCommunicator::GetLogStream ( )
virtual

Get/Set the output stream to which communications should be logged. This is intended as a debugging feature.

virtual int vtkSocketCommunicator::LogToFile ( const char *  name)
virtual

Log messages to the given file. The file is truncated unless the second argument is non-zero (default is to truncate). If the file name is empty or NULL, logging is disabled. Returns 0 if the file failed to open, and 1 otherwise.

virtual int vtkSocketCommunicator::LogToFile ( const char *  name,
int  append 
)
virtual

Log messages to the given file. The file is truncated unless the second argument is non-zero (default is to truncate). If the file name is empty or NULL, logging is disabled. Returns 0 if the file failed to open, and 1 otherwise.

virtual void vtkSocketCommunicator::SetReportErrors ( int  )
virtual

If ReportErrors if false, all vtkErrorMacros are suppressed.

virtual int vtkSocketCommunicator::GetReportErrors ( )
virtual

If ReportErrors if false, all vtkErrorMacros are suppressed.

virtual vtkClientSocket* vtkSocketCommunicator::GetSocket ( )
virtual

Get/Set the actual socket used for communication.

void vtkSocketCommunicator::SetSocket ( vtkClientSocket )

Get/Set the actual socket used for communication.

int vtkSocketCommunicator::Handshake ( )

Performs handshake. This uses vtkClientSocket::ConnectingSide to decide whether to perform ServerSideHandshake or ClientSideHandshake.

int vtkSocketCommunicator::ServerSideHandshake ( )

Performs ServerSide handshake. One should preferably use Handshake() which calls ServerSideHandshake or ClientSideHandshake as required.

int vtkSocketCommunicator::ClientSideHandshake ( )

Performs ClientSide handshake. One should preferably use Handshake() which calls ServerSideHandshake or ClientSideHandshake as required.

virtual int vtkSocketCommunicator::GetIsServer ( )
virtual

Returns true if this side of the socket is the server. The result is invalid if the socket is not connected.

static int vtkSocketCommunicator::GetVersion ( )
static

Uniquely identifies the version of this class. If the versions match, then the socket communicators should be compatible.

void vtkSocketCommunicator::BufferCurrentMessage ( )
inline

This flag is cleared before vtkCommand::WrongTagEvent is fired when ever a message with mismatched tag is received. If the handler wants the message to be buffered for later use, it should set this flag to true. In which case the vtkSocketCommunicator will buffer the messsage and it will be automatically processed the next time one does a ReceiveTagged() with a matching tag.

Definition at line 212 of file vtkSocketCommunicator.h.

bool vtkSocketCommunicator::HasBufferredMessages ( )

Returns true if there are any messages in the receive buffer.

int vtkSocketCommunicator::SendTagged ( const void *  data,
int  wordSize,
int  numWords,
int  tag,
const char *  logName 
)
protected
int vtkSocketCommunicator::ReceiveTagged ( void *  data,
int  wordSize,
int  numWords,
int  tag,
const char *  logName 
)
protected
int vtkSocketCommunicator::ReceivePartialTagged ( void *  data,
int  wordSize,
int  numWords,
int  tag,
const char *  logName 
)
protected
int vtkSocketCommunicator::ReceivedTaggedFromBuffer ( void *  data,
int  wordSize,
int  numWords,
int  tag,
const char *  logName 
)
protected
void vtkSocketCommunicator::FixByteOrder ( void *  data,
int  wordSize,
int  numWords 
)
protected

Fix byte order for received data.

void vtkSocketCommunicator::LogTagged ( const char *  name,
const void *  data,
int  wordSize,
int  numWords,
int  tag,
const char *  logName 
)
protected
int vtkSocketCommunicator::CheckForErrorInternal ( int  id)
protected

Member Data Documentation

vtkClientSocket* vtkSocketCommunicator::Socket
protected

Definition at line 222 of file vtkSocketCommunicator.h.

int vtkSocketCommunicator::SwapBytesInReceivedData
protected

Definition at line 223 of file vtkSocketCommunicator.h.

int vtkSocketCommunicator::RemoteHas64BitIds
protected

Definition at line 224 of file vtkSocketCommunicator.h.

int vtkSocketCommunicator::PerformHandshake
protected

Definition at line 225 of file vtkSocketCommunicator.h.

int vtkSocketCommunicator::IsServer
protected

Definition at line 226 of file vtkSocketCommunicator.h.

int vtkSocketCommunicator::ReportErrors
protected

Definition at line 228 of file vtkSocketCommunicator.h.

ofstream* vtkSocketCommunicator::LogFile
protected

Definition at line 230 of file vtkSocketCommunicator.h.

ostream* vtkSocketCommunicator::LogStream
protected

Definition at line 231 of file vtkSocketCommunicator.h.

bool vtkSocketCommunicator::BufferMessage
protected

Definition at line 255 of file vtkSocketCommunicator.h.


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