Пример #1
0
        public IObservable <MotionVector> AnalyzeMove()
        {
            var events = _eventAggregator.Observe <MotionEvent>();

            return(events.Timestamp(_concurrencyProvider.Scheduler)
                   .Select(move => new MotionWindow(move.Value.Message.MotionDetectorUID, move.Timestamp))
                   .Do(HandleMove)
                   .Window(events, _ => Observable.Timer(_motionConfiguration.MotionTimeWindow, _concurrencyProvider.Scheduler))
                   .SelectMany(x => x.Scan((vectors, currentPoint) => vectors.AccumulateVector(currentPoint.Start, IsProperVector))
                               .SelectMany(motion => motion.ToVectors())));
        }
Пример #2
0
 public IObservable <IMessageEnvelope <T> > Observe <T>(RoutingFilter routingFilter = null) where T : Event
 {
     return(_eventAggregator.Observe <T>(routingFilter));
 }
Пример #3
0
 public IObservable <IMessageEnvelope <T> > Observe <T>() where T : Event
 {
     return(_eventAggregator.Observe <T>());
 }