VTK  9.3.20240424
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 Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkSocketCommunicatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
virtual void CloseConnection ()
 Close a connection.
 
virtual int ConnectTo (const char *hostName, int port)
 Open a connection to host.
 
int GetIsConnected ()
 Is the communicator connected?.
 
void SetNumberOfProcesses (int num) override
 Set the number of processes you will be using.
 
void Barrier () override
 This class foolishly breaks the conventions of the superclass, so this overload fixes the method.
 
int Handshake ()
 Performs handshake.
 
int ServerSideHandshake ()
 Performs ServerSide handshake.
 
int ClientSideHandshake ()
 Performs ClientSide handshake.
 
void BufferCurrentMessage ()
 This flag is cleared before vtkCommand::WrongTagEvent is fired when ever a message with mismatched tag is received.
 
bool HasBufferredMessages ()
 Returns true if there are any messages in the receive buffer.
 
virtual int WaitForConnection (int port)
 Wait for connection on a given port.
 
virtual int WaitForConnection (vtkServerSocket *socket, unsigned long msec=0)
 Wait for connection on a given port.
 
virtual int GetSwapBytesInReceivedData ()
 Returns 1 if bytes must be swapped in received ints, floats, etc.
 
int SendVoidArray (const void *data, vtkIdType length, int type, int remoteHandle, int tag) override
 Performs the actual communication.
 
int ReceiveVoidArray (void *data, vtkIdType length, int type, int remoteHandle, int tag) override
 Performs the actual communication.
 
int BroadcastVoidArray (void *data, vtkIdType length, int type, int srcProcessId) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int GatherVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int destProcessId) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int GatherVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int type, int destProcessId) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int ScatterVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int srcProcessId) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int ScatterVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int type, int srcProcessId) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int AllGatherVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int AllGatherVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int type) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int ReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int operation, int destProcessId) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int ReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, Operation *operation, int destProcessId) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int AllReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int operation) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
int AllReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, Operation *operation) override
 This class foolishly breaks the conventions of the superclass, so the default implementations of these methods do not work.
 
virtual void SetPerformHandshake (vtkTypeBool)
 Set or get the PerformHandshake ivar.
 
virtual void PerformHandshakeOn ()
 Set or get the PerformHandshake ivar.
 
virtual void PerformHandshakeOff ()
 Set or get the PerformHandshake ivar.
 
virtual vtkTypeBool GetPerformHandshake ()
 Set or get the PerformHandshake ivar.
 
virtual void SetLogStream (ostream *stream)
 Get/Set the output stream to which communications should be logged.
 
virtual ostream * GetLogStream ()
 Get/Set the output stream to which communications should be logged.
 
virtual int LogToFile (const char *name)
 Log messages to the given file.
 
virtual int LogToFile (const char *name, int append)
 Log messages to the given file.
 
virtual void SetReportErrors (int)
 If ReportErrors if false, all vtkErrorMacros are suppressed.
 
virtual int GetReportErrors ()
 If ReportErrors if false, all vtkErrorMacros are suppressed.
 
virtual vtkClientSocketGetSocket ()
 Get/Set the actual socket used for communication.
 
void SetSocket (vtkClientSocket *)
 Get/Set the actual socket used for communication.
 
virtual int GetIsServer ()
 Returns true if this side of the socket is the server.
 
- Public Member Functions inherited from vtkCommunicator
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkCommunicatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
int Send (vtkDataObject *data, int remoteHandle, int tag)
 This method sends a data object to a destination.
 
int Send (vtkDataArray *data, int remoteHandle, int tag)
 This method sends a data array to a destination.
 
virtual int SendVoidArray (const void *data, vtkIdType length, int type, int remoteHandle, int tag)=0
 Subclasses have to supply this method to send various arrays of data.
 
int Send (const vtkMultiProcessStream &stream, int remoteId, int tag)
 
int Receive (vtkDataObject *data, int remoteHandle, int tag)
 This method receives a data object from a corresponding send.
 
