示例#1
0
 public void DeployUltrasound()
 {
     if (!controller.UltraSoundActive)
     {
         controller.Deploy(estimatorFactory.GetUltrasoundSpeedEstimator());
     }
 }
示例#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);
        }