} // 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> public void reflection(StringBuilder sb) { sb.Append("<LinearSegmentParameter>" + System.Environment.NewLine); try { sb.Append("<segmentNumber type=\"byte\">" + _segmentNumber.ToString() + "</segmentNumber> " + System.Environment.NewLine); sb.Append("<segmentAppearance>" + System.Environment.NewLine); _segmentAppearance.reflection(sb); sb.Append("</segmentAppearance>" + System.Environment.NewLine); sb.Append("<location>" + System.Environment.NewLine); _location.reflection(sb); sb.Append("</location>" + System.Environment.NewLine); sb.Append("<orientation>" + System.Environment.NewLine); _orientation.reflection(sb); sb.Append("</orientation>" + System.Environment.NewLine); sb.Append("<segmentLength type=\"ushort\">" + _segmentLength.ToString() + "</segmentLength> " + System.Environment.NewLine); sb.Append("<segmentWidth type=\"ushort\">" + _segmentWidth.ToString() + "</segmentWidth> " + System.Environment.NewLine); sb.Append("<segmentHeight type=\"ushort\">" + _segmentHeight.ToString() + "</segmentHeight> " + System.Environment.NewLine); sb.Append("<segmentDepth type=\"ushort\">" + _segmentDepth.ToString() + "</segmentDepth> " + System.Environment.NewLine); sb.Append("<pad1 type=\"uint\">" + _pad1.ToString() + "</pad1> " + System.Environment.NewLine); sb.Append("</LinearSegmentParameter>" + 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("<ArealObjectStatePdu>" + System.Environment.NewLine); base.reflection(sb); try { sb.Append("<objectID>" + System.Environment.NewLine); _objectID.reflection(sb); sb.Append("</objectID>" + System.Environment.NewLine); sb.Append("<referencedObjectID>" + System.Environment.NewLine); _referencedObjectID.reflection(sb); sb.Append("</referencedObjectID>" + System.Environment.NewLine); sb.Append("<updateNumber type=\"ushort\">" + _updateNumber.ToString() + "</updateNumber> " + System.Environment.NewLine); sb.Append("<forceID type=\"byte\">" + _forceID.ToString() + "</forceID> " + System.Environment.NewLine); sb.Append("<modifications type=\"byte\">" + _modifications.ToString() + "</modifications> " + System.Environment.NewLine); sb.Append("<objectType>" + System.Environment.NewLine); _objectType.reflection(sb); sb.Append("</objectType>" + System.Environment.NewLine); sb.Append("<objectAppearance>" + System.Environment.NewLine); _objectAppearance.reflection(sb); sb.Append("</objectAppearance>" + System.Environment.NewLine); sb.Append("<objectLocation type=\"ushort\">" + _objectLocation.Count.ToString() + "</objectLocation> " + System.Environment.NewLine); sb.Append("<requesterID>" + System.Environment.NewLine); _requesterID.reflection(sb); sb.Append("</requesterID>" + System.Environment.NewLine); sb.Append("<receivingID>" + System.Environment.NewLine); _receivingID.reflection(sb); sb.Append("</receivingID>" + System.Environment.NewLine); for (int idx = 0; idx < _objectLocation.Count; idx++) { sb.Append("<objectLocation" + idx.ToString() + " type=\"Vector3Double\">" + System.Environment.NewLine); Vector3Double aVector3Double = (Vector3Double)_objectLocation[idx]; aVector3Double.reflection(sb); sb.Append("</objectLocation" + idx.ToString() + ">" + System.Environment.NewLine); } // end of list marshalling sb.Append("</ArealObjectStatePdu>" + System.Environment.NewLine); } // end try catch (Exception e) { Trace.WriteLine(e); Trace.Flush(); } } // end of marshal method