certi-cvs
[Top][All Lists]
Advanced

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

certi RTIA/ObjectManagement.cc RTIA/ObjectManag...


From: certi-cvs
Subject: certi RTIA/ObjectManagement.cc RTIA/ObjectManag...
Date: Wed, 27 Feb 2008 16:38:28 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     ROUSSELOT <rousse>      08/02/27 16:38:28

Modified files:
        RTIA           : ObjectManagement.cc ObjectManagement.hh 
                         RTIA_federate.cc 
        RTIG           : FederationsList.cc FederationsList.hh RTIG.cc 
                         RTIG.hh RTIG_processing.cc 
        libCERTI       : Message.cc 

Log message:
        Request Object attribute value update continued and to be continued

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.cc?cvsroot=certi&r1=3.33&r2=3.34
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.hh?cvsroot=certi&r1=3.17&r2=3.18
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.65&r2=3.66
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.cc?cvsroot=certi&r1=3.51&r2=3.52
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.hh?cvsroot=certi&r1=3.38&r2=3.39
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&r1=3.34&r2=3.35
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.hh?cvsroot=certi&r1=3.22&r2=3.23
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.53&r2=3.54
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message.cc?cvsroot=certi&r1=3.48&r2=3.49

Patches:
Index: RTIA/ObjectManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.cc,v
retrieving revision 3.33
retrieving revision 3.34
diff -u -b -r3.33 -r3.34
--- RTIA/ObjectManagement.cc    25 Feb 2008 10:28:13 -0000      3.33
+++ RTIA/ObjectManagement.cc    27 Feb 2008 16:38:26 -0000      3.34
@@ -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: ObjectManagement.cc,v 3.33 2008/02/25 10:28:13 rousse Exp $
+// $Id: ObjectManagement.cc,v 3.34 2008/02/27 16:38:26 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -608,7 +608,7 @@
 
 // ----------------------------------------------------------------------------
 //! requestObjectAttributeValueUpdate
-EventRetractionHandle
+void
 ObjectManagement::requestObjectAttributeValueUpdate(ObjectHandle handle,
                                                     AttributeHandle *attribs,
                                                     UShort attribArraySize,
@@ -633,7 +633,7 @@
                       req.federate);
     e = rep.exception ;
     G.Out(pdGendoc,"exit  
ObjectManagement::requestObjectAttributeValueUpdate");
-    return rep.eventRetraction ;
+
 }
 
 
@@ -773,4 +773,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: ObjectManagement.cc,v 3.33 2008/02/25 10:28:13 rousse Exp $
+// $Id: ObjectManagement.cc,v 3.34 2008/02/27 16:38:26 rousse Exp $

Index: RTIA/ObjectManagement.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.hh,v
retrieving revision 3.17
retrieving revision 3.18
diff -u -b -r3.17 -r3.18
--- RTIA/ObjectManagement.hh    5 Dec 2007 12:29:39 -0000       3.17
+++ RTIA/ObjectManagement.hh    27 Feb 2008 16:38:26 -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: ObjectManagement.hh,v 3.17 2007/12/05 12:29:39 approx Exp $
+// $Id: ObjectManagement.hh,v 3.18 2008/02/27 16:38:26 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIA_OM
@@ -173,7 +173,7 @@
                                OrderType theType,
                                TypeException &e);
 
-    EventRetractionHandle
+    void
     requestObjectAttributeValueUpdate(ObjectHandle theObjectHandle,
                                       AttributeHandle *attribArray,
                                       UShort attribArraySize,
@@ -224,4 +224,4 @@
 
 #endif // _CERTI_RTIA_OM
 
-// $Id: ObjectManagement.hh,v 3.17 2007/12/05 12:29:39 approx Exp $
+// $Id: ObjectManagement.hh,v 3.18 2008/02/27 16:38:26 rousse Exp $

Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.65
retrieving revision 3.66
diff -u -b -r3.65 -r3.66
--- RTIA/RTIA_federate.cc       26 Feb 2008 08:56:10 -0000      3.65
+++ RTIA/RTIA_federate.cc       27 Feb 2008 16:38:26 -0000      3.66
@@ -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.65 2008/02/26 08:56:10 siron Exp $
+// $Id: RTIA_federate.cc,v 3.66 2008/02/27 16:38:26 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -514,10 +514,10 @@
         try {
             D.Out(pdTrace,"Receiving Message from Federate, type "
                                 "RequestAttributeValueUpadate.");
-            
rep.setEventRetraction(om->requestObjectAttributeValueUpdate(req->getObject(),
+            om->requestObjectAttributeValueUpdate(req->getObject(),
                                             req->handleArray,
                                             req->handleArraySize,
-                                            e));
+                                            e);
           } catch (Exception *e) { throw e ;}
         break ;
 
@@ -1306,4 +1306,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: RTIA_federate.cc,v 3.65 2008/02/26 08:56:10 siron Exp $
+// $Id: RTIA_federate.cc,v 3.66 2008/02/27 16:38:26 rousse Exp $

Index: RTIG/FederationsList.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/FederationsList.cc,v
retrieving revision 3.51
retrieving revision 3.52
diff -u -b -r3.51 -r3.52
--- RTIG/FederationsList.cc     13 Feb 2008 16:28:29 -0000      3.51
+++ RTIG/FederationsList.cc     27 Feb 2008 16:38:27 -0000      3.52
@@ -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.51 2008/02/13 16:28:29 rousse Exp $
+// $Id: FederationsList.cc,v 3.52 2008/02/27 16:38:27 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -1528,7 +1528,39 @@
     G.Out(pdGendoc,"exit  FederationsList::federateRestoreStatus");
 }
 
