Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            EventLoggerAccess log = null;

            _apcsAccess = new ApcsAccess(log);
            _apcsAccess.Start();
            SignOfLifeSequenceTBK.DataContext = _apcsAccess;

            _speedMsgThread = new Thread(new ThreadStart(SpeedMsgAgent));
            _speedMsgThread.IsBackground = true;
            _speedMsgThread.Name = "Main Window Speed Message thread";
            _speedMsgEnd.Reset();
            _speedMsgThread.Start();
        }
Exemplo n.º 2
0
        public DetectorsDataAccess(EventLoggerAccess logger) :
            base(logger)
        {
            _logger = logger;

            _detectorsAccess = new DetectorsAccess(_logger);
            _detectorsAccess.ReadyEvent += new ConnectionStateChangeHandler(OnDetectorsChange);

            _apcsAccess = new ApcsAccess(logger);
            _apcsAccess.ReadyEvent += new ConnectionStateChangeHandler(OnApcsChange);

            _apcsAccess.Start();
            _detectorsAccess.Start();

            _OpcTags = new OpcTags();
            base.TagUpdate += new PLCTagUpdateHandler(_OpcTags.DataAccess_TagUpdate);
            base.TagUpdate += new PLCTagUpdateHandler(DetectorsDataAccess_TagUpdate);

            _cargoHostEndPoint = new CargoHostEndPoint(AppConfiguration.CargoHostServer, AppConfiguration.CargoHostPort);
            _logger.LogInfo("Cargo Host HostEndPoint is " + _cargoHostEndPoint.IPAddress + ":" + _cargoHostEndPoint.IPPort.ToString());

            _rawDataAccess = new RawDataAccess(_logger, _detectorsAccess);
            _realTimeViewer = new RealTimeViewer(_logger);
        }