i have the information as shown below.
I have to parse the DATA PART that i will get from a machine and fill the values like Rinse mode,status of machine....
I will get data on Com Port,i have to do it in c++.
I have written the code to open the com port and send Data demand(command).
Can anyone help me to suggest how to do the parsing?
・ All data isASCII character code without checksumand CR.
・ Range ofMachineNumber start from0000 to 9999
・ If there is no top digit at data part, itwill be zero suppression and put space to fill it.
・ Calculate sum total from top till before checksum (１bite unit), then recognize this
complement of 1 as checksum.
・ Finish of format isCR Hexadecimal: OD
CM" "00" Checksum CR
(2 bite) (2 bite)
"RE" "00" MachineNumber Data part
(2 bite) (2 bite) 4bite 128 byte
Parameter Data byte Unit Status
Status of machine # 1
Rinsemode # 1
Bypass # 1
Dialysate flow ### 3
Treated blood volume ##.## 5
W+B conductivity ##.# 4