• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
November 23, 2024, 06:50:13 am

News:

SMF - Just Installed!


Behaviour of DataProc Demo

Started by Arne, October 14, 2008, 09:59:10 am

Previous topic - Next topic

Arne

October 14, 2008, 09:59:10 am Last Edit: October 14, 2008, 10:06:22 am by Arne
Hi,

I got a strange behaviour with the DataProc demo. When I am sending four times the string "start" (without the quotes) then the memo of the demo prints:

Packet with BEGIN and legth:start
Packet with BEGIN and legth:start
Packet with BEGIN and legth:start
Packet with fixed legth:starstarstarstar
Packet with BEGIN and legth:start


How can it be that the fourth output (Packet with fixed legth:starstarstarstar) happens?
Shouldn't have the first three 'start' have been eaten?

Edit: can answer my own question: need to set 'ResetOthers' to True.

Roman Novgorodov

Hello Arne

Thank you for your information.

So the DataProc demo contains the following data packets:

1) First data packet with start 'st' and length 5.
2) Second data packet has fixed length 16 chars.

Demo receives following 20 chars: "startstartstartstart"

Please see my comments after every result:

Packet with BEGIN and legth:start  // OK. Detected 5 chars from "st":  "startstartstartstart"
Packet with BEGIN and legth:start  // OK. Detected 5 chars from "st":  "startstartstartstart"
Packet with BEGIN and legth:start  // OK. Detected 5 chars from "st":  "startstartstartstart"
Packet with fixed legth:starstarstarstar // ERROR !!! It should be first 16 chars from data stream "startstartstartstart".
Packet with BEGIN and legth:start // OK. Detected 5 chars from "st":  "startstartstartstart"

It seems like data packet detection engine loses a last char that was detected by other data packet.
We will check more and will fix this trouble.

While I can recommend you to set ResetOthers property in True for every DataPacket "Packet with BEGIN and length" item. It helps to start other packet detection from zero.

Roman
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.