Exemple #1
0
        /// <summary>
        /// Creates a new object.
        /// </summary>
        public Listener()
        {
            _Clock     = Factory.Singleton.Resolve <IClock>();
            Statistics = Factory.Singleton.Resolve <IStatistics>();
            Statistics.Initialise();

            _Port30003MessageTranslator = Factory.Singleton.Resolve <IBaseStationMessageTranslator>();
            _ModeSMessageTranslator     = Factory.Singleton.Resolve <IModeSTranslator>();
            _AdsbMessageTranslator      = Factory.Singleton.Resolve <IAdsbTranslator>();
            _ModeSParity = Factory.Singleton.Resolve <IModeSParity>();
            _Compressor  = Factory.Singleton.Resolve <IBaseStationMessageCompressor>();
            _AircraftListJsonMessageConverter = Factory.Singleton.Resolve <IAircraftListJsonMessageConverter>();

            _ModeSMessageTranslator.Statistics = Statistics;
            _AdsbMessageTranslator.Statistics  = Statistics;

            var messageQueueName = String.Format("MessageProcessingAndDispatchQueue_{0}", ++_ListenerCounter);

            _MessageProcessingAndDispatchQueue = new BackgroundThreadQueue <MessageDispatch>(messageQueueName, 200000);
            _MessageProcessingAndDispatchQueue.StartBackgroundThread(ProcessAndDispatchMessageQueueItem, HandleMessageDispatchException);
        }
Exemple #2
0
 public void TestInitialise()
 {
     _Converter        = Factory.Resolve <IAircraftListJsonMessageConverter>();
     _AircraftListJson = new AircraftListJson();
 }