IEnumerator <ITask> OnEStopHandler(OnEStop onEStop) { if (onEStop.DriveControl == _driveControl && _drivePort != null) { LogInfo("Requesting EStop"); drive.AllStopRequest request = new drive.AllStopRequest(); _drivePort.AllStop(request); } yield break; }
protected void DriveOutputHandler(DriveOutputState output) { if (output.AllStop) { Arbiter.Activate(TaskQueue, Arbiter.Choice( _drivePort.AllStop(new drive.AllStopRequest()), delegate(DefaultUpdateResponseType success) { }, delegate(W3C.Soap.Fault failure) { LogError("Failed to Stop!"); } ) ); } else { _drivePort.SetDrivePower(output); } }
//public override bool Equals(Object obj) //{ // if (obj is String) // { // string truncUri = ServiceInfo.Service.Substring(ServiceInfo.Service.IndexOf('/', ServiceInfo.Service.IndexOf("//") + 2)); // return String.Equals(truncUri, obj); // } // else // return String.Equals(this.ServiceInfo.Service, ((DriveAdapter)obj).ServiceInfo.Service); //} public void Stop() { RSUtils.ReceiveSync <DefaultUpdateResponseType>(taskQueue, drivePort.AllStop(), Myro.Utilities.Params.DefaultRecieveTimeout); }