certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi libCERTI/Message_W.cc libCERTI/NM_Classes...


From: certi-cvs
Subject: [certi-cvs] certi libCERTI/Message_W.cc libCERTI/NM_Classes...
Date: Thu, 22 May 2008 12:20:22 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/05/22 12:20:22

Modified files:
        libCERTI       : Message_W.cc NM_Classes.hh NM_Classes.cc 
                         Message_R.cc 
        RTIG           : RTIG_processing.cc RTIG.cc RTIG.hh 
        RTIA           : FederationManagement.cc 

Log message:
        Should fix synchronization trouble.
        bug #23313 : Billard : 3rd federate never synchronizes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message_W.cc?cvsroot=certi&r1=3.25&r2=3.26
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NM_Classes.hh?cvsroot=certi&r1=3.2&r2=3.3
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NM_Classes.cc?cvsroot=certi&r1=3.5&r2=3.6
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message_R.cc?cvsroot=certi&r1=3.22&r2=3.23
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.68&r2=3.69
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&r1=3.42&r2=3.43
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.hh?cvsroot=certi&r1=3.26&r2=3.27
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.cc?cvsroot=certi&r1=3.61&r2=3.62

Patches:
Index: libCERTI/Message_W.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Message_W.cc,v
retrieving revision 3.25
retrieving revision 3.26
diff -u -b -r3.25 -r3.26
--- libCERTI/Message_W.cc       12 May 2008 12:16:59 -0000      3.25
+++ libCERTI/Message_W.cc       22 May 2008 12:20:19 -0000      3.26
@@ -17,7 +17,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Message_W.cc,v 3.25 2008/05/12 12:16:59 erk Exp $
+// $Id: Message_W.cc,v 3.26 2008/05/22 12:20:19 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -29,7 +29,7 @@
 
 namespace certi {
 
-static pdCDebug D("RTIA_MSG","(LocalMESS) - ");
+static PrettyDebug D("RTIA_MSG","Message::");
 static PrettyDebug G("GENDOC",__FILE__);
 
 
@@ -524,7 +524,7 @@
 
     // If the message carry an exception, the Body will only contain the
     // exception reason.
-
+    D.Out(pdDebug,"Sent message type <%d> ",type);
     if (exception != e_NO_EXCEPTION) {
         header.bodySize = 1 ;
         // G.Out(pdGendoc,"exit  Message::writeHeader carrying exception");
@@ -748,4 +748,4 @@
 
 } // namespace certi
 
-// $Id: Message_W.cc,v 3.25 2008/05/12 12:16:59 erk Exp $
+// $Id: Message_W.cc,v 3.26 2008/05/22 12:20:19 erk Exp $

Index: libCERTI/NM_Classes.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/NM_Classes.hh,v
retrieving revision 3.2
retrieving revision 3.3
diff -u -b -r3.2 -r3.3
--- libCERTI/NM_Classes.hh      12 May 2008 12:16:59 -0000      3.2
+++ libCERTI/NM_Classes.hh      22 May 2008 12:20:19 -0000      3.3
@@ -281,8 +281,13 @@
        NM_Register_Federation_Synchronization_Point();
        virtual ~NM_Register_Federation_Synchronization_Point();        
        /* specific Getter/Setter */
+       void setExist() {_setExist=true;};
+       void setDoesNotExist() {_setExist=false;};              
+       bool doesSetExist() {return _setExist;};
 protected:
        /* specific field */      
+       /* tell whether if the synchronization set is specified or not */
+       bool _setExist;
 private:
 };
 

Index: libCERTI/NM_Classes.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/NM_Classes.cc,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -b -r3.5 -r3.6
--- libCERTI/NM_Classes.cc      12 May 2008 12:17:00 -0000      3.5
+++ libCERTI/NM_Classes.cc      22 May 2008 12:20:20 -0000      3.6
@@ -556,6 +556,7 @@
        this->name = "REGISTER_FEDERATION_SYNCHRONIZATION_POINT";
        this->type = NetworkMessage::REGISTER_FEDERATION_SYNCHRONIZATION_POINT;
        /* specific field init */
+       this->_setExist = false;
 }
 
NM_Register_Federation_Synchronization_Point::~NM_Register_Federation_Synchronization_Point()
 {
 }

