Menu

Time regulating

Pavel
2012-01-20
2013-05-30
  • Pavel

    Pavel - 2012-01-20

    Hello! I try to enable TimeRegulating
    code:

            try {
    //          LogicalTimeInterval lookahead = LogicalTimeFactoryFactory.getLogicalTimeFactory
    //                  (HLAfloat64TimeFactory.class).makeInterval(1.0);
                LogicalTimeInterval lookahead = new IEEE1516eHLAfloat64Interval(1.0);
                rtiamb.enableTimeRegulation(lookahead);
            } catch (RTIexception e){
                logln("Error: " + e.getMessage());
                    }
    

    No exception. No callback.
    Last message on server side:

    Looks like try rise a exception. What is wrong i am doing.

     
  • Pavel

    Pavel - 2012-01-20

    Awaiting callback:

            while (!((TestFederateAmbassador)fedamb).isTimeRegulating()) {
                try {
                    rtiamb.evokeCallback(1.0);
                } catch(RTIexception e) {
                    logln("Error: " + e.getMessage());
                }
            }
    
     
  • Pavel

    Pavel - 2012-01-24

    Hi! Seems to I found a bug.
    In class RTIChannelPipelineFactory in method getPipeline():

        pipeline.addLast(MessageEncoder.NAME, new MessageEncoder());
        pipeline.addLast(MessageDecoder.NAME, new MessageDecoder());
        pipeline.addLast(RTIChannelUpstreamHandler.NAME, rtiChannelUpstreamHandler);
    

    and logicalTimeFactory in MessageDecoder is uninitialized (null)

    Upon receipt of time-related messages, it cause NullPointerException

     
  • Michael Newcomb

    Michael Newcomb - 2012-01-24

    The LogicalTimeFactory is set when a federate joins a FederationExecution.

    Are you using the 0.5 release or what is in trunk in svn?
    What version of the JDK are you using?

     
  • Pavel

    Pavel - 2012-01-24

    Sorry, I had the old version.

     
  • Michael Newcomb

    Michael Newcomb - 2012-01-24

    No problems.

    I don't think time worked at all for <0.5 and I'm pretty sure that 0.5 time implementation is still broken.

    The current trunk version (0.6) should have time working. Save/Restore is also in a state of flux. I am working on that as I get time to.

     

Log in to post a comment.