Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EventQueue"/> class.
        /// </summary>
        public EventQueue(
            IDataGatherer dataGatherer,
            IRandomCallGenerator generator,
            uint numberOfStations,
            uint highwayLength,
            uint channelsPerStation,
            uint reservedChannelsPerStation)
        {
            if (dataGatherer == null)
            {
                throw new ArgumentNullException("dataGatherer");
            }
            if (generator == null)
            {
                throw new ArgumentNullException("generator");
            }

            _dataGatherer = dataGatherer;
            _generator    = generator;
            _stations     = new StationList(
                numberOfStations,
                highwayLength,
                channelsPerStation,
                reservedChannelsPerStation);
            _innerQueue           = new SortedList <uint, IEvent>();
            _stationRangeDiameter = highwayLength / numberOfStations;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EventQueue"/> class.
        /// </summary>
        public EventQueue(
			IDataGatherer dataGatherer,
			IRandomCallGenerator generator,
			uint numberOfStations,
			uint highwayLength,
			uint channelsPerStation,
			uint reservedChannelsPerStation )
        {
            if( dataGatherer == null )
                throw new ArgumentNullException( "dataGatherer" );
            if( generator == null )
                throw new ArgumentNullException( "generator" );

            _dataGatherer = dataGatherer;
            _generator = generator;
            _stations = new StationList(
                numberOfStations,
                highwayLength,
                channelsPerStation,
                reservedChannelsPerStation );
            _innerQueue = new SortedList<uint, IEvent>();
            _stationRangeDiameter = highwayLength / numberOfStations;
        }