/// <summary> /// 点击Filter按钮,改变Filter事件 /// </summary> /// <param name="sender">无</param> /// <param name="e">无</param> public void FilterChanged(object sender, CustomDataEvtArg e) { if (FilterChangedEvent != null) { FilterChangedEvent(sender, e); } }
/// <summary> /// 停止调试事件 /// </summary> /// <param name="e">无</param> public void StopDebug(CustomDataEvtArg e) { if (StopDebugEvent != null) { StopDebugEvent(this, e); } }
/// <summary> /// 发送事件到MIB解析界面 /// </summary> /// <param name="sender">无</param> /// <param name="e">无</param> public void SendDataToDecode(object sender, CustomDataEvtArg e) { if (SendDataToDecodeEvent != null) { SendDataToDecodeEvent(sender, e); } }
/// <summary> /// 准备测试事件 /// </summary> /// <param name="sender">无</param> /// <param name="e">无</param> public void Ready(object sender, CustomDataEvtArg e) { if (ReadyEvent != null) { ReadyEvent(this, e); } }
public void SendUeInfoToMainForm(object sender, CustomDataEvtArg ce) { if (SendUeInfoToMainFormEvent != null) { SendUeInfoToMainFormEvent(sender, ce); } }
public void SendPagingPwrToCtrlForm(object sender, CustomDataEvtArg ce) { if (SendPagingPwrToCtrlFormEvent != null) { SendPagingPwrToCtrlFormEvent(sender, ce); } }
/// <summary> /// 发送数据到小区消息分离模块 /// </summary> public void SendDataToCellSysSplit(object sender, CustomDataEvtArg e) { if (SendDataToCellSysSplitEvent != null) { SendDataToCellSysSplitEvent(sender, e); } }
/// <summary> /// 发送数据到协议跟踪模块 /// </summary> public void SendDataToProTrack(object sender, CustomDataEvtArg e) { if (SendDataToProTrackEvent != null) { SendDataToProTrackEvent(sender, e); } }
/// <summary> /// 发送数据到STMSIGraph模块 /// </summary> public void SendDataToSTMSIGraph(object sender, CustomDataEvtArg e) { if (SendDataToSTMSIGraphEvent != null) { SendDataToSTMSIGraphEvent(sender, e); } }
/// <summary> /// 发送ACK到搜索窗口 /// </summary> public void SendACKToCellSearch(object sender, CustomDataEvtArg e) { if (SendACKToCellSearchEvent != null) { SendACKToCellSearchEvent(sender, e); } }
/// <summary> /// 发送数据到主窗口 /// </summary> public void SendStatusToMainForm(object sender, CustomDataEvtArg e) { if (SendStatusToMainFormEvent != null) { SendStatusToMainFormEvent(sender, e); } }
public void SendToDlSniffForm(object sender, CustomDataEvtArg ce) { if (SendToDlSniffFormEvent != null) { SendToDlSniffFormEvent(sender, ce); } }
/// <summary> /// 配置“调试”完成的事件。调试配置界面中点击“OK”按钮,通知主程序 /// </summary> /// <param name="e">无</param> public void OnDebugConfigOK(CustomDataEvtArg e) { if (DebugConfigOKEvent != null) { DebugConfigOKEvent(this, e); } }
/// <summary> /// 开始测试事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void Start(object sender, CustomDataEvtArg e) { if (StartEvent != null) { StartEvent(this, e); } }
/// <summary> /// “开始测试”执行的事件: /// 清空所有数据以及界面上的内容 /// </summary> /// <param name="sender">sender为AGIInterface.Class1</param> /// <param name="e">自定义的事件参数</param> private void StartEvent(object sender, AGIInterface.CustomDataEvtArg e) { if (CSAMForm != null) { //读取两个表格的数据 //sTmsiGraph.dgvDisplay.Rows.Clear(); } }
/// <summary> /// 发送数据到设备模块 /// </summary> public int SendDataToDevice(object sender, CustomDataEvtArg e) { if (SendDataToDeviceEvent != null) { SendDataToDeviceEvent(sender, e); return(0); } else { return(-1); } }
/// <summary> /// 停止测试事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public bool Stop(object sender, CustomDataEvtArg e) { if (StopEvent != null) { StopEvent(this, e); return(true); } else { return(false); } }
/// <summary> /// 指定设备发送信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void send(object sender, AGIInterface.CustomDataEvtArg e) { string deviceName = e.deivceName; byte[] message = e.data; Device device = FindDevice(deviceName); if (device == null) { MessageBox.Show("Sorry,Can not find this device!"); return; } if (device.ConnectionState == (byte)Global.DeviceStateValue.Connecting) { device.sendMessage(message); } else { MessageBox.Show("Instrument:" + device.DeviceName + "has not been connected!"); return; } }
public void DataReceived(object sender, AGIInterface.CustomDataEvtArg e) { if (CSAMForm.InvokeRequired) { try { if (CSAMForm != null) { //proTracDisplay.Invoke(new Class1.DeviceSendDataToProTrackHandler(DataReceived), sender, e); CSAMForm.BeginInvoke(new Class1.DeviceSendDataToProTrackHandler(DataReceived), sender, e); } else { } } catch (Exception ex) { Console.WriteLine(">>>Message= " + ex.Message + "\r\n StrackTrace: " + ex.StackTrace); } } else { if (Global.CurrentSender == CSAMForm.Name && e.deivceName == Global.GCurrentDevice) { try { UInt16 messageType = 0; messageType = BitConverter.ToUInt16(e.data, 6); UInt16 messageLength = 0; messageLength = BitConverter.ToUInt16(e.data, 10); //判断消息长度 if (messageLength * 4 != e.data.Length - 12) { return; } switch (messageType) { case COM.ZCTT.AGI.Common.AGIMsgDefine.L2P_AG_CELL_CAPTURE_IND_MSG_TYPE: { Dictionary <string, string> result = Decode.dataBackControl_SendMIBToDisplayEvent(e); //string tai = (BitConverter.ToUInt16(e.data, 26)).ToString(); //string ecgi = (BitConverter.ToUInt32(e.data, 28)).ToString(); //string rsrp = (BitConverter.ToUInt16(e.data, 32) * 0.125).ToString("f2") + "dBm"; short MinRSRQ = -15; if ((result["RSRQ"] == "NULL" || Convert.ToInt16(result["RSRQ"]) < MinRSRQ) && isSecond == false) { CellSearchItemIndex--; isSecond = true; } else { System.Diagnostics.Debug.WriteLine(">>>>>>>>>>>>>>>>CellSearchItemIndex: " + CellSearchItemIndex); if (result["RSRP"] != "NULL") { CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[4].Text = result["RSRP"] + "dBm"; } else { CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[4].Text = "N/A"; } if (result["RSRP"] != "NULL") { CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[5].Text = result["RSRQ"] + "dB"; } else { CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[5].Text = "N/A"; } switch (result["DLBand"]) { case "NULL": CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[6].Text = "N/A"; break; case "0": CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[6].Text = "1.4M"; break; case "1": CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[6].Text = "3M"; break; case "2": CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[6].Text = "5M"; break; case "3": CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[6].Text = "10M"; break; case "4": CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[6].Text = "15M"; break; case "5": CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[6].Text = "20M"; break; } CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[7].Text = result["TAC"]; CSAMForm.CellSearchListView.Items[CellSearchItemIndex].SubItems[8].Text = result["CellID"]; isSecond = false; } Thread.Sleep(2000); mutexRelease = 1; ReleaseProtocolTracing(); break; } case COM.ZCTT.AGI.Common.AGIMsgDefine.L1_AG_PROTOCOL_TRACE_REL_ACK_MSG_TYPE: case COM.ZCTT.AGI.Common.AGIMsgDefine.AG_PC_PROTOCOL_TRACE_REL_ACK_MSG_TYPE: { CellSearchItemIndex++; if (CellSearchItemIndex == CSAMForm.CellSearchListView.Items.Count) { CellSearchItemIndex = 0; } CSAMForm.CellSearchStart(); break; } default: break; } } catch (Exception ex) { Console.WriteLine(">>>Message= " + ex.Message + "\r\n StrackTrace: " + ex.StackTrace); return; } } } }
public void ACKHandler(object sender, AGIInterface.CustomDataEvtArg e) { if (this.InvokeRequired) { try { this.BeginInvoke(new Class1.DeviceSendACKToCellScan(ACKHandler), sender, e); } catch { } } else { if (Global.CurrentSender == CSAMForm.Name && e.deivceName == Global.GCurrentDevice) { // if (mutexRrace == 0 && CellSearchItemIndex != CSAMForm.CellSearchListView.Items.Count) //CellSearchItemIndex = 0; { Thread.Sleep(1000); CellSearchItemIndex++; System.Diagnostics.Debug.WriteLine("CellSearchItemIndex: " + CellSearchItemIndex + ">>>>>>>>>>>>>>>>"); mutexRrace = 1; CrossThreadOperationControl CrossThreadInfoRefresh = delegate() { CSAMForm.CellIndexLabel.Text = CellSearchItemIndex.ToString(); if (CellSearchItemIndex != CSAMForm.CellSearchListView.Items.Count && isStop == false) { CSAMForm.CellSearchStart(); } }; CSAMForm.Invoke(CrossThreadInfoRefresh); } if (CellSearchItemIndex == CSAMForm.CellSearchListView.Items.Count || isStop == true) { CrossThreadOperationControl CrossThreadInfoRefresh = delegate() { //Device temDevice = null; //foreach (Device d in DeviceManger.deviceList) //{ // if (d.ConnectionState == 0) // temDevice = d; //} //DeviceManger DM = new DeviceManger(); //Thread RebootThread = new Thread(() => DM.RebootThreadFun(temDevice)); //RebootThread.Start(); CSAMForm.CellIndexLabel.Text = CellSearchItemIndex.ToString(); foreach (Device dev in DeviceManger.deviceList) { if (dev.SendRexAnt) { dev.SendRexAnt = false; } } isStop = false; CSAMForm.CellMonitorButton.Enabled = true; CSAMForm.CellStopBtn.Enabled = false; Global.tempClass.CSAMStop(); CSAMRunning = false; //Global.tempClass.FTSTMSIStop(); }; CSAMForm.Invoke(CrossThreadInfoRefresh); } } } }