+// ----------------------------------------------------------------------------
+// requestAttribute
+void
+FederationsList::requestAttribute(Handle handle,
+                                 FederateHandle federate,
+                                 ObjectHandle id,
+                                 AttributeHandle *attributes,
+                                 UShort list_size)
+        throw (FederateNotExecutionMember,
+               FederateNotPublishing,
+               ObjectAlreadyRegistered,
+               ObjectClassNotDefined,
+               ObjectClassNotPublished,
+               SaveInProgress,
+               RestoreInProgress,
+               RTIinternalError)
+{
+    G.Out(pdGendoc,"enter FederationsList::requestAttribute");
+
+    Federation *federation = NULL ;
+
+    // It may throw RTIinternalError.
+    checkHandle(handle);
+    checkHandle(federate);
+
+    // It may throw FederationExecutionDoesNotExist.
+    searchFederation(handle, federation);
+
+    //federation->requestAttribute(federate, id, list_size));
+    G.Out(pdGendoc,"exit FederationsList::requestAttribute");
+}
+
 }} // certi::rtig
 
-// EOF $Id: FederationsList.cc,v 3.51 2008/02/13 16:28:29 rousse Exp $
+// EOF $Id: FederationsList.cc,v 3.52 2008/02/27 16:38:27 rousse Exp $
 

Index: RTIG/FederationsList.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/FederationsList.hh,v
retrieving revision 3.38
retrieving revision 3.39
diff -u -b -r3.38 -r3.39
--- RTIG/FederationsList.hh     11 Dec 2007 17:27:42 -0000      3.38
+++ RTIG/FederationsList.hh     27 Feb 2008 16:38:27 -0000      3.39
@@ -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.hh,v 3.38 2007/12/11 17:27:42 rousse Exp $
+// $Id: FederationsList.hh,v 3.39 2008/02/27 16:38:27 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIG_FEDERATIONS_LIST_HH
@@ -259,6 +259,20 @@
                RestoreInProgress,
                RTIinternalError);
     
+    void requestAttribute(Handle handle,
+                                FederateHandle federate,
+                                ObjectHandle id,
+                                AttributeHandle *attributes,
+                                 UShort list_size)
+        throw (FederateNotExecutionMember,
+               FederateNotPublishing,
+               ObjectAlreadyRegistered,
+               ObjectClassNotDefined,
+               ObjectClassNotPublished,
+               SaveInProgress,
+               RestoreInProgress,
+               RTIinternalError);
+   
     void destroyObject(Handle theHandle,
                       FederateHandle theFederateHandle,
                       ObjectHandle theObjectHandle,
@@ -576,4 +590,4 @@
 
 #endif // _CERTI_RTIG_FEDERATIONS_LIST_HH
 
-// $Id: FederationsList.hh,v 3.38 2007/12/11 17:27:42 rousse Exp $
+// $Id: FederationsList.hh,v 3.39 2008/02/27 16:38:27 rousse Exp $

Index: RTIG/RTIG.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.34
retrieving revision 3.35
diff -u -b -r3.34 -r3.35
--- RTIG/RTIG.cc        13 Feb 2008 16:28:30 -0000      3.34
+++ RTIG/RTIG.cc        27 Feb 2008 16:38:27 -0000      3.35
@@ -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.34 2008/02/13 16:28:30 rousse Exp $
+// $Id: RTIG.cc,v 3.35 2008/02/27 16:38:27 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -196,6 +196,12 @@
         processFederateRestoreStatus(link, msg);
         break ;
 
+      case NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE:
+       D[pdTrace] << "requestAttributeValueUpdate" << endl ;
+        auditServer.setLevel(6);
+        processRequestObjectAttributeValueUpdate(link, msg);
+        break ;
+
       case NetworkMessage::SET_TIME_REGULATING:
         D.Out(pdTrace, "SetTimeRegulating du federe %u(date=%f).",
               msg->federate, msg->date);
@@ -981,4 +987,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG.cc,v 3.34 2008/02/13 16:28:30 rousse Exp $
+// $Id: RTIG.cc,v 3.35 2008/02/27 16:38:27 rousse Exp $

Index: RTIG/RTIG.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.hh,v
retrieving revision 3.22
retrieving revision 3.23
diff -u -b -r3.22 -r3.23
--- RTIG/RTIG.hh        3 Sep 2007 13:59:48 -0000       3.22
+++ RTIG/RTIG.hh        27 Feb 2008 16:38:27 -0000      3.23
@@ -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.22 2007/09/03 13:59:48 erk Exp $
+// $Id: RTIG.hh,v 3.23 2008/02/27 16:38:27 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef CERTI_RTIG_HH
@@ -112,6 +112,7 @@
     void processSubscribeInteractionWR(Socket*, NetworkMessage*);
     void processUnsubscribeInteractionWR(Socket*, NetworkMessage*);
     void processRegisterObjectWithRegion(Socket*, NetworkMessage*);
+    void processRequestObjectAttributeValueUpdate(Socket*, NetworkMessage*);
 
 private:
     int tcpPort ;
@@ -130,4 +131,4 @@
 
 #endif // CERTI_RTIG_HH
 
-// $Id: RTIG.hh,v 3.22 2007/09/03 13:59:48 erk Exp $
+// $Id: RTIG.hh,v 3.23 2008/02/27 16:38:27 rousse Exp $

Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.53
retrieving revision 3.54
diff -u -b -r3.53 -r3.54
--- RTIG/RTIG_processing.cc     21 Feb 2008 10:15:24 -0000      3.53
+++ RTIG/RTIG_processing.cc     27 Feb 2008 16:38:27 -0000      3.54
@@ -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.53 2008/02/21 10:15:24 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.54 2008/02/27 16:38:27 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -1354,6 +1354,37 @@
     rep.write(link); // Send answer to RTIA
 }
 
