Ejemplo n.º 1
0
        public override int GetMarshalledSize()
        {
            int marshalSize = 0;

            marshalSize  = base.GetMarshalledSize();
            marshalSize += this._orginatingEntityID.GetMarshalledSize(); // this._orginatingEntityID
            marshalSize += 2;                                            // this._infraredSignatureRepresentationIndex
            marshalSize += 2;                                            // this._acousticSignatureRepresentationIndex
            marshalSize += 2;                                            // this._radarCrossSectionSignatureRepresentationIndex
            marshalSize += 2;                                            // this._numberOfPropulsionSystems
            marshalSize += 2;                                            // this._numberOfVectoringNozzleSystems
            for (int idx = 0; idx < this._propulsionSystemData.Count; idx++)
            {
                PropulsionSystemData listElement = (PropulsionSystemData)this._propulsionSystemData[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            for (int idx = 0; idx < this._vectoringSystemData.Count; idx++)
            {
                VectoringNozzleSystemData listElement = (VectoringNozzleSystemData)this._vectoringSystemData[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            return(marshalSize);
        }
Ejemplo n.º 2
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<SeesPdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<orginatingEntityID>");
                this._orginatingEntityID.Reflection(sb);
                sb.AppendLine("</orginatingEntityID>");
                sb.AppendLine("<infraredSignatureRepresentationIndex type=\"ushort\">" + this._infraredSignatureRepresentationIndex.ToString(CultureInfo.InvariantCulture) + "</infraredSignatureRepresentationIndex>");
                sb.AppendLine("<acousticSignatureRepresentationIndex type=\"ushort\">" + this._acousticSignatureRepresentationIndex.ToString(CultureInfo.InvariantCulture) + "</acousticSignatureRepresentationIndex>");
                sb.AppendLine("<radarCrossSectionSignatureRepresentationIndex type=\"ushort\">" + this._radarCrossSectionSignatureRepresentationIndex.ToString(CultureInfo.InvariantCulture) + "</radarCrossSectionSignatureRepresentationIndex>");
                sb.AppendLine("<propulsionSystemData type=\"ushort\">" + this._propulsionSystemData.Count.ToString(CultureInfo.InvariantCulture) + "</propulsionSystemData>");
                sb.AppendLine("<vectoringSystemData type=\"ushort\">" + this._vectoringSystemData.Count.ToString(CultureInfo.InvariantCulture) + "</vectoringSystemData>");
                for (int idx = 0; idx < this._propulsionSystemData.Count; idx++)
                {
                    sb.AppendLine("<propulsionSystemData" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"PropulsionSystemData\">");
                    PropulsionSystemData aPropulsionSystemData = (PropulsionSystemData)this._propulsionSystemData[idx];
                    aPropulsionSystemData.Reflection(sb);
                    sb.AppendLine("</propulsionSystemData" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                for (int idx = 0; idx < this._vectoringSystemData.Count; idx++)
                {
                    sb.AppendLine("<vectoringSystemData" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"VectoringNozzleSystemData\">");
                    VectoringNozzleSystemData aVectoringNozzleSystemData = (VectoringNozzleSystemData)this._vectoringSystemData[idx];
                    aVectoringNozzleSystemData.Reflection(sb);
                    sb.AppendLine("</vectoringSystemData" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</SeesPdu>");
            }
            catch (Exception e)
            {
#if DEBUG
                Trace.WriteLine(e);
                Trace.Flush();
#endif
                this.OnException(e);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        ///     <c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(PropulsionSystemData obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return(false);
            }

            if (this._powerSetting != obj._powerSetting)
            {
                ivarsEqual = false;
            }

            if (this._engineRpm != obj._engineRpm)
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
Ejemplo n.º 4
0
        public override void Unmarshal(DataInputStream dis)
        {
            base.Unmarshal(dis);

            if (dis != null)
            {
                try
                {
                    this._orginatingEntityID.Unmarshal(dis);
                    this._infraredSignatureRepresentationIndex          = dis.ReadUnsignedShort();
                    this._acousticSignatureRepresentationIndex          = dis.ReadUnsignedShort();
                    this._radarCrossSectionSignatureRepresentationIndex = dis.ReadUnsignedShort();
                    this._numberOfPropulsionSystems      = dis.ReadUnsignedShort();
                    this._numberOfVectoringNozzleSystems = dis.ReadUnsignedShort();
                    for (int idx = 0; idx < this.NumberOfPropulsionSystems; idx++)
                    {
                        PropulsionSystemData anX = new PropulsionSystemData();
                        anX.Unmarshal(dis);
                        this._propulsionSystemData.Add(anX);
                    }
                    ;

                    for (int idx = 0; idx < this.NumberOfVectoringNozzleSystems; idx++)
                    {
                        VectoringNozzleSystemData anX = new VectoringNozzleSystemData();
                        anX.Unmarshal(dis);
                        this._vectoringSystemData.Add(anX);
                    }
                    ;
                }
                catch (Exception e)
                {
#if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
#endif
                    this.OnException(e);
                }
            }
        }
Ejemplo n.º 5
0
        public override void Marshal(DataOutputStream dos)
        {
            base.Marshal(dos);
            if (dos != null)
            {
                try
                {
                    this._orginatingEntityID.Marshal(dos);
                    dos.WriteUnsignedShort((ushort)this._infraredSignatureRepresentationIndex);
                    dos.WriteUnsignedShort((ushort)this._acousticSignatureRepresentationIndex);
                    dos.WriteUnsignedShort((ushort)this._radarCrossSectionSignatureRepresentationIndex);
                    dos.WriteUnsignedShort((ushort)this._propulsionSystemData.Count);
                    dos.WriteUnsignedShort((ushort)this._vectoringSystemData.Count);

                    for (int idx = 0; idx < this._propulsionSystemData.Count; idx++)
                    {
                        PropulsionSystemData aPropulsionSystemData = (PropulsionSystemData)this._propulsionSystemData[idx];
                        aPropulsionSystemData.Marshal(dos);
                    }

                    for (int idx = 0; idx < this._vectoringSystemData.Count; idx++)
                    {
                        VectoringNozzleSystemData aVectoringNozzleSystemData = (VectoringNozzleSystemData)this._vectoringSystemData[idx];
                        aVectoringNozzleSystemData.Marshal(dos);
                    }
                }
                catch (Exception e)
                {
#if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
#endif
                    this.OnException(e);
                }
            }
        }
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        /// 	<c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(PropulsionSystemData obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return false;
            }

            if (this._powerSetting != obj._powerSetting)
            {
                ivarsEqual = false;
            }

            if (this._engineRpm != obj._engineRpm)
            {
                ivarsEqual = false;
            }

            return ivarsEqual;
        }