コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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()));
            }
        }
コード例 #4
0
 protected void CoAsynRadio(GroupComunicatePackage communicator)
 {
     _asynRadioRunner.EnqueueMessage(communicator);
 }
コード例 #5
0
 /// <summary>
 /// 发起一次广播通讯
 /// </summary>
 /// <param name="communicator">广播通讯包</param>
 public void Radio(GroupComunicatePackage communicator)
 {
     base.CoAsynRadio(communicator);
 }