private void Bind(VehicleCollection vehicles, IVehicleDetector detector) { _model.Bind(detector.RequiredPorts.GetVehicleKind = vehicles.ProvidedPorts.GetVehicleKind); _model.Bind(detector.RequiredPorts.GetVehiclePosition = vehicles.ProvidedPorts.GetVehiclePosition); _model.Bind(detector.RequiredPorts.GetVehicleSpeed = vehicles.ProvidedPorts.GetVehicleSpeed); _model.Bind(detector.RequiredPorts.GetVehicleLane = vehicles.ProvidedPorts.GetVehicleLane); }
/// <summary> /// Initializes a new instance. /// </summary> /// <param name="positionDetector">The sensor that detects overheight vehicles on any lane.</param> /// <param name="leftDetector">The sensor that detects high vehicles on the left lane.</param> /// <param name="rightDetector">The sensor that detects high vehicles on the right lane.</param> /// <param name="timeout">The amount of time after which the main-control is deactivated.</param> public OriginalMainControl(IVehicleDetector positionDetector, IVehicleDetector leftDetector, IVehicleDetector rightDetector, int timeout) { _timer = new Timer(timeout); _positionDetector = positionDetector; _leftDetector = leftDetector; _rightDetector = rightDetector; }
/// <summary> /// Initializes a new instance. /// </summary> /// <param name="positionDetector">The sensor that detects vehicles on any lane.</param> /// <param name="leftDetector">The sensor that detects vehicles on the left lane.</param> /// <param name="rightDetector">The sensor that detects vehicles on the right lane.</param> public RevisedPreControl(IVehicleDetector positionDetector, IVehicleDetector leftDetector, IVehicleDetector rightDetector) { _positionDetector = positionDetector; _leftDetector = leftDetector; _rightDetector = rightDetector; }
/// <summary> /// Initializes a new instance. /// </summary> /// <param name="detector">The sensor that should be used to detect vehicles in the end-control area.</param> /// <param name="timeout">The amount of time after which the end-control is deactivated.</param> public OriginalEndControl(IVehicleDetector detector, int timeout) { _timer = new Timer(timeout); _detector = detector; }
/// <summary> /// Initializes a new instance. /// </summary> /// <param name="positionDetector"> /// The vehicle detector that should be used to detect vehicles entering the pre-control area. /// </param> public OriginalPreControl(IVehicleDetector positionDetector) { _positionDetector = positionDetector; }