Ejemplo n.º 1
0
        } // end of unmarshal method

        ///<summary>
        ///This allows for a quick display of PDU data.  The current format is unacceptable and only used for debugging.
        ///This will be modified in the future to provide a better display.  Usage:
        ///pdu.GetType().InvokeMember("reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
        ///where pdu is an object representing a single pdu and sb is a StringBuilder.
        ///Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
        ///</summary>
        new public void reflection(StringBuilder sb)
        {
            sb.Append("<IffAtcNavAidsLayer2Pdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<layerHeader>" + System.Environment.NewLine);
                _layerHeader.reflection(sb);
                sb.Append("</layerHeader>" + System.Environment.NewLine);
                sb.Append("<beamData>" + System.Environment.NewLine);
                _beamData.reflection(sb);
                sb.Append("</beamData>" + System.Environment.NewLine);
                sb.Append("<secondaryOperationalData>" + System.Environment.NewLine);
                _secondaryOperationalData.reflection(sb);
                sb.Append("</secondaryOperationalData>" + System.Environment.NewLine);

                for (int idx = 0; idx < _fundamentalIffParameters.Count; idx++)
                {
                    sb.Append("<fundamentalIffParameters" + idx.ToString() + " type=\"FundamentalParameterDataIff\">" + System.Environment.NewLine);
                    FundamentalParameterDataIff aFundamentalParameterDataIff = (FundamentalParameterDataIff)_fundamentalIffParameters[idx];
                    aFundamentalParameterDataIff.reflection(sb);
                    sb.Append("</fundamentalIffParameters" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling

                sb.Append("</IffAtcNavAidsLayer2Pdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of reflection method
Ejemplo n.º 2
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(IffAtcNavAidsLayer2Pdu rhs)
        {
            bool ivarsEqual = true;

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

            if (!(_layerHeader.Equals(rhs._layerHeader)))
            {
                ivarsEqual = false;
            }
            if (!(_beamData.Equals(rhs._beamData)))
            {
                ivarsEqual = false;
            }
            if (!(_secondaryOperationalData.Equals(rhs._secondaryOperationalData)))
            {
                ivarsEqual = false;
            }

            for (int idx = 0; idx < _fundamentalIffParameters.Count; idx++)
            {
                FundamentalParameterDataIff x = (FundamentalParameterDataIff)_fundamentalIffParameters[idx];
                if (!(_fundamentalIffParameters[idx].Equals(rhs._fundamentalIffParameters[idx])))
                {
                    ivarsEqual = false;
                }
            }


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

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

            return(marshalSize);
        }
Ejemplo n.º 4
0
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(FundamentalParameterDataIff rhs)
        {
            bool ivarsEqual = true;

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


            if (!(_erp == rhs._erp))
            {
                ivarsEqual = false;
            }
            if (!(_frequency == rhs._frequency))
            {
                ivarsEqual = false;
            }
            if (!(_pgrf == rhs._pgrf))
            {
                ivarsEqual = false;
            }
            if (!(_pulseWidth == rhs._pulseWidth))
            {
                ivarsEqual = false;
            }
            if (!(_burstLength == rhs._burstLength))
            {
                ivarsEqual = false;
            }
            if (!(_applicableModes == rhs._applicableModes))
            {
                ivarsEqual = false;
            }
            if (!(_pad2 == rhs._pad2))
            {
                ivarsEqual = false;
            }
            if (!(_pad3 == rhs._pad3))
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
Ejemplo n.º 5
0
        ///<summary>
        ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
        ///</summary>
        new public void marshal(DataOutputStream dos)
        {
            base.marshal(dos);
            try
            {
                _layerHeader.marshal(dos);
                _beamData.marshal(dos);
                _secondaryOperationalData.marshal(dos);

                for (int idx = 0; idx < _fundamentalIffParameters.Count; idx++)
                {
                    FundamentalParameterDataIff aFundamentalParameterDataIff = (FundamentalParameterDataIff)_fundamentalIffParameters[idx];
                    aFundamentalParameterDataIff.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Ejemplo n.º 6
0
        } // end of marshal method

        new public void unmarshal(DataInputStream dis)
        {
            base.unmarshal(dis);

            try
            {
                _layerHeader.unmarshal(dis);
                _beamData.unmarshal(dis);
                _secondaryOperationalData.unmarshal(dis);
                for (int idx = 0; idx < _pad2; idx++)
                {
                    FundamentalParameterDataIff anX = new FundamentalParameterDataIff();
                    anX.unmarshal(dis);
                    _fundamentalIffParameters.Add(anX);
                }
                ;
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of unmarshal method
        public new void unmarshal(DataInputStream dis)
        {
            base.unmarshal(dis);

            try
            {
                _layerHeader.unmarshal(dis);
                _beamData.unmarshal(dis);
                _secondaryOperationalData.unmarshal(dis);
                for(int idx = 0; idx < _pad2; idx++)
                {
                    FundamentalParameterDataIff anX = new FundamentalParameterDataIff();
                    anX.unmarshal(dis);
                    _fundamentalIffParameters.Add(anX);
                };

            } // end try
            catch(Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        }
        /**
          * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
          */
        public bool equals(FundamentalParameterDataIff rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
            return false;

             if( ! (_erp == rhs._erp)) ivarsEqual = false;
             if( ! (_frequency == rhs._frequency)) ivarsEqual = false;
             if( ! (_pgrf == rhs._pgrf)) ivarsEqual = false;
             if( ! (_pulseWidth == rhs._pulseWidth)) ivarsEqual = false;
             if( ! (_burstLength == rhs._burstLength)) ivarsEqual = false;
             if( ! (_applicableModes == rhs._applicableModes)) ivarsEqual = false;
             if( ! (_pad2 == rhs._pad2)) ivarsEqual = false;
             if( ! (_pad3 == rhs._pad3)) ivarsEqual = false;

            return ivarsEqual;
        }