示例#1
0
        public TimeManagementForm(XrtiExecutiveAmbassador aRti, TimeManagementSimulation aTms)
        {
            InitializeComponent();
            InitializeScenario();

            this.rti = aRti;
            this.tms = aTms;
        }
 public TimeManagementObjectModelInteractionListener(XrtiExecutiveAmbassador aRti, 
     ILogicalTimeFactory aTimeFactory, Home home, ILogicalTimeInterval moveActorInterval,
     TimeManagementForm form, TimeManagementSimulation simulation)
 {
     this.rti = aRti;
     this.timeFactory = aTimeFactory;
     this.home = home;
     this.moveActorInterval = moveActorInterval;
     this.form = form;
     this.simulation = simulation;
 }
 public ManagementObjectModelInteractionListener(XrtiExecutiveAmbassador p, String aName)
     : base(aName)
 {
     parent = p;
 }
 public FederationManagementObjectModelInteractionListener(XrtiExecutiveAmbassador p, String aName)
     : base(p, aName)
 {
 }
 public FederateAmbassador(IRTIambassador prtiAmbassador)
     : base(prtiAmbassador)
 {
     rti = ((XrtiExecutiveAmbassador)rtiAmbassador);
 }
 public MetaFederationLowLevelManagementInteractionListener(XrtiExecutiveAmbassador p, String aName)
     : base(p, aName)
 {
 }
 //protected Dictionary<long, HLAfederation> federations = new Dictionary<long, HLAfederation>();
 //protected IAttributeHandleValueMapFactory factory = new XRTIAttributeHandleValueMapFactory();
 public LowLevelManagementObjectModelInteractionListener(XrtiExecutiveAmbassador p, String aName)
     : base(aName)
 {
     parent = p;
     federationExecutionDescriptor = parent.descriptorManager.GetObjectClassDescriptor("HLAfederationExecution");
 }
示例#8
0
        public MainForm(string[] args)
        {
            InitializeComponent();

            app = new MainApplication(args);
            IConfig cfg = app.ConfigSource.Configs["PeerInfo"];
            if (cfg != null)
            {
                peerName = cfg.Get("PeerName", "NoNamePeer");
                peerDescription = cfg.Get("PeerDescription", "A generic peer description");
            }
            this.Text = "Main Application for " + peerName + " : " + peerDescription;
            OnTraceOn(null, null);
            // Log an info level message
            if (log.IsDebugEnabled)
            {
                System.Threading.Thread.CurrentThread.Name = "Main(" + System.Threading.Thread.CurrentThread.ManagedThreadId + ")";
                log.Debug("Tests Server Start");
            }
            // Write output to the file and to the console screen.
            if (log.IsInfoEnabled)
                log.Info("Welcome to the Sxta Test Kit !");

            if (rtiAmbassador == null)
                rtiAmbassador = new XrtiExecutiveAmbassador(app.ConfigSource);
            OnLoadPlugins();

            showRightToLeft.Checked = (RightToLeft == RightToLeft.Yes);
            RightToLeftLayout = showRightToLeft.Checked;
            m_objectModelExplorer = new ObjectModelExplorer(rtiAmbassador.descriptorManager);
            m_objectModelExplorer.PropertyGrid = m_propertyWindow;
            m_objectModelExplorer.RightToLeftLayout = RightToLeftLayout;
            m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
        }
示例#9
0
 protected override void OnFormClosed(FormClosedEventArgs e)
 {
     if (rtiAmbassador != null)
     {
         rtiAmbassador.Stop();
         rtiAmbassador = null;
     }
     if (channelManager != null)
         channelManager.Close();
     OnStopPrograms(null, null);
 }
示例#10
0
 public virtual void TearDown()
 {
     // Log an baseInfo level message
     if (log.IsDebugEnabled)
         log.Debug(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " Tests End");
     if (rtiAmbassador != null)
         rtiAmbassador = null;
 }
示例#11
0
        public void LogAndRtiInit()
        {
            app = new MainApplication(new string[] { "-dialog=false" });

            FileInfo logFile = new System.IO.FileInfo("Log4Net.config");
            if (logFile.Exists)
            {
                // Log4Net is configured using a DOMConfigurator.
                log4net.Config.XmlConfigurator.Configure(logFile);
            }
            else
            {
                // Set up a simple configuration that logs on the console.
                log4net.Config.BasicConfigurator.Configure();
            }

            // Log an baseInfo level message
            if (log.IsDebugEnabled)
            {
                if (string.IsNullOrEmpty(System.Threading.Thread.CurrentThread.Name))
                    System.Threading.Thread.CurrentThread.Name = "Main(" + System.Threading.Thread.CurrentThread.ManagedThreadId + ")";
                log.Debug(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " Tests Start");
            }

            if (rtiAmbassador == null)
                rtiAmbassador = new XrtiExecutiveAmbassador(app.ConfigSource);
        }
示例#12
0
 public FederateAmbassador(IRTIambassador prtiAmbassador)
     : base(prtiAmbassador)
 {
     rti = ((XrtiExecutiveAmbassador)rtiAmbassador);
 }
示例#13
0
        public void ShowInformationFromRtiAmbassador(MetaFederateAmbassador metaFederateAmbassador, XrtiExecutiveAmbassador rti)
        {
            TreeView objectTreeView = this.treeView1;
            objectTreeView.ImageList = this.imageList1;

            if (metaFederateAmbassador != null)
            {
                DumpMetaFederationObjects(metaFederateAmbassador, META_FEDERATION_NODE_NAME);
            }

            if (rti.FederateAmbassador != null)
            {
                IList<HLAobjectRoot> objectsFederation = ((FederateAmbassador)rti.FederateAmbassador).GetObjects();

                DumpFederationObjects(metaFederateAmbassador, objectsFederation, "Federation : " + rti.FederationName, rti.FederationName);
            }

            //objectTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
            //objectTreeView.Location = new System.Drawing.Point(4, 4);
            //objectTreeView.Margin = new System.Windows.Forms.Padding(4);
            //objectTreeView.Name = "Object View";
            //objectTreeView.Size = new System.Drawing.Size(251, 268);
            //objectTreeView.TabIndex = 0;
            //objectTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TreeViewAfterSelect);
        }
 public MyLowLevelManagementObjectModelInteractionListener(XrtiExecutiveAmbassador p, String aName, TimeManagementForm form)
     : base(p, aName)
 {
     this.form = form;
 }