QT C++ How can I inform the user after the sQSerialPort reading process is finished?
-
I have a program that reads data over the serial port. I am collecting the incoming data into a buffer and the incoming data has no fixed value. I want to notify the user after the data is finished reading How can I do this?
Here I check if data is coming through the serial port. How can I check this after all the data is in?
serialInput = serial.getString(); serial.clearAll(); serialInput = serialInput.trimmed(); if (serialInput.isEmpty() == false) { parser.parse(serialInput, 0 == 0, 0 == 2); QStringList labelList = parser.getStringListLabels(); QList < double > numericDataList = parser.getListNumericValues(); QList < long > timeStamps = parser.getListTimeStamp(); this -> processChart(labelList, numericDataList, timeStamps); this -> saveToRAM(labelList, numericDataList, timeStamps); } } -
I have a program that reads data over the serial port. I am collecting the incoming data into a buffer and the incoming data has no fixed value. I want to notify the user after the data is finished reading How can I do this?
Here I check if data is coming through the serial port. How can I check this after all the data is in?
serialInput = serial.getString(); serial.clearAll(); serialInput = serialInput.trimmed(); if (serialInput.isEmpty() == false) { parser.parse(serialInput, 0 == 0, 0 == 2); QStringList labelList = parser.getStringListLabels(); QList < double > numericDataList = parser.getListNumericValues(); QList < long > timeStamps = parser.getListTimeStamp(); this -> processChart(labelList, numericDataList, timeStamps); this -> saveToRAM(labelList, numericDataList, timeStamps); } }@TheCeylann said in QT C++ How can I inform the user after the sQSerialPort reading process is finished?:
I want to notify the user after the data is finished reading How can I do this?
How do you know that all data is transferred?
-
After all the data has been sent, if I send another data indicating that the data has been sent, can I do this by checking the latest data?
-
After all the data has been sent, if I send another data indicating that the data has been sent, can I do this by checking the latest data?
@TheCeylann When you send data over a stream you have to add some kind of protocol so you know when your data is complete. How you implement it is up to you.