In order to be GUI responsive, the MFC application does the reading in separate working threads:ĬMainFrame* pMainFrame = (CMainFrame*)pParam ĬRingBuffer& pRingBuffer = pMainFrame- >m_pRingBuffer ĬSerialPort& pSerialPort = pMainFrame- >m_pSerialPort M_pSocket.SendTo(pBuffer.GetBufferSetLength(nLength), M_pIncomming.Send(pBuffer.GetBufferSetLength(nLength), nLength, 0) M_pSocket.Send(pBuffer.GetBufferSetLength(nLength), nLength, 0) M_pSerialPort.Write(pBuffer.GetBufferSetLength(nLength), nLength) Ĭonst UINT nServerPort = theApp.GetInt(_T( " ServerPort"), 0) StrFormat.LoadString(IDS_SERIAL_PORT_CLOSED) ĬStringA pBuffer(dlgInput.m_strSendData) _T( " TCP") : _T( " UDP")), strServerIP, nServerPort) StrMessage.Format(strFormat, ((theApp.GetInt(_T( " Connection"), 0) = 1) ? StrFormat.LoadString(IDS_SOCKET_CREATED) M_pSocket.Connect(strServerIP, nServerPort) If (theApp.GetInt(_T( " SocketType"), 0) = 1) // Client If (theApp.GetInt(_T( " Connection"), 0) = 1) // TCP Socket ((theApp.GetInt(_T( " Connection"), 0) = 1) ? SOCK_STREAM : SOCK_DGRAM), AF_INET) UINT nClientPort = theApp.GetInt(_T( " ClientPort"), 0) UINT nServerPort = theApp.GetInt(_T( " ServerPort"), 0) ĬString strClientIP = theApp.GetString(_T( " ClientIP"), _T( " 127.0.0.1")) StrMessage.Format(strFormat, theApp.GetString(_T( " SerialName"), _T( " COM1"))) ĬString strServerIP = theApp.GetString(_T( " ServerIP"), _T( " 127.0.0.1")) StrFormat.LoadString(IDS_SERIAL_PORT_OPENED) (CSerialPort::FlowControl) theApp.GetInt(_T( " FlowControl"), CSerialPort::NoFlowControl),ĪfxBeginThread(SerialPortThreadFunc, this) (CSerialPort::StopBits) theApp.GetInt(_T( " StopBits"), CSerialPort::OneStopBit), (BYTE)theApp.GetInt(_T( " DataBits"), 8), (CSerialPort::Parity) theApp.GetInt(_T( " Parity"), CSerialPort::NoParity), Switch (theApp.GetInt(_T( " Connection"), 0)) Please check the OnOpenSerialPort and OnCloseSerialPort functions for implementation details. Next, now you can connect/disconnect from your data source. Please check the CConfigureDlg class for implementation details. How Do I Get Started?įirst, configure the MFC application to get logs from either serial port or TCP/UDP socket connection. Confirmation of the EFTPOS transaction is sent to the store and passed on to the customer in the form of a printed EFTPOS transaction record. Before the EFTPOS customer has had the goods put into a bag, the EFTPOS transaction will be complete. The EFTPOS transaction takes a matter of only a few seconds. Unless there is reason for the EFTPOS transaction not to be completed, the funds will then be transferred between the two accounts. A message is also sent to the customer's bank. When the EFTPOS customer confirms the purchase, either by signature or security PIN, the EFTPOS equipment contacts the store's bank electronically about the transaction. On making a purchase, the EFTPOS customer gives an EFTPOS card to the cashier who inserts it into an on-site EFTPOS machine. For those who do not know, EFTPOS is the method for paying for goods or services without needing to carry cash. The main purpose of this MFC application is to get logs via serial port or UDP socket from embedded systems, such as EFTPOS devices, and it is based on PJ Naughter's CSerialPort and CWSocket classes. You can use IntelliPort to perform the specific tasks described above, but do not attempt to use IntelliPort for more complex communication needs. IntelliPort is designed to be an easy-to-use tool and is not meant to replace other full-feature tools available on the market. You can use IntelliPort to transfer large files from a computer onto your portable computer using a serial port rather than going through the process of setting up your portable computer on a network. IntelliPort has scroll functionality that allows you to look at received text that has scrolled off the screen. To make sure that your modem is connected properly or to view your modem's settings, you can send commands through IntelliPort and check the results. Therefore, it can serve as a valuable troubleshooting tool when setting up and using your modem. IntelliPort records the messages passed to and from the computer on the other end of your connection. IntelliPort is a program that you can use to connect to other computers, using either your null modem cable or Ethernet connection. As you already know, Microsoft has dropped the development of HyperTerminal starting with Windows 7.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |