public static void shutdown() { if (bank != null) { bank.Dispose(); DssEnvironment.Shutdown(); DssEnvironment.WaitForShutdown(); } }
void ConnectToScribbler(DateTime dt) { Uri driveUri = null; // Look for any active generic drive contract service running Arbiter.Activate(DssEnvironment.TaskQueue, Arbiter.Choice(DssEnvironment.DirectoryQuery(drive.Contract.Identifier), delegate(ServiceInfoType success) { driveUri = new Uri(success.Service); Console.WriteLine("================\n" + driveUri); // Initialize the port and subscribe to the service motorsOn = false; drivePort = DssEnvironment.ServiceForwarder <drive.DriveOperations>(driveUri); drive.DriveOperations driveNotificationPort = new drive.DriveOperations(); drivePort.Subscribe(driveNotificationPort); // Set up notifications Arbiter.Activate(DssEnvironment.TaskQueue, Arbiter.Receive <drive.Update>(true, driveNotificationPort, NotifyDriveUpdate) ); autolock.Set(); }, delegate(W3C.Soap.Fault failure) { // Request failed. Sleep for 1 sec and look for 30 times. if (++attemptCount >= 30) { DssEnvironment.LogError("Unable to find Drive Service, aborting - Press <Enter>"); Console.ReadLine(); DssEnvironment.Shutdown(); } else { // Post a timer message that expires in 30 seconds TimeSpan timeout = new TimeSpan(0, 0, 30); DssEnvironment.TaskQueue.EnqueueTimer(timeout, _timerPort); } } )); }
/// <summary> /// Shut down the DSS node and MSRDS services. This method waits /// for everything to shut down before returning. /// </summary> public static void Shutdown() { LastStateChange = RobotStateChange.SHUTDOWN; try { if (bank != null) { bank.Dispose(); } } catch (Exception) { } try { DssEnvironment.Shutdown(); DssEnvironment.WaitForShutdown(); } catch (Exception) { } LastStateChange = RobotStateChange.SHUTDOWN_COMPLETE; }
public void DropHandler(DsspDefaultDrop drop) { DssEnvironment.ControlPanelPort.Shutdown(); DssEnvironment.Shutdown(); }
public void Shutdown() { DssEnvironment.Shutdown(); bank.Dispose(); }