Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the flooding warning system.
 /// </summary>
 /// <param name="speedEstimator">Speed estimator.</param>
 /// <param name="depthEstimator">Depth estimator.</param>
 /// <param name="localWarner">Local warner.</param>
 public FloodingWarningSystem(ISpeedEstimator speedEstimator,
                              IDepthEstimator depthEstimator,
                              ILocalWarner localWarner)
 {
     Deploy(speedEstimator);
     Deploy(depthEstimator);
     Deploy(localWarner);
     InitializeMonitoringHooks();
 }
Exemple #2
0
        public FloodingSimulator()
        {
            environment = new Environment();
            BuildSimulation();

            sensorFactory    = new DummySensorFactory(environment);
            actuatorFactory  = new DummyActuatorFactory(environment);
            estimatorFactory = new EstimatorFactory(sensorFactory, actuatorFactory);
            warnerFactory    = new WarnerFactory(actuatorFactory);

            var speedEstimator = estimatorFactory.GetUltrasoundSpeedEstimator();
            var depthEstimator = estimatorFactory.GetRadarDepthEstimator();

            warner = warnerFactory.GetSMSWarner();

            controller = new FloodingWarningSystem(speedEstimator, depthEstimator, warner);
        }
Exemple #3
0
 /// <summary>
 /// Deploy the specified localWarner as the new warner module.
 /// </summary>
 /// <param name="localWarner">Local warner.</param>
 public void Deploy(ILocalWarner localWarner)
 {
     this.localWarner = localWarner;
 }