certi-cvs
[Top][All Lists]
Advanced

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

[certi-cvs] applications/PyHLA doc/rti/services.tex test/CM...


From: certi-cvs
Subject: [certi-cvs] applications/PyHLA doc/rti/services.tex test/CM...
Date: Sun, 07 Jun 2009 15:12:48 +0000

CVSROOT:        /sources/certi
Module name:    applications
Changes by:     Petr Gotthard <gotthardp>       09/06/07 15:12:48

Modified files:
        PyHLA/doc/rti  : services.tex 
        PyHLA/test     : CMakeLists.txt transportationtype_conversion.py 
Added files:
        PyHLA/test     : region_creation.py 

Log message:
        Added test for createRegion and deleteRegion.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/doc/rti/services.tex?cvsroot=certi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/test/CMakeLists.txt?cvsroot=certi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/test/transportationtype_conversion.py?cvsroot=certi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/test/region_creation.py?cvsroot=certi&rev=1.1

Patches:
Index: doc/rti/services.tex
===================================================================
RCS file: /sources/certi/applications/PyHLA/doc/rti/services.tex,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- doc/rti/services.tex        16 Nov 2008 14:42:25 -0000      1.1
+++ doc/rti/services.tex        7 Jun 2009 15:12:48 -0000       1.2
@@ -930,7 +930,7 @@
 \exception{ConcurrentAccessAttempted}.
 \end{methoddesc}
 
-\begin{methoddesc}{createRegion}{space, [dimension, (upper, lower)]}
+\begin{methoddesc}{createRegion}{space, [dimension, (lower, upper)]}
 
 Returns region handle.
 
@@ -1908,4 +1908,4 @@
 \begin{methoddesc}{federationSynchronized}{label}
 \end{methoddesc}
 
-% $Id: services.tex,v 1.1 2008/11/16 14:42:25 gotthardp Exp $
+% $Id: services.tex,v 1.2 2009/06/07 15:12:48 gotthardp Exp $

Index: test/CMakeLists.txt
===================================================================
RCS file: /sources/certi/applications/PyHLA/test/CMakeLists.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/CMakeLists.txt 28 Oct 2008 21:13:20 -0000      1.1
+++ test/CMakeLists.txt 7 Jun 2009 15:12:48 -0000       1.2
@@ -1,5 +1,6 @@
 ENABLE_TESTING()
 
 ADD_TEST(transportationtype_conversion ${PYTHON_EXECUTABLE} 
transportationtype_conversion.py)
+ADD_TEST(region_creation ${PYTHON_EXECUTABLE} region_creation.py)
 
-# $Id: CMakeLists.txt,v 1.1 2008/10/28 21:13:20 gotthardp Exp $
+# $Id: CMakeLists.txt,v 1.2 2009/06/07 15:12:48 gotthardp Exp $

Index: test/transportationtype_conversion.py
===================================================================
RCS file: 
/sources/certi/applications/PyHLA/test/transportationtype_conversion.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/transportationtype_conversion.py       28 Oct 2008 21:13:20 -0000      
1.1
+++ test/transportationtype_conversion.py       7 Jun 2009 15:12:48 -0000       
1.2
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 import hla.rti as rti
 import hla.omt as fom
 
@@ -42,4 +43,4 @@
 RAISE_NAMENOTFOUND(lambda: rtia.getOrderingHandle("HLAreliable")) # 
transportation
 RAISE_NAMENOTFOUND(lambda: rtia.getOrderingHandle("UNKNOWN"))
 
-# $Id: transportationtype_conversion.py,v 1.1 2008/10/28 21:13:20 gotthardp 
Exp $
+# $Id: transportationtype_conversion.py,v 1.2 2009/06/07 15:12:48 gotthardp 
Exp $

Index: test/region_creation.py
===================================================================
RCS file: test/region_creation.py
diff -N test/region_creation.py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/region_creation.py     7 Jun 2009 15:12:48 -0000       1.1
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+import hla.rti as rti
+
+class MyAmbassador(rti.FederateAmbassador):
+    pass
+
+rtia = rti.RTIAmbassador()
+
+try:
+    rtia.createFederationExecution("VirtualAir", "AviationSimNet-v3.1.fed")
+except rti.FederationExecutionAlreadyExists:
+    pass
+
+mya = MyAmbassador()
+rtia.joinFederationExecution("python-01", "VirtualAir", mya)
+
+spaceHandle = rtia.getRoutingSpaceHandle("Geo")
+dimensionHandle = rtia.getDimensionHandle("X", spaceHandle)
+
+region = rtia.createRegion(spaceHandle,[(dimensionHandle,(1,5))])
+
+rtia.notifyAboutRegionModification(region)
+
+rtia.deleteRegion(region)
+
+# $Id: region_creation.py,v 1.1 2009/06/07 15:12:48 gotthardp Exp $




reply via email to

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