Help

retola
2011-11-08
2013-05-30
  • retola

    retola - 2011-11-08

    Hi,

    how can I test ohla on my pc?I have downloaded this

     
  • Michael Newcomb

    Michael Newcomb - 2011-11-08

    You can run the testsuite from ant. There are instructions in the TESTSUITE.txt file.

     
  • retola

    retola - 2011-11-09

    Can I have an email of anyone?I want to do an Hello World example with ohla 0.5

     
  • Michael Newcomb

    Michael Newcomb - 2011-11-09

    I didn't get a chance to look at the image (they are blocked at work).

    The best way to start would be to post your questions here.

    You can browse the testsuite to get an idea of how to use the RTIambassador and FederateAmbassador classes. I will add a real example (maybe a chat application) to the next release.

     
  • retola

    retola - 2011-11-11

    Can I have an example?

     
  • Pavel

    Pavel - 2011-11-30

    Hi, this is my first meeting with ohla.
    I start server with command:

    java -classpath .;ohla-rti.jar;ieee-1516e.jar;ieee-1516.jar;hla-1.3.jar;thirdparty/cal10n/lib/cal10n-api-0.7.4;thirdparty/javacc/bin/lib/javacc.jar;thirdparty/logback/lib/logback-classic-0.9.28.jar;thirdparty/logback/lib/logback-core-0.9.28.jar;thirdparty/netty/lib/netty-3.2.4.Final.jar;thirdparty/slf4j/lib/slf4j-api-1.6.1.jar;thirdparty/slf4j/lib/slf4j-ext-1.6.1.jar;thirdparty/testng/lib/testng-5.14.7.jar net.sf.ohla.rti.RTI -server
    

    when attempt to create federation:

        private void runFederate() throws MalformedURLException{
            RTIAmbassador rtiamb = (RTIambassador) new IEEE1516eRTIambassador();
            FederateAmbassador fedamb = new TestFederateAmbassador();
            try {
                rtiamb.connect(fedamb, CallbackModel.HLA_EVOKED);
            } catch (ConnectionFailed | InvalidLocalSettingsDesignator
                    | UnsupportedCallbackModel | AlreadyConnected
                    | CallNotAllowedFromWithinCallback | RTIinternalError e1) {
                e1.printStackTrace();
            }
    
            File fedFile = new File("C:\\TestFed.xml");
            File mimFile = new File("C:\\HLAstandardMIM.xml");
            URL feds = new URL[]{fedFile.toURI().toURL()};          
            URL mim = mimFile.toURI().toURL();
            try {
                rtiamb.createFederationExecution("TestFederation", feds, mim);
            } catch (InconsistentFDD | ErrorReadingFDD | CouldNotOpenFDD
                    | FederationExecutionAlreadyExists | NotConnected
                    | RTIinternalError | ErrorReadingMIM | CouldNotOpenMIM | DesignatorIsHLAstandardMIM  e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    
            log("Federation created\n");
    
            try {
                rtiamb.disconnect();
            } catch (FederateIsExecutionMember | CallNotAllowedFromWithinCallback
                    | RTIinternalError e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            log("Disconnected from LRC");
        }
    

    and at line 19 (rtiamb.createFederationExecution) programm hang up.

    What am I doing wrong

     
  • Michael Newcomb

    Michael Newcomb - 2011-11-30

    If you do a <ctrl><break> (all together) on the command line, it will dump out the stack traces for all threads and we can find out what it is blocked on.

     
  • Pavel

    Pavel - 2011-12-14

    I understood, I use bad command for start RTI.
    "thirdparty/cal10n/lib/cal10n-api-0.7.4;"  instead "thirdparty/cal10n/lib/cal10n-api-0.7.4.jar;"
    But I did not get any error messages.

     
  • Michael Newcomb

    Michael Newcomb - 2011-12-21

    If you do a <ctrl><break> (all together) on the command line, it will dump out the stack traces for all threads and we can find out what it is blocked on.

     
  • retola

    retola - 2012-01-02

    ok ,but I tried  to run testsuite of the project and the    runtime      blocked at this point:

    Will be run sequentially:
            0 <- 
         Will be run in random order:
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testCreateSingleFDDFederationWithEmptyFederationExecutionName()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG@186c6b2
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testCreateSingleFDDFederationWithUnfindableFDD()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG@186c6b2
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testDestroyFederationExecutionThatDoesNotExist()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG@186c6b2
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testCreateSingleFDDFederationWithNullFDD()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG@186c6b2
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testDestroyFederationExecutionWithEmptyFederationExecutionName()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG@186c6b2
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testCreateSingleFDDFederationWithBadFDD()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG@186c6b2
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testDestroyFederationExecutionWithNullFederationExecutionName()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG@186c6b2
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testCreateSingleFDDFederationWithNullFederationExecutionName()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG@186c6b2
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG.testJoinFederationExecution()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG@15ee671
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG.testJoinFederationExecutionWithFederateName()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG@15ee671
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG.testJoinFederationExecutionWithNullFederateType()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG@15ee671
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG.testJoinFederationExecutionWithNullFederationExecutionName()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG@15ee671
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG.testJoinFederationThatDoesNotExist()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG@15ee671
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG.testResignFederationExecutionNotExecutionMemberOf()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.JoiningTestNG@15ee671
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG.testRegisterFederationSynchronizationPointOfSubsetOfFederates()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG@16b13c7
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG.testRegisterFederationSynchronizationPointWhereAFederateIsNotSuccessful()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG@16b13c7
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG.testRegisterFederationSynchronizationPointWithNullTag()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG@16b13c7
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG.testRegisterFederationSynchronizationPointWithResignedFederate()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG@16b13c7
           net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG.testSynchronizationPointAchievedOfUnannouncedSynchronizationPoint()
               on instances
              net.sf.ohla.rti.testsuite.hla.rti1516e.federation.SynchronizationTestNG@16b13c7
         ===
         Invoking @BeforeClass net.sf.ohla.rti.testsuite.hla.rti1516e.BaseTestNG.baseSetup()
         Invoking net.sf.ohla.rti.testsuite.hla.rti1516e.federation.ConnectionTestNG.testDefaultConnect
         Invoking net.sf.ohla.rti.testsuite.hla.rti1516e.federation.ConnectionTestNG.testAlreadyConnected
         Invoking @AfterClass net.sf.ohla.rti.testsuite.hla.rti1516e.BaseTestNG.baseTeardown()
         Invoking @BeforeClass net.sf.ohla.rti.testsuite.hla.rti1516e.BaseTestNG.baseSetup()
         Invoking @BeforeClass net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.setup()
         Invoking net.sf.ohla.rti.testsuite.hla.rti1516e.federation.CreationTestNG.testCreateSingleFDDFederation

     
  • Michael Newcomb

    Michael Newcomb - 2012-01-03

    Did you start the rti? You need to have 2 command line processes. One to run the rti in (I think it is 'ant start-rti') and the other to run the testsuite in.

     
  • retola

    retola - 2012-01-04

    yes I run rti from command prompt (ant start-rti) and after I start testsuite-ieee-1516e from eclipse ant editor but it stops at that point.

    The example you make me don't run,can I have another testFederate?Thanks

     
  • Michael Newcomb

    Michael Newcomb - 2012-01-04

    I don't use Eclipse. Is it possible for you to install ant and run both from the command line? Or, you could execute the testsuite in debug mode (I can do that in IntelliJ IDEA) and then pause the process and find out where the 'main' thread is stuck at.

     
  • retola

    retola - 2012-10-16

    Hi,

    how can I synchonize the federates?

     
  • matthew

    matthew - 2012-10-19

    Hi,

    I have recently started working on HLA. So I am not at synchronize part yet.
    Can anyone help me with the constructor of federate.

    public Federate(String federateName, String federateType, String federationExecutionName,
                      List<FDD> additionalFDDs, FederateAmbassador federateAmbassador, CallbackManager callbackManager,
                      Channel rtiChannel)

    Channel parameter is already implemented in OHLA or I will implement it ?

     
  • Michael Newcomb

    Michael Newcomb - 2012-10-22

    The Federate class is OHLA specific.

    As an HLA developer, you only want to reference files in the hla.rti (HLA 1.3), hla.rti1516 (HLA IEEE 1516), or hla.rti1516e (HLA IEEE 1516 Evolved) packages.

    You use the RtiFactoryFactory to get an RtiFactory with which you can create an RTIambassador.

     
  • matthew

    matthew - 2012-10-28

        rtiAmbassador = (RTIambassador) new IEEE1516eRTIambassador();
        federateAmbassador = new BaseFederateAmbassador(rtiAmbassador);
        CallbackManager callbackManager = new CallbackManager((hla.rti1516e.FederateAmbassador)federateAmbassador);
        federate = new Federate("federate1", "sendingFederate", "federationExecution1",
                                         null, federateAmbassador, callbackManager,
                                         Channel rtiChannel);

    I couldn t see any channel implementation in OHLA ( Channel is an interface. ) Should I implement all its methods ?

     
  • Michael Newcomb

    Michael Newcomb - 2012-10-29

    You should not create an RTIambassador directly.

    To get an RTIambassador, you should do the following:

    hla.rti.1516e.RtiFactory rtiFactory = hla.rti1516e.RtiFactoryFactory.getRtiFactory();
    hla.rti.1516e.RTIambassador rtiAmbassador = rtiFactory.getRtiAmbassador();

    Now you have an RTIambassador which you would then connect and create/join a federation.

    BaseFederateAmbassador is solely used in the testsuite and your custom FederateAmbassador should extend hla.rti1516e.NullFederateAmbassador.

    You should not be using any class in the net.sf.ohla.* package.

     
  • matthew

    matthew - 2012-11-02

    Hi,

    I see  " // TODO: read from configuration file " at the beginning of RTI constructor. Does this prevent working of RTI ?

     

Log in to post a comment.