vtkDataObjectReceiveDataObject (int remoteHandle, int tag)
 The caller does not have to know the data type before this call is made.
 
int Receive (vtkDataArray *data, int remoteHandle, int tag)
 This method receives a data array from a corresponding send.
 
virtual int ReceiveVoidArray (void *data, vtkIdType maxlength, int type, int remoteHandle, int tag)=0
 Subclasses have to supply this method to receive various arrays of data.
 
int Receive (vtkMultiProcessStream &stream, int remoteId, int tag)
 
virtual void Barrier ()
 Will block the processes until all other processes reach the Barrier function.
 
int Broadcast (vtkMultiProcessStream &stream, int srcProcessId)
 
int Gather (vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject > > &recvBuffer, int destProcessId)
 Gathers vtkDataObject (sendBuffer) from all ranks to the destProcessId.
 
int Gather (const vtkMultiProcessStream &sendBuffer, std::vector< vtkMultiProcessStream > &recvBuffer, int destProcessId)
 Gathers vtkMultiProcessStream (sendBuffer) from all ranks to the destProcessId.
 
int GatherV (vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *recvData, int destProcessId)
 Collects data objects in the process with id destProcessId.
 
int AllGather (vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject > > &recvBuffer)
 Gathers vtkDataObject (sendBuffer) from all ranks to all raks.
 
virtual bool CanProbe ()
 Check if this communicator implements a probe operation.
 
virtual int Probe (int vtkNotUsed(source), int vtkNotUsed(tag), int *vtkNotUsed(actualSource))
 Blocking test for checking for a message tagged with tag from source process (if source == ANY_SOURCE check for any message).
 
virtual int ComputeGlobalBounds (int processorId, int numProcesses, vtkBoundingBox *bounds, int *rightHasBounds=nullptr, int *leftHasBounds=nullptr, int hasBoundsTag=288402, int localBoundsTag=288403, int globalBoundsTag=288404)
 Determine the global bounds for a set of processes.
 
virtual int GetNumberOfProcesses ()
 Set the number of processes you will be using.
 
virtual int GetLocalProcessId ()
 Tells you which process [0, NumProcess) you are in.
 
