protected GroupComunicatePackage CoCreateGroupCommunicatePackage(string radioName, ParamPackage radioParamPkg, GroupDevice targetGroup) { GroupComunicatePackage gropCommunicatPkg = new GroupComunicatePackage(); gropCommunicatPkg.CommunicationName = radioName; gropCommunicatPkg.ParamPackage = radioParamPkg; gropCommunicatPkg.TargetDevice = targetGroup; gropCommunicatPkg.WaitResponse = false; return(gropCommunicatPkg); }
private void __PerRadio_Elapsed(object sender, EventArgs e) { ParamPackage packageSended = PackMessage(); GroupDevice targetGroup = null; foreach (GroupDevice item in groupDeviceList) { if (item.Detail == comboBox14.SelectedItem.ToString()) { targetGroup = item; } } string radioOp = this.comboBox8.SelectedItem.ToString(); GroupComunicatePackage groupComunicatePackage = localDevice.CreateRadioCommunicatePackage(radioOp, packageSended, targetGroup); localDevice.Radio(groupComunicatePackage); }
private void __CoAsynRadioRunning(GroupComunicatePackage communicator) { RadioPackage radioPkg = new RadioPackage(communicator.TargetDevice, communicator.CommunicationName, communicator.ParamPackage.ParamDefalutValues); C2CRadioPackage c2cRadioPkg = new C2CRadioPackage(communicator.TargetDevice, "outside radio message", null); c2cRadioPkg.OutsideMessage = radioPkg; try { _groupCommunicateProcessor.Radio(c2cRadioPkg); } catch (System.Exception ex) { this.CoRadioErrorRecived_OutsideNotify(communicator, new RadioErrorExcetion(ex.ToString())); } }
protected void CoAsynRadio(GroupComunicatePackage communicator) { _asynRadioRunner.EnqueueMessage(communicator); }
/// <summary> /// 发起一次广播通讯 /// </summary> /// <param name="communicator">广播通讯包</param> public void Radio(GroupComunicatePackage communicator) { base.CoAsynRadio(communicator); }