Exemple #1
0
 internal FakeGsrSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.FromSeconds(5.0),
         SubscriptionType.Gsr
     }
 }, bandType)
 {
 }
Exemple #2
0
 public FakeAmbientLightSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.FromMilliseconds(500.0),
         SubscriptionType.AmbientLight
     }
 }, bandType)
 {
 }
Exemple #3
0
 public FakeBarometerSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.FromSeconds(1.0),
         SubscriptionType.Barometer
     }
 }, bandType)
 {
 }
Exemple #4
0
 public FakeRrSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.Zero,
         SubscriptionType.RRInterval
     }
 }, bandType)
 {
 }
 internal FakeSkinTemperatureSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Cargo,
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.FromMinutes(1.0),
         SubscriptionType.SkinTemperature
     }
 }, bandType)
 {
 }
Exemple #6
0
 public FakeCaloriesSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Cargo,
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.FromSeconds(1.0),
         SubscriptionType.Calories1S
     }
 }, bandType)
 {
 }
 internal FakeDistanceSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Cargo,
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.FromSeconds(1.0),
         SubscriptionType.Distance
     }
 }, bandType)
 {
 }
 public FakeDeviceContactSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Cargo,
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.Zero,
         SubscriptionType.DeviceContact
     }
 }, bandType)
 {
     State = new FakeBandDeviceContactReading(BandContactState.Worn);
 }
Exemple #9
0
 internal FakeBandSensorManager(BandTypeConstants bandType)
 {
     _bandType        = bandType;
     _accelerometer   = new Lazy <IBandSensor <IBandAccelerometerReading> >(() => new FakeAccelerometerSensor(bandType));
     _calories        = new Lazy <IBandSensor <IBandCaloriesReading> >(() => new FakeCaloriesSensor(bandType));
     _contact         = new Lazy <IBandContactSensor>(() => new FakeDeviceContactSensor(bandType));
     _distance        = new Lazy <IBandSensor <IBandDistanceReading> >(() => new FakeDistanceSensor(bandType));
     _gyroscope       = new Lazy <IBandSensor <IBandGyroscopeReading> >(() => new FakeGyroSensor(bandType));
     _heartRate       = new Lazy <IBandSensor <IBandHeartRateReading> >(() => new FakeHeartRateSensor(bandType));
     _pedometer       = new Lazy <IBandSensor <IBandPedometerReading> >(() => new FakePedometerSensor(bandType));
     _skinTemperature = new Lazy <IBandSensor <IBandSkinTemperatureReading> >(() => new FakeSkinTemperatureSensor(bandType));
     _uv           = new Lazy <IBandSensor <IBandUVReading> >(() => new FakeUVSensor(bandType));
     _gsr          = new Lazy <IBandSensor <IBandGsrReading> >(() => new FakeGsrSensor(bandType));
     _rRInterval   = new Lazy <IBandSensor <IBandRRIntervalReading> >(() => new FakeRrSensor(bandType));
     _ambientLight = new Lazy <IBandSensor <IBandAmbientLightReading> >(() => new FakeAmbientLightSensor(bandType));
     _barometer    = new Lazy <IBandSensor <IBandBarometerReading> >(() => new FakeBarometerSensor(bandType));
     _altimeter    = new Lazy <IBandSensor <IBandAltimeterReading> >(() => new FakeAltimeterSensor(bandType));
 }
Exemple #10
0
 internal FakeUVSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Cargo,
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.FromMinutes(1.0),
         SubscriptionType.UV
     },
     {
         TimeSpan.FromMilliseconds(400.0),
         SubscriptionType.UVFast
     }
 }, bandType)
 {
 }
 public FakeGyroSensor(BandTypeConstants bandType) :
     base(new List <BandType>
 {
     BandType.Cargo,
     BandType.Envoy
 }, new Dictionary <TimeSpan, SubscriptionType>
 {
     {
         TimeSpan.FromMilliseconds(16.0),
         SubscriptionType.AccelerometerGyroscope16MS
     },
     {
         TimeSpan.FromMilliseconds(32.0),
         SubscriptionType.AccelerometerGyroscope32MS
     },
     {
         TimeSpan.FromMilliseconds(128.0),
         SubscriptionType.AccelerometerGyroscope128MS
     }
 }, bandType)
 {
 }
 internal FakeBandSensor(IEnumerable <BandType> supportedBandClasses, Dictionary <TimeSpan, SubscriptionType> supportedReportingSubscriptions, BandTypeConstants type)
 {
     _supportedReportingSubscriptions = supportedReportingSubscriptions;
     _isSupported       = supportedBandClasses.Contains(type.BandType);
     _reportingInterval = _supportedReportingSubscriptions.Keys.FirstOrDefault();
 }