public Device(IDeviceService iDeviceService, string version, DateTime timeWhenUsed, Guid applicationId)
 {
     this.deviceService = iDeviceService;
     this.Version = version;
     this.DateCreated = timeWhenUsed;
     this.applicationId = applicationId;
 }
        public OfficeConfiguration(
            IDeviceService deviceService,
            IAreaService areaService,
            IDaylightService daylightService,
            CCToolsBoardService ccToolsBoardService,
            SynonymService synonymService,
            RemoteSocketService remoteSocketService,
            ActuatorFactory actuatorFactory,
            SensorFactory sensorFactory)
        {
            if (deviceService == null) throw new ArgumentNullException(nameof(deviceService));
            if (areaService == null) throw new ArgumentNullException(nameof(areaService));
            if (daylightService == null) throw new ArgumentNullException(nameof(daylightService));
            if (ccToolsBoardService == null) throw new ArgumentNullException(nameof(ccToolsBoardService));
            if (synonymService == null) throw new ArgumentNullException(nameof(synonymService));
            if (remoteSocketService == null) throw new ArgumentNullException(nameof(remoteSocketService));
            if (actuatorFactory == null) throw new ArgumentNullException(nameof(actuatorFactory));
            if (sensorFactory == null) throw new ArgumentNullException(nameof(sensorFactory));

            _deviceService = deviceService;
            _areaService = areaService;
            _daylightService = daylightService;
            _ccToolsBoardService = ccToolsBoardService;
            _synonymService = synonymService;
            _remoteSocketService = remoteSocketService;
            _actuatorFactory = actuatorFactory;
            _sensorFactory = sensorFactory;
        }
            public Configuration(
                CCToolsBoardService ccToolsBoardService, 
                IPi2GpioService pi2GpioService, 
                SynonymService synonymService,
                IDeviceService deviceService,
                II2CBusService i2CBusService, 
                ISchedulerService schedulerService, 
                RemoteSocketService remoteSocketService, 
                IApiService apiService,
                IContainer containerService)
            {
                if (ccToolsBoardService == null) throw new ArgumentNullException(nameof(ccToolsBoardService));
                if (pi2GpioService == null) throw new ArgumentNullException(nameof(pi2GpioService));
                if (synonymService == null) throw new ArgumentNullException(nameof(synonymService));
                if (deviceService == null) throw new ArgumentNullException(nameof(deviceService));
                if (i2CBusService == null) throw new ArgumentNullException(nameof(i2CBusService));
                if (schedulerService == null) throw new ArgumentNullException(nameof(schedulerService));
                if (remoteSocketService == null) throw new ArgumentNullException(nameof(remoteSocketService));
                if (apiService == null) throw new ArgumentNullException(nameof(apiService));
                if (containerService == null) throw new ArgumentNullException(nameof(containerService));

                _ccToolsBoardService = ccToolsBoardService;
                _pi2GpioService = pi2GpioService;
                _synonymService = synonymService;
                _deviceService = deviceService;
                _i2CBusService = i2CBusService;
                _schedulerService = schedulerService;
                _remoteSocketService = remoteSocketService;
                _apiService = apiService;
                _containerService = containerService;
            }
        public BedroomConfiguration(
            IDeviceService deviceService,
            IAreaService areaService,
            CCToolsBoardService ccToolsBoardService,
            SynonymService synonymService,
            ActuatorFactory actuatorFactory,
            SensorFactory sensorFactory,
            AutomationFactory automationFactory)
        {
            if (deviceService == null) throw new ArgumentNullException(nameof(deviceService));
            if (areaService == null) throw new ArgumentNullException(nameof(areaService));
            if (ccToolsBoardService == null) throw new ArgumentNullException(nameof(ccToolsBoardService));
            if (synonymService == null) throw new ArgumentNullException(nameof(synonymService));
            if (actuatorFactory == null) throw new ArgumentNullException(nameof(actuatorFactory));
            if (sensorFactory == null) throw new ArgumentNullException(nameof(sensorFactory));
            if (automationFactory == null) throw new ArgumentNullException(nameof(automationFactory));

            _deviceService = deviceService;
            _areaService = areaService;
            _ccToolsBoardService = ccToolsBoardService;
            _synonymService = synonymService;
            _actuatorFactory = actuatorFactory;
            _sensorFactory = sensorFactory;
            _automationFactory = automationFactory;
        }
        public LowerBathroomConfiguration(
            IDeviceService deviceService,
            ISchedulerService schedulerService,
            IAreaService areaService,
            SynonymService synonymService,
            AutomationFactory automationFactory,
            ActuatorFactory actuatorFactory,
            SensorFactory sensorFactory)
        {
            if (deviceService == null) throw new ArgumentNullException(nameof(deviceService));
            if (schedulerService == null) throw new ArgumentNullException(nameof(schedulerService));
            if (areaService == null) throw new ArgumentNullException(nameof(areaService));
            if (synonymService == null) throw new ArgumentNullException(nameof(synonymService));
            if (automationFactory == null) throw new ArgumentNullException(nameof(automationFactory));
            if (actuatorFactory == null) throw new ArgumentNullException(nameof(actuatorFactory));
            if (sensorFactory == null) throw new ArgumentNullException(nameof(sensorFactory));

            _deviceService = deviceService;
            _schedulerService = schedulerService;
            _areaService = areaService;
            _synonymService = synonymService;
            _automationFactory = automationFactory;
            _actuatorFactory = actuatorFactory;
            _sensorFactory = sensorFactory;
        }
