Click here to Skip to main content
15,913,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Getting Mac Address Pin
bob1697213-Feb-07 3:37
bob1697213-Feb-07 3:37 
QuestionRe: Getting Mac Address Pin
David Crow13-Feb-07 3:43
David Crow13-Feb-07 3:43 
QuestionOpen dialog from within a dialog ? Pin
ldsdbomber13-Feb-07 0:10
ldsdbomber13-Feb-07 0:10 
AnswerRe: Open dialog from within a dialog ? Pin
Hamid_RT13-Feb-07 0:21
Hamid_RT13-Feb-07 0:21 
AnswerRe: Open dialog from within a dialog ? Pin
toxcct13-Feb-07 0:30
toxcct13-Feb-07 0:30 
AnswerRe: Open dialog from within a dialog ? Pin
Rage13-Feb-07 1:14
professionalRage13-Feb-07 1:14 
QuestionHow to read a text line from a COM port Pin
jrgrobinson12-Feb-07 23:57
jrgrobinson12-Feb-07 23:57 
AnswerRe: How to read a text line from a COM port Pin
Roger Stoltz13-Feb-07 1:34
Roger Stoltz13-Feb-07 1:34 
jrgrobinson wrote:
Rather than character by character processing messages (NMEA) from a number of serial ports I would like something simple like 'Readline'


With the ordinary serial port driver you simply cannot do this. Each character is transmitted as a groupd of bits consisting of a start bit, the actual character value, parity bits and one or two stop bits. There's no way for the hardware to know how you want to separate messages from each other; it should not since it's the wrong OSI layer for that.

It is for an application to handle this kind of situations, or some kind of service or "daemon".
I suggest that you implement a worker thread that reads the port, assembles the NMEA messages and puts them into a queue. When a complete new message has arrived and has been put in the queue, the worker thread signals the main thread to inform that there is a new message in the queue.
In your worker thread you have to read byte-wise and each NMEA message will start with '$' and end with '\n', if I remember correctly.
This way you won't bother the main thread until there's a complete NMEA message in the queue.

Have a look at Joe Newcomer's article about serial port programming here[^]. I don't know if the article is applicable for Borland C++ Builder, but it addresses some issues that you probably should think of anyway.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote

GeneralRe: How to read a text line from a COM port Pin
jrgrobinson13-Feb-07 2:14
jrgrobinson13-Feb-07 2:14 
QuestionHow to set active tab in IE7 from BHO Pin
amsdev12-Feb-07 23:44
amsdev12-Feb-07 23:44 
QuestionHow to bind function with button after create them? Pin
bosfan12-Feb-07 23:34
bosfan12-Feb-07 23:34 
AnswerRe: How to bind function with button after create them? Pin
Hamid_RT13-Feb-07 0:40
Hamid_RT13-Feb-07 0:40 
GeneralRe: How to bind function with button after create them? Pin
bosfan13-Feb-07 1:20
bosfan13-Feb-07 1:20 
GeneralRe: How to bind function with button after create them? Pin
prasad_som13-Feb-07 2:15
prasad_som13-Feb-07 2:15 
GeneralRe: How to bind function with button after create them? Pin
bosfan13-Feb-07 2:21
bosfan13-Feb-07 2:21 
QuestionRe: How to bind function with button after create them? Pin
David Crow13-Feb-07 3:10
David Crow13-Feb-07 3:10 
GeneralRe: How to bind function with button after create them? Pin
Hamid_RT13-Feb-07 4:17
Hamid_RT13-Feb-07 4:17 
GeneralRe: How to bind function with button after create them? Pin
bosfan14-Feb-07 0:15
bosfan14-Feb-07 0:15 
GeneralRe: How to bind function with button after create them? Pin
Hamid_RT14-Feb-07 1:00
Hamid_RT14-Feb-07 1:00 
GeneralRe: How to bind function with button after create them? Pin
bosfan14-Feb-07 1:54
bosfan14-Feb-07 1:54 
GeneralRe: How to bind function with button after create them? Pin
Hamid_RT14-Feb-07 2:54
Hamid_RT14-Feb-07 2:54 
GeneralRe: How to bind function with button after create them? Pin
Hamid_RT14-Feb-07 1:07
Hamid_RT14-Feb-07 1:07 
Questionmemory leak in IXMLDOMDocument Pin
voorugonda prashanth12-Feb-07 23:30
voorugonda prashanth12-Feb-07 23:30 
AnswerRe: memory leak in IXMLDOMDocument Pin
toxcct13-Feb-07 0:07
toxcct13-Feb-07 0:07 
AnswerRe: memory leak in IXMLDOMDocument Pin
prasad_som13-Feb-07 2:00
prasad_som13-Feb-07 2:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.