Esempio n. 1
0
        public override void Unmarshal(DataInputStream dis)
        {
            base.Unmarshal(dis);

            if (dis != null)
            {
                try
                {
                    this._entityID.Unmarshal(dis);
                    this._forceId = dis.ReadUnsignedByte();
                    this._numberOfArticulationParameters = dis.ReadByte();
                    this._entityType.Unmarshal(dis);
                    this._alternativeEntityType.Unmarshal(dis);
                    this._entityLinearVelocity.Unmarshal(dis);
                    this._entityLocation.Unmarshal(dis);
                    this._entityOrientation.Unmarshal(dis);
                    this._entityAppearance = dis.ReadInt();
                    this._deadReckoningParameters.Unmarshal(dis);
                    this._marking.Unmarshal(dis);
                    this._capabilities = dis.ReadInt();

                    for (int idx = 0; idx < this.NumberOfArticulationParameters; idx++)
                    {
                        ArticulationParameter anX = new ArticulationParameter();
                        anX.Unmarshal(dis);
                        this._articulationParameters.Add(anX);
                    }
                }
                catch (Exception e)
                {
                    if (PduBase.TraceExceptions)
                    {
                        Trace.WriteLine(e);
                        Trace.Flush();
                    }

                    this.RaiseExceptionOccured(e);

                    if (PduBase.ThrowExceptions)
                    {
                        throw e;
                    }
                }
            }
        }
Esempio n. 2
0
        public override void Unmarshal(DataInputStream dis)
        {
            base.Unmarshal(dis);

            if (dis != null)
            {
                try
                {
                    this._munitionID.Unmarshal(dis);
                    this._eventID.Unmarshal(dis);
                    this._velocity.Unmarshal(dis);
                    this._locationInWorldCoordinates.Unmarshal(dis);
                    this._burstDescriptor.Unmarshal(dis);
                    this._locationInEntityCoordinates.Unmarshal(dis);
                    this._detonationResult = dis.ReadUnsignedByte();
                    this._numberOfArticulationParameters = dis.ReadUnsignedByte();
                    this._pad = dis.ReadShort();

                    for (int idx = 0; idx < this.NumberOfArticulationParameters; idx++)
                    {
                        ArticulationParameter anX = new ArticulationParameter();
                        anX.Unmarshal(dis);
                        this._articulationParameters.Add(anX);
                    }
                }
                catch (Exception e)
                {
                    if (PduBase.TraceExceptions)
                    {
                        Trace.WriteLine(e);
                        Trace.Flush();
                    }

                    this.RaiseExceptionOccured(e);

                    if (PduBase.ThrowExceptions)
                    {
                        throw e;
                    }
                }
            }
        }