Example #6
0
 public DeviceController(ICustomerService customerService, IDistributorService distributorService, IDealerService dealerService, IVehicleService<Vehicle> vehicleService, IDeviceService<Device> deviceService)
 {
     this._customerService = customerService;
     this._distributorService = distributorService;
     this._dealerService = dealerService;
     this._vehicleService = vehicleService;
     this._deviceServce = deviceService;
 }
 public IssueDetailsPageViewModel(IDeviceService deviceService,
     ILoader loader,
     IProgressService progressService,
     INavigationService navigationService)
     : base(loader, progressService, navigationService)
 {
     _deviceService = deviceService;
 }
        public CCToolsBoardService(IDeviceService deviceService, II2CBusService i2CBusServiceService)
        {
            if (i2CBusServiceService == null) throw new ArgumentNullException(nameof(i2CBusServiceService));
            if (deviceService == null) throw new ArgumentNullException(nameof(deviceService));

            _deviceService = deviceService;
            _i2CBusService = i2CBusServiceService;
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="client">Associated DeviceHive device client. Use any custom or default <see cref="RestfulDeviceService"/> implementation.</param>
        /// <param name="network">Associated DeviceHive network object (optional). If specified network is not found in the DeviceHive service, it will be automatically created.</param>
        public DeviceHost(IDeviceService client, Network network)
        {
            if (client == null)
                throw new ArgumentNullException("client");

            DeviceClient = client;
            Network = network;
        }
 public AppSession(Guid deviceId, Guid applicationId, 
     DateTime timeWhenUsed, string version, IDeviceService iDeviceService)
 {
     this.deviceId = deviceId;
     this.applicationId = applicationId;
     this.iDeviceService = iDeviceService;
     this.timeWhenUsed = timeWhenUsed;
     this.version = version;
 }
 public SimulationService(IDeviceService deviceService, IIotHubRepository iotHubRepository, Settings settings)
 {
     _deviceService = deviceService;
     _iotHubRepository = iotHubRepository;
     _storageConnectionString = settings.StorageConnectionString;
     _telemetryTableName = settings.TelemetryTableName;
     _mlResultTableName = settings.PredictionTableName;
     _simulatorStateTableName = settings.SimulatorStateTableName;
 }
Example #12
0
 public DevicesController(
     IDeviceRepository deviceRepository,
     IDeviceService deviceService,
     UserManager<User> userManager)
 {
     _deviceRepository = deviceRepository;
     _deviceService = deviceService;
     _userManager = userManager;
 }
Example #13
0
 public NowViewModel(IDeviceService deviceService)
 {
     _deviceService = deviceService;
     _setOffset();
     var t = new Timer();
     t.Interval = 3000;
     t.Elapsed += T_Elapsed;
     t.Start();
 }
Example #14
0
 public AUserService(IRepository rep,
     ICacheService cacheService, IDeviceService deviceService, INodeService nodeService, IUserService userService)
 {
     _rep = rep;
     _cacheService = cacheService;
     _deviceService = deviceService;
     _nodeService = nodeService;
     _userService = userService;
 }
 public AboutPageViewModel(IDeviceService deviceService,
     ILoader loader,
     IProgressService progressService,
     INavigationService navigationService)
     : base(loader, progressService, navigationService)
 {
     _deviceService = deviceService;
     Version = "1.0";
 }
 public CompanyController(IEmailService emailService, IHandsetOpotunitiesService handsetOpotunitiesService, ITimeFrameService timeFrameService, IDeviceService deviceService, IRegionService regionService, ISelectionDateService selectionDateService, ILumiaTrialFormDataService lumiaTrialFormDataService)
 {
     this.deviceService = deviceService;
     this.regionService = regionService;
     this.selectionDateService = selectionDateService;
     this.lumiaTrialFormDataService = lumiaTrialFormDataService;
     this.timeFrameService = timeFrameService;
     this.handsetOpotunitiesService = handsetOpotunitiesService;
     this.emailService = emailService;
     this.companyViewModel = new CompanyViewModel();
 }
Example #17
0
        public EventPopupView(EventPopupViewModel vm, IDeviceService deviceService)
        {
            _vm = vm;
            _deviceService = deviceService;
            DataContext = _vm;
            
            InitializeComponent();

            this.Closed += EventPopupView_Closed;
            this.Loaded += EventPopupView_Loaded;
        }
Example #18
0
 public SettingsViewModel(ISettingService settingService, IMessagingService messagingService, IDeviceService deviceService)
 {
     _settingService = settingService;
     _messagingService = messagingService;
     _deviceService = deviceService;
     SaveSettingsCommand = new CaptionCommand<string>(Resources.Save, OnSaveSettings);
     StartMessagingServerCommand = new CaptionCommand<string>(Resources.StartClientNow, OnStartMessagingServer, CanStartMessagingServer);
     DisplayCommonAppPathCommand = new CaptionCommand<string>(Resources.DisplayAppPath, OnDisplayAppPath);
     DisplayUserAppPathCommand = new CaptionCommand<string>(Resources.DisplayUserPath, OnDisplayUserPath);
     EditCallerIdDeviceSettingsCommand = new CaptionCommand<string>(Resources.Settings, OnEditCallerIdDeviceSettings);
 }
Example #19
0
        public MainWindow()
        {
            InitializeComponent();
     
            this.Loaded += MainWindow_Loaded;
            _container = ContainerHost.Container;
            _deviceService = _container.Resolve<IDeviceService>();
            _userService = _container.Resolve<IUserService>();
            this.Register<LogoutAndShowMainMessage>(_reshowThis);

            XDispatcher.Dispatcher = Dispatcher;

        }
Example #20
0
        protected override async Task ConfigureAsync(IDeviceService deviceService)
        {
            var pi2PortController = new Pi2GpioService();
            
            var openWeatherMapService = new OpenWeatherMapService(
                ServiceLocator.GetService<IDateTimeService>(),
                ServiceLocator.GetService<ISchedulerService>(),
                ServiceLocator.GetService<ISystemInformationService>());

            ServiceLocator.RegisterService(typeof(IOutdoorTemperatureService), new OutdoorTemperatureService(openWeatherMapService, ServiceLocator.GetService<IDateTimeService>()));
            ServiceLocator.RegisterService(typeof(IOutdoorHumidityService), new OutdootHumidityService(openWeatherMapService, ServiceLocator.GetService<IDateTimeService>()));
            ServiceLocator.RegisterService(typeof(IDaylightService), new DaylightService(openWeatherMapService, ServiceLocator.GetService<IDateTimeService>()));
            ServiceLocator.RegisterService(typeof(IWeatherService), new WeatherService(openWeatherMapService, ServiceLocator.GetService<IDateTimeService>()));
            ServiceLocator.RegisterService(typeof(OpenWeatherMapService), openWeatherMapService);

            var ccToolsFactory = new CCToolsBoardService(this, GetDevice<II2CBusService>());
            var hsrt16 = ccToolsFactory.CreateHSRT16(Device.CellarHSRT16, new I2CSlaveAddress(32));

            var garden = this.CreateArea(RoomId.Garden)
                .WithLamp(Garden.LampTerrace, hsrt16[HSRT16Pin.Relay15])
                .WithLamp(Garden.LampGarage, hsrt16[HSRT16Pin.Relay14])
                .WithLamp(Garden.LampTap, hsrt16[HSRT16Pin.Relay13])
                .WithLamp(Garden.SpotlightRoof, hsrt16[HSRT16Pin.Relay12])
                .WithLamp(Garden.LampRearArea, hsrt16[HSRT16Pin.Relay11])
                .WithSocket(Garden.SocketPavillion, hsrt16[HSRT16Pin.Relay10])
                // 9 = free
                .WithLamp(Garden.LampParkingLot, new LogicalBinaryOutput().WithOutput(hsrt16[HSRT16Pin.Relay8]).WithOutput(hsrt16[HSRT16Pin.Relay6]).WithOutput(hsrt16[HSRT16Pin.Relay7]))
                .WithButton(Garden.Button, pi2PortController.GetInput(4).WithInvertedState())
                .WithStateMachine(Garden.StateMachine, SetupStateMachine);

            garden.GetStateMachine(Garden.StateMachine).ConnectMoveNextAndToggleOffWith(garden.GetButton(Garden.Button));

            garden.SetupConditionalOnAutomation()
                .WithActuator(garden.GetLamp(Garden.LampParkingLot))
                .WithOnAtNightRange()
                .WithOffBetweenRange(TimeSpan.Parse("22:30:00"), TimeSpan.Parse("05:00:00"));

            TimerService.Tick += (s, e) => { pi2PortController.PollOpenInputPorts(); };

            await base.ConfigureAsync();
        }
Example #21
0
 public AppController(
     IUserService userService,
     ILoginService loginService,
     IPositionService positionService,
     IAlarmService alarmService,
     IMileageReportService mileageReportService,
     IDeviceService deviceService,
     IAUserService aUserService,
     IStateService stateService, IAreaService areaService, 
     IInstructionSendService instructionSendService)
 {
     _userService = userService;
     _aUserService = aUserService;
     _loginService = loginService;
     _positionService = positionService;
     _mileageReportService = mileageReportService;
     _deviceService = deviceService;
     _stateService = stateService;
     _areaService = areaService;
     _instructionSendService = instructionSendService;
     _alarmService = alarmService;
 }
Example #22
0
        public BarViewModel(ICalendarService calendarService, 
            IUserService userService, ILifetimeScope scope, 
            IDeviceService deviceService, IBarConfigService barConfig)
        {
            _calendarService = calendarService;
            _userService = userService;
            _scope = scope;
            _deviceService = deviceService;
            _barConfig = barConfig;
            NowViewModel = scope.Resolve<NowViewModel>();
            Width = deviceService.WindowWidth;

            this.Register<ShowEventPopupMessage>(_showEventPopup);
            this.Register<HideEventPopupMessage>(_hideEventPopup);
            this.Register<RefreshCalendarMessage>(_onRefreshCalendar);
            this.Register<ShowTomorrowMessage>(_onShowTomorrow);

            _timer = new Timer();
            _timer.Interval = 5000;
            _timer.Elapsed += T_Elapsed;
            _timer.Start();
        }
		public MainViewModel(
			IInteractionService interactionService,
			ISoundService soundService,
			ISpeakService speakService,
			ILanguageService languageService,
			IDeviceService deviceService)
		{

			this.interactionService = interactionService;
			this.soundService = soundService;
			this.speakService = speakService;
			this.languageService = languageService;
			this.deviceService = deviceService;

			this.timer = new Timer((obj) => {
				CheckFiguresToRemove();
			}, null, timerDelay, timerDelay);

			this.interactionService.InteractionOccured += InteractionService_InteractionOccured;

			//play the intro sound
			this.soundService.PlayEmbebedResourceAsync(introSound);
		}
Example #24
0
 public MemberController(
     IDeviceService deviceService,
     IDeviceGroupService deviceGroupService,
     IPositionService positionService,
     IAreaService areaService,
     ILineService lineService,
     IAlarmService alarmService,
     IMileageReportService mileageReportService,
     IAUserService aUserService,
     IUserService userService,
     IInstructionSendService instructionSendService)
 {
     _deviceService = deviceService;
     _deviceGroupService = deviceGroupService;
     _positionService = positionService;
     _areaService = areaService;
     _lineService = lineService;
     _alarmService = alarmService;
     _mileageReportService = mileageReportService;
     _aUserService = aUserService;
     _userService = userService;
     _instructionSendService = instructionSendService;
 }
Example #25
0
        public BarView(BarViewModel vm, 
            IDeviceService deviceService, IUIUtils uiUtils)
        {
            InitializeComponent();


            _timeEnter = this.Resources["TimeLengedFadeIn"] as Storyboard;
            _timeLeave = this.Resources["TimeLegendFadeOut"] as Storyboard;

            this._vm = vm;
            _deviceService = deviceService;
            _uiUtils = uiUtils;
            this.DataContext = vm;
            vm.MyDispatcher = Dispatcher.CurrentDispatcher;
            vm.PropertyChanged += Vm_PropertyChanged;

            this.MouseDoubleClick += BarView_MouseDoubleClick;
            this.MouseRightButtonUp += BarView_MouseRightButtonUp;
            this.MouseUp += BarView_MouseUp;
            this.Closed += BarView_Closed;
            this.Loaded += BarView_Loaded;
            this.MouseEnter += BarView_MouseEnter;
            this.MouseLeave += BarView_MouseLeave;
        }
Example #26
0
 public AdminController(
     IDeviceService deviceService
     )
 {
     _deviceService = deviceService;
 }
Example #27
0
 public GalleryController(IDealerService dealerService, IVehicleService<Vehicle> vehicleService,IDeviceService<Device> deviceService)
 {
     this.dealerService = dealerService;
     this.vehicleServce = vehicleService;
     this.deviceService = deviceService;
 }
Example #28
0
 public AuthenticationHelper(ICachePersist cachePersist, IDeviceService deviceService)
 {
     _cachePersist = cachePersist;
     _deviceService = deviceService;
 }
Example #29
0
 public AutomationService(IDeviceService deviceService, RuleActionTypeRegistry ruleActionTypeRegistry)
 {
     _deviceService = deviceService;
     _ruleActionTypeRegistry = ruleActionTypeRegistry;
 }
 public UserController(IDeviceService deviceService, IUserService userService)
 {
     _deviceService = deviceService;
     _userService = userService;
 }