Exemplo n.º 1
0
 public HomeController(
     IOptions <GeneralSettings> generalSettings,
     NRF24State nrf24State,
     MysensorsState mysensorsState,
     VeraSettings veraSettings)
 {
     _generalSettings = generalSettings.Value;
     _nrf24State      = nrf24State;
     _mysensorsState  = mysensorsState;
     _veraSettings    = veraSettings;
 }
Exemplo n.º 2
0
 public HomeController(
     IOptions<GeneralSettings> generalSettings,
     NRF24State nrf24State,
     MysensorsState mysensorsState,
     VeraSettings veraSettings)
 {
     _generalSettings = generalSettings.Value;
     _nrf24State = nrf24State;
     _mysensorsState = mysensorsState;
     _veraSettings = veraSettings;
 }
Exemplo n.º 3
0
        public NRF24Hub(IConnectionManager connectionManager,
            GeneralSettings generalSettings,
            NRF24State nrf24State,
            VeraSettings veraSettings)
        {
            _connectionManager = connectionManager;
            _generalSettings = generalSettings;
            _nrf24State = nrf24State;
            _veraSettings = veraSettings;

            _rawData = string.Empty;
        }
Exemplo n.º 4
0
        public NRF24Hub(IConnectionManager connectionManager,
                        GeneralSettings generalSettings,
                        NRF24State nrf24State,
                        VeraSettings veraSettings)
        {
            _connectionManager = connectionManager;
            _generalSettings   = generalSettings;
            _nrf24State        = nrf24State;
            _veraSettings      = veraSettings;

            _rawData = string.Empty;
        }
Exemplo n.º 5
0
        public NRF24Controller(
            IConnectionManager connectionManager,
            IOptions<GeneralSettings> generalSettings,
            NRF24State nrf24State,
            VeraSettings veraSettings)
        {
            // Make sure the serial capture process is only running once
            if (nrf24State.Started)
                return;

            nrf24State.Started = true;

            var hub = new NRF24Hub(connectionManager, generalSettings.Value, nrf24State, veraSettings);
            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                hub.StartSerialClient();
            }).Start();
        }
Exemplo n.º 6
0
        public NRF24Controller(
            IConnectionManager connectionManager,
            IOptions<GeneralSettings> generalSettings,
            NRF24State nrf24State,
            VeraSettings veraSettings)
        {
            // Make sure the serial capture process is only running once
            if (nrf24State.Started)
                return;

            nrf24State.Started = true;

            var hub = new NRF24Hub(connectionManager, generalSettings.Value, nrf24State, veraSettings);
            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                hub.StartSerialClient();
            }).Start();
        }