public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteUnsignedInt((uint)this._recordType); dos.WriteUnsignedShort((ushort)this._recordLength); dos.WriteUnsignedShort((ushort)this._padding); dos.WriteUnsignedShort((ushort)this._beamAntennaParameterList.Count); dos.WriteUnsignedShort((ushort)this._directedEnergyTargetEnergyDepositionRecordList.Count); for (int idx = 0; idx < this._beamAntennaParameterList.Count; idx++) { BeamAntennaPattern aBeamAntennaPattern = (BeamAntennaPattern)this._beamAntennaParameterList[idx]; aBeamAntennaPattern.Marshal(dos); } for (int idx = 0; idx < this._directedEnergyTargetEnergyDepositionRecordList.Count; idx++) { DirectedEnergyTargetEnergyDeposition aDirectedEnergyTargetEnergyDeposition = (DirectedEnergyTargetEnergyDeposition)this._directedEnergyTargetEnergyDepositionRecordList[idx]; aDirectedEnergyTargetEnergyDeposition.Marshal(dos); } } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
/// <summary> /// Compares for reference AND value equality. /// </summary> /// <param name="obj">The object to compare with this instance.</param> /// <returns> /// <c>true</c> if both operands are equal; otherwise, <c>false</c>. /// </returns> public bool Equals(BeamAntennaPattern obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return(false); } if (!this._beamDirection.Equals(obj._beamDirection)) { ivarsEqual = false; } if (this._azimuthBeamwidth != obj._azimuthBeamwidth) { ivarsEqual = false; } if (this._referenceSystem != obj._referenceSystem) { ivarsEqual = false; } if (this._padding1 != obj._padding1) { ivarsEqual = false; } if (this._padding2 != obj._padding2) { ivarsEqual = false; } if (this._ez != obj._ez) { ivarsEqual = false; } if (this._ex != obj._ex) { ivarsEqual = false; } if (this._phase != obj._phase) { ivarsEqual = false; } return(ivarsEqual); }
public virtual int GetMarshalledSize() { int marshalSize = 0; marshalSize += 4; // this._recordType marshalSize += 2; // this._recordLength marshalSize += 2; // this._padding marshalSize += 2; // this._beamAntennaPatternRecordCount marshalSize += 2; // this._directedEnergyTargetEnergyDepositionRecordCount for (int idx = 0; idx < this._beamAntennaParameterList.Count; idx++) { BeamAntennaPattern listElement = (BeamAntennaPattern)this._beamAntennaParameterList[idx]; marshalSize += listElement.GetMarshalledSize(); } for (int idx = 0; idx < this._directedEnergyTargetEnergyDepositionRecordList.Count; idx++) { DirectedEnergyTargetEnergyDeposition listElement = (DirectedEnergyTargetEnergyDeposition)this._directedEnergyTargetEnergyDepositionRecordList[idx]; marshalSize += listElement.GetMarshalledSize(); } return(marshalSize); }
public virtual void Reflection(StringBuilder sb) { sb.AppendLine("<DirectedEnergyAreaAimpoint>"); try { sb.AppendLine("<recordType type=\"uint\">" + this._recordType.ToString(CultureInfo.InvariantCulture) + "</recordType>"); sb.AppendLine("<recordLength type=\"ushort\">" + this._recordLength.ToString(CultureInfo.InvariantCulture) + "</recordLength>"); sb.AppendLine("<padding type=\"ushort\">" + this._padding.ToString(CultureInfo.InvariantCulture) + "</padding>"); sb.AppendLine("<beamAntennaParameterList type=\"ushort\">" + this._beamAntennaParameterList.Count.ToString(CultureInfo.InvariantCulture) + "</beamAntennaParameterList>"); sb.AppendLine("<directedEnergyTargetEnergyDepositionRecordList type=\"ushort\">" + this._directedEnergyTargetEnergyDepositionRecordList.Count.ToString(CultureInfo.InvariantCulture) + "</directedEnergyTargetEnergyDepositionRecordList>"); for (int idx = 0; idx < this._beamAntennaParameterList.Count; idx++) { sb.AppendLine("<beamAntennaParameterList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"BeamAntennaPattern\">"); BeamAntennaPattern aBeamAntennaPattern = (BeamAntennaPattern)this._beamAntennaParameterList[idx]; aBeamAntennaPattern.Reflection(sb); sb.AppendLine("</beamAntennaParameterList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } for (int idx = 0; idx < this._directedEnergyTargetEnergyDepositionRecordList.Count; idx++) { sb.AppendLine("<directedEnergyTargetEnergyDepositionRecordList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"DirectedEnergyTargetEnergyDeposition\">"); DirectedEnergyTargetEnergyDeposition aDirectedEnergyTargetEnergyDeposition = (DirectedEnergyTargetEnergyDeposition)this._directedEnergyTargetEnergyDepositionRecordList[idx]; aDirectedEnergyTargetEnergyDeposition.Reflection(sb); sb.AppendLine("</directedEnergyTargetEnergyDepositionRecordList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("</DirectedEnergyAreaAimpoint>"); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } }
public virtual void Unmarshal(DataInputStream dis) { if (dis != null) { try { this._recordType = dis.ReadUnsignedInt(); this._recordLength = dis.ReadUnsignedShort(); this._padding = dis.ReadUnsignedShort(); this._beamAntennaPatternRecordCount = dis.ReadUnsignedShort(); this._directedEnergyTargetEnergyDepositionRecordCount = dis.ReadUnsignedShort(); for (int idx = 0; idx < this.BeamAntennaPatternRecordCount; idx++) { BeamAntennaPattern anX = new BeamAntennaPattern(); anX.Unmarshal(dis); this._beamAntennaParameterList.Add(anX); } ; for (int idx = 0; idx < this.DirectedEnergyTargetEnergyDepositionRecordCount; idx++) { DirectedEnergyTargetEnergyDeposition anX = new DirectedEnergyTargetEnergyDeposition(); anX.Unmarshal(dis); this._directedEnergyTargetEnergyDepositionRecordList.Add(anX); } ; } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
/// <summary> /// Compares for reference AND value equality. /// </summary> /// <param name="obj">The object to compare with this instance.</param> /// <returns> /// <c>true</c> if both operands are equal; otherwise, <c>false</c>. /// </returns> public bool Equals(BeamAntennaPattern obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return false; } if (!this._beamDirection.Equals(obj._beamDirection)) { ivarsEqual = false; } if (this._azimuthBeamwidth != obj._azimuthBeamwidth) { ivarsEqual = false; } if (this._elevationBeamwidth != obj._elevationBeamwidth) { ivarsEqual = false; } if (this._referenceSystem != obj._referenceSystem) { ivarsEqual = false; } if (this._padding1 != obj._padding1) { ivarsEqual = false; } if (this._padding2 != obj._padding2) { ivarsEqual = false; } if (this._ez != obj._ez) { ivarsEqual = false; } if (this._ex != obj._ex) { ivarsEqual = false; } if (this._phase != obj._phase) { ivarsEqual = false; } if (this._padding3 != obj._padding3) { ivarsEqual = false; } return ivarsEqual; }
public virtual void Unmarshal(DataInputStream dis) { if (dis != null) { try { this._recordType = dis.ReadUnsignedInt(); this._recordLength = dis.ReadUnsignedShort(); this._padding = dis.ReadUnsignedShort(); this._beamAntennaPatternRecordCount = dis.ReadUnsignedShort(); this._directedEnergyTargetEnergyDepositionRecordCount = dis.ReadUnsignedShort(); for (int idx = 0; idx < this.BeamAntennaPatternRecordCount; idx++) { BeamAntennaPattern anX = new BeamAntennaPattern(); anX.Unmarshal(dis); this._beamAntennaParameterList.Add(anX); }; for (int idx = 0; idx < this.DirectedEnergyTargetEnergyDepositionRecordCount; idx++) { DirectedEnergyTargetEnergyDeposition anX = new DirectedEnergyTargetEnergyDeposition(); anX.Unmarshal(dis); this._directedEnergyTargetEnergyDepositionRecordList.Add(anX); }; } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }