Exemplo n.º 1
0
 private void DestroyComportMonitoring()
 {
     if (SerialPortMonitor != null)
     {
         SerialPortMonitor.ComportEventOccured -= OnComPortEventReceived;
         SerialPortMonitor.StopMonitoring();
     }
 }
Exemplo n.º 2
0
        public void Initialize()
        {
            DeviceEventReceived  = OnDeviceEventReceived;
            ComPortEventReceived = OnComPortEventReceived;

            SerialPortMonitor.ComportEventOccured += OnComPortEventReceived;
            SerialPortMonitor.StartMonitoring();

            StateActionRules = new StateActionRules();

            DeviceConfigurationProvider.InitializeConfiguration();
            Configuration = DeviceConfigurationProvider.GetAppConfig();
            //LoggingClient = LoggingServiceClientProvider.GetLoggingServiceClient();
            //Connector = ListenerConnectorProvider.GetConnector(DeviceConfigurationProvider.GetConfiguration());

            stateActionController = DeviceStateActionControllerProvider.GetStateActionController(this);

            InitializeConnectorEvents();
        }