Home > Software engineering > VC/MFC read many groups from the serial number, how to screen a few of these sets of data
VC/MFC read many groups from the serial number, how to screen a few of these sets of data
Time:09-24
Received many sets of data, each set of data is 8 hexadecimal number together, such as one group is 99, 66 1 a 22 33 21 00 this data, I now need to extract the data in each group in fourth, five, six of the three Numbers, and these three number addition of a new decimal number and prints, how should the whole,
CodePudding user response:
Understanding through transport protocol, to ensure that the received data packet correctly Then define a structure, Typedef struct _tagGpData_t { Uchar uByte [8]. } GPDATA; The rest of the almost similar with PGp GPDATA *=(GPDATA *) pRecv;//points to the data set buffer Int (pGp newData=https://bbs.csdn.net/topics/-> uByte [4] <16) + (pGp -> uByte [5] <8) + (pGp -> uByte [6]);
CodePudding user response:
Didn't know what's going on, I want to be a serial real-time data is read and drawing software, need among the several groups of data