private void __OutsideRadioMessageRecived(RadioPackage radioPkg) { if (null != this.RemotRadioRecived) { this.RemotRadioRecived(radioPkg); } }
public void ParseSerializeData(CCCommunicateClass.Seria_C2CRadioPackage obj) { base.ParseSerializeData(obj as CCCommunicateClass.Seria_RadioPackage); RadioPackage tmpRadioPkg = new RadioPackage(); tmpRadioPkg.ParseSerializeData(obj.OutsideMessage); this.OutsideMessage = tmpRadioPkg; }
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())); } }
private void RadioPackage_Received(RadioPackage p) { Console.WriteLine("Radio: " + p.RadioName); //List<string> receivedDetails = new List<string>(); ////receivedDetails = p.Values<string>("value"); //string receivedStringInfo = p.Value<string>("value"); //receivedDetails.Add(receivedStringInfo); ////XmlDocument caonima = p.Value<XmlDocument>("xml"); ////List<XmlDocument> caonima2 = p.Values<XmlDocument>("objects"); //string log = ""; //log = "TargetGroup: " + p.GroupInfo.Detail + "\n" + "RadioName: " + p.RadioName + "\n" + "Message: " + ((receivedDetails.Count != 0)?(receivedDetails[0]):("")); //this.richTextBox1.Text = log; //GroupDevice _group = localDevice.GetGroup("g1", //Middleware.Communication.CommunicationConfig.CommunicatType.Synchronization); //_group.Referesh(); //List<ClientDevice> _clients = _group.Members; //foreach(ClientDevice x862 in _clients) //{ // if (x862.Detail.Equals("x862")) // { // Dictionary<string, object> dicr = new Dictionary<string, object>(); // dicr.Add("value", "unity"); // RequestCommunicatePackage reqtPkg = localDevice.CreateRequestCommunicatePackage("opr", // CommunicatType.Synchronization, new ParamPackage("unity-request", dicr), x862, true, // null); // localDevice.SynSendRequest(reqtPkg, 1000); // Console.WriteLine(reqtPkg.ResponsePackage.ReplyState); // } //} }