Re: MSComm Newby Question
- From: "Dick Grier" <dick_grierNOSPAM@xxxxxxx>
- Date: Wed, 30 Mar 2005 15:51:31 -0700
Hi,
>>
but where/when is it done?
It seems to me that the NEMA strings I am receiving are incomplete or
fragmented. Should I parse it out as it comes into the buffer one character
at a time or get a larger segment of the string and then parse it out?
<<
The simple way is to concatenate data in the OnComm event. When you have
one (or more) complete sentences, then parse the data out. Each sentence is
terminated by a CRLF, so parsing is pretty simple. Just remember to clean
up the string buffer that you use to concatenated data, after it has been
parsed.
Dick
--
Richard Grier (Microsoft Visual Basic MVP)
See www.hardandsoftware.net for contact information.
Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
.
- References:
- Re: MSComm Newby Question
- From: Dick Grier
- Re: MSComm Newby Question
- From: Brian
- Re: MSComm Newby Question
- Prev by Date: Re: tabstrip control
- Next by Date: Re: Don't show Agree button until all text has been viewed
- Previous by thread: Re: MSComm Newby Question
- Next by thread: Re: MSComm Newby Question
- Index(es):
Relevant Pages
|