A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pdb::PDBCommunicator Class Reference

#include <PDBCommunicator.h>

+ Collaboration diagram for pdb::PDBCommunicator:

Public Member Functions

bool pointToFile (PDBLoggerPtr logToMeIn, int socketFDIn, std::string &errMsg)
 
bool pointToInternet (PDBLoggerPtr logToMeIn, int socketFDIn, std::string &errMs)
 
bool connectToInternetServer (PDBLoggerPtr logToMeIn, int portNumber, std::string serverAddress, std::string &errMsg)
 
bool connectToLocalServer (PDBLoggerPtr logToMeIn, std::string fName, std::string &errMsg)
 
size_t getSizeOfNextObject ()
 
template<class ObjType >
Handle< ObjType > getNextObject (void *readToHere, bool &success, std::string &errMsg)
 
template<class ObjType >
Handle< ObjType > getNextObject (bool &success, std::string &errMsg)
 
template<class ObjType >
bool sendObject (Handle< ObjType > &sendMe, std::string &errMsg)
 
bool sendBytes (void *data, size_t size, std::string &errMsg)
 
bool receiveBytes (void *data, std::string &errMsg)
 
virtual ~PDBCommunicator ()
 
 PDBCommunicator ()
 
int16_t getObjectTypeID ()
 
void setNeedsToDisconnect (bool option)
 
int getSocketFD ()
 
bool isSocketClosed ()
 
bool isLongConnection ()
 
void setLongConnection (bool longConnection)
 
bool reconnect (std::string &errMsg)
 

Private Member Functions

bool doTheWrite (char *start, char *end)
 
bool doTheRead (char *dataIn)
 

Private Attributes

size_t msgSize
 
int socketFD
 
PDBLoggerPtr logToMe
 
bool readCurMsgSize
 
int16_t nextTypeID
 
bool needToSendDisconnectMsg
 
bool socketClosed
 
bool longConnection
 
int portNumber
 
std::string serverAddress
 
std::string fileName
 
bool isInternet
 

Detailed Description

Definition at line 43 of file PDBCommunicator.h.

Constructor & Destructor Documentation

pdb::PDBCommunicator::~PDBCommunicator ( )
virtual

Definition at line 292 of file PDBCommunicator.cc.

+ Here is the call graph for this function:

pdb::PDBCommunicator::PDBCommunicator ( )

Definition at line 51 of file PDBCommunicator.cc.

Member Function Documentation

bool pdb::PDBCommunicator::connectToInternetServer ( PDBLoggerPtr  logToMeIn,
int  portNumber,
std::string  serverAddress,
std::string &  errMsg 
)

Definition at line 85 of file PDBCommunicator.cc.

+ Here is the caller graph for this function:

bool pdb::PDBCommunicator::connectToLocalServer ( PDBLoggerPtr  logToMeIn,
std::string  fName,
std::string &  errMsg 
)

Definition at line 224 of file PDBCommunicator.cc.

+ Here is the caller graph for this function:

bool pdb::PDBCommunicator::doTheRead ( char *  dataIn)
private

Definition at line 539 of file PDBCommunicator.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::PDBCommunicator::doTheWrite ( char *  start,
char *  end 
)
private

Definition at line 497 of file PDBCommunicator.cc.

+ Here is the caller graph for this function:

template<class ObjType >
Handle< ObjType > pdb::PDBCommunicator::getNextObject ( void *  readToHere,
bool &  success,
std::string &  errMsg 
)

Definition at line 160 of file CommunicatorTemplates.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ObjType >
Handle< ObjType > pdb::PDBCommunicator::getNextObject ( bool &  success,
std::string &  errMsg 
)

Definition at line 214 of file CommunicatorTemplates.cc.

+ Here is the call graph for this function:

int16_t pdb::PDBCommunicator::getObjectTypeID ( )

Definition at line 342 of file PDBCommunicator.cc.

+ Here is the call graph for this function:

size_t pdb::PDBCommunicator::getSizeOfNextObject ( )

Definition at line 350 of file PDBCommunicator.cc.

+ Here is the caller graph for this function:

int pdb::PDBCommunicator::getSocketFD ( )

Definition at line 338 of file PDBCommunicator.cc.

bool pdb::PDBCommunicator::isLongConnection ( )

Definition at line 612 of file PDBCommunicator.cc.

bool pdb::PDBCommunicator::isSocketClosed ( )

Definition at line 608 of file PDBCommunicator.cc.

bool pdb::PDBCommunicator::pointToFile ( PDBLoggerPtr  logToMeIn,
int  socketFDIn,
std::string &  errMsg 
)

Definition at line 269 of file PDBCommunicator.cc.

bool pdb::PDBCommunicator::pointToInternet ( PDBLoggerPtr  logToMeIn,
int  socketFDIn,
std::string &  errMs 
)

Definition at line 61 of file PDBCommunicator.cc.

bool pdb::PDBCommunicator::receiveBytes ( void *  data,
std::string &  errMsg 
)
inline

Definition at line 110 of file CommunicatorTemplates.cc.

+ Here is the call graph for this function:

bool pdb::PDBCommunicator::reconnect ( std::string &  errMsg)

Definition at line 620 of file PDBCommunicator.cc.

+ Here is the call graph for this function:

bool pdb::PDBCommunicator::sendBytes ( void *  data,
size_t  size,
std::string &  errMsg 
)
inline

Definition at line 129 of file CommunicatorTemplates.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ObjType >
bool pdb::PDBCommunicator::sendObject ( Handle< ObjType > &  sendMe,
std::string &  errMsg 
)

Definition at line 47 of file CommunicatorTemplates.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void pdb::PDBCommunicator::setLongConnection ( bool  longConnection)

Definition at line 616 of file PDBCommunicator.cc.

void pdb::PDBCommunicator::setNeedsToDisconnect ( bool  option)

Definition at line 220 of file PDBCommunicator.cc.

Member Data Documentation

std::string pdb::PDBCommunicator::fileName
private

Definition at line 148 of file PDBCommunicator.h.

bool pdb::PDBCommunicator::isInternet
private

Definition at line 150 of file PDBCommunicator.h.

PDBLoggerPtr pdb::PDBCommunicator::logToMe
private

Definition at line 125 of file PDBCommunicator.h.

bool pdb::PDBCommunicator::longConnection
private

Definition at line 140 of file PDBCommunicator.h.

size_t pdb::PDBCommunicator::msgSize
private

Definition at line 119 of file PDBCommunicator.h.

bool pdb::PDBCommunicator::needToSendDisconnectMsg
private

Definition at line 135 of file PDBCommunicator.h.

int16_t pdb::PDBCommunicator::nextTypeID
private

Definition at line 131 of file PDBCommunicator.h.

int pdb::PDBCommunicator::portNumber
private

Definition at line 144 of file PDBCommunicator.h.

bool pdb::PDBCommunicator::readCurMsgSize
private

Definition at line 128 of file PDBCommunicator.h.

std::string pdb::PDBCommunicator::serverAddress
private

Definition at line 146 of file PDBCommunicator.h.

bool pdb::PDBCommunicator::socketClosed
private

Definition at line 138 of file PDBCommunicator.h.

int pdb::PDBCommunicator::socketFD
private

Definition at line 122 of file PDBCommunicator.h.


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