[Gambas-user] Serial port control

Carl Nilsson nilsson at ...1979...
Mon Dec 23 04:15:10 CET 2013


Randall: Thanks for responding.  OK, I have looked at the stream 
functions:  My question was, basically, how do I specify how many 
bytes I want to take in from a given serial port at each 
instance?  For example, on one input I expect a continuous stream of 
31 byte packets and I want to take them in for processing 25 (say) 
packets at a time, i.e. 775 bytes at a time.  Now I don't much mind 
if I get a few bytes more or less because I can check for a remainder 
part-packet and put it on the front of the next nominal 775 byte 
intake - that's part of the processing software - but I don't want 
the CPU tied up with that port or stream between intakes of (about) 
775 bytes.  There are other input streams and data processing to 
attend to.  I don't see how to do that with the stream functions - 
but maybe I'm not understanding how the stream works?  I can see that 
I could (I think!) read a given number of bytes from a stream, but 
does that relieve the CPU from being tied up with that stream until I 
read another 775 bytes?  Is a stream of indefinite length or does it 
have some buffer limit?
Carl

At 01:09 PM 23/12/2013, you wrote:
>As I recall gb serial is steam based and so you would handle buffers via
>the stream not the serial object.
>
>
>On Sun, Dec 22, 2013 at 3:01 PM, Carl Nilsson <nilsson at ...1979...> wrote:
>
> > G'day all:
> > Now with Gambas 3 installed, I want to get on with porting my running
> > software from VB6/Windows.  It requires processing multiple streams
> > of binary serial data from attached devices.  The serial control in
> > gambas 3 does not seem up to the job, in so far as the available
> > properties lack the elements I use under VB MScomm.  ...(snip)


> > Carl
> >
> > Carl S Nilsson
> > 137 Gordons Hill Road
> > Lindisfarne, Tas.
> > Australia 7015
> >
> >
> >
> > 
> ------------------------------------------------------------------------------
> > Rapidly troubleshoot problems before they affect your business. Most IT
> > organizations don't have a clear picture of how application performance
> > affects their revenue. With AppDynamics, you get 100% visibility into your
> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> > Pro!
> > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
>
>
>--
>If you ask me if it can be done. The answer is YES, it can always be done.
>The correct questions however are... What will it cost, and how long will
>it take?
>------------------------------------------------------------------------------
>Rapidly troubleshoot problems before they affect your business. Most IT
>organizations don't have a clear picture of how application performance
>affects their revenue. With AppDynamics, you get 100% visibility into your
>Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>_______________________________________________
>Gambas-user mailing list
>Gambas-user at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user

Carl S Nilsson
137 Gordons Hill Road
Lindisfarne, Tas.
Australia 7015 


More information about the User mailing list