Exemplo n.º 1
0
 /// <summary>
 /// <param name="accelerometerLow">Lower bound for the accelerometer, any accelerometer above this threshold fires an observation event</param>
 /// <param name="accelerometerHigh">Optional Upper bound, any accelerometer below this threshold and above LowAccelerometer, fires an observe event</param>
 /// </summary>
 public AccelerometerObserver(Guid vehicleId, Accelerometer accelerometerLow = null, Accelerometer accelerometerHigh = null,
     ObserverTiming timing = ObserverTiming.edge)
     : base(ObserverType.Accelerometer,
             typeof(Vehicle),  // events == true means observe events for a vehicle
             null,  // events == false means observe a vehicle
             timing)
 {
     if (accelerometerLow == null)
         accelerometerLow = new Accelerometer { X = 2.0, Y = 2.0, Z = 2.0 };
     SubjectId = vehicleId;
     SetCondition(accelerometerLow, accelerometerHigh);
 }
Exemplo n.º 2
0
 public void SetCondition(Accelerometer accelerometerLow, Accelerometer accelerometerHigh = null)
 {
     AccelerometerLow = accelerometerLow;
     AccelerometerHigh = accelerometerHigh;
 }