[Gambas-user] Issue/Problem with Serial Port Component

nando nando_f at ...951...
Mon Jun 5 01:22:05 CEST 2006


The remark line after the READ does some testing to see 
if complete data received matches known formats.  There is no CR/LF
embedded within the stream.  I am well practiced in ASCII/CL/LF stuff
and binary over serial.

The _read events fires and the bunch of chars already received in the kernel
are appended to the accumulating string.

The string is tested each _read event.

The problem here is that if you read *ALL* LOF(SPort) every _read event,
there will not be a _read event for the last bunch.

Reading one less than LOF(SPort) ensures the _event one more time.

I have tried it here over 100 times with the same results.
It's fascinating!

-Fernando






---------- Original Message -----------
From: ron <ronstk at ...239...>
To: nando_f at ...951..., mailing list for gambas users
<gambas-user at lists.sourceforge.net>
Sent: Mon, 5 Jun 2006 01:03:43  0200
Subject: Re: [Gambas-user] Issue/Problem with Serial Port Component

> On Monday 05 June 2006 00:52, nando wrote:
> > There is no CR/LF
> > The data is ASCII text
> > 
> > 
> Yeah and how do you know the line is 
> received and when a new line starts?
> 
> This works only if the ASCII text is 
> always a fixed length and send as one peace.
> 
> And the sending machine/program can add
> it if you send it away automatic each line.
> 
> In notepad I do not see them, they are CR/LF
> but when reversed I see square blocks for one of those.
> 
> So it is importand to know who is what sending exactly.
> Special when it is ASCII text how stupid it sounds.
> 
> Ron
> 
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists//gambas-user
------- End of Original Message -------




More information about the User mailing list