+// ----------------------------------------------------------------------------
+// processRequestObjectAttributeValueUpdate
+void
+RTIG::processRequestObjectAttributeValueUpdate(Socket *link, NetworkMessage 
*request)
+{
+    NetworkMessage answer ;
+
+    G.Out(pdGendoc,"enter RTIG::processRequestObjectAttributeValueUpdate");
+    G.Out(pdGendoc,"BEGIN ** REQUEST OBJECT ATTRIBUTE VALUE UPDATE **");
+
+    auditServer << "ObjID = " << request->object ;
+
+    // We have to do verifications about this object
+    federations.requestAttribute(request->federation,
+                                 request->federate,
+                                 request->object,
+                                 request->handleArray,
+                                 request->handleArraySize);
+
+
+    answer.type = NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE;
+    answer.type = request->type ;
+    answer.exception = e_NO_EXCEPTION ;
+    answer.federate = request->federate ;
+    answer.object = request->object ;
+
+    answer.write(link); // Send answer to RTIA
+    G.Out(pdGendoc,"exit  RTIG::processRequestObjectAttributeValueUpdate");
+    G.Out(pdGendoc,"END   ** REQUEST OBJECT ATTRIBUTE VALUE UPDATE **");
+}
+
 }} // namespace certi/rtig
 
-// $Id: RTIG_processing.cc,v 3.53 2008/02/21 10:15:24 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.54 2008/02/27 16:38:27 rousse Exp $

Index: libCERTI/Message.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Message.cc,v
retrieving revision 3.48
retrieving revision 3.49
diff -u -b -r3.48 -r3.49
--- libCERTI/Message.cc 15 Feb 2008 14:16:19 -0000      3.48
+++ libCERTI/Message.cc 27 Feb 2008 16:38:27 -0000      3.49
@@ -649,10 +649,12 @@
     else if ( type == JOIN_FEDERATION_EXECUTION )
       printf("JOIN_FEDERATION_EXECUTION : federate number %d federation name 
%s federate name %s\n",
              
federate,((federationName==NULL)?"empty":federationName),federateName) ;
-    else if (type == FEDERATE_RESTORE_COMPLETE )
-        printf("FEDERATE_RESTORE_COMPLETE : federationName %s : federatehandle 
%d \n",federationName,federate);
     else if (type == FEDERATE_SAVE_COMPLETE )
         printf("FEDERATE_SAVE_COMPLETE : federationName %s : federatehandle %d 
\n",federationName,federate);
+    else if (type == FEDERATE_RESTORE_COMPLETE )
+        printf("FEDERATE_RESTORE_COMPLETE : federationName %s : federatehandle 
%d \n",federationName,federate);
+    else if (type == REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE )
+        printf("REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE : \n");
     else
         printf(" type=%d :", type);
     printf(" date=%f: ", fed_time.getTime());
@@ -665,9 +667,9 @@
     printf(" interactionClass=%ld:\n", interactionClass);
     printf(" attribute=%ld:\n", attribute);
     printf(" parameter=%ld:\n", parameter);
-    printf(" object=%ld:\n", object);
-    printf(" handleArraySize=%d:\n", handleArraySize);
-    printf(" space %ld:\n", space);
+    printf(" object=%ld:", object);
+    printf(" handleArraySize=%d:", handleArraySize);
+    printf(" space %ld:", space);
     printf(" dimension %ld:\n", dimension);
     // printf(" transportation %d:\n", transportation);
     // printf(" ordering %d:\n", ordering);




reply via email to

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