Ejemplo n.º 1
0
        private void SetTimeRegulating(object sender, EventArgs e)
        {
            ILogicalTimeInterval        lookahead = new DoubleValuedLogicalTimeInterval(1.0);
            ILogicalTimeIntervalFactory factory   = ((XrtiExecutiveAmbassador)rtiAmbassador).LogicalTimeIntervalFactory;

            rtiAmbassador.EnableTimeRegulation(lookahead);

            OnDumpObjects(null, null);
        }
Ejemplo n.º 2
0
        private void TimeAdvancedRequest(object sender, EventArgs e)
        {
            ILogicalTimeInterval        lookahead = new DoubleValuedLogicalTimeInterval(1.0);
            ILogicalTimeIntervalFactory factory   = ((XrtiExecutiveAmbassador)rtiAmbassador).LogicalTimeIntervalFactory;
            ILogicalTime time = rtiAmbassador.Federate.HLAlogicalTime.Add(lookahead);

            rtiAmbassador.TimeAdvanceRequest(time);

            OnDumpObjects(null, null);
        }
Ejemplo n.º 3
0
        protected ILogicalTimeInterval ConvertToFederationLogicalTimeIntervalRepresentation(ILogicalTimeInterval timeInterval)
        {
            if (Federation != null)
            {
                ILogicalTimeIntervalFactory factory = Federation.LogicalTimeIntervalFactory;

                if (factory != null)
                {
                    byte[] timeIntervalByteArray = new byte[timeInterval.EncodedLength()];
                    timeInterval.Encode(timeIntervalByteArray, 0);

                    return(factory.Decode(timeIntervalByteArray, 0));
                }
                else
                {
                    return(timeInterval);
                }
            }
            else
            {
                return(timeInterval);
            }
        }
Ejemplo n.º 4
0
 /// <summary> 
 /// Constructor.
 /// </summary>
 /// <param name="timeFactory">the logical time factory
 /// </param>
 /// <param name="intervalFactory">the logical time interval factory
 /// </param>
 public MobileFederateServices(ILogicalTimeFactory timeFactory, ILogicalTimeIntervalFactory intervalFactory)
 {
     _timeFactory = timeFactory;
     _intervalFactory = intervalFactory;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="timeFactory">the logical time factory
 /// </param>
 /// <param name="intervalFactory">the logical time interval factory
 /// </param>
 public MobileFederateServices(ILogicalTimeFactory timeFactory, ILogicalTimeIntervalFactory intervalFactory)
 {
     _timeFactory     = timeFactory;
     _intervalFactory = intervalFactory;
 }
 public ILogicalTimeIntervalXrtiSerializer(XrtiSerializerManager manager, ILogicalTimeIntervalFactory aLogicalTimeIntervalFactory)
     : base(manager)
 {
     this.logicalTimeIntervalFactory = aLogicalTimeIntervalFactory;
 }
 public ILogicalTimeIntervalXrtiSerializer(XrtiSerializerManager manager, ILogicalTimeIntervalFactory aLogicalTimeIntervalFactory)
     : base(manager)
 {
     this.logicalTimeIntervalFactory = aLogicalTimeIntervalFactory;
 }