///<summary> Writes this HLAsubscribeInteractionClassMessage to the specified stream.</summary> ///<param name="writer"> the output stream to write to</param> ///<param name="obj"> the object to serialize</param> ///<exception cref="System.IO.IOException"> if an error occurs</exception> public override void Serialize(HlaEncodingWriter writer, object obj) { try { base.Serialize(writer, obj); IInteractionClassHandle interactionClassHandle = (((HLAsubscribeInteractionClassMessage)obj).HLAinteractionClass); byte[] interactionClassHandleByteArray = new byte[interactionClassHandle.EncodedLength()]; interactionClassHandle.Encode(interactionClassHandleByteArray, 0); writer.WriteHLAopaqueData(interactionClassHandleByteArray); writer.WriteHLAboolean(((HLAsubscribeInteractionClassMessage)obj).HLAactive); /* * writer.WriteHLAinteger32BE((((HLAsubscribeInteractionClassMessage)obj).HLAinteractionClass).Length); * * for (int i = 0; i < (((HLAsubscribeInteractionClassMessage)obj).HLAinteractionClass).Length; i++) * { * writer.WriteHLAoctet((((HLAsubscribeInteractionClassMessage)obj).HLAinteractionClass)[i]); * } * writer.WriteHLAboolean(((HLAsubscribeInteractionClassMessage)obj).HLAactive); */ } catch (System.IO.IOException ioe) { throw new RTIinternalError(ioe.ToString()); } }
public void TestInteractionHandlesWithoutQualifiedName() { try { JoinFederation(); IInteractionClassHandle commHandle = rtiAmbassador.GetInteractionClassHandle("Communication"); IParameterHandle messageHandle = rtiAmbassador.GetParameterHandle(commHandle, "message"); string messageName = rtiAmbassador.GetParameterName(commHandle, messageHandle); Assert.AreEqual("message", messageName); } catch (Exception e) { if (log.IsErrorEnabled) { log.Error(e.Message); } Assert.Fail("Unexpected exception while fetching the object model handles:" + e); } // clean up for the next test Resign(); }
public ReceiveInteractionCallback(IFederateAmbassador federate, ILogicalTime time, IInteractionClassHandle interactionClassParam, IParameterHandleValueMap theParametersParam, byte[] userSuppliedTagParam) : base(federate, time) { this.interactionClass = interactionClassParam; this.theParameters = theParametersParam; this.userSuppliedTag = userSuppliedTagParam; }
/// <summary> /// Constructor. /// </summary> /// <param name="pName">the name of the interaction class /// </param> /// <param name="pHandle">the handle of the interaction class /// </param> /// <param name="pParentDescriptors">the descriptors of the interaction class's parents /// </param> /// <param name="pDimensions">the dimensions associated with the interaction class /// </param> /// <param name="pTransportation">the transportation type of the interaction class /// </param> /// <param name="pOrder">the order type of the interaction class /// </param> public InteractionClassDescriptor(XmlElement interactionElement, IInteractionClassHandle pHandle, List<InteractionClassDescriptor> pParentDescriptors, IDimensionHandleSet pDimensions, TransportationType pTransportation, Sxta.Rti1516.Reflection.HLAorderType pOrder) { interactionClass = new Sxta.Rti1516.Reflection.HLAinteractionClass(interactionElement); handle = pHandle; parentDescriptors = pParentDescriptors; dimensions = pDimensions; transportation = pTransportation; order = pOrder; }
/// <summary> /// Constructor. /// </summary> /// <param name="interactClass">the info of the interaction class /// </param> /// <param name="pHandle">the handle of the interaction class /// </param> /// <param name="pParentDescriptors">the descriptors of the interaction class's parents /// </param> /// </param> public InteractionClassDescriptor(Sxta.Rti1516.Reflection.HLAinteractionClass interactClass, IInteractionClassHandle pHandle) { interactionClass = interactClass; handle = pHandle; parentDescriptors = new List <InteractionClassDescriptor>(); dimensions = new XRTIDimensionHandleSet(); transportation = "HLAreliable".Equals(interactClass.Transportation) ? TransportationType.HLA_RELIABLE : TransportationType.HLA_BEST_EFFORT; order = "Receive".Equals(interactClass.Order) ? Sxta.Rti1516.Reflection.HLAorderType.Receive : Sxta.Rti1516.Reflection.HLAorderType.TimeStamp; }
/// <summary> /// Constructor. /// </summary> /// <param name="pName">the name of the interaction class /// </param> /// <param name="pHandle">the handle of the interaction class /// </param> /// <param name="pParentDescriptors">the descriptors of the interaction class's parents /// </param> /// <param name="pDimensions">the dimensions associated with the interaction class /// </param> /// <param name="pTransportation">the transportation type of the interaction class /// </param> /// <param name="pOrder">the order type of the interaction class /// </param> public InteractionClassDescriptor(XmlElement interactionElement, IInteractionClassHandle pHandle, List <InteractionClassDescriptor> pParentDescriptors, IDimensionHandleSet pDimensions, TransportationType pTransportation, Sxta.Rti1516.Reflection.HLAorderType pOrder) { interactionClass = new Sxta.Rti1516.Reflection.HLAinteractionClass(interactionElement); handle = pHandle; parentDescriptors = pParentDescriptors; dimensions = pDimensions; transportation = pTransportation; order = pOrder; }
/// <summary> /// Constructor. /// </summary> /// <param name="interactClass">the info of the interaction class /// </param> /// <param name="pHandle">the handle of the interaction class /// </param> /// <param name="pParentDescriptors">the descriptors of the interaction class's parents /// </param> /// </param> public InteractionClassDescriptor(Sxta.Rti1516.Reflection.HLAinteractionClass interactClass, IInteractionClassHandle pHandle) { interactionClass = interactClass; handle = pHandle; parentDescriptors = new List<InteractionClassDescriptor>(); dimensions = new XRTIDimensionHandleSet(); transportation = "HLAreliable".Equals(interactClass.Transportation) ? TransportationType.HLA_RELIABLE : TransportationType.HLA_BEST_EFFORT; order = "Receive".Equals(interactClass.Order) ? Sxta.Rti1516.Reflection.HLAorderType.Receive : Sxta.Rti1516.Reflection.HLAorderType.TimeStamp; }
public virtual void TurnInteractionsOn(IInteractionClassHandle theHandle) { 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."); }
/// <summary> /// Returns the descriptor for the interaction class with the given handle. /// </summary> /// <param name="handle">the handle of the interaction class /// </param> /// <returns> the interaction class descriptor, or <code>null</code> if no such /// descriptor exists /// </returns> public virtual InteractionClassDescriptor GetInteractionClassDescriptor(IInteractionClassHandle handle) { return interactionClassHandleDescriptorMap[handle]; }
/// <summary> /// Checks whether the specified interaction class handle is a bootstrap /// handle. /// </summary> /// <param name="ich">the interaction class handle to check /// </param> /// <returns> <code>true</code> if the handle is a bootstrap handle, /// <code>false</code> otherwise /// </returns> public virtual bool IsBootstrapHandle(IInteractionClassHandle ich) { return ((XRTIInteractionClassHandle)ich).Identifier < handleCounter; }
public virtual void TurnInteractionsOff(IInteractionClassHandle theHandle) { throw new Exception("The method or operation is not implemented."); }