public bool StartThread(Uri Orion_url, Uri input1_url, Uri input2_url, int Port1, int Port2) { log.Debug("Cygnus started"); if (Connect() == false) { log.Warn("Cannot connect to the Cygnus server"); return(false); } try { lastCommand = "Start Command"; StartCommand sc = new StartCommand { BoxUrl = Orion_url.ToString(), E1Port1 = Port1, E1Port2 = Port2, Input1Url = input1_url.ToString(), Input2Url = input2_url.ToString() }; Header h = new Header { Sequence = 0, Opcode = OPCODE.StartCmd, MessageData = MessageExtensions.ToByteString(sc) }; Send(h); log.Debug("Cygnus started"); isRunning = true; } catch (Exception e) { log.Error("Cygnus error during auto start", e); isRunning = false; } return(isRunning); }
public void StartThread(Uri input1_url, Uri input2_url, Uri output1_url, Uri output2_url) { try { if (Connect() == false) { log.Warn("Cannot connect to the Mediation server"); return; } log.Debug("Starting Mediation"); lastCommand = "Start Command"; AutomaticStartCommand asc = new AutomaticStartCommand { Input1Url = input1_url.ToString(), Input2Url = input2_url.ToString(), Output1Url = output1_url.ToString(), Output2Url = output2_url.ToString() }; Header h = new Header { Sequence = 0, Opcode = OPCODE.AutoStartCmd, MessageData = MessageExtensions.ToByteString(asc) }; Send(h); log.Debug("Mediation started"); isRunning = true; } catch (Exception e) { log.Error("Mediation error during auto start", e); isRunning = false; } }
public bool identify(float Carrierdb) { try { Identify id = new Identify { Cncarrierdb = Carrierdb }; Header h = new Header { Sequence = Sequence++, Opcode = OPCODE.Identify, MessageData = MessageExtensions.ToByteString(id) }; Send(h); lastCommand = "identify"; log.Debug("identify sent"); return(true); } catch (Exception ex) { log.Error("identify failed", ex); } return(false); }
public bool identifyAndSeparate(Uri Output1url, Uri Output2url, float Carrierdb) { try { IdentifyAndSeparate id = new IdentifyAndSeparate { Cncarrierdb = Carrierdb, Output1Url = Output1url.Host.ToString() + ":" + Output1url.Port.ToString(), Output2Url = Output2url.Host.ToString() + ":" + Output2url.Port.ToString(), Output = outputType.ToUdp, }; Header h = new Header { Sequence = Sequence++, Opcode = OPCODE.IdentifyAndSeparate, MessageData = MessageExtensions.ToByteString(id) }; Send(h); lastCommand = "Identify And Separate"; log.Debug("IdentifyAndSeparate sent"); return(true); } catch (Exception ex) { log.Error("IdentifyAndSeparate failed", ex); } return(false); }
public bool configureHWFE(float FeinHz, float Fchz, float Usefulbwhz, float Gaindb) { try { configure_HWFE chw = new configure_HWFE { Feinhz = FeinHz, Fchz = Fchz, Usefulbwhz = Usefulbwhz, Gaindb = Gaindb, Wideband = false, }; Header h = new Header { Sequence = Sequence++, Opcode = OPCODE.ConfigureHwfe, MessageData = MessageExtensions.ToByteString(chw) }; lastCommand = "configure_HWFE"; Send(h); log.Debug("configureHWFE sent"); return(true); } catch (Exception ex) { log.Error("configureHWFE failed", ex); } return(false); }
public bool configureSWFE(float SampleFrequency, float CenterFrequency, float Usefulbwhz, float Gaindb, string InputFilename, InputType inputType, SubType subType) { try { //FeinHz = 12.5F; //Usefulbwhz = 2.5F; configure_SWFE csw = new configure_SWFE { Filename = InputFilename, Inputsignaltype = inputType, Inputsignalsubtypefromfile = subType, Feinhz = SampleFrequency * 1000000, // Sample Frequency Fchz = CenterFrequency * 1000000, // Center Frequency Usefulbwhz = Usefulbwhz * 1000000, // 2.5 Gaindb = Gaindb, Wideband = false, }; Header h = new Header { Sequence = Sequence++, Opcode = OPCODE.ConfigureSwfe, MessageData = MessageExtensions.ToByteString(csw) }; lastCommand = "configure_SWFE"; Send(h); log.Debug("configureSWFE sent"); return(true); } catch (Exception ex) { log.Error("configureHWFE failed", ex); } return(false); }