[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
certi RTIA/FederationManagement.cc RTIA/RTIA_fe...
From: |
certi-cvs |
Subject: |
certi RTIA/FederationManagement.cc RTIA/RTIA_fe... |
Date: |
Tue, 29 Jan 2008 14:30:52 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: ROUSSELOT <rousse> 08/01/29 14:30:51
Modified files:
RTIA : FederationManagement.cc RTIA_federate.cc
RTIA_network.cc
RTIG : Federation.cc FederationsList.cc RTIG.cc
RTIG_processing.cc
libCERTI : Message_W.cc NetworkMessage_RW.cc
Log message:
Request Federation Save implemented. Ready for tests
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.cc?cvsroot=certi&r1=3.39&r2=3.40
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.57&r2=3.58
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_network.cc?cvsroot=certi&r1=3.17&r2=3.18
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&r1=3.75&r2=3.76
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.cc?cvsroot=certi&r1=3.48&r2=3.49
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&r1=3.31&r2=3.32
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.47&r2=3.48
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message_W.cc?cvsroot=certi&r1=3.13&r2=3.14
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NetworkMessage_RW.cc?cvsroot=certi&r1=3.39&r2=3.40
Patches:
Index: RTIA/FederationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.cc,v
retrieving revision 3.39
retrieving revision 3.40
diff -u -b -r3.39 -r3.40
--- RTIA/FederationManagement.cc 21 Dec 2007 14:29:41 -0000 3.39
+++ RTIA/FederationManagement.cc 29 Jan 2008 14:30:50 -0000 3.40
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: FederationManagement.cc,v 3.39 2007/12/21 14:29:41 rousse Exp $
+// $Id: FederationManagement.cc,v 3.40 2008/01/29 14:30:50 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -754,6 +754,7 @@
void
FederationManagement::federateSaveBegun(TypeException &)
{
+ G.Out(pdGendoc,"enter FederationManagement::federateSaveBegun");
D.Out(pdInit, "Beginning federate save.");
if (!savingState)
@@ -762,14 +763,21 @@
NetworkMessage req ;
req.type = NetworkMessage::FEDERATE_SAVE_BEGUN ;
+ req.federate = federate ;
+ req.federation = _numero_federation ;
+
+ G.Out(pdGendoc," federateSaveBegun ====>send Message F_S_B to RTIG");
comm->sendMessage(&req);
+
+ G.Out(pdGendoc,"exit FederationManagement::federateSaveBegun");
}
// ----------------------------------------------------------------------------
void
FederationManagement::federateSaveStatus(bool status, TypeException &)
{
+ G.Out(pdGendoc,"enter FederationManagement::federateSaveStatus");
D.Out(pdInit, "Federate %ssaved.", status ? "" : "not ");
if (!savingState)
@@ -778,8 +786,21 @@
NetworkMessage req ;
req.type = status ? NetworkMessage::FEDERATE_SAVE_COMPLETE :
NetworkMessage::FEDERATE_SAVE_NOT_COMPLETE ;
+ req.federate = federate ;
+ req.federation = _numero_federation ;
+
+ if (status)
+ {
+ G.Out(pdGendoc," federateSaveStatus ====>send Message F_S_C to
RTIG");
+ }
+ else
+ {
+ G.Out(pdGendoc," federateSaveStatus ====>send Message F_S_N_C to
RTIG");
+ }
comm->sendMessage(&req);
+
+ G.Out(pdGendoc,"exit FederationManagement::federateSaveStatus");
}
// ----------------------------------------------------------------------------
@@ -807,6 +828,7 @@
void
FederationManagement::federationSavedStatus(bool status)
{
+ G.Out(pdGendoc,"enter FederationManagement::federationSavedStatus");
D.Out(pdInit, "Federation %ssaved.", status ? "" : "not ");
savingState = false ;
@@ -816,6 +838,8 @@
req.type = status ? Message::FEDERATION_SAVED :
Message::FEDERATION_NOT_SAVED ;
comm->requestFederateService(&req, &rep);
+
+ G.Out(pdGendoc,"exit FederationManagement::federationSavedStatus");
}
// ----------------------------------------------------------------------------
@@ -948,4 +972,4 @@
}} // namespace certi/rtia
-// $Id: FederationManagement.cc,v 3.39 2007/12/21 14:29:41 rousse Exp $
+// $Id: FederationManagement.cc,v 3.40 2008/01/29 14:30:50 rousse Exp $
Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.57
retrieving revision 3.58
diff -u -b -r3.57 -r3.58
--- RTIA/RTIA_federate.cc 17 Dec 2007 16:01:24 -0000 3.57
+++ RTIA/RTIA_federate.cc 29 Jan 2008 14:30:51 -0000 3.58
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIA_federate.cc,v 3.57 2007/12/17 16:01:24 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.58 2008/01/29 14:30:51 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -232,7 +232,7 @@
case Message::FEDERATE_SAVE_BEGUN:
D.Out(pdTrace, "Receiving Message from Federate, type"
" FederateSaveBegun.");
-
+ G.Out(pdGendoc,"chooseFederateProcessing FEDERATE_SAVE_BEGUN");
fm->federateSaveBegun(e);
break ;
@@ -240,8 +240,15 @@
case Message::FEDERATE_SAVE_NOT_COMPLETE: {
D.Out(pdTrace, "Receiving Message from Federate, type"
" FederateSave(Not)Complete.");
-
bool result = req->type == Message::FEDERATE_SAVE_COMPLETE ;
+ if (result)
+ {
+ G.Out(pdGendoc,"chooseFederateProcessing
FEDERATE_SAVE_COMPLETE");
+ }
+ else
+ {
+ G.Out(pdGendoc,"chooseFederateProcessing
FEDERATE_SAVE_NOT_COMPLETE");
+ }
fm->federateSaveStatus(result, e);
}
break ;
@@ -1259,4 +1266,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_federate.cc,v 3.57 2007/12/17 16:01:24 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.58 2008/01/29 14:30:51 rousse Exp $
Index: RTIA/RTIA_network.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_network.cc,v
retrieving revision 3.17
retrieving revision 3.18
diff -u -b -r3.17 -r3.18
--- RTIA/RTIA_network.cc 18 Dec 2007 16:23:58 -0000 3.17
+++ RTIA/RTIA_network.cc 29 Jan 2008 14:30:51 -0000 3.18
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIA_network.cc,v 3.17 2007/12/18 16:23:58 rousse Exp $
+// $Id: RTIA_network.cc,v 3.18 2008/01/29 14:30:51 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -34,6 +34,7 @@
namespace rtia {
static pdCDebug D("RTIA", "(RTIA net) ");
+static PrettyDebug G("GENDOC",__FILE__);
// ----------------------------------------------------------------------------
//! RTIA processes a message coming from network.
@@ -42,6 +43,8 @@
{
NetworkMessage::Type msgType = msg->type;
+G.Out(pdGendoc,"enter RTIA::processNetworkMessage");
+
//D.Mes(pdMessage, 'N', msgType);
msg->trace("RTIA::processNetworkMessage ");
@@ -334,8 +337,9 @@
}
stat.rtiService(msgType);
+ G.Out(pdGendoc,"exit RTIA::processNetworkMessage");
}
}} // namespace certi/rtia
-// $Id: RTIA_network.cc,v 3.17 2007/12/18 16:23:58 rousse Exp $
+// $Id: RTIA_network.cc,v 3.18 2008/01/29 14:30:51 rousse Exp $
Index: RTIG/Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.75
retrieving revision 3.76
diff -u -b -r3.75 -r3.76
--- RTIG/Federation.cc 19 Dec 2007 10:38:06 -0000 3.75
+++ RTIG/Federation.cc 29 Jan 2008 14:30:51 -0000 3.76
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: Federation.cc,v 3.75 2007/12/19 10:38:06 rousse Exp $
+// $Id: Federation.cc,v 3.76 2008/01/29 14:30:51 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -1042,7 +1042,9 @@
Federation::federateSaveBegun(FederateHandle the_federate)
throw (FederateNotExecutionMember)
{
+ G.Out(pdGendoc,"enter Federation::federateSaveBegun");
check(the_federate);
+ G.Out(pdGendoc,"exit Federation::federateSaveBegun");
}
// ----------------------------------------------------------------------------
@@ -1083,6 +1085,8 @@
broadcastAnyMessage(&msg, 0);
+ G.Out(pdGendoc," =======> broadcast F_S or F_N_S");
+
// Reinitialize state.
saveStatus = true ;
saveInProgress = false ;
@@ -2246,5 +2250,5 @@
}} // namespace certi/rtig
-// $Id: Federation.cc,v 3.75 2007/12/19 10:38:06 rousse Exp $
+// $Id: Federation.cc,v 3.76 2008/01/29 14:30:51 rousse Exp $
Index: RTIG/FederationsList.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/FederationsList.cc,v
retrieving revision 3.48
retrieving revision 3.49
diff -u -b -r3.48 -r3.49
--- RTIG/FederationsList.cc 21 Dec 2007 14:29:41 -0000 3.48
+++ RTIG/FederationsList.cc 29 Jan 2008 14:30:51 -0000 3.49
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: FederationsList.cc,v 3.48 2007/12/21 14:29:41 rousse Exp $
+// $Id: FederationsList.cc,v 3.49 2008/01/29 14:30:51 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -1458,6 +1458,8 @@
FederationsList::federateSaveBegun(Handle the_federation,
FederateHandle the_federate)
{
+ G.Out(pdGendoc,"enter FederationsList::federateSaveBegun");
+
checkHandle(the_federation);
// It may throw FederationExecutionDoesNotExist
@@ -1465,6 +1467,8 @@
searchFederation(the_federation, federation);
federation->federateSaveBegun(the_federate);
+
+ G.Out(pdGendoc,"exit FederationsList::federateSaveBegun");
}
// ----------------------------------------------------------------------------
@@ -1473,6 +1477,8 @@
FederateHandle the_federate,
bool the_status)
{
+ G.Out(pdGendoc,"enter FederationsList::federateSaveStatus");
+
checkHandle(the_federation);
// It may throw FederationExecutionDoesNotExist
@@ -1480,6 +1486,8 @@
searchFederation(the_federation, federation);
federation->federateSaveStatus(the_federate, the_status);
+
+ G.Out(pdGendoc,"exit FederationsList::federateSaveStatus");
}
// ----------------------------------------------------------------------------
@@ -1514,5 +1522,5 @@
}} // certi::rtig
-// EOF $Id: FederationsList.cc,v 3.48 2007/12/21 14:29:41 rousse Exp $
+// EOF $Id: FederationsList.cc,v 3.49 2008/01/29 14:30:51 rousse Exp $
Index: RTIG/RTIG.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.31
retrieving revision 3.32
diff -u -b -r3.31 -r3.32
--- RTIG/RTIG.cc 6 Jul 2007 09:25:19 -0000 3.31
+++ RTIG/RTIG.cc 29 Jan 2008 14:30:51 -0000 3.32
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIG.cc,v 3.31 2007/07/06 09:25:19 erk Exp $
+// $Id: RTIG.cc,v 3.32 2008/01/29 14:30:51 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -46,7 +46,7 @@
// ----------------------------------------------------------------------------
// Constructor
-
+// Note (JYR) : udpPort modified AFTER used in socketServer(.) call, strange...
RTIG::RTIG()
: terminate(false), federationHandles(1),
socketServer(&tcpSocketServer, &udpSocketServer, udpPort),
@@ -397,6 +397,7 @@
// ----------------------------------------------------------------------------
// execute
+// Called only by RTIG main
void
RTIG::execute()
{
@@ -977,4 +978,4 @@
}} // namespace certi/rtig
-// $Id: RTIG.cc,v 3.31 2007/07/06 09:25:19 erk Exp $
+// $Id: RTIG.cc,v 3.32 2008/01/29 14:30:51 rousse Exp $
Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.47
retrieving revision 3.48
diff -u -b -r3.47 -r3.48
--- RTIG/RTIG_processing.cc 17 Dec 2007 16:01:24 -0000 3.47
+++ RTIG/RTIG_processing.cc 29 Jan 2008 14:30:51 -0000 3.48
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIG_processing.cc,v 3.47 2007/12/17 16:01:24 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.48 2008/01/29 14:30:51 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -504,19 +504,31 @@
void
RTIG::processFederateSaveBegun(Socket *, NetworkMessage *req)
{
+ G.Out(pdGendoc,"BEGIN ** FEDERATE SAVE BEGUN SERVICE **");
+ G.Out(pdGendoc,"enter RTIG::processFederateSaveBegun");
+
+ G.Out(pdGendoc,"processFederateSaveBegun federation = %d",req->federation);
+
auditServer << "Federate " << req->federate << " save begun." ;
federations.federateSaveBegun(req->federation, req->federate);
+
+ G.Out(pdGendoc,"exit RTIG::processFederateSaveBegun");
+ G.Out(pdGendoc,"END ** FEDERATE SAVE BEGUN SERVICE **");
}
// ----------------------------------------------------------------------------
void
RTIG::processFederateSaveStatus(Socket *, NetworkMessage *req)
{
+ G.Out(pdGendoc,"enter RTIG::processFederateSaveStatus");
+
auditServer << "Federate " << req->federate << " save ended." ;
bool status = req->type == NetworkMessage::FEDERATE_SAVE_COMPLETE ;
federations.federateSaveStatus(req->federation, req->federate, status);
+
+ G.Out(pdGendoc,"exit RTIG::processFederateSaveStatus");
}
// ----------------------------------------------------------------------------
@@ -1325,4 +1337,4 @@
}} // namespace certi/rtig
-// $Id: RTIG_processing.cc,v 3.47 2007/12/17 16:01:24 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.48 2008/01/29 14:30:51 rousse Exp $
Index: libCERTI/Message_W.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Message_W.cc,v
retrieving revision 3.13
retrieving revision 3.14
diff -u -b -r3.13 -r3.14
--- libCERTI/Message_W.cc 17 Dec 2007 16:01:25 -0000 3.13
+++ libCERTI/Message_W.cc 29 Jan 2008 14:30:51 -0000 3.14
@@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Message_W.cc,v 3.13 2007/12/17 16:01:25 rousse Exp $
+// $Id: Message_W.cc,v 3.14 2008/01/29 14:30:51 rousse Exp $
// ----------------------------------------------------------------------------
@@ -463,6 +463,7 @@
// 3- Write Header to socket, then write Body to socket.
// socket->send((void *) &Header, sizeof(MessageHeader));
+ G.Out(pdGendoc," Message::writeBody ======> send Message");
socket->send(body.getBuffer(), body.size());
G.Out(pdGendoc,"exit Message::writeBody");
}
@@ -711,4 +712,4 @@
} // namespace certi
-// $Id: Message_W.cc,v 3.13 2007/12/17 16:01:25 rousse Exp $
+// $Id: Message_W.cc,v 3.14 2008/01/29 14:30:51 rousse Exp $
Index: libCERTI/NetworkMessage_RW.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/NetworkMessage_RW.cc,v
retrieving revision 3.39
retrieving revision 3.40
diff -u -b -r3.39 -r3.40
--- libCERTI/NetworkMessage_RW.cc 18 Dec 2007 16:23:58 -0000 3.39
+++ libCERTI/NetworkMessage_RW.cc 29 Jan 2008 14:30:51 -0000 3.40
@@ -16,7 +16,7 @@
// License along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: NetworkMessage_RW.cc,v 3.39 2007/12/18 16:23:58 rousse Exp $
+// $Id: NetworkMessage_RW.cc,v 3.40 2008/01/29 14:30:51 rousse Exp $
// ----------------------------------------------------------------------------
@@ -385,6 +385,9 @@
case DDM_CREATE_REGION:
case FEDERATE_SAVE_BEGUN:
case FEDERATE_SAVE_COMPLETE:
+ case FEDERATE_SAVE_NOT_COMPLETE:
+ case FEDERATION_SAVED:
+ case FEDERATION_NOT_SAVED:
case FEDERATE_RESTORE_COMPLETE:
case FEDERATE_RESTORE_NOT_COMPLETE:
case FEDERATION_RESTORE_BEGUN:
@@ -484,6 +487,8 @@
MessageBody body ;
unsigned short i ;
+ G.Out(pdGendoc,"enter NetworkMessage::writeBody");
+
// 0- Copy the Header at the beginning of the body, in order to
// make a single Socket->Emettre call while sending both.
// WARNING: As the body size is not known yet, we will have to
@@ -740,12 +745,15 @@
(reinterpret_cast<HeaderStruct *>(body.getBufferModeRW()))->bodySize =
Header.bodySize ;
D.Out(pdTrace,"Sending MessageBody of size <%d>",body.size());
socket->send(body.getBuffer(), body.size());
+
+ G.Out(pdGendoc,"exit NetworkMessage::writeBody");
}
// ----------------------------------------------------------------------------
bool
NetworkMessage::writeHeader(Socket *socket)
{
+ G.Out(pdGendoc,"enter NetworkMessage::writeHeader");
// 2- Fill Header(Static Part)
Header.type = type ;
Header.exception = exception ;
@@ -756,6 +764,7 @@
if (exception != e_NO_EXCEPTION) {
Header.bodySize = 1 ;
+ G.Out(pdGendoc,"exit NetworkMessage::writeHeader carrying an
exception");
return true ;
}
@@ -979,9 +988,10 @@
if (Header.bodySize == 0)
socket->send(reinterpret_cast<unsigned char *>(&Header),
sizeof(HeaderStruct));
+ G.Out(pdGendoc,"exit NetworkMessage::writeHeader");
return Header.bodySize != 0 ;
}
} // namespace certi
-// $Id: NetworkMessage_RW.cc,v 3.39 2007/12/18 16:23:58 rousse Exp $
+// $Id: NetworkMessage_RW.cc,v 3.40 2008/01/29 14:30:51 rousse Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- certi RTIA/FederationManagement.cc RTIA/RTIA_fe...,
certi-cvs <=