Exemplo n.º 1
0
 public DiscoverObjectInstanceCallback(IFederateAmbassador federate, ILogicalTime time, long federateHandle, long interactionIndex, IObjectInstanceHandle theObjectParam, IObjectClassHandle theObjectClassParam, string objectNameParam)
     : base(federate, time, federateHandle, interactionIndex)
 {
     this.theObject      = theObjectParam;
     this.theObjectClass = theObjectClassParam;
     this.objectName     = objectNameParam;
 }
Exemplo n.º 2
0
        public void OnReceiveUpdateAttributeValues(IObjectInstanceHandle instanceHandle, IDictionary <string, object> methodNameValueMap, ILogicalTime time)
        {
            HLAattributeHandleValuePair[] attributeHandleValuePair = CreateAttributesHandleValuePairList(methodNameValueMap, instanceHandle);

            // TODO ANGEL: que pasa con userSuppliedTag
            rti.UpdateAttributeValues(instanceHandle, attributeHandleValuePair, new byte[1], time);
        }
Exemplo n.º 3
0
 public DiscoverObjectInstanceCallback(IFederateAmbassador federate, IObjectInstanceHandle theObjectParam, IObjectClassHandle theObjectClassParam, string objectNameParam)
     : base(federate)
 {
     this.theObject      = theObjectParam;
     this.theObjectClass = theObjectClassParam;
     this.objectName     = objectNameParam;
 }
Exemplo n.º 4
0
 public ReflectAttributeValuesExtCallback(IFederateAmbassador federate, IObjectInstanceHandle theObjectParam, HLAattributeHandleValuePair[] theAttributesParam, byte[] userSuppliedTagParam)
     : base(federate)
 {
     this.theObject       = theObjectParam;
     this.theAttributes   = theAttributesParam;
     this.userSuppliedTag = userSuppliedTagParam;
 }
Exemplo n.º 5
0
 public RemoveObjectInstanceCallback(IFederateAmbassador federate, ILogicalTime time, IObjectInstanceHandle theObjectParam, byte[] userSuppliedTagParam, OrderType sentOrderingParam)
     : base(federate, time)
 {
     this.theObject       = theObjectParam;
     this.userSuppliedTag = userSuppliedTagParam;
     this.sentOrdering    = sentOrderingParam;
 }
Exemplo n.º 6
0
 public ProvideAttributeValueUpdateCallback(IFederateAmbassador federate, ILogicalTime time, IObjectInstanceHandle theObjectParam, IAttributeHandleSet theAttributesParam, byte[] userSuppliedTagParam)
     : base(federate, time)
 {
     this.theObject       = theObjectParam;
     this.theAttributes   = theAttributesParam;
     this.userSuppliedTag = userSuppliedTagParam;
 }
Exemplo n.º 7
0
 public ReflectAttributeValuesExtCallback(IFederateAmbassador federate, ILogicalTime time, long federateHandle, long interactionIndex, IObjectInstanceHandle theObjectParam, HLAattributeHandleValuePair[] theAttributesParam, byte[] userSuppliedTagParam)
     : base(federate, time, federateHandle, interactionIndex)
 {
     this.theObject       = theObjectParam;
     this.theAttributes   = theAttributesParam;
     this.userSuppliedTag = userSuppliedTagParam;
 }
Exemplo n.º 8
0
        public void TestObjectInstanceName()
        {
            // get the FOM handles //
            try
            {
                JoinFederation();

                IObjectClassHandle countryHandle = rtiAmbassador.GetObjectClassHandle("Country");
#if TODO
                IObjectClassHandle countryHandle = rtiAmbassador.GetObjectClassHandle("HLAobjectRoot.Country");
#endif
                rtiAmbassador.ReserveObjectInstanceName("Country1");
                IObjectInstanceHandle objHandle1 = rtiAmbassador.RegisterObjectInstance(countryHandle, "Country1");
                string objName = rtiAmbassador.GetObjectInstanceName(objHandle1);
                Assert.AreEqual("Country1", objName);

                IObjectInstanceHandle objHandle2 = rtiAmbassador.RegisterObjectInstance(countryHandle);
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error(e.Message);
                }
                Assert.Fail("Unexpected exception while testing object instances:" + e);
            }

            // clean up for the next test
            Resign();
        }
