Belle II Software development
|
Public Member Functions | |
NSMCommunicator (const std::string &host="", int port=-1) | |
NSMCommunicator (NSMcontext *nsmc) | |
void | init (const NSMNode &node, const std::string &host, int port) |
void | setCallback (NSMCallback *callback) |
void | callContext () |
int | getId () const |
void | setId (int id) |
NSMMessage & | getMessage () |
const NSMMessage & | getMessage () const |
void | setMessage (const NSMMessage &msg) |
const NSMNode & | getNode () const |
int | getNodeIdByName (const std::string &name) |
int | getNodePidByName (const std::string &name) |
const std::string & | getHostName () |
int | getPort () |
NSMCallback & | getCallback () |
bool | isConnected (const std::string &node) |
const std::string | getNodeNameById (int id) |
void | pushQueue (const NSMMessage &msg) |
bool | hasQueue () const |
NSMMessage | popQueue () |
Static Public Member Functions | |
static NSMCommunicator & | select (double sec) |
static NSMCommunicator & | connected (const std::string &node) |
static NSMCommunicatorList & | get () |
static bool | send (const NSMMessage &msg) |
Private Types | |
typedef std::vector< NSMCommunicator * > | NSMCommunicatorList |
Private Member Functions | |
NSMcontext * | getContext () |
bool | sendRequest (const NSMMessage &msg) |
Private Attributes | |
int | m_id |
NSMcontext * | m_nsmc |
NSMCallback * | m_callback |
NSMMessage | m_message |
std::string | m_host |
int | m_port |
NSMNode | m_node |
std::queue< NSMMessage > | m_msg_q |
Static Private Attributes | |
static NSMCommunicatorList | g_comm |
static Mutex | g_mutex |
static Mutex | g_mutex_select |
Friends | |
class | NSMData |
Definition at line 32 of file NSMCommunicator.h.
|
private |
Definition at line 34 of file NSMCommunicator.h.
NSMCommunicator | ( | const std::string & | host = "" , |
int | port = -1 |
||
) |
Definition at line 140 of file NSMCommunicator.cc.
|
explicit |
Definition at line 149 of file NSMCommunicator.cc.
|
inline |
Definition at line 52 of file NSMCommunicator.h.
|
static |
Definition at line 96 of file NSMCommunicator.cc.
|
inlinestatic |
Definition at line 41 of file NSMCommunicator.h.
NSMCallback & getCallback | ( | ) |
Definition at line 182 of file NSMCommunicator.cc.
|
inlineprivate |
Definition at line 85 of file NSMCommunicator.h.
|
inline |
Definition at line 75 of file NSMCommunicator.h.
|
inline |
Definition at line 63 of file NSMCommunicator.h.
|
inline |
Definition at line 65 of file NSMCommunicator.h.
|
inline |
Definition at line 66 of file NSMCommunicator.h.
|
inline |
Definition at line 68 of file NSMCommunicator.h.
int getNodeIdByName | ( | const std::string & | name | ) |
Definition at line 208 of file NSMCommunicator.cc.
const std::string getNodeNameById | ( | int | id | ) |
Definition at line 218 of file NSMCommunicator.cc.
int getNodePidByName | ( | const std::string & | name | ) |
Definition at line 225 of file NSMCommunicator.cc.
|
inline |
Definition at line 76 of file NSMCommunicator.h.
|
inline |
Definition at line 81 of file NSMCommunicator.h.
void init | ( | const NSMNode & | node, |
const std::string & | host, | ||
int | port | ||
) |
Definition at line 156 of file NSMCommunicator.cc.
bool isConnected | ( | const std::string & | node | ) |
Definition at line 235 of file NSMCommunicator.cc.
NSMMessage popQueue | ( | ) |
Definition at line 242 of file NSMCommunicator.cc.
|
inline |
Definition at line 80 of file NSMCommunicator.h.
|
static |
Definition at line 50 of file NSMCommunicator.cc.
|
static |
Definition at line 106 of file NSMCommunicator.cc.
void setCallback | ( | NSMCallback * | callback | ) |
Definition at line 190 of file NSMCommunicator.cc.
|
inline |
Definition at line 64 of file NSMCommunicator.h.
void setMessage | ( | const NSMMessage & | msg | ) |
Definition at line 249 of file NSMCommunicator.cc.
|
friend |
Definition at line 36 of file NSMCommunicator.h.
|
staticprivate |
Definition at line 45 of file NSMCommunicator.h.
|
staticprivate |
Definition at line 46 of file NSMCommunicator.h.
|
staticprivate |
Definition at line 47 of file NSMCommunicator.h.
|
private |
Definition at line 93 of file NSMCommunicator.h.
|
private |
Definition at line 95 of file NSMCommunicator.h.
|
private |
Definition at line 91 of file NSMCommunicator.h.
|
private |
Definition at line 94 of file NSMCommunicator.h.
|
private |
Definition at line 98 of file NSMCommunicator.h.
|
private |
Definition at line 97 of file NSMCommunicator.h.
|
private |
Definition at line 92 of file NSMCommunicator.h.
|
private |
Definition at line 96 of file NSMCommunicator.h.