예제 #1
0
        public BiometricTelemetryService(string EventHubConnectionString)
        {
            _eventHub = new EventHubMessageSender(EventHubConnectionString);

            ConfigureOverSampling();

            Init();
        }
예제 #2
0
        public BiometricTelemetryService(string EventHubConnectionString)
        {
            _eventHub = new EventHubMessageSender(EventHubConnectionString);

            ConfigureOverSampling();
            
            Init();
        }
예제 #3
0
        public KioskInteractionService(ISensorService <KinectSensor> sensorService,
                                       IDemographicsService demographicsService,
                                       IItemInteractionService itemInteractionService,
                                       IBodyTrackingService bodyTrackingService,
                                       IConfigurationProvider configurationProvider)
        {
            _currentZone        = "NoTrack";
            _demographicService = demographicsService;

            _InteractionEventHub = new EventHubMessageSender(ConfigurationManager.AppSettings["Azure.Hub.Kiosk"]);

            _sensorService = sensorService;

            SendKioskReportConfigurationToAzure();

            _itemInteractionService = itemInteractionService;
            _itemInteractionService.ItemInteraction += _itemInteractionService_ItemInteraction;
            _coordinateMapper = _sensorService.Sensor.CoordinateMapper;

            _configurationProvider = configurationProvider;
            _configurationProvider.ConfigurationSettingsChanged += _configurationProvider_ConfigurationSettingsChanged;
            GetConfig();

            _sensorService.StatusChanged += _sensorService_StatusChanged;

            _bodyFrameReader = _sensorService.Sensor.BodyFrameSource.OpenReader();
            if (_bodyFrameReader != null)
            {
                _bodyFrameReader.FrameArrived += _bodyFrameReader_FrameArrived;
            }

            _sensorService.Open();

            // Telemetry processing routine done on a seperate background thread via queues
            _interactionProcessingQueue = new BlockingCollection <KioskStateEventArgs>();
            {
                IObservable <KioskStateEventArgs> ob = _interactionProcessingQueue.
                                                       GetConsumingEnumerable().
                                                       ToObservable(TaskPoolScheduler.Default);

                ob.Subscribe(p =>
                {
                    // This handler will get called whenever
                    // anything appears on myQueue in the future.
                    this.SendIteraction(p);
                });
            }

            _bodyTrackingService = bodyTrackingService;

            CurrentState = KioskStates.NoTrack;
        }
예제 #4
0
        public KioskInteractionService(ISensorService<KinectSensor> sensorService,
            IDemographicsService demographicsService,
            IItemInteractionService itemInteractionService,
            IBodyTrackingService bodyTrackingService,
            IConfigurationProvider configurationProvider)
        {
            _currentZone = "NoTrack";
            _demographicService = demographicsService;

            _eventHub = new EventHubMessageSender(ConfigurationManager.AppSettings["Azure.Hub.Kiosk"]);

            _sensorService = sensorService;
              //  _telemetryService = telemetryService;

            _itemInteractionService = itemInteractionService;
            _itemInteractionService.ItemInteraction += _itemInteractionService_ItemInteraction;
            _coordinateMapper = _sensorService.Sensor.CoordinateMapper;

            _configurationProvider = configurationProvider;
            _configurationProvider.ConfigurationSettingsChanged += _configurationProvider_ConfigurationSettingsChanged;
            GetConfig();

            _sensorService.StatusChanged += _sensorService_StatusChanged;
            _bodyFrameReader = _sensorService.Sensor.BodyFrameSource.OpenReader();
            if (_bodyFrameReader != null)
                _bodyFrameReader.FrameArrived += _bodyFrameReader_FrameArrived;

            _sensorService.Open();

            _interactionProcessingQueue = new BlockingCollection<KioskStateEventArgs>();
            {
                IObservable<KioskStateEventArgs> ob = _interactionProcessingQueue.
                  GetConsumingEnumerable().
                  ToObservable(TaskPoolScheduler.Default);

                ob.Subscribe(p =>
                {
                    //var temp = Thread.CurrentThread.ManagedThreadId;
                    // This handler will get called whenever
                    // anything appears on myQueue in the future.
                    this.SendIteraction(p);
                    //Debug.Write("Consuming: {0}\n", p);
                });
            }

            _bodyTrackingService = bodyTrackingService;

            CurrentState = KioskStates.NoTrack;
        }
예제 #5
0
        private void SendKioskReportConfigurationToAzure()
        {
            //Send the KioskConfig to Azure for reporting purposes
            KioskReportingConfig rptConfig;

            var configEventHub = new EventHubMessageSender(ConfigurationManager.AppSettings["Azure.Hub.KioskConfig"]);

            using (StreamReader r = new StreamReader("KioskReportingConfig.json"))
            {
                string json = r.ReadToEnd();
                rptConfig = JsonConvert.DeserializeObject <KioskReportingConfig>(json);
            }
            var id = _sensorService.Sensor.UniqueKinectId;

            rptConfig.kinectID = id;
            configEventHub.SendMessageToEventHub(rptConfig);
        }
예제 #6
0
 public SkeletalTelemetryService(string EventHubConnectionString)
 {
     _eventHub = new EventHubMessageSender(EventHubConnectionString);
 }
예제 #7
0
 public SkeletalTelemetryService(string EventHubConnectionString)
 {
     _eventHub = new EventHubMessageSender(EventHubConnectionString);
 }