/// <summary> /// Unsubscribe from all prior analog sensor requests /// </summary> private void UnsubscribeAllSensors() { if (_sensorList == null) { return; } foreach (SubscribeResponseType sub in _sensorList.Values) { submgr.SubscriptionManagerPort subMgr = ServiceForwarder <submgr.SubscriptionManagerPort>(sub.SubscriptionManager); subMgr.Post(new submgr.DeleteSubscription(new submgr.DeleteSubscriptionMessage(sub.Subscriber))); } _sensorList.Clear(); }
protected override void Start() { dssp.PartnerType p = FindPartner(dssp.Partners.SubscriptionManager, ServiceInfo.PartnerList); if (p != null && p.Service != null) { _subMgrPort = ServiceForwarder <submgr.SubscriptionManagerPort>(p.Service); _subMgrUri = p.Service; } try { InitControllerInternal(); } catch { LogError("Service failed to initialize. Shutting down."); Shutdown(); } ActivateDsspOperationHandlers(); DirectoryInsert(); Console.WriteLine("COM is: COM" + _state.ComPort); }