Improved socketcand input buffer handling to reduce lost data.
No longer tossing partial frames, saving the data to concat with future data. On startup there can be some data loss, but after it gets rolling there is none. Added rough provision to ensure the buffer doesn't get filled with bad data, but the decodeFrames recursive calls do a pretty good job of getting rid of it so I haven't seen the buffer grow after millions of frames coming over a UDP-based VPN.
This commit is contained in:
@@ -57,7 +57,7 @@ private slots:
|
||||
void invokeReadTCPData();
|
||||
void deviceConnected(int busNum);
|
||||
void switchToRawMode(int busNum);
|
||||
void decodeFrames(QString, int busNum);
|
||||
QString decodeFrames(QString, int busNum);
|
||||
|
||||
private:
|
||||
void procRXData(QString, int busNum);
|
||||
@@ -76,6 +76,7 @@ protected:
|
||||
QByteArray buildData;
|
||||
QVarLengthArray<MODE> rx_state;
|
||||
CANFrame buildFrame;
|
||||
QString unprocessedData;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user