[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi/RTIA ObjectManagement.cc ObjectManagement...
From: |
certi-cvs |
Subject: |
[certi-cvs] certi/RTIA ObjectManagement.cc ObjectManagement... |
Date: |
Fri, 10 Oct 2008 14:04:48 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Petr Gotthard <gotthardp> 08/10/10 14:04:48
Modified files:
RTIA : ObjectManagement.cc ObjectManagement.hh RTIA.hh
RTIA_federate.cc
Log message:
Bugfix #24515: GET_TRANSPORTATION_HANDLE/NAME and
GET_ORDERING_HANDLE/NAME handling implemented
Bugfix #24514: Fixed RTIA crash after unexpected exception
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.cc?cvsroot=certi&r1=3.52&r2=3.53
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.hh?cvsroot=certi&r1=3.25&r2=3.26
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA.hh?cvsroot=certi&r1=3.14&r2=3.15
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.88&r2=3.89
Patches:
Index: ObjectManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.cc,v
retrieving revision 3.52
retrieving revision 3.53
diff -u -b -r3.52 -r3.53
--- ObjectManagement.cc 18 Sep 2008 14:41:26 -0000 3.52
+++ ObjectManagement.cc 10 Oct 2008 14:04:47 -0000 3.53
@@ -831,6 +831,72 @@
return rootObject->objects->getObjectClass(object);
}
+// ----------------------------------------------------------------------------
+//! getTransportationHandle
+TransportType
+ObjectManagement::getTransportationHandle(const char *theName)
+{
+ for(const TransportTypeList *item = transportTypeList; item->name != NULL;
item++) {
+ if(strcmp(theName, item->name) == 0)
+ return item->type;
+ }
+
+ throw NameNotFound(theName);
+}
+
+const ObjectManagement::TransportTypeList
+ObjectManagement::transportTypeList[] = {
+ { "HLAreliable", RELIABLE },
+ { "HLAbestEffort", BEST_EFFORT },
+ { NULL }
+};
+
+// ----------------------------------------------------------------------------
+//! getTransportationName
+const char *
+ObjectManagement::getTransportationName(TransportType theType)
+{
+ for(const TransportTypeList *item = transportTypeList; item->name != NULL;
item++) {
+ if(theType == item->type)
+ return item->name;
+ }
+
+ throw InvalidTransportationHandle("");
+}
+
+// ----------------------------------------------------------------------------
+//! getOrderingHandle
+OrderType
+ObjectManagement::getOrderingHandle(const char *theName)
+{
+ for(const OrderTypeList *item = orderTypeList; item->name != NULL; item++)
{
+ if(strcmp(theName, item->name) == 0)
+ return item->type;
+ }
+
+ throw NameNotFound(theName);
+}
+
+const ObjectManagement::OrderTypeList
+ObjectManagement::orderTypeList[] = {
+ { "Receive", RECEIVE },
+ { "Timestamp", TIMESTAMP },
+ { NULL }
+};
+
+// ----------------------------------------------------------------------------
+//! getOrderingName
+const char *
+ObjectManagement::getOrderingName(OrderType theType)
+{
+ for(const OrderTypeList *item = orderTypeList; item->name != NULL; item++)
{
+ if(theType == item->type)
+ return item->name;
+ }
+
+ throw InvalidOrderingHandle("");
+}
+
// --------------------------------------
// setAttributeScopeAdvisorySwitch
// --------------------------------------
Index: ObjectManagement.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.hh,v
retrieving revision 3.25
retrieving revision 3.26
diff -u -b -r3.25 -r3.26
--- ObjectManagement.hh 18 Sep 2008 14:41:27 -0000 3.25
+++ ObjectManagement.hh 10 Oct 2008 14:04:48 -0000 3.26
@@ -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.25 2008/09/18 14:41:27 gotthardp Exp $
+// $Id: ObjectManagement.hh,v 3.26 2008/10/10 14:04:48 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_RTIA_OM
@@ -249,6 +249,24 @@
ObjectClassHandle getObjectClass(ObjectHandle);
+ struct TransportTypeList {
+ const char *name;
+ TransportType type;
+ };
+ static const TransportTypeList transportTypeList[];
+
+ TransportType getTransportationHandle(const char *theName);
+ const char *getTransportationName(TransportType theType);
+
+ struct OrderTypeList {
+ const char *name;
+ OrderType type;
+ };
+ static const OrderTypeList orderTypeList[];
+
+ OrderType getOrderingHandle(const char *theName);
+ const char *getOrderingName(OrderType theType);
+
TimeManagement *tm ;
protected:
@@ -263,4 +281,4 @@
#endif // _CERTI_RTIA_OM
-// $Id: ObjectManagement.hh,v 3.25 2008/09/18 14:41:27 gotthardp Exp $
+// $Id: ObjectManagement.hh,v 3.26 2008/10/10 14:04:48 gotthardp Exp $
Index: RTIA.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA.hh,v
retrieving revision 3.14
retrieving revision 3.15
diff -u -b -r3.14 -r3.15
--- RTIA.hh 23 Jun 2008 12:49:15 -0000 3.14
+++ RTIA.hh 10 Oct 2008 14:04:48 -0000 3.15
@@ -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.hh,v 3.14 2008/06/23 12:49:15 erk Exp $
+// $Id: RTIA.hh,v 3.15 2008/10/10 14:04:48 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_RTIA_HH
@@ -64,9 +64,7 @@
void processNetworkMessage(NetworkMessage *);
void processFederateRequest(Message *);
- void chooseFederateProcessing(Message *, Message &, TypeException &)
- throw (CouldNotOpenFED,FederationExecutionAlreadyExists,ErrorReadingFED,
- FederateAlreadyExecutionMember,SaveInProgress,RestoreInProgress);
+ void chooseFederateProcessing(Message *, Message &, TypeException &);
void processOngoingTick();
};
@@ -74,4 +72,4 @@
#endif // _CERTI_RTIA_HH
-// $Id: RTIA.hh,v 3.14 2008/06/23 12:49:15 erk Exp $
+// $Id: RTIA.hh,v 3.15 2008/10/10 14:04:48 gotthardp Exp $
Index: RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.88
retrieving revision 3.89
diff -u -b -r3.88 -r3.89
--- RTIA_federate.cc 18 Sep 2008 14:41:27 -0000 3.88
+++ RTIA_federate.cc 10 Oct 2008 14:04:48 -0000 3.89
@@ -112,8 +112,6 @@
//! Choose federate processing.
void
RTIA::chooseFederateProcessing(Message *req, Message &rep, TypeException &e)
- throw (CouldNotOpenFED,FederationExecutionAlreadyExists,ErrorReadingFED,
- FederateAlreadyExecutionMember,SaveInProgress,RestoreInProgress)
{
G.Out(pdGendoc,"enter RTIA::chooseFederateProcessing for type =
%d",req->type);
@@ -890,6 +888,26 @@
rep.setObjectClass(om->getObjectClass(req->getObject()));
break ;
+ case Message::GET_TRANSPORTATION_HANDLE:
+ D[pdTrace] << "Message from Federate: getTransportationHandle" << endl
;
+
rep.setTransportation(om->getTransportationHandle(req->getName().c_str()));
+ break ;
+
+ case Message::GET_TRANSPORTATION_NAME:
+ D[pdTrace] << "Message from Federate: getTransportationName" << endl ;
+ rep.setName(om->getTransportationName(req->getTransportation()));
+ break ;
+
+ case Message::GET_ORDERING_HANDLE:
+ D[pdTrace] << "Message from Federate: getOrderingHandle" << endl ;
+ rep.setOrdering(om->getOrderingHandle(req->getName().c_str()));
+ break ;
+
+ case Message::GET_ORDERING_NAME:
+ D[pdTrace] << "Message from Federate: getOrderingName" << endl ;
+ rep.setName(om->getOrderingName(req->getOrdering()));
+ break ;
+
case Message::DDM_CREATE_REGION:
D[pdTrace] << "Receiving Message from Federate: CreateRegion" << endl ;
rep.setRegion(ddm->createRegion(req->getSpace(), req->getNumber(), e));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi/RTIA ObjectManagement.cc ObjectManagement...,
certi-cvs <=