#include "jamming.h" Jamming::Jamming(QObject *parent, uint32_t PlatformID, uint32_t InstanceID, bool SwitchMode, QString Name, QUrl SimulationUrl, int style) : ExternalSim(parent) { StyleInit(); this->PlatformID = PlatformID; this->InstanceID = InstanceID; this->SwitchMode = SwitchMode; this->Name = Name; this->SimulatorUrl = SimulationUrl; this->style = style; radarsim = new client(nullptr, SimulationUrl); connect(this,&Jamming::SigSendStyleToSim, radarsim,&client::SlotSendStyleToSim); } void Jamming::StyleInit() { JammingStyle Jamming001; Jamming001.OpMode = QString::fromLocal8Bit("噪声调频干扰"); Jamming001.fc = 9.5e9; Jamming001.fs = 20e9; JammingStyleList.insert(std::pair(1,Jamming001)); JammingStyle Jamming002; Jamming002.OpMode = QString::fromLocal8Bit("噪声调幅干扰"); Jamming002.fc = 9.5e9; Jamming002.fs = 20e9; JammingStyleList.insert(std::pair(2,Jamming002)); JammingStyle Jamming003; Jamming003.OpMode = QString::fromLocal8Bit("射频噪声干扰"); Jamming003.fc = 9.5e9; Jamming003.fs = 20e9; JammingStyleList.insert(std::pair(3,Jamming003)); JammingStyle Jamming004; Jamming004.OpMode = QString::fromLocal8Bit("距离假目标"); Jamming004.fc = 9.5e9; Jamming004.fs = 20e9; JammingStyleList.insert(std::pair(4,Jamming004)); JammingStyle Jamming005; Jamming005.OpMode = QString::fromLocal8Bit("速度假目标"); Jamming005.fc = 9.5e9; Jamming005.fs = 20e9; JammingStyleList.insert(std::pair(5,Jamming005)); JammingStyle Jamming006; Jamming006.OpMode = QString::fromLocal8Bit("速度拖引干扰"); Jamming006.fc = 9.5e9; Jamming006.fs = 20e9; JammingStyleList.insert(std::pair(6,Jamming006)); JammingStyle Jamming007; Jamming007.OpMode = QString::fromLocal8Bit("间接采样转发干扰"); Jamming007.fc = 9.5e9; Jamming007.fs = 20e9; JammingStyleList.insert(std::pair(7,Jamming007)); JammingStyle Jamming008; Jamming008.OpMode = QString::fromLocal8Bit("切片转发干扰"); Jamming008.fc = 9.5e9; Jamming008.fs = 20e9; JammingStyleList.insert(std::pair(8,Jamming008)); JammingStyle Jamming009; Jamming009.OpMode = QString::fromLocal8Bit("DRFM噪声干扰"); Jamming009.fc = 9.5e9; Jamming009.fs = 20e9; JammingStyleList.insert(std::pair(9,Jamming009)); } void Jamming::StyleUpdate(int newstyle) { style = newstyle; emit SigSendStyleToSim(QString::number(newstyle)); }