Recently in re-learning u/cos-ii, learning, to a small thing practiced hand is the best way to learn, so there is a serial port parsing module, is filled with my code base it,
U/COS-II analog is the single-chip terminal serial analysis, the host computer serial debugging is written with QT, because the Windows C language development of the serial port is not very convenient, so I choose to use TCP data transmission method, with the socket for data transmission,
The basic model is that QT does the server side of TCP, can simultaneously connect multiple lower machine, while sending, while receiving, point-to-point, point-to-more send data,
U/cos-ii writes the TCP client port on the Windows side, connects Qt servers, interacts with the data,
The following company the QT port interface,
After the completion of the interface.
The upper block is the receiving area, which indicates the received data, and some operations or formats received.
Here is the send area, including some sent formats and action buttons,
This interface is an earlier version, and I later connect the button with a combox that represents the port number of TCP.
Send two mode Select button is RadioButton, this kind of button in Qt, only need two or more in a group frame, that is, the Send area that box, you can achieve the single choice,
Empty save button, is a normal push button, the internal call some functions, the implementation of saving empty,
The display box is text edit, which is very useful after zooming in,
The following things are similar.
QT Serial port simulation-BASIC interface