Index: libCERTI/Message_R.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Message_R.cc,v
retrieving revision 3.22
retrieving revision 3.23
diff -u -b -r3.22 -r3.23
--- libCERTI/Message_R.cc       12 May 2008 12:17:00 -0000      3.22
+++ libCERTI/Message_R.cc       22 May 2008 12:20:20 -0000      3.23
@@ -17,7 +17,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Message_R.cc,v 3.22 2008/05/12 12:17:00 erk Exp $
+// $Id: Message_R.cc,v 3.23 2008/05/22 12:20:20 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -29,10 +29,9 @@
 
 namespace certi {
 
-static pdCDebug D("RTIA_MSG","(LocalMESS) - ");
+static PrettyDebug D("RTIA_MSG","Message::");
 static PrettyDebug G("GENDOC",__FILE__);
 
-
 // ----------------------------------------------------------------------------
 //! Read NetworkMessage Objects from Socket objects.
 void
@@ -497,12 +496,15 @@
     socket->receive((const unsigned char *) &header, sizeof(MessageHeader));
 
     // 2- Parse Header
+    
     type = header.type ;
     exception = header.exception ;
     setFederationTime(header.date);
     // If the message carry an exception, the Body will only contain the
     // exception reason.
 
+    D.Out(pdDebug,"Received message type <%d> ",type);
+               
     if (exception != e_NO_EXCEPTION)
         {
         // G.Out(pdGendoc,"exit  Message::readHeader carrying an exception");
@@ -767,4 +769,4 @@
 
 } // namespace certi
 
-// $Id: Message_R.cc,v 3.22 2008/05/12 12:17:00 erk Exp $
+// $Id: Message_R.cc,v 3.23 2008/05/22 12:20:20 erk Exp $

Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.68
retrieving revision 3.69
diff -u -b -r3.68 -r3.69
--- RTIG/RTIG_processing.cc     12 May 2008 12:17:02 -0000      3.68
+++ RTIG/RTIG_processing.cc     22 May 2008 12:20:21 -0000      3.69
@@ -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.68 2008/05/12 12:17:02 erk Exp $
+// $Id: RTIG_processing.cc,v 3.69 2008/05/22 12:20:21 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -489,7 +489,7 @@
 // ----------------------------------------------------------------------------
 //! processRegisterSynchronization.
 void
-RTIG::processRegisterSynchronization(Socket *link, NetworkMessage *req)
+RTIG::processRegisterSynchronization(Socket *link, 
NM_Register_Federation_Synchronization_Point *req)
 {
 
     G.Out(pdGendoc,"BEGIN ** REGISTER FEDERATION SYNCHRONIZATION POINT Service 
**");
@@ -499,7 +499,7 @@
                << req->getTag().c_str() << "\"" ;
 
     // boolean true means a federates set exists
-    if ( req->boolean )
+    if ( req->doesSetExist() )
         federations.manageSynchronization(req->federation,
                                           req->federate,
                                           true,
@@ -526,7 +526,7 @@
     rep.send(link);
 
     // boolean true means a federates set exists
-    if ( req->boolean )
+    if ( req->doesSetExist() )
         federations.broadcastSynchronization(req->federation,
                                           req->federate,
                                           req->getLabel().c_str(),
@@ -1427,4 +1427,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG_processing.cc,v 3.68 2008/05/12 12:17:02 erk Exp $
+// $Id: RTIG_processing.cc,v 3.69 2008/05/22 12:20:21 erk Exp $

Index: RTIG/RTIG.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.42
retrieving revision 3.43
diff -u -b -r3.42 -r3.43
--- RTIG/RTIG.cc        12 May 2008 12:17:04 -0000      3.42
+++ RTIG/RTIG.cc        22 May 2008 12:20:21 -0000      3.43
@@ -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.42 2008/05/12 12:17:04 erk Exp $
+// $Id: RTIG.cc,v 3.43 2008/05/22 12:20:21 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -148,7 +148,7 @@
               "Federation %u: registerFedSyncPoint from federate %u.",
               msg->federation, msg->federate);
         auditServer.setLevel(8);
-        processRegisterSynchronization(link, msg);
+        processRegisterSynchronization(link, 
static_cast<NM_Register_Federation_Synchronization_Point*>(msg));
         break ;
 
       case NetworkMessage::SYNCHRONIZATION_POINT_ACHIEVED:
@@ -990,4 +990,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG.cc,v 3.42 2008/05/12 12:17:04 erk Exp $
+// $Id: RTIG.cc,v 3.43 2008/05/22 12:20:21 erk Exp $

Index: RTIG/RTIG.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.hh,v
retrieving revision 3.26
retrieving revision 3.27
diff -u -b -r3.26 -r3.27
--- RTIG/RTIG.hh        12 May 2008 12:17:04 -0000      3.26
+++ RTIG/RTIG.hh        22 May 2008 12:20:21 -0000      3.27
@@ -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.hh,v 3.26 2008/05/12 12:17:04 erk Exp $
+// $Id: RTIG.hh,v 3.27 2008/05/22 12:20:21 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef CERTI_RTIG_HH
@@ -75,7 +75,7 @@
     void processSetTimeRegulating(Socket*, NM_Set_Time_Regulating *msg);
     void processSetTimeConstrained(Socket*, NM_Set_Time_Constrained *msg);
     void processMessageNull(NetworkMessage*);
-    void processRegisterSynchronization(Socket*, NetworkMessage*);
+    void processRegisterSynchronization(Socket*, 
NM_Register_Federation_Synchronization_Point*);
     void processSynchronizationAchieved(Socket*, NetworkMessage*);
     void processRequestFederationSave(Socket*, NetworkMessage*);
     void processFederateSaveBegun(Socket*, NetworkMessage*);
@@ -132,4 +132,4 @@
 
 #endif // CERTI_RTIG_HH
 
-// $Id: RTIG.hh,v 3.26 2008/05/12 12:17:04 erk Exp $
+// $Id: RTIG.hh,v 3.27 2008/05/22 12:20:21 erk Exp $

Index: RTIA/FederationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.cc,v
retrieving revision 3.61
retrieving revision 3.62
diff -u -b -r3.61 -r3.62
--- RTIA/FederationManagement.cc        7 May 2008 15:37:38 -0000       3.61
+++ RTIA/FederationManagement.cc        22 May 2008 12:20:22 -0000      3.62
@@ -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.61 2008/05/07 15:37:38 erk Exp $
+// $Id: FederationManagement.cc,v 3.62 2008/05/22 12:20:22 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -509,6 +509,8 @@
         req.federate = federate ;
         req.setLabel(label);
         req.setTag(tag);
+        // no federates set so boolean must be false
+        req.setDoesNotExist();
 
         G.Out(pdGendoc,"      registerSynchronization====> send Message to 
RTIG");
 
@@ -557,6 +559,8 @@
         req.federate = federate ;
         req.setLabel(label);
         req.setTag(tag);
+        /* the synchronization point concerns a set of federate */
+        req.setExist();
         req.handleArraySize = array_size ;
         for ( int j=0 ; j < array_size ; j++)
             req.handleArray[j] = fed_array[j] ;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]