public AzureIotHubDeviceFacility(IDeviceStatusProvider deviceStatusProvider, AppConfig config) { this.deviceStatusProvider = deviceStatusProvider; cancellationTokenSource = new CancellationTokenSource(); this.config = config; ReceiveCommands(); }
public DeviceService(IOptionsMonitor <SettingsOption> settingOptionsMonitor, IDateProvider dateProvider, IDeviceStatusProvider deviceStatusProvider, IWorkerService workerService) { _settingOptionsMonitor = settingOptionsMonitor; _dateProvider = dateProvider; _deviceStatusProvider = deviceStatusProvider; _workerService = workerService; }
public ConsoleFacility(IDeviceStatusProvider deviceStatusProvider, IApplicationLifetime applicationLifetime) { Console.CancelKeyPress += TerminateApplication; this.applicationLifetime = applicationLifetime; this.deviceStatusProvider = deviceStatusProvider; cancellationTokenSource = new CancellationTokenSource(); ReadCommands(); }
public MainWindow() { InitializeComponent(); string[] config = File.ReadAllLines("config.txt"); Provider = new OrangePiSshProvider(config[0], config[1], config[2]) { RootPassword = config[3] }; Provider.Init(); Provider.GetCurrentStatus(); var timer = new Timer(1000); timer.AutoReset = true; timer.Elapsed += Timer_Elapsed; timer.Start(); }
public GpioFacility(IDeviceStatusProvider deviceStatusProvider) { this.deviceStatusProvider = deviceStatusProvider; alarmTimer = new Timer() { Interval = blinkInterval, AutoReset = true, Enabled = false }; alarmTimer.Elapsed += BlinkAlarm; inputTimer = new Timer() { Interval = inputInterval, AutoReset = true, Enabled = true }; inputTimer.Elapsed += ReadInputValues; ConfigureGPIOs(); }
public AlertFacility(IDeviceStatusProvider deviceStatusProvider, AppConfig config) { this.config = config; this.deviceStatusProvider = deviceStatusProvider; }
public WebsocketFacility(IDeviceStatusProvider deviceStatusProvider) { //this.nextMiddleware = nextMiddleware; this.clients = new ConcurrentDictionary <WebSocket, Guid>(); this.deviceStatusProvider = deviceStatusProvider; }