c++ - how does readyRead() work in Qt? -


This is my first question on this website!

I have a problem reading a dump from a comm port, I send a complete message from another com port, and when I get it from Qt, it is always cut in many subpages .

  Zero SerialPortReader :: init () {connect (m_serialPort, SIGNAL (readyRead ()), this, slot (readData ())); } Zero SerialPortReader :: readData () {// m_serialPort-> Waiter Reid (200); QByteArray Byte = m_serialPort-> ReadAll (); QDebug () & lt; & Lt; Bytearray; If (Baitarekstartsvith (Sof) and amp; Baitareyreds (Aofaiels) and Baitareaijh () & gt; = MIN_SIZE_DATA) {Dikoddeta (Baitare. Constdeta ()); } And {qDebug () & lt; & Lt; "LIB SWCom: Invalid Tram!"; }}  

Sent messages are 25 or 27 bytes long, if I use a hybrid to read or read them, then I have no problem. If I use 2 emulated serial port to use COM, then I do not have this problem ... It only happens with the QT reading system and 2 physical COM portes ...

It seems that I'm not ready when the Reed Signals are extinguished ...

I am very confused, thanks in advance for your help!

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -