public void StartCalibration(UdpHost udpHost) { //Subscribing to the mqttManager events ExoUdpHost.OnElbowValue += OnElbowValue; ExoUdpHost.OnWristValue += OnWristValue; //Instantiating a new Calibration object _calibration = new Calibration(); //Start the calibration coroutine StartCoroutine(Calibrate()); }
public void Request() { var h1 = new UdpHost(); var h2 = new UdpHost(); var c1 = h1.CreateCommunicator(); var c2 = h2.CreateCommunicator(); c2.MessageReceived += (sender, message) => { c2.PostMessage(sender, new RPCResponse { RequestId = ((RPCRequest)message).RequestId }); }; h1.Start(); h2.Start(); c1.Request<RPCResponse>(c2.Location, new RPCRequest()).Wait(); }