public override void Reflection(StringBuilder sb) { sb.AppendLine("<MinefieldDataPdu>"); base.Reflection(sb); try { sb.AppendLine("<minefieldID>"); this._minefieldID.Reflection(sb); sb.AppendLine("</minefieldID>"); sb.AppendLine("<requestingEntityID>"); this._requestingEntityID.Reflection(sb); sb.AppendLine("</requestingEntityID>"); sb.AppendLine("<minefieldSequenceNumbeer type=\"ushort\">" + this._minefieldSequenceNumbeer.ToString(CultureInfo.InvariantCulture) + "</minefieldSequenceNumbeer>"); sb.AppendLine("<requestID type=\"byte\">" + this._requestID.ToString(CultureInfo.InvariantCulture) + "</requestID>"); sb.AppendLine("<pduSequenceNumber type=\"byte\">" + this._pduSequenceNumber.ToString(CultureInfo.InvariantCulture) + "</pduSequenceNumber>"); sb.AppendLine("<numberOfPdus type=\"byte\">" + this._numberOfPdus.ToString(CultureInfo.InvariantCulture) + "</numberOfPdus>"); sb.AppendLine("<mineLocation type=\"byte\">" + this._mineLocation.Count.ToString(CultureInfo.InvariantCulture) + "</mineLocation>"); sb.AppendLine("<sensorTypes type=\"byte\">" + this._sensorTypes.Count.ToString(CultureInfo.InvariantCulture) + "</sensorTypes>"); sb.AppendLine("<pad2 type=\"byte\">" + this._pad2.ToString(CultureInfo.InvariantCulture) + "</pad2>"); sb.AppendLine("<dataFilter type=\"uint\">" + this._dataFilter.ToString(CultureInfo.InvariantCulture) + "</dataFilter>"); sb.AppendLine("<mineType>"); this._mineType.Reflection(sb); sb.AppendLine("</mineType>"); for (int idx = 0; idx < this._sensorTypes.Count; idx++) { sb.AppendLine("<sensorTypes" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"TwoByteChunk\">"); TwoByteChunk aTwoByteChunk = (TwoByteChunk)this._sensorTypes[idx]; aTwoByteChunk.Reflection(sb); sb.AppendLine("</sensorTypes" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("<pad3 type=\"byte\">" + this._pad3.ToString(CultureInfo.InvariantCulture) + "</pad3>"); for (int idx = 0; idx < this._mineLocation.Count; idx++) { sb.AppendLine("<mineLocation" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"Vector3Float\">"); Vector3Float aVector3Float = (Vector3Float)this._mineLocation[idx]; aVector3Float.Reflection(sb); sb.AppendLine("</mineLocation" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("</MinefieldDataPdu>"); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } }
public override void Reflection(StringBuilder sb) { sb.AppendLine("<TransmitterPdu>"); base.Reflection(sb); try { sb.AppendLine("<radioEntityType>"); this._radioEntityType.Reflection(sb); sb.AppendLine("</radioEntityType>"); sb.AppendLine("<transmitState type=\"byte\">" + this._transmitState.ToString(CultureInfo.InvariantCulture) + "</transmitState>"); sb.AppendLine("<inputSource type=\"byte\">" + this._inputSource.ToString(CultureInfo.InvariantCulture) + "</inputSource>"); sb.AppendLine("<padding1 type=\"ushort\">" + this._padding1.ToString(CultureInfo.InvariantCulture) + "</padding1>"); sb.AppendLine("<antennaLocation>"); this._antennaLocation.Reflection(sb); sb.AppendLine("</antennaLocation>"); sb.AppendLine("<relativeAntennaLocation>"); this._relativeAntennaLocation.Reflection(sb); sb.AppendLine("</relativeAntennaLocation>"); sb.AppendLine("<antennaPatternType type=\"ushort\">" + this._antennaPatternType.ToString(CultureInfo.InvariantCulture) + "</antennaPatternType>"); sb.AppendLine("<antennaPatternList type=\"ushort\">" + this._antennaPatternList.Count.ToString(CultureInfo.InvariantCulture) + "</antennaPatternList>"); sb.AppendLine("<frequency type=\"ulong\">" + this._frequency.ToString(CultureInfo.InvariantCulture) + "</frequency>"); sb.AppendLine("<transmitFrequencyBandwidth type=\"float\">" + this._transmitFrequencyBandwidth.ToString(CultureInfo.InvariantCulture) + "</transmitFrequencyBandwidth>"); sb.AppendLine("<power type=\"float\">" + this._power.ToString(CultureInfo.InvariantCulture) + "</power>"); sb.AppendLine("<modulationType>"); this._modulationType.Reflection(sb); sb.AppendLine("</modulationType>"); sb.AppendLine("<cryptoSystem type=\"ushort\">" + this._cryptoSystem.ToString(CultureInfo.InvariantCulture) + "</cryptoSystem>"); sb.AppendLine("<cryptoKeyId type=\"ushort\">" + this._cryptoKeyId.ToString(CultureInfo.InvariantCulture) + "</cryptoKeyId>"); sb.AppendLine("<modulationParametersList type=\"byte\">" + this._modulationParametersList.Count.ToString(CultureInfo.InvariantCulture) + "</modulationParametersList>"); sb.AppendLine("<padding2 type=\"ushort\">" + this._padding2.ToString(CultureInfo.InvariantCulture) + "</padding2>"); sb.AppendLine("<padding3 type=\"byte\">" + this._padding3.ToString(CultureInfo.InvariantCulture) + "</padding3>"); for (int idx = 0; idx < this._modulationParametersList.Count; idx++) { sb.AppendLine("<modulationParametersList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"Vector3Float\">"); Vector3Float aVector3Float = (Vector3Float)this._modulationParametersList[idx]; aVector3Float.Reflection(sb); sb.AppendLine("</modulationParametersList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } for (int idx = 0; idx < this._antennaPatternList.Count; idx++) { sb.AppendLine("<antennaPatternList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"Vector3Float\">"); Vector3Float aVector3Float = (Vector3Float)this._antennaPatternList[idx]; aVector3Float.Reflection(sb); sb.AppendLine("</antennaPatternList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("</TransmitterPdu>"); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } }