public void TestObjectUsingAOP() { // get the FOM handles // try { JoinFederation(); Country country = Country.NewCountry(); string objName = rtiAmbassador.GetObjectInstanceName(country.InstanceHandle); IObjectClassHandle classHandle = rtiAmbassador.GetKnownObjectClassHandle(country.InstanceHandle); string className = rtiAmbassador.GetObjectClassName(classHandle); Assert.AreEqual("Country", className); } catch (Exception e) { if (log.IsErrorEnabled) { log.Error(e.Message); } Assert.Fail("Unexpected exception while testing creation object instances:" + e); } // clean up for the next test Resign(); }
private void OnCreateACountry(object sender, EventArgs e) { Sxta.Rti1516.Samples.Country aNewCountry = Sxta.Rti1516.Samples.Country.NewCountry(); aNewCountry.Name = "Rusia"; aNewCountry.Population = 300000000; aNewCountry.Position = new Sxta.Rti1516.Samples.Vector3FloatStruct((float)400, (float)23.4, (float)234); OnDumpObjects(null, null); }
private void createCountry() { if (aNewCountry == null) { aNewCountry = Sxta.Rti1516.Samples.Country.NewCountry(); aNewCountry.Name = "España"; aNewCountry.Population = 40000000; aNewCountry.Position = new Sxta.Rti1516.Samples.Vector3FloatStruct(50, 100, 30); } }
private void FlushAttributeValues(object sender, EventArgs e) { Sxta.Rti1516.Samples.Country aCountry = Sxta.Rti1516.Samples.Country.NewCountry(); aCountry.AutoFlushDisabled = true; aCountry.Name = "Croacia"; aCountry.Population = 10000000; aCountry.Position = new Sxta.Rti1516.Samples.Vector3FloatStruct(90, 30, 23); System.Threading.Thread.Sleep(5000); aCountry.FlushAttributeValues(new byte[1]); }