gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
GmshSocket Class Reference

#include <GmshSocket.h>

Inheritance diagram for GmshSocket:

Public Types

enum  MessageType {
  GMSH_START = 1, GMSH_STOP = 2, GMSH_INFO = 10, GMSH_WARNING = 11,
  GMSH_ERROR = 12, GMSH_PROGRESS = 13, GMSH_MERGE_FILE = 20, GMSH_PARSE_STRING = 21,
  GMSH_VERTEX_ARRAY = 22, GMSH_PARAMETER = 23, GMSH_PARAMETER_QUERY = 24, GMSH_PARAMETER_QUERY_ALL = 25,
  GMSH_PARAMETER_QUERY_END = 26, GMSH_CONNECT = 27, GMSH_OLPARSE = 28, GMSH_PARAMETER_NOT_FOUND = 29,
  GMSH_SPEED_TEST = 30, GMSH_PARAMETER_CLEAR = 31, GMSH_PARAMETER_UPDATE = 32, GMSH_OPEN_PROJECT = 33,
  GMSH_CLIENT_CHANGED = 34, GMSH_PARAMETER_WITHOUT_CHOICES = 35, GMSH_PARAMETER_QUERY_WITHOUT_CHOICES = 36, GMSH_OPTION_1 = 100,
  GMSH_OPTION_2 = 101, GMSH_OPTION_3 = 102, GMSH_OPTION_4 = 103, GMSH_OPTION_5 = 104
}
 

Public Member Functions

 GmshSocket ()
 
 ~GmshSocket ()
 
int Select (int seconds, int microseconds, int socket=-1)
 
void SendMessage (int type, int length, const void *msg)
 
void SendString (int type, const char *str)
 
void Info (const char *str)
 
void Warning (const char *str)
 
void Error (const char *str)
 
void Progress (const char *str)
 
void MergeFile (const char *str)
 
void OpenProject (const char *str)
 
void ParseString (const char *str)
 
void SpeedTest (const char *str)
 
void Option (int num, const char *str)
 
int ReceiveHeader (int *type, int *len, int *swap)
 
int ReceiveMessage (int len, void *buffer)
 
int ReceiveString (int len, char *str)
 
void CloseSocket (int s)
 
void ShutdownSocket (int s)
 
unsigned long int SentBytes ()
 
unsigned long int ReceivedBytes ()
 

Protected Member Functions

int _sendData (const void *buffer, int bytes)
 
int _receiveData (void *buffer, int bytes)
 
void _swapBytes (char *array, int size, int n)
 
void _sleep (int ms)
 

Protected Attributes

int _sock
 
std::string _sockname
 
unsigned long int _sent
 
unsigned long int _received
 

Detailed Description

Definition at line 59 of file GmshSocket.h.

Member Enumeration Documentation

◆ MessageType

Enumerator
GMSH_START 
GMSH_STOP 
GMSH_INFO 
GMSH_WARNING 
GMSH_ERROR 
GMSH_PROGRESS 
GMSH_MERGE_FILE 
GMSH_PARSE_STRING 
GMSH_VERTEX_ARRAY 
GMSH_PARAMETER 
GMSH_PARAMETER_QUERY 
GMSH_PARAMETER_QUERY_ALL 
GMSH_PARAMETER_QUERY_END 
GMSH_CONNECT 
GMSH_OLPARSE 
GMSH_PARAMETER_NOT_FOUND 
GMSH_SPEED_TEST 
GMSH_PARAMETER_CLEAR 
GMSH_PARAMETER_UPDATE 
GMSH_OPEN_PROJECT 
GMSH_CLIENT_CHANGED 
GMSH_PARAMETER_WITHOUT_CHOICES 
GMSH_PARAMETER_QUERY_WITHOUT_CHOICES 
GMSH_OPTION_1 
GMSH_OPTION_2 
GMSH_OPTION_3 
GMSH_OPTION_4 
GMSH_OPTION_5 

Definition at line 65 of file GmshSocket.h.

Constructor & Destructor Documentation

◆ GmshSocket()

GmshSocket::GmshSocket ( )
inline

Definition at line 156 of file GmshSocket.h.

◆ ~GmshSocket()

GmshSocket::~GmshSocket ( )
inline

Definition at line 163 of file GmshSocket.h.

Member Function Documentation

◆ _receiveData()

int GmshSocket::_receiveData ( void *  buffer,
int  bytes 
)
inlineprotected

Definition at line 119 of file GmshSocket.h.

Referenced by ReceiveHeader(), ReceiveMessage(), and ReceiveString().

Here is the caller graph for this function:

◆ _sendData()

int GmshSocket::_sendData ( const void *  buffer,
int  bytes 
)
inlineprotected

Definition at line 104 of file GmshSocket.h.

Referenced by SendMessage().

Here is the caller graph for this function:

◆ _sleep()

void GmshSocket::_sleep ( int  ms)
inlineprotected

Definition at line 146 of file GmshSocket.h.

Referenced by GmshClient::Connect().

Here is the caller graph for this function:

◆ _swapBytes()

void GmshSocket::_swapBytes ( char *  array,
int  size,
int  n 
)
inlineprotected

Definition at line 135 of file GmshSocket.h.

Referenced by ReceiveHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CloseSocket()

void GmshSocket::CloseSocket ( int  s)
inline

Definition at line 243 of file GmshSocket.h.

Referenced by GmshClient::Connect(), GmshClient::Disconnect(), GmshServer::Shutdown(), and GmshServer::Start().

Here is the caller graph for this function:

◆ Error()

void GmshSocket::Error ( const char *  str)
inline

Definition at line 200 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::_get(), Msg::Error(), onelab::remoteNetworkClient::sendError(), and onelab::remoteNetworkClient::waitOnSubClients().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Info()

void GmshSocket::Info ( const char *  str)
inline

Definition at line 198 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::_get(), Msg::Debug(), Msg::Direct(), Msg::Info(), onelab::remoteNetworkClient::sendInfo(), Msg::StatusBar(), and onelab::remoteNetworkClient::waitOnSubClients().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MergeFile()

void GmshSocket::MergeFile ( const char *  str)
inline

Definition at line 202 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::sendMergeFileRequest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OpenProject()

void GmshSocket::OpenProject ( const char *  str)
inline

Definition at line 203 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::sendOpenProjectRequest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Option()

void GmshSocket::Option ( int  num,
const char *  str 
)
inline

Definition at line 206 of file GmshSocket.h.

Here is the call graph for this function:

◆ ParseString()

void GmshSocket::ParseString ( const char *  str)
inline

Definition at line 204 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::sendParseStringRequest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Progress()

void GmshSocket::Progress ( const char *  str)
inline

Definition at line 201 of file GmshSocket.h.

Referenced by Msg::ProgressMeter(), and onelab::remoteNetworkClient::sendProgress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReceivedBytes()

unsigned long int GmshSocket::ReceivedBytes ( )
inline

Definition at line 258 of file GmshSocket.h.

◆ ReceiveHeader()

int GmshSocket::ReceiveHeader ( int *  type,
int *  len,
int *  swap 
)
inline

Definition at line 212 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::_get(), and onelab::remoteNetworkClient::waitOnSubClients().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReceiveMessage()

int GmshSocket::ReceiveMessage ( int  len,
void *  buffer 
)
inline

Definition at line 229 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::_get(), and onelab::remoteNetworkClient::waitOnSubClients().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReceiveString()

int GmshSocket::ReceiveString ( int  len,
char *  str 
)
inline

Definition at line 235 of file GmshSocket.h.

Here is the call graph for this function:

◆ Select()

int GmshSocket::Select ( int  seconds,
int  microseconds,
int  socket = -1 
)
inline

Definition at line 173 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::_get(), and onelab::remoteNetworkClient::waitOnSubClients().

Here is the caller graph for this function:

◆ SendMessage()

void GmshSocket::SendMessage ( int  type,
int  length,
const void *  msg 
)
inline

Definition at line 186 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::_get(), onelab::remoteNetworkClient::_set(), onelab::remoteNetworkClient::clear(), onelab::remoteNetworkClient::runNonBlockingSubClient(), and SendString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendString()

void GmshSocket::SendString ( int  type,
const char *  str 
)
inline

Definition at line 194 of file GmshSocket.h.

Referenced by Error(), PViewDataRemote::fillRemoteVertexArrays(), Info(), MergeFile(), OpenProject(), Option(), ParseString(), Progress(), SpeedTest(), GmshClient::Start(), GmshClient::Stop(), and Warning().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SentBytes()

unsigned long int GmshSocket::SentBytes ( )
inline

Definition at line 257 of file GmshSocket.h.

◆ ShutdownSocket()

void GmshSocket::ShutdownSocket ( int  s)
inline

Definition at line 251 of file GmshSocket.h.

Referenced by GmshServer::Shutdown().

Here is the caller graph for this function:

◆ SpeedTest()

void GmshSocket::SpeedTest ( const char *  str)
inline

Definition at line 205 of file GmshSocket.h.

Here is the call graph for this function:

◆ Warning()

void GmshSocket::Warning ( const char *  str)
inline

Definition at line 199 of file GmshSocket.h.

Referenced by onelab::remoteNetworkClient::sendWarning(), and Msg::Warning().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _received

unsigned long int GmshSocket::_received
protected

Definition at line 102 of file GmshSocket.h.

Referenced by _receiveData(), and ReceivedBytes().

◆ _sent

unsigned long int GmshSocket::_sent
protected

Definition at line 102 of file GmshSocket.h.

Referenced by _sendData(), and SentBytes().

◆ _sock

int GmshSocket::_sock
protected

◆ _sockname

std::string GmshSocket::_sockname
protected

Definition at line 100 of file GmshSocket.h.

Referenced by GmshServer::Shutdown(), and GmshServer::Start().


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