Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2005

Tip: Looking for answers? Try searching our database.

need a little help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bill - 08 Jun 2005 22:31 GMT
Good Day,

I am developing an application that utilizes the serial port. I have looked
through the news groups and seen some examples.

Here is my dilemna:

I am creating a processing intensive application that gets all of its data
from the serial port.

It would be great if I could do the following:

Read Com Port, parse message
Determine message type
call appropriate function to process message
continue extensive processing

So I need to read the com port, collect the bytes, check to see if I have a
message

If I have a complete message, process it

Now the problem may be that the stream of data to the serial port could be
constant, message after message. And I will have a ton of processing that
will have to happen while the data collection on the serial port continues.

If this is possible, please if you could point me in the right direction I
would certainly appreciate it.

Thanks,
Bill
Jochen Kalmbach [MVP] - 09 Jun 2005 07:34 GMT
Hi bill!

> Now the problem may be that the stream of data to the serial port could be
> constant, message after message. And I will have a ton of processing that
> will have to happen while the data collection on the serial port continues.

1. Use some "prooven and working" serial port class like:

See: Serial library for C++
http://www.codeproject.com/system/serial.asp

See: CSerialPort v1.03 - Serial Port Wrapper
http://www.codeproject.com/system/cserialport.asp

> If this is possible, please if you could point me in the right direction I
> would certainly appreciate it.

Use one thread only for reading the data and put the "message" into an
queue which will be processed from an different thread.

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.