/// <summary> /// 从参数指定的发射机设置选择加载信息,如果当前发射机对应信息以初始化就忽略,否则,从参数加载. /// </summary> /// <param name="src">参考发射机信息</param> public void FillFrom(TransmitterParams src) { if (!this.tuningRangeStart.DataInitialized) { this.tuningRangeStart.CopyFrom(src.tuningRangeStart); } if (!this.tuningRangeEnd.DataInitialized) { this.tuningRangeEnd.CopyFrom(src.tuningRangeEnd); } if (this.band.DataInitialized) { this.band.CopyFrom(src.band); } if (this.channelSpacing.DataInitialized) { this.channelSpacing.CopyFrom(src.channelSpacing); } if (this.mod == EMCModulationEnum.None) { this.mod = src.mod; } if (!this.power.DataInitialized) { this.power.CopyFrom(src.power); } this.ant.FillFrom(src.ant); }
/// <summary> /// 构造函数 /// </summary> /// <param name="equipID">所属设备编号</param> /// <param name="freq">发射频率</param> /// <param name="transmitter">发射机参数</param> /// <param name="coordinate">地理坐标</param> public Transmitter(string equipID, ComparableFreq freq, TransmitterParams transmitter, EMCGeographyCoordinate coordinate) { this.equipID = equipID; this.freqValue = freq; this.transmitterParams = transmitter; this.coordinate = coordinate; }
/// <summary> /// 从参数指定的参考信息覆盖加载发射机参数设置 /// </summary> /// <param name="src">参考发射机信息</param> public void CopyFrom(TransmitterParams src) { this.tuningRangeStart.CopyFrom(src.tuningRangeStart); this.tuningRangeEnd.CopyFrom(src.tuningRangeEnd); this.band.CopyFrom(src.band); this.channelSpacing.CopyFrom(src.channelSpacing); this.mod = src.mod; this.power.CopyFrom(src.power); this.ant.CopyFrom(src.ant); }