コード例 #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("<CommentReliablePdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<fixedDatumRecords type=\"uint\">" + _fixedDatumRecords.Count.ToString() + "</fixedDatumRecords> " + System.Environment.NewLine);
                sb.Append("<variableDatumRecords type=\"uint\">" + _variableDatumRecords.Count.ToString() + "</variableDatumRecords> " + System.Environment.NewLine);

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


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

                sb.Append("</CommentReliablePdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of reflection method
コード例 #2
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("<DataQueryReliablePdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<requiredReliabilityService type=\"byte\">" + _requiredReliabilityService.ToString() + "</requiredReliabilityService> " + System.Environment.NewLine);
                sb.Append("<pad1 type=\"ushort\">" + _pad1.ToString() + "</pad1> " + System.Environment.NewLine);
                sb.Append("<pad2 type=\"byte\">" + _pad2.ToString() + "</pad2> " + System.Environment.NewLine);
                sb.Append("<requestID type=\"uint\">" + _requestID.ToString() + "</requestID> " + System.Environment.NewLine);
                sb.Append("<timeInterval type=\"uint\">" + _timeInterval.ToString() + "</timeInterval> " + System.Environment.NewLine);
                sb.Append("<fixedDatumRecords type=\"uint\">" + _fixedDatumRecords.Count.ToString() + "</fixedDatumRecords> " + System.Environment.NewLine);
                sb.Append("<variableDatumRecords type=\"uint\">" + _variableDatumRecords.Count.ToString() + "</variableDatumRecords> " + System.Environment.NewLine);

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


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

                sb.Append("</DataQueryReliablePdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of reflection method
コード例 #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("<EventReportPdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<eventType type=\"uint\">" + _eventType.ToString() + "</eventType> " + System.Environment.NewLine);
                sb.Append("<padding1 type=\"uint\">" + _padding1.ToString() + "</padding1> " + System.Environment.NewLine);
                sb.Append("<fixedDatums type=\"uint\">" + _fixedDatums.Count.ToString() + "</fixedDatums> " + System.Environment.NewLine);
                sb.Append("<variableDatums type=\"uint\">" + _variableDatums.Count.ToString() + "</variableDatums> " + System.Environment.NewLine);

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


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

                sb.Append("</EventReportPdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
コード例 #4
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("<ActionRequestPdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<requestID type=\"uint\">" + _requestID.ToString() + "</requestID> " + System.Environment.NewLine);
                sb.Append("<actionID type=\"uint\">" + _actionID.ToString() + "</actionID> " + System.Environment.NewLine);
                sb.Append("<fixedDatums type=\"uint\">" + _fixedDatums.Count.ToString() + "</fixedDatums> " + System.Environment.NewLine);
                sb.Append("<variableDatums type=\"uint\">" + _variableDatums.Count.ToString() + "</variableDatums> " + System.Environment.NewLine);

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


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

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