int Send (const int *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const unsigned int *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const short *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const unsigned short *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const long *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const unsigned long *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const unsigned char *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const char *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const signed char *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const float *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const double *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const long long *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Send (const unsigned long long *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays.
 
int Receive (int *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (unsigned int *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (short *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (unsigned short *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (long *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (unsigned long *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (unsigned char *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (char *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (signed char *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (float *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (double *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (long long *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
int Receive (unsigned long long *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays.
 
virtual vtkIdType GetCount ()
 Returns the number of words received by the most recent Receive().
 
int Broadcast (int *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (unsigned int *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (short *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (unsigned short *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (long *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (unsigned long *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (unsigned char *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (char *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (signed char *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (float *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (double *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (long long *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (unsigned long long *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (vtkDataObject *data, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Broadcast (vtkDataArray *data, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes.
 
int Gather (const int *sendBuffer, int *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const short *sendBuffer, short *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const long *sendBuffer, long *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const char *sendBuffer, char *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const float *sendBuffer, float *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const double *sendBuffer, double *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int Gather (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
 Gather collects arrays in the process with id destProcessId.
 
int GatherV (const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const long long *sendBuffer, long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather.
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 For the first GatherV variant, recvLengths and offsets known on destProcessId and are passed in as parameters For the second GatherV variant, recvLengths and offsets are not known on destProcessId.
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdTypeArray *recvLengths, vtkIdTypeArray *offsets, int destProcessId)
 For the first GatherV variant, recvLengths and offsets known on destProcessId and are passed in as parameters For the second GatherV variant, recvLengths and offsets are not known on destProcessId.
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
 For the first GatherV variant, recvLengths and offsets known on destProcessId and are passed in as parameters For the second GatherV variant, recvLengths and offsets are not known on destProcessId.
 
int Scatter (const int *sendBuffer, int *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const short *sendBuffer, short *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const long *sendBuffer, long *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const char *sendBuffer, char *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const float *sendBuffer, float *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const double *sendBuffer, double *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int Scatter (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it.
 
int ScatterV (const int *sendBuffer, int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const short *sendBuffer, short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const long *sendBuffer, long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const float *sendBuffer, float *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const double *sendBuffer, double *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const long long *sendBuffer, long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int ScatterV (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter.
 
int AllGather (const int *sendBuffer, int *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const short *sendBuffer, short *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const long *sendBuffer, long *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const char *sendBuffer, char *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const float *sendBuffer, float *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const double *sendBuffer, double *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const long long *sendBuffer, long long *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes.
 
int AllGather (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
 Same as gather except that the result ends up on all processes.
 
int AllGather (const vtkMultiProcessStream &sendBuffer, std::vector< vtkMultiProcessStream > &recvBuffer)
 Same as gather except that the result ends up on all processes.
 
int AllGatherV (const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const long long *sendBuffer, long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes.
 
int AllGatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
 Same as GatherV except that the result is placed in all processes.
 
int Reduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int Reduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation, int destProcessId)
 Reduce an array to the given destination process.
 
int AllReduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
int AllReduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation)
 Same as Reduce except that the result is placed in all of the processes.
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on.
 
virtual void DebugOff ()
 Turn debugging output off.
 
bool GetDebug ()
 Get the value of the debug flag.
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag.
 
virtual void Modified ()
 Update the modification time for this object.
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
vtkTypeBool InvokeEvent (unsigned long event)
 
vtkTypeBool InvokeEvent (const char *event)
 
std::string GetObjectDescription () const override
 The object description printed in messages and PrintSelf output.
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method.
 
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes.
 
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes.
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string.
 
virtual std::string GetObjectDescription () const
 The object description printed in messages and PrintSelf output.
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
virtual void Delete ()
 Delete a VTK object.
 
virtual void FastDelete ()
 Delete a reference to this object.
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream.
 
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object).
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object).
 
int GetReferenceCount ()
 Return the current reference count of this object.
 
void SetReferenceCount (int)
 Sets the reference count.
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space.
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not.
 

Static Public Member Functions

static vtkSocketCommunicatorNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkSocketCommunicatorSafeDownCast (vtkObjectBase *o)
 
static int GetVersion ()
 Uniquely identifies the version of this class.
 
- Static Public Member Functions inherited from vtkCommunicator
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkCommunicatorSafeDownCast (vtkObjectBase *o)
 
static void SetUseCopy (int useCopy)
 
static vtkSmartPointer< vtkDataObjectUnMarshalDataObject (vtkCharArray *buffer)
 Same as UnMarshalDataObject(vtkCharArray*, vtkDataObject*) except that this method doesn't need to know the type of the data object a priori.
 
static int GetParentProcessor (int pid)
 Some helper functions when dealing with heap tree - based algorithms - we don't need a function for getting the right processor since it is 1 + theLeftProcessor.
 
static int GetLeftChildProcessor (int pid)
 Some helper functions when dealing with heap tree - based algorithms - we don't need a function for getting the right processor since it is 1 + theLeftProcessor.
 
static int MarshalDataObject (vtkDataObject *object, vtkCharArray *buffer)
 Convert a data object into a string that can be transmitted and vice versa.
 
static int UnMarshalDataObject (vtkCharArray *buffer, vtkDataObject *object)
 Convert a data object into a string that can be transmitted and vice versa.
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
 
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class.
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkSocketCommunicator ()
 
 ~vtkSocketCommunicator () override
 
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)
 Fix byte order for received data.
 
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
virtual vtkObjectBaseNewInstanceInternal () const
 
int WriteDataArray (vtkDataArray *object)
 
int ReadDataArray (vtkDataArray *object)
 
 vtkCommunicator ()
 
 ~vtkCommunicator () override
 
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)
 GatherV collects arrays in the process with id destProcessId.
 
int GatherVElementalDataObject (vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *receiveData, int destProcessId)
 GatherV collects arrays in the process with id destProcessId.
 
int AllGatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdTypeArray *recvLengthsArray, vtkIdTypeArray *offsetsArray)
 
int AllGatherV (vtkDataArray *sendArray, vtkDataArray *recvArray, vtkSmartPointer< vtkDataArray > *recvArrays)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events.
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void ObjectFinalize ()
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkClientSocketSocket
 
int SwapBytesInReceivedData
 
int RemoteHas64BitIds
 
vtkTypeBool PerformHandshake
 
int IsServer
 
int ReportErrors
 
ostream * 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
 
std::string ObjectName
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 
- 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 53 of file vtkSocketCommunicator.h.

Member Typedef Documentation

◆ Superclass

Definition at line 57 of file vtkSocketCommunicator.h.

Constructor & Destructor Documentation

◆ vtkSocketCommunicator()

vtkSocketCommunicator::vtkSocketCommunicator ( )
protected

◆ ~vtkSocketCommunicator()

vtkSocketCommunicator::~vtkSocketCommunicator ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkSocketCommunicator * vtkSocketCommunicator::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkSocketCommunicator::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool 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.

◆ SafeDownCast()

static vtkSocketCommunicator * vtkSocketCommunicator::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkSocketCommunicator::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkCommunicator.

◆ NewInstance()

vtkSocketCommunicator * vtkSocketCommunicator::NewInstance ( ) const

◆ PrintSelf()

void vtkSocketCommunicator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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.

◆ WaitForConnection() [1/2]

virtual int vtkSocketCommunicator::WaitForConnection ( int  port)
virtual

Wait for connection on a given port.

These methods return 1 on success, 0 on error.

◆ WaitForConnection() [2/2]

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.

◆ CloseConnection()

virtual void vtkSocketCommunicator::CloseConnection ( )
virtual

Close a connection.

◆ ConnectTo()

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

Open a connection to host.

◆ GetSwapBytesInReceivedData()

virtual int vtkSocketCommunicator::GetSwapBytesInReceivedData ( )
virtual

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

◆ GetIsConnected()

int vtkSocketCommunicator::GetIsConnected ( )

Is the communicator connected?.

◆ SetNumberOfProcesses()

void vtkSocketCommunicator::SetNumberOfProcesses ( int  num)
overridevirtual

Set the number of processes you will be using.

Reimplemented from vtkCommunicator.

◆ SendVoidArray()

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

Performs the actual communication.

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

Implements vtkCommunicator.

◆ ReceiveVoidArray()

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

Performs the actual communication.

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

Implements vtkCommunicator.

◆ Barrier()

void vtkSocketCommunicator::Barrier ( )
overridevirtual

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

Reimplemented from vtkCommunicator.

◆ BroadcastVoidArray()

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

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.

◆ GatherVoidArray()

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

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.

◆ GatherVVoidArray()

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

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.

◆ ScatterVoidArray()

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

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.

◆ ScatterVVoidArray()

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

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.

◆ AllGatherVoidArray()

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

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.

◆ AllGatherVVoidArray()

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

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.

◆ ReduceVoidArray() [1/2]

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

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.

◆ ReduceVoidArray() [2/2]

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

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.

◆ AllReduceVoidArray() [1/2]

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

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.

◆ AllReduceVoidArray() [2/2]

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

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.

◆ SetPerformHandshake()

virtual void vtkSocketCommunicator::SetPerformHandshake ( vtkTypeBool  )
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.

◆ PerformHandshakeOn()

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.

◆ PerformHandshakeOff()

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.

◆ GetPerformHandshake()

virtual vtkTypeBool 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.

◆ SetLogStream()

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.

◆ GetLogStream()

virtual ostream * vtkSocketCommunicator::GetLogStream ( )
virtual

Get/Set the output stream to which communications should be logged.

This is intended as a debugging feature.

◆ LogToFile() [1/2]

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 nullptr, logging is disabled. Returns 0 if the file failed to open, and 1 otherwise.

◆ LogToFile() [2/2]

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 nullptr, logging is disabled. Returns 0 if the file failed to open, and 1 otherwise.

◆ SetReportErrors()

virtual void vtkSocketCommunicator::SetReportErrors ( int  )
virtual

If ReportErrors if false, all vtkErrorMacros are suppressed.

◆ GetReportErrors()

virtual int vtkSocketCommunicator::GetReportErrors ( )
virtual

If ReportErrors if false, all vtkErrorMacros are suppressed.

◆ GetSocket()

virtual vtkClientSocket * vtkSocketCommunicator::GetSocket ( )
virtual

Get/Set the actual socket used for communication.

◆ SetSocket()

void vtkSocketCommunicator::SetSocket ( vtkClientSocket )

Get/Set the actual socket used for communication.

◆ Handshake()

int vtkSocketCommunicator::Handshake ( )

Performs handshake.

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

◆ ServerSideHandshake()

int vtkSocketCommunicator::ServerSideHandshake ( )

Performs ServerSide handshake.

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

◆ ClientSideHandshake()

int vtkSocketCommunicator::ClientSideHandshake ( )

Performs ClientSide handshake.

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

◆ GetIsServer()

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.

◆ GetVersion()

static int vtkSocketCommunicator::GetVersion ( )
static

Uniquely identifies the version of this class.

If the versions match, then the socket communicators should be compatible.

◆ BufferCurrentMessage()

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 message and it will be automatically processed the next time one does a ReceiveTagged() with a matching tag.

Definition at line 232 of file vtkSocketCommunicator.h.

◆ HasBufferredMessages()

bool vtkSocketCommunicator::HasBufferredMessages ( )

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

◆ SendTagged()

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

◆ ReceiveTagged()

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

◆ ReceivePartialTagged()

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

◆ ReceivedTaggedFromBuffer()

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

◆ FixByteOrder()

void vtkSocketCommunicator::FixByteOrder ( void *  data,
int  wordSize,
int  numWords 
)
protected

Fix byte order for received data.

◆ LogTagged()

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

◆ CheckForErrorInternal()

int vtkSocketCommunicator::CheckForErrorInternal ( int  id)
protected

Member Data Documentation

◆ Socket

vtkClientSocket* vtkSocketCommunicator::Socket
protected

Definition at line 240 of file vtkSocketCommunicator.h.

◆ SwapBytesInReceivedData

int vtkSocketCommunicator::SwapBytesInReceivedData
protected

Definition at line 241 of file vtkSocketCommunicator.h.

◆ RemoteHas64BitIds

int vtkSocketCommunicator::RemoteHas64BitIds
protected

Definition at line 242 of file vtkSocketCommunicator.h.

◆ PerformHandshake

vtkTypeBool vtkSocketCommunicator::PerformHandshake
protected

Definition at line 243 of file vtkSocketCommunicator.h.

◆ IsServer

int vtkSocketCommunicator::IsServer
protected

Definition at line 244 of file vtkSocketCommunicator.h.

◆ ReportErrors

int vtkSocketCommunicator::ReportErrors
protected

Definition at line 246 of file vtkSocketCommunicator.h.

◆ LogFile

ostream* vtkSocketCommunicator::LogFile
protected

Definition at line 248 of file vtkSocketCommunicator.h.

◆ LogStream

ostream* vtkSocketCommunicator::LogStream
protected

Definition at line 249 of file vtkSocketCommunicator.h.

◆ BufferMessage

bool vtkSocketCommunicator::BufferMessage
protected

Definition at line 272 of file vtkSocketCommunicator.h.


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