• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
November 21, 2024, 07:50:31 am

News:

SMF - Just Installed!


CRLF at end of Packet

Started by ijbranch, September 09, 2013, 07:47:21 am

Previous topic - Next topic

ijbranch

HI Guys,
I am processing packets that end in CRLF.

i.e. AB,24.5dbCRLF

For Packet end, do I include the CRLF?  If so how? 

db#13#10?

Regards,

Ian



Roman Novgorodov

Hello

It is difficult to do at design time in object inspector.
You can make this at runtime:

nrDataProcessor1.DataPackets[0].PacketEnd := 'db'#13#10;

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.

Micky

Hi,
I am using nrCommLib v.9.63 and C++ Builder v.11.
I am trying to use it with some ASCII protocol which starts with some Ascii characters and finish with \r (it contains constant amount of data).

How I can use in C++ Bulder below Delphi equivalent?
nrDataProcessor1.DataPackets
  • .PacketEnd := 'db'#13#10;
nrDataProcessor1->DataPackets
  • .PacketEnd = char(0x0d); // it is not working - [bcc32c Error] Unit1.cpp(27): no member named 'PacketEnd' in 'Nrdataproc::TnrDataPackets'
I tried different versions and I cannot find the right one.

Could you advise?
Thank you in advance!

Roman Novgorodov

Hello

You can try a something like that:

.PacketEnd = "db\r\n";


Also you can take a look at following demo:

Demos\SimplePacket\SimplePacket.dpr

It detects string by #13#10 sequence.

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