MOOS 0.2375
|
#include <MOOSDB.h>
The CMOOSDB class is the core of the MOOS comms protocol. It is only of interest to the developer modifying the MOOSDB application server
CMOOSDB::CMOOSDB | ( | ) |
Definition at line 69 of file MOOSDB.cpp.
CMOOSDB::~CMOOSDB | ( | ) | [virtual] |
Definition at line 120 of file MOOSDB.cpp.
we now want to store some message in anoth cleints message box, when they next call in they shall be informed of the change by stuffing this msg into a return packet
Definition at line 432 of file MOOSDB.cpp.
bool CMOOSDB::DoServerRequest | ( | CMOOSMsg & | Msg, |
MOOSMSG_LIST & | MsgTxList | ||
) | [protected] |
Definition at line 585 of file MOOSDB.cpp.
bool CMOOSDB::DoVarLookup | ( | CMOOSMsg & | Msg, |
MOOSMSG_LIST & | MsgTxList | ||
) | [protected] |
long CMOOSDB::GetDBPort | ( | ) | [inline] |
CMOOSDBVar & CMOOSDB::GetOrMakeVar | ( | CMOOSMsg & | Msg | ) | [protected] |
return a reference to a DB variable is it already exists and if not make one and then return a reference to it.
Msg | Msg.m_sKey contains name of variable |
Definition at line 515 of file MOOSDB.cpp.
bool CMOOSDB::OnClearRequested | ( | CMOOSMsg & | Msg, |
MOOSMSG_LIST & | MsgTxList | ||
) | [protected] |
Definition at line 747 of file MOOSDB.cpp.
bool CMOOSDB::OnDisconnect | ( | string & | sClient | ) |
Definition at line 565 of file MOOSDB.cpp.
bool CMOOSDB::OnDisconnectCallBack | ( | string & | sClient, |
void * | pParam | ||
) | [static] |
called internally when a client disconnects
Definition at line 62 of file MOOSDB.cpp.
called when the in focus client is telling us something has changed. Ie this is a notify packet
Definition at line 305 of file MOOSDB.cpp.
bool CMOOSDB::OnProcessSummaryRequested | ( | CMOOSMsg & | Msg, |
MOOSMSG_LIST & | MsgTxList | ||
) | [protected] |
Definition at line 611 of file MOOSDB.cpp.
Called when a msg containing a registration (subscription) request is received
Definition at line 478 of file MOOSDB.cpp.
bool CMOOSDB::OnRxPkt | ( | const std::string & | sClient, |
MOOSMSG_LIST & | MsgListRx, | ||
MOOSMSG_LIST & | MsgListTx | ||
) |
called internally when a MOOSPkt (a collection of MOOSMsg's ) is received by the server
this will be called each time a new packet is recieved
Definition at line 218 of file MOOSDB.cpp.
bool CMOOSDB::OnRxPktCallBack | ( | const std::string & | sClient, |
MOOSMSG_LIST & | MsgLstRx, | ||
MOOSMSG_LIST & | MsgLstTx, | ||
void * | pParam | ||
) | [static] |
callback function passed to CMOOSCommServer member object. This STATIC function allows entry back into this object by invoking OnRxPkt()
Definition at line 55 of file MOOSDB.cpp.
bool CMOOSDB::OnServerAllRequested | ( | CMOOSMsg & | Msg, |
MOOSMSG_LIST & | MsgTxList | ||
) | [protected] |
Next three functions are unusual and their genus should not proliferate. Very occasionally a client with a singularly unusual role may want to ask questions directly to the DB. The paired function is in MOOCCommClient::ServerRequest which unusually, is blocking (with timeout) - hence my edgey feel about these utilities
Definition at line 673 of file MOOSDB.cpp.
Called when a msg containing a unregistration (desubscribe) request is received
Definition at line 459 of file MOOSDB.cpp.
bool CMOOSDB::OnVarSummaryRequested | ( | CMOOSMsg & | Msg, |
MOOSMSG_LIST & | MsgTxList | ||
) | [protected] |
Definition at line 713 of file MOOSDB.cpp.
bool CMOOSDB::ProcessMsg | ( | CMOOSMsg & | MsgRx, |
MOOSMSG_LIST & | MsgListTx | ||
) | [protected] |
This functions decides what needs to be done on a message by message basis
Definition at line 275 of file MOOSDB.cpp.
bool CMOOSDB::Run | ( | const std::string & | sMissionFile = "" | ) |
called by the owning application to start the DB running. It launches threads and returns
Definition at line 125 of file MOOSDB.cpp.
void CMOOSDB::UpdateDBClientsVar | ( | ) | [protected] |
Definition at line 173 of file MOOSDB.cpp.
void CMOOSDB::UpdateDBTimeVars | ( | ) | [protected] |
Definition at line 198 of file MOOSDB.cpp.
void CMOOSDB::Var2Msg | ( | CMOOSDBVar & | Var, |
CMOOSMsg & | Msg | ||
) | [protected] |
Definition at line 824 of file MOOSDB.cpp.
bool CMOOSDB::VariableExists | ( | const string & | sVar | ) | [protected] |
Definition at line 817 of file MOOSDB.cpp.