Exemplo n.º 9
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="pName">the name of the object instance
        /// </param>
        /// <param name="pHandle">the handle of the object instance
        /// </param>
        /// <param name="pClassHandle">the handle of the object instance class
        /// </param>
        public ObjectInstanceDescriptor(System.String pName, IObjectInstanceHandle pHandle, IObjectClassHandle pClassHandle, long pFederationHandle)
        {
            name        = pName;
            handle      = pHandle;
            classHandle = pClassHandle;
            federationExecutionHandle = pFederationHandle;

            ownedAttributes = new XRTIAttributeHandleSet();
        }
Exemplo n.º 10
0
 public void OnReceiveUpdateAttributeValues(IObjectInstanceHandle instanceHandle, IDictionary <string, object> methodNameValueMap)
 {
     if (log.IsDebugEnabled)
     {
         foreach (KeyValuePair <string, object> entry in methodNameValueMap)
         {
             log.Debug("The method " + entry.Key + " from object " + instanceHandle + " has been called; new value:" + entry.Value + "; parameter type = " + entry.Value.GetType());
         }
     }
 }
Exemplo n.º 11
0
        public void OnReceiveUpdateAttributeValues(IObjectInstanceHandle instanceHandle, string methodName, object newValue)
        {
            if (log.IsDebugEnabled)
            {
                log.Debug("The method " + methodName + " from object " + instanceHandle + " has been called; new value:" + newValue + "; parameter type = " + newValue.GetType());
            }

            HLAattributeHandleValuePair[] attributeHandleValuePair = CreateAttributeHandleValuePairList(methodName, newValue, instanceHandle);

            // TODO ANGEL: que pasa con userSuppliedTag
            rti.UpdateAttributeValues(instanceHandle, attributeHandleValuePair, null);
        }
Exemplo n.º 12
0
        public void OnReceiveUpdateAttributeValues(IObjectInstanceHandle instanceHandle, IDictionary <string, object> methodNameValueMap)
        {
            if (log.IsDebugEnabled)
            {
                Sxta.Rti1516.HLAAttributes.HLAobjectRoot obj = registedObjects[instanceHandle] as Sxta.Rti1516.HLAAttributes.HLAobjectRoot;
                log.Debug("The object is " + obj);

                foreach (KeyValuePair <string, object> entry in methodNameValueMap)
                {
                    log.Debug("The method " + entry.Key + " from object " + instanceHandle + " has been called; new value:" + entry.Value + "; parameter type = " + entry.Value.GetType());
                }
            }
        }
Exemplo n.º 13
0
 public override void ReflectAttributeValuesExt(IObjectInstanceHandle theObject, HLAattributeHandleValuePair[] theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
 {
     // TODO ANGEL: LOCK DUDOSO
     //lock (this)
     //{
     if (objectInstanceHandleProxyMap.ContainsKey(theObject))
     {
         object instance = objectInstanceHandleProxyMap[theObject];
         rti.objectManager.UpdateAttributeValuesProxyObject(instance, theAttributes);
     }
     else
     {
         if (log.IsErrorEnabled)
         {
             log.Error("Object " + theObject + " not found. Attributes to reflect: " + theAttributes);
         }
     }
     //}
 }
Exemplo n.º 14
0
        public override void DiscoverObjectInstance(IObjectInstanceHandle theObject, IObjectClassHandle theObjectClass, string objectName)
        {
            long instanceHandle = ((XRTIObjectInstanceHandle)theObject).Identifier;
            long classHandle = ((XRTIObjectClassHandle)theObjectClass).Identifier;

            object proxy = rti.objectManager.CreateProxyObject(objectName, instanceHandle, classHandle);

            if (proxy != null)
            {
                RegisterObjectInstance(proxy);
            }
            else
            {
                throw new RTIinternalError("Type not found: " + objectName + ".");
            }
            if (OnNewObject != null)
            {
                if (log.IsInfoEnabled)
                    log.Info("Discovered a new object: " + proxy);
                OnNewObject(proxy);
            }
        }
Exemplo n.º 15
0
        public override void DiscoverObjectInstance(IObjectInstanceHandle theObject, IObjectClassHandle theObjectClass, string objectName)
        {
            long instanceHandle = ((XRTIObjectInstanceHandle)theObject).Identifier;
            long classHandle    = ((XRTIObjectClassHandle)theObjectClass).Identifier;

            object proxy = rti.objectManager.CreateProxyObject(objectName, instanceHandle, classHandle);

            if (proxy != null)
            {
                RegisterObjectInstance(proxy);
            }
            else
            {
                throw new RTIinternalError("Type not found: " + objectName + ".");
            }
            if (OnNewObject != null)
            {
                if (log.IsInfoEnabled)
                {
                    log.Info("Discovered a new object: " + proxy);
                }
                OnNewObject(proxy);
            }
        }
Exemplo n.º 16
0
 public virtual void AttributeOwnershipAcquisitionNotification(IObjectInstanceHandle theObject, IAttributeHandleSet securedAttributes, byte[] userSuppliedTag)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 17
0
 public virtual void TurnUpdatesOnForObjectInstance(IObjectInstanceHandle theObject, IAttributeHandleSet theAttributes)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 18
0
 public virtual void RequestAttributeOwnershipRelease(IObjectInstanceHandle theObject, IAttributeHandleSet candidateAttributes, byte[] userSuppliedTag)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 19
0
 public virtual void RemoveObjectInstance(IObjectInstanceHandle theObject, byte[] userSuppliedTag, OrderType sentOrdering)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 20
0
        private HLAattributeHandleValuePair[] CreateAttributesHandleValuePairList(IDictionary<string, object> methodNameValueMap, IObjectInstanceHandle instanceHandle)
        {
            HLAattributeHandleValuePair[] attributeHandleValuePairList = new HLAattributeHandleValuePair[methodNameValueMap.Count];

            ObjectInstanceDescriptor oid = rti.descriptorManager.GetObjectInstanceDescriptor(instanceHandle);
            IObjectClassHandle och = oid.ClassHandle;
            ObjectClassDescriptor ocd = rti.descriptorManager.GetObjectClassDescriptor(och);

            int count = 0;
            foreach (KeyValuePair<string, object> entry in methodNameValueMap)
            {
                if (log.IsDebugEnabled)
                    log.Debug("The method " + entry.Key + " from object " + instanceHandle + " has been called; new value:" + entry.Value + "; parameter type = " + entry.Value.GetType());

                attributeHandleValuePairList[count] = new HLAattributeHandleValuePair();
                attributeHandleValuePairList[count].AttributeHandle = ((XRTIAttributeHandle)ocd.GetAttributeDescriptor(entry.Key).Handle).Identifier;
                attributeHandleValuePairList[count].AttributeValue = entry.Value;
                count++;
            }

            return attributeHandleValuePairList;
        }
Exemplo n.º 21
0
        public void OnReceiveUpdateAttributeValues(IObjectInstanceHandle instanceHandle, string methodName, object newValue, ILogicalTime time)
        {
            if (log.IsDebugEnabled)
                log.Debug("The method " + methodName + " from object " + instanceHandle + " has been called; new value:" + newValue + "; parameter type = " + newValue.GetType());

            HLAattributeHandleValuePair[] attributeHandleValuePair = CreateAttributeHandleValuePairList(methodName, newValue, instanceHandle);

            // TODO ANGEL: que pasa con userSuppliedTag
            rti.UpdateAttributeValues(instanceHandle, attributeHandleValuePair, null, time);
        }
Exemplo n.º 22
0
 public ReflectAttributeValuesExtCallback(IFederateAmbassador federate, IObjectInstanceHandle theObjectParam, HLAattributeHandleValuePair[] theAttributesParam, byte[] userSuppliedTagParam)
     : base(federate)
 {
     this.theObject = theObjectParam;
     this.theAttributes = theAttributesParam;
     this.userSuppliedTag = userSuppliedTagParam;
 }
Exemplo n.º 23
0
 public virtual void InformAttributeOwnership(IObjectInstanceHandle theObject, IAttributeHandle theAttribute, IFederateHandle theOwner)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 24
0
 public virtual void AttributeIsOwnedByRTI(IObjectInstanceHandle theObject, IAttributeHandle theAttribute)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 25
0
        public override void ReflectAttributeValuesExt(IObjectInstanceHandle theObject, HLAattributeHandleValuePair[] theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
        {
            // TODO ANGEL: LOCK DUDOSO
            lock (this)
            {
                base.ReflectAttributeValuesExt(theObject, theAttributes, userSuppliedTag, sentOrdering, theTransport);

                if (objectInstanceHandleProxyMap.ContainsKey(theObject))
                {
                    object instance = objectInstanceHandleProxyMap[theObject];

                    // TODO ANGEL: ¿Esto debería estar aquí o dentro de la funcionalidad del objectManager?
                    //             El problema es que si lo hace objectManager debe poder acceder al federationsMap del rti
                    foreach (HLAattributeHandleValuePair entry in theAttributes)
                    {
                        string attributeName = GetAttributeName(instance, entry.AttributeHandle);

                        // Checks if the object created is an instance of HLAfederation and its properties are modificated
                        if (instance is HLAfederation)
                        {
                            if (attributeName == "HLAfederationName")
                            {
                                rti.federationsMap.Add((string)entry.AttributeValue, instance as HLAfederation);
                            }
                            else if (attributeName == "HLAFDDID")
                            {
                                rti.interactionManager.RegisterHelperClass((string)entry.AttributeValue);
                            }
                        }

                        // Checks if the object created is an instance of HLAfederate and its properties are modificated
                        if (instance is HLAfederate)
                        {
                            if (attributeName == "HLAfederateHandle")
                            {
                                if (instance is Sxtafederate)
                                {
                                    Sxtafederate federate = instance as Sxtafederate;

                                    // TODO ANGEL: OJO! Implica que la propiedad HLAfederationNameJoined se haya recibido antes que ésta
                                    HLAfederateHandle federateHandle = (HLAfederateHandle)entry.AttributeValue;
                                    rti.federationsMap[federate.HLAfederationNameJoined].HLAfederatesinFederation.Add(federateHandle);
                                }
                            }

                            if (attributeName == "HLAfederationNameJoined")
                            {
                                if (instance is Sxtafederate)
                                {
                                    Sxtafederate federate = instance as Sxtafederate;

                                    HLAfederation federation = rti.federationsMap[federate.HLAfederationNameJoined];
                                    federate.Federation = federation;
                                }
                            }

                            /*
                             * if (attributeName == "HLAlogicalTime" || attributeName == "HLApendingTime"
                             || attributeName == "HLAlookahead" || attributeName == "HLAGALT" || attributeName == "HLALITS")
                             ||{
                             || //System.Threading.Monitor.Pulse(rti);
                             || //rti.PushFederates();
                             ||}
                             */
                        }
                    }
                }
            }
        }
Exemplo n.º 26
0
        public void OnReceiveUpdateAttributeValues(IObjectInstanceHandle instanceHandle, IDictionary<string, object> methodNameValueMap)
        {
            if (log.IsDebugEnabled)
            {
                Sxta.Rti1516.HLAAttributes.HLAobjectRoot obj = registedObjects[instanceHandle] as Sxta.Rti1516.HLAAttributes.HLAobjectRoot;
                log.Debug("The object is " + obj);

                foreach (KeyValuePair<string, object> entry in methodNameValueMap)
                {
                    log.Debug("The method " + entry.Key + " from object " + instanceHandle + " has been called; new value:" + entry.Value + "; parameter type = " + entry.Value.GetType());
                }
            }
        }
Exemplo n.º 27
0
 /// <summary> 
 /// Returns the descriptor for the object instance with the given handle.
 /// </summary>
 /// <param name="handle">the handle of the object instance
 /// </param>
 /// <returns> the object instance descriptor, or <code>null</code> if no such
 /// descriptor exists
 /// </returns>
 public virtual ObjectInstanceDescriptor GetObjectInstanceDescriptor(IObjectInstanceHandle handle)
 {
     return objectInstanceHandleDescriptorMap[handle];
 }
Exemplo n.º 28
0
 // TODO ANGEL: Se añade un método de actualización específico para las propiedades de los objetos.
 //             Es debido a que usaban un IAttributeHandleValueMap que imponía una serie de problemas: implicaba la conversión de los values de object a byte[]
 public virtual void ReflectAttributeValuesExt(IObjectInstanceHandle theObject, HLAattributeHandleValuePair[] theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 29
0
 public virtual void ProvideAttributeValueUpdate(IObjectInstanceHandle theObject, IAttributeHandleSet theAttributes, byte[] userSuppliedTag)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 30
0
 public virtual void ConfirmAttributeOwnershipAcquisitionCancellation(IObjectInstanceHandle theObject, IAttributeHandleSet theAttributes)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 31
0
 public DiscoverObjectInstanceCallback(IFederateAmbassador federate, ILogicalTime time, long federateHandle, long interactionIndex, IObjectInstanceHandle theObjectParam, IObjectClassHandle theObjectClassParam, string objectNameParam)
     : base(federate, time, federateHandle, interactionIndex)
 {
     this.theObject = theObjectParam;
     this.theObjectClass = theObjectClassParam;
     this.objectName = objectNameParam;
 }
Exemplo n.º 32
0
 public TimeStampedRemoveObjectInstanceCallback(IFederateAmbassador federate, ILogicalTime time, IObjectInstanceHandle theObjectParam, byte[] userSuppliedTagParam, OrderType sentOrderingParam, ILogicalTime theTimeParam, OrderType receivedOrderingParam)
     : base(federate, time, theObjectParam, userSuppliedTagParam, sentOrderingParam)
 {
     this.timeParam        = theTimeParam;
     this.receivedOrdering = receivedOrderingParam;
 }
Exemplo n.º 33
0
 public RemoveObjectInstanceCallback(IFederateAmbassador federate, ILogicalTime time, IObjectInstanceHandle theObjectParam, byte[] userSuppliedTagParam, OrderType sentOrderingParam)
     : base(federate, time)
 {
     this.theObject = theObjectParam;
     this.userSuppliedTag = userSuppliedTagParam;
     this.sentOrdering = sentOrderingParam;
 }
Exemplo n.º 34
0
 public virtual void RequestAttributeOwnershipRelease(IObjectInstanceHandle theObject, IAttributeHandleSet candidateAttributes, byte[] userSuppliedTag)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 35
0
 public override void ReflectAttributeValuesExt(IObjectInstanceHandle theObject, HLAattributeHandleValuePair[] theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
 {
     // TODO ANGEL: LOCK DUDOSO
     //lock (this)
     //{
     if (objectInstanceHandleProxyMap.ContainsKey(theObject))
     {
         object instance = objectInstanceHandleProxyMap[theObject];
         rti.objectManager.UpdateAttributeValuesProxyObject(instance, theAttributes);
     }
     else
     {
         if (log.IsErrorEnabled)
             log.Error("Object " + theObject + " not found. Attributes to reflect: " + theAttributes);
     }
     //}
 }
Exemplo n.º 36
0
 public virtual void AttributeOwnershipUnavailable(IObjectInstanceHandle theObject, IAttributeHandleSet theAttributes)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 37
0
        private HLAattributeHandleValuePair[] CreateAttributeHandleValuePairList(string methodName, object newValue, IObjectInstanceHandle instanceHandle)
        {
            ObjectInstanceDescriptor oid = rti.descriptorManager.GetObjectInstanceDescriptor(instanceHandle);
            IObjectClassHandle       och = oid.ClassHandle;
            ObjectClassDescriptor    ocd = rti.descriptorManager.GetObjectClassDescriptor(och);

            HLAattributeHandleValuePair[] attributeHandleValuePairList = new HLAattributeHandleValuePair[1];
            attributeHandleValuePairList[0] = new HLAattributeHandleValuePair();
            attributeHandleValuePairList[0].AttributeHandle = ((XRTIAttributeHandle)ocd.GetAttributeDescriptor(methodName).Handle).Identifier;
            attributeHandleValuePairList[0].AttributeValue  = newValue;

            return(attributeHandleValuePairList);
        }
Exemplo n.º 38
0
 public virtual void AttributeOwnershipAcquisitionNotification(IObjectInstanceHandle theObject, IAttributeHandleSet securedAttributes, byte[] userSuppliedTag)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 39
0
 public virtual void RemoveObjectInstance(IObjectInstanceHandle theObject, byte[] userSuppliedTag, OrderType sentOrdering, ILogicalTime theTime, OrderType receivedOrdering, IMessageRetractionHandle retractionHandle)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 40
0
        public override void ReflectAttributeValuesExt(IObjectInstanceHandle theObject, HLAattributeHandleValuePair[] theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
        {
            // TODO ANGEL: LOCK DUDOSO
            lock (this)
            {
                base.ReflectAttributeValuesExt(theObject, theAttributes, userSuppliedTag, sentOrdering, theTransport);

                if (objectInstanceHandleProxyMap.ContainsKey(theObject))
                {
                    object instance = objectInstanceHandleProxyMap[theObject];

                    // TODO ANGEL: ¿Esto debería estar aquí o dentro de la funcionalidad del objectManager?
                    //             El problema es que si lo hace objectManager debe poder acceder al federationsMap del rti
                    foreach (HLAattributeHandleValuePair entry in theAttributes)
                    {

                        string attributeName = GetAttributeName(instance, entry.AttributeHandle);

                        // Checks if the object created is an instance of HLAfederation and its properties are modificated
                        if (instance is HLAfederation)
                        {

                            if (attributeName == "HLAfederationName")
                            {
                                rti.federationsMap.Add((string)entry.AttributeValue, instance as HLAfederation);
                            }
                            else if (attributeName == "HLAFDDID")
                            {
                                rti.interactionManager.RegisterHelperClass((string)entry.AttributeValue);
                            }
                        }

                        // Checks if the object created is an instance of HLAfederate and its properties are modificated
                        if (instance is HLAfederate)
                        {
                            if (attributeName == "HLAfederateHandle")
                            {
                                if (instance is Sxtafederate)
                                {
                                    Sxtafederate federate = instance as Sxtafederate;

                                    // TODO ANGEL: OJO! Implica que la propiedad HLAfederationNameJoined se haya recibido antes que ésta
                                    HLAfederateHandle federateHandle = (HLAfederateHandle)entry.AttributeValue;
                                    rti.federationsMap[federate.HLAfederationNameJoined].HLAfederatesinFederation.Add(federateHandle);
                                }
                            }

                            if (attributeName == "HLAfederationNameJoined")
                            {
                                if (instance is Sxtafederate)
                                {
                                    Sxtafederate federate = instance as Sxtafederate;

                                    HLAfederation federation = rti.federationsMap[federate.HLAfederationNameJoined];
                                    federate.Federation = federation;
                                }
                            }

                            /*
                            if (attributeName == "HLAlogicalTime" || attributeName == "HLApendingTime"
                                || attributeName == "HLAlookahead" || attributeName == "HLAGALT" || attributeName == "HLALITS")
                            {
                                //System.Threading.Monitor.Pulse(rti);
                                //rti.PushFederates();
                            }
                            */
                        }
                    }
                }
            }
        }
Exemplo n.º 41
0
 public virtual void RequestDivestitureConfirmation(IObjectInstanceHandle theObject, IAttributeHandleSet offeredAttributes)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 42
0
 public virtual void RequestDivestitureConfirmation(IObjectInstanceHandle theObject, IAttributeHandleSet offeredAttributes)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 43
0
 public virtual void AttributeIsOwnedByRTI(IObjectInstanceHandle theObject, IAttributeHandle theAttribute)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 44
0
 public virtual void RemoveObjectInstance(IObjectInstanceHandle theObject, byte[] userSuppliedTag, OrderType sentOrdering, ILogicalTime theTime, OrderType receivedOrdering, IMessageRetractionHandle retractionHandle)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 45
0
 public virtual void AttributeOwnershipUnavailable(IObjectInstanceHandle theObject, IAttributeHandleSet theAttributes)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 46
0
 public virtual void TurnUpdatesOffForObjectInstance(IObjectInstanceHandle theObject, IAttributeHandleSet theAttributes)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 47
0
 public DiscoverObjectInstanceCallback(IFederateAmbassador federate, IObjectInstanceHandle theObjectParam, IObjectClassHandle theObjectClassParam, string objectNameParam)
     : base(federate)
 {
     this.theObject = theObjectParam;
     this.theObjectClass = theObjectClassParam;
     this.objectName = objectNameParam;
 }
Exemplo n.º 48
0
 public virtual void ConfirmAttributeOwnershipAcquisitionCancellation(IObjectInstanceHandle theObject, IAttributeHandleSet theAttributes)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 49
0
 public ReflectAttributeValuesCallback(IFederateAmbassador federate, ILogicalTime time, IObjectInstanceHandle theObjectParam, IAttributeHandleValueMap theAttributesParam, byte[] userSuppliedTagParam)
     : base(federate, time)
 {
     this.theObject = theObjectParam;
     this.theAttributes = theAttributesParam;
     this.userSuppliedTag = userSuppliedTagParam;
 }
Exemplo n.º 50
0
 public virtual void DiscoverObjectInstance(IObjectInstanceHandle theObject, IObjectClassHandle theObjectClass, string objectName)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 51
0
 public ReflectAttributeValuesExtCallback(IFederateAmbassador federate, ILogicalTime time, long federateHandle, long interactionIndex, IObjectInstanceHandle theObjectParam, HLAattributeHandleValuePair[] theAttributesParam, byte[] userSuppliedTagParam)
     : base(federate, time, federateHandle, interactionIndex)
 {
     this.theObject = theObjectParam;
     this.theAttributes = theAttributesParam;
     this.userSuppliedTag = userSuppliedTagParam;
 }
Exemplo n.º 52
0
 public virtual void InformAttributeOwnership(IObjectInstanceHandle theObject, IAttributeHandle theAttribute, IFederateHandle theOwner)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 53
0
 public TimeStampedRemoveObjectInstanceCallback(IFederateAmbassador federate, ILogicalTime time, IObjectInstanceHandle theObjectParam, byte[] userSuppliedTagParam, OrderType sentOrderingParam, ILogicalTime theTimeParam, OrderType receivedOrderingParam)
     : base(federate, time, theObjectParam, userSuppliedTagParam, sentOrderingParam)
 {
     this.timeParam = theTimeParam;
     this.receivedOrdering = receivedOrderingParam;
 }
Exemplo n.º 54
0
 public virtual void ProvideAttributeValueUpdate(IObjectInstanceHandle theObject, IAttributeHandleSet theAttributes, byte[] userSuppliedTag)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 55
0
        public void OnReceiveUpdateAttributeValues(IObjectInstanceHandle instanceHandle, IDictionary<string, object> methodNameValueMap, ILogicalTime time)
        {
            HLAattributeHandleValuePair[] attributeHandleValuePair = CreateAttributesHandleValuePairList(methodNameValueMap, instanceHandle);

            // TODO ANGEL: que pasa con userSuppliedTag
            rti.UpdateAttributeValues(instanceHandle, attributeHandleValuePair, new byte[1], time);
        }
Exemplo n.º 56
0
 public virtual void ReflectAttributeValues(IObjectInstanceHandle theObject, IAttributeHandleValueMap theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport, ILogicalTime theTime, OrderType receivedOrdering, IMessageRetractionHandle retractionHandle, IRegionHandleSet sentRegions)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 57
0
        private HLAattributeHandleValuePair[] CreateAttributeHandleValuePairList(string methodName, object newValue, IObjectInstanceHandle instanceHandle)
        {
            ObjectInstanceDescriptor oid = rti.descriptorManager.GetObjectInstanceDescriptor(instanceHandle);
            IObjectClassHandle och = oid.ClassHandle;
            ObjectClassDescriptor ocd = rti.descriptorManager.GetObjectClassDescriptor(och);

            HLAattributeHandleValuePair[] attributeHandleValuePairList = new HLAattributeHandleValuePair[1];
            attributeHandleValuePairList[0] = new HLAattributeHandleValuePair();
            attributeHandleValuePairList[0].AttributeHandle = ((XRTIAttributeHandle)ocd.GetAttributeDescriptor(methodName).Handle).Identifier;
            attributeHandleValuePairList[0].AttributeValue = newValue;

            return attributeHandleValuePairList;
        }
Exemplo n.º 58
0
 // TODO ANGEL: Se añade un método de actualización específico para las propiedades de los objetos.
 //             Es debido a que usaban un IAttributeHandleValueMap que imponía una serie de problemas: implicaba la conversión de los values de object a byte[]
 public virtual void ReflectAttributeValuesExt(IObjectInstanceHandle theObject, HLAattributeHandleValuePair[] theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 59
0
 public virtual void RemoveObjectInstance(IObjectInstanceHandle theObject, byte[] userSuppliedTag, OrderType sentOrdering)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 60
0
        private HLAattributeHandleValuePair[] CreateAttributesHandleValuePairList(IDictionary <string, object> methodNameValueMap, IObjectInstanceHandle instanceHandle)
        {
            HLAattributeHandleValuePair[] attributeHandleValuePairList = new HLAattributeHandleValuePair[methodNameValueMap.Count];

            ObjectInstanceDescriptor oid = rti.descriptorManager.GetObjectInstanceDescriptor(instanceHandle);
            IObjectClassHandle       och = oid.ClassHandle;
            ObjectClassDescriptor    ocd = rti.descriptorManager.GetObjectClassDescriptor(och);

            int count = 0;

            foreach (KeyValuePair <string, object> entry in methodNameValueMap)
            {
                if (log.IsDebugEnabled)
                {
                    log.Debug("The method " + entry.Key + " from object " + instanceHandle + " has been called; new value:" + entry.Value + "; parameter type = " + entry.Value.GetType());
                }

                attributeHandleValuePairList[count] = new HLAattributeHandleValuePair();
                attributeHandleValuePairList[count].AttributeHandle = ((XRTIAttributeHandle)ocd.GetAttributeDescriptor(entry.Key).Handle).Identifier;
                attributeHandleValuePairList[count].AttributeValue  = entry.Value;
                count++;
            }

            return(attributeHandleValuePairList);
        }