private void Initialize(byte _pcNumDevice, CStationBase.Protocol _FrameProtocol, EnumFrameFlowControl _Flowcontrol, int frameWindow) { m_FrameProtocol = _FrameProtocol; m_Flowcontrol = _Flowcontrol; m_pcNumDevice = _pcNumDevice; m_FrameDataOut01 = new CFrameData(_FrameProtocol); m_FrameDataIn01 = new CFrameData(_FrameProtocol); m_FrameDataOut02 = new CFrameData(_FrameProtocol); m_FrameDataIn02 = new CFrameData(_FrameProtocol); }
public void Initialize(bool _BurstMessages, byte _StationNumDevice, CStationBase.Protocol _FrameProtocol, CStationBase.Protocol _CommandProtocol) { if (_BurstMessages) { m_flowControlMethod = EnumFrameFlowControl.BURST; m_frameWindow = MAX_FRAME_WINDOW; } else { m_flowControlMethod = EnumFrameFlowControl.ONE_TO_ONE; } if (m_mode == SearchMode.USB) { m_StackDll = new Stack_dll(ref m_pSerialPort, m_sourceAddress, _FrameProtocol, m_flowControlMethod, m_frameWindow); m_StackDll.DataReceived += DataReceived; m_StackDll.DataReceivedMessages += DataReceived_Burst; m_StackDll.ErrorConnect += Event_ConnectionError; #if LibraryTest m_StackDll.DataSentFrame += StackDll_DataSentFrame; m_StackDll.DataReceivedFrame += StackDll_DataReceivedFrame; m_StackDll.DataReceivedFrameMessages += StackDll_DataReceivedFrame_Burst; m_StackDll.DataSentRawData += StackDll_DataSentRawData; m_StackDll.DataReceivedRawData += StackDll_DataReceivedRawData; #endif } else if (m_mode == SearchMode.ETH) { m_StackDll = new Stack_dll(ref m_pWinSock, m_sourceAddress, _FrameProtocol, m_flowControlMethod, m_frameWindow); m_StackDll.DataReceived += DataReceived; m_StackDll.DataReceivedMessages += DataReceived_Burst; m_StackDll.ErrorConnect += Event_ConnectionError; #if LibraryTest m_StackDll.DataSentFrame += StackDll_DataSentFrame; m_StackDll.DataReceivedFrame += StackDll_DataReceivedFrame; m_StackDll.DataReceivedFrameMessages += StackDll_DataReceivedFrame_Burst; m_StackDll.DataSentRawData += StackDll_DataSentRawData; m_StackDll.DataReceivedRawData += StackDll_DataReceivedRawData; #endif } }
internal Stack_dll(ref RoutinesLibrary.Net.Protocols.TCP.TCP WinSock, byte _pcNumDevice, CStationBase.Protocol _FrameProtocol, EnumFrameFlowControl _Flowcontrol, int frameWindow) { m_phl = new Stack_phl(WinSock, (MAX_FRAME_LENGTH * frameWindow) + MAX_FRAME_LENGTH); m_phl.DataReceived += phl_DataReceived; m_phl.ErrorConnect += phl_ErrorConnect; Initialize(_pcNumDevice, _FrameProtocol, _Flowcontrol, frameWindow); }