Author Topic: DataPacketLength - solved  (Read 901 times)

Telli1

  • Newbie
  • *
  • Posts: 1
    • View Profile
DataPacketLength - solved
« on: May 03, 2012, 08:29:22 pm »
Hello,

I need help with determing packet length :(

MyPacket.PacketBegin:=[Byte-Start]
MyPacket.PacketEnd:=
MyPacket.PacketLength:=0

Following bytes in buffer:
[Byte-Start]
[Byte-Length=n]
[Byte.1]
...
[Byte.n]
[Byte-Start]
[Byte-Length=m]
[Byte.1]
...
[Byte.m]
...

Prog doesnt enter "MyPacket.OnPacketLength()"
 
What to do to get the 'n' and 'm' ?

Thx for help :)

--- SOLVED ---
PacketBegin is chr(255)+chr(255)

I entered #255#255 for PacketBegin... it doesnt work
I had to set it in Create "...PacketBegin:=chr(255)+chr(255)"; this works



« Last Edit: May 07, 2012, 10:51:27 am by Telli1 »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: DataPacketLength - solved
« Reply #1 on: May 10, 2012, 06:12:53 am »
Hello

I'm sorry if my answer is too late.
There is problem with entering invisible chars into string properties in object inspector.
You filled necessary values at run-time and it is correct.

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