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); } //} }
/// <summary> /// Copy constructor. /// </summary> /// <param name="otherOrderType">the order type to copy /// </param> public OrderType(OrderType otherOrderType) { val = otherOrderType.val; }
public RemoveObjectInstanceCallback(IFederateAmbassador federate, ILogicalTime time, IObjectInstanceHandle theObjectParam, byte[] userSuppliedTagParam, OrderType sentOrderingParam) : base(federate, time) { this.theObject = theObjectParam; this.userSuppliedTag = userSuppliedTagParam; this.sentOrdering = sentOrderingParam; }
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; }
public virtual void RemoveObjectInstance(IObjectInstanceHandle theObject, byte[] userSuppliedTag, OrderType sentOrdering) { throw new Exception("The method or operation is not implemented."); }
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."); }
// 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."); }
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."); }
public virtual void ReceiveInteraction(IInteractionClassHandle interactionClass, IParameterHandleValueMap theParameters, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport, ILogicalTime theTime, OrderType receivedOrdering, IMessageRetractionHandle messageRetractionHandle, IRegionHandleSet sentRegions) { throw new Exception("The method or operation is not implemented."); }
public virtual void ReceiveInteraction(IInteractionClassHandle interactionClass, IParameterHandleValueMap theParameters, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport) { throw new Exception("The method or operation is not implemented."); }
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(); } */ } } } } }