private void Initialize() { sampResponse = new SampleResponses(); sampResponse.LoadSampleResponses(); ethAdapter = new CommEthernet(sampResponse); serialAdapter = new CommRS232(sampResponse); protocolCmd = new Protocol(); requestsQueue = new ConcurrentQueue <CommandRequest>(); BkgdWorkerObj = new BackgroundWorker(); // Attach event handlers to the BackgroundWorker object. BkgdWorkerObj.DoWork += new DoWorkEventHandler(BkgdWorkerObj_DoWork); BkgdWorkerObj.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BkgdWorkerObj_RunWorkerCompleted); workerThreadBusy = false; }
public CommEthernet(SampleResponses resp) { response = resp; }
public CommRS232(SampleResponses resp) { response = resp; }