Ejemplo n.º 1
0
        public override void Marshal(DataOutputStream dos)
        {
            base.Marshal(dos);
            if (dos != null)
            {
                try
                {
                    this._layerHeader.Marshal(dos);
                    this._beamData.Marshal(dos);
                    this._secondaryOperationalData.Marshal(dos);

                    for (int idx = 0; idx < this._fundamentalIffParameters.Count; idx++)
                    {
                        FundamentalParameterDataIff aFundamentalParameterDataIff = (FundamentalParameterDataIff)this._fundamentalIffParameters[idx];
                        aFundamentalParameterDataIff.Marshal(dos);
                    }
                }
                catch (Exception e)
                {
                    if (PduBase.TraceExceptions)
                    {
                        Trace.WriteLine(e);
                        Trace.Flush();
                    }

                    this.RaiseExceptionOccured(e);

                    if (PduBase.ThrowExceptions)
                    {
                        throw e;
                    }
                }
            }
        }
Ejemplo n.º 2
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(FundamentalParameterDataIff obj)
        {
            bool ivarsEqual = true;

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

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

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

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

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

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

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

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

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

            return(ivarsEqual);
        }
Ejemplo n.º 3
0
        public override int GetMarshalledSize()
        {
            int marshalSize = 0;

            marshalSize  = base.GetMarshalledSize();
            marshalSize += this._layerHeader.GetMarshalledSize();              // this._layerHeader
            marshalSize += this._beamData.GetMarshalledSize();                 // this._beamData
            marshalSize += this._secondaryOperationalData.GetMarshalledSize(); // this._secondaryOperationalData
            for (int idx = 0; idx < this._fundamentalIffParameters.Count; idx++)
            {
                FundamentalParameterDataIff listElement = (FundamentalParameterDataIff)this._fundamentalIffParameters[idx];
                marshalSize += listElement.GetMarshalledSize();
            }

            return(marshalSize);
        }
Ejemplo n.º 4
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<IffAtcNavAidsLayer2Pdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<layerHeader>");
                this._layerHeader.Reflection(sb);
                sb.AppendLine("</layerHeader>");
                sb.AppendLine("<beamData>");
                this._beamData.Reflection(sb);
                sb.AppendLine("</beamData>");
                sb.AppendLine("<secondaryOperationalData>");
                this._secondaryOperationalData.Reflection(sb);
                sb.AppendLine("</secondaryOperationalData>");
                for (int idx = 0; idx < this._fundamentalIffParameters.Count; idx++)
                {
                    sb.AppendLine("<fundamentalIffParameters" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"FundamentalParameterDataIff\">");
                    FundamentalParameterDataIff aFundamentalParameterDataIff = (FundamentalParameterDataIff)this._fundamentalIffParameters[idx];
                    aFundamentalParameterDataIff.Reflection(sb);
                    sb.AppendLine("</fundamentalIffParameters" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</IffAtcNavAidsLayer2Pdu>");
            }
            catch (Exception e)
            {
                if (PduBase.TraceExceptions)
                {
                    Trace.WriteLine(e);
                    Trace.Flush();
                }

                this.RaiseExceptionOccured(e);

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

            if (dis != null)
            {
                try
                {
                    this._layerHeader.Unmarshal(dis);
                    this._beamData.Unmarshal(dis);
                    this._secondaryOperationalData.Unmarshal(dis);

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

                    this.RaiseExceptionOccured(e);

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