} // 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("<GridAxisRecordRepresentation1>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<fieldScale type=\"float\">" + _fieldScale.ToString() + "</fieldScale> " + System.Environment.NewLine);
                sb.Append("<fieldOffset type=\"float\">" + _fieldOffset.ToString() + "</fieldOffset> " + System.Environment.NewLine);
                sb.Append("<dataValues type=\"ushort\">" + _dataValues.Count.ToString() + "</dataValues> " + System.Environment.NewLine);

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

                sb.Append("</GridAxisRecordRepresentation1>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of reflection method
        } // 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("<MinefieldDataPdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<minefieldID>" + System.Environment.NewLine);
                _minefieldID.reflection(sb);
                sb.Append("</minefieldID>" + System.Environment.NewLine);
                sb.Append("<requestingEntityID>" + System.Environment.NewLine);
                _requestingEntityID.reflection(sb);
                sb.Append("</requestingEntityID>" + System.Environment.NewLine);
                sb.Append("<minefieldSequenceNumbeer type=\"ushort\">" + _minefieldSequenceNumbeer.ToString() + "</minefieldSequenceNumbeer> " + System.Environment.NewLine);
                sb.Append("<requestID type=\"byte\">" + _requestID.ToString() + "</requestID> " + System.Environment.NewLine);
                sb.Append("<pduSequenceNumber type=\"byte\">" + _pduSequenceNumber.ToString() + "</pduSequenceNumber> " + System.Environment.NewLine);
                sb.Append("<numberOfPdus type=\"byte\">" + _numberOfPdus.ToString() + "</numberOfPdus> " + System.Environment.NewLine);
                sb.Append("<mineLocation type=\"byte\">" + _mineLocation.Count.ToString() + "</mineLocation> " + System.Environment.NewLine);
                sb.Append("<sensorTypes type=\"byte\">" + _sensorTypes.Count.ToString() + "</sensorTypes> " + System.Environment.NewLine);
                sb.Append("<pad2 type=\"byte\">" + _pad2.ToString() + "</pad2> " + System.Environment.NewLine);
                sb.Append("<dataFilter type=\"uint\">" + _dataFilter.ToString() + "</dataFilter> " + System.Environment.NewLine);
                sb.Append("<mineType>" + System.Environment.NewLine);
                _mineType.reflection(sb);
                sb.Append("</mineType>" + System.Environment.NewLine);

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

                sb.Append("<pad3 type=\"byte\">" + _pad3.ToString() + "</pad3> " + System.Environment.NewLine);

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

                sb.Append("</MinefieldDataPdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of reflection method
Example #3
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("<MinefieldQueryPdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<minefieldID>" + System.Environment.NewLine);
                _minefieldID.reflection(sb);
                sb.Append("</minefieldID>" + System.Environment.NewLine);
                sb.Append("<requestingEntityID>" + System.Environment.NewLine);
                _requestingEntityID.reflection(sb);
                sb.Append("</requestingEntityID>" + System.Environment.NewLine);
                sb.Append("<requestID type=\"byte\">" + _requestID.ToString() + "</requestID> " + System.Environment.NewLine);
                sb.Append("<requestedPerimeterPoints type=\"byte\">" + _requestedPerimeterPoints.Count.ToString() + "</requestedPerimeterPoints> " + System.Environment.NewLine);
                sb.Append("<pad2 type=\"byte\">" + _pad2.ToString() + "</pad2> " + System.Environment.NewLine);
                sb.Append("<sensorTypes type=\"byte\">" + _sensorTypes.Count.ToString() + "</sensorTypes> " + System.Environment.NewLine);
                sb.Append("<dataFilter type=\"uint\">" + _dataFilter.ToString() + "</dataFilter> " + System.Environment.NewLine);
                sb.Append("<requestedMineType>" + System.Environment.NewLine);
                _requestedMineType.reflection(sb);
                sb.Append("</requestedMineType>" + System.Environment.NewLine);

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


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

                sb.Append("</MinefieldQueryPdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of reflection method