AGG Software Forums
September 20, 2024, 06:54:26 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
   Home   Help Search Login Register  

Pages: [1]
  Print  
Author Topic: Splitting data packets with the parser module  (Read 11382 times)
Spomaha
Newbie
*

Karma: +0/-0
Posts: 1


View Profile
« on: August 09, 2012, 09:28:27 AM »

My query contents 3 parts. Each part demands a certain information:
<STX>#81#D4#D5<ETX><STX>#81#C1#B0#F0<ETX><STX>#81#C1#B1#F1<ETX>

Answers look like this (1 data packet):
<STX>#81#D4#B0#B9#B0#B8#B1#B2#B0#B7#B4#B7#B5#B9#DF<ETX><STX>#81#C1#B0#A0#B0#B7#B0#AE#B0#A0#B0#B7#B0#AE#B0#F0<ETX><STX>#81#C1#B1#A0#B0#B8#B5#AE#B0#A0#B0#B8#B5#AE#B0#F1<ETX>

I have a problem with parsing the data packets. Sometimes the parser module doesn't figure out where the correct beginning/ending of the data packet is. The result is a "slipping" of the parsed data. There is a checksum in front of every <ETX>.

I tried to split the packets by sign characters, but concerning the checksum the second and the third part of the packet have the same ending.
Beginning: #02#81#D4     Ending: ?!

Now I split them by a timeout of 10 ms. It also doesn't work.
Is there also a solution for three queries? I need to extract/export 2 variables of each part.


Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #1 on: August 08, 2020, 02:00:00 PM »

You may use #02 and #03 as begin and end signatures.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines