473,569 Members | 2,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

need a little help

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


Nov 17 '05 #1
1 1087
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.
--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7161
by: Marc | last post by:
Hi all, I am trying to write an application where I need the ability to open an Excel spreadsheet and do basic read/write, insert rows, and hide/unhide rows. Using win32com I have been able to get the basics down as well as some examples displaying how to simply read and write. But the next step appears exponential. I haven never done...
7
1654
by: Keyed4U | last post by:
I have a drop down list system (works to some extent) for a date range search that I need to do a little more. The following is a small sample from the script: function modify_mo_list(mo_model) { molist = document.forms.querymo2; if (mo_model == '/01/') { var i = 0; molist.options = new Option('February','/02/');
2
2170
by: OZ | last post by:
Hi, I am new C++ and need a little help with a public domain program that is suppose to perform a byte swap. I am receiving the following error messages during the compile process with Microsoft C++ 2003. Here are the error messages and source code: (97) : error C2664: 'fgetpos' : cannot convert parameter 2 from 'void
17
1953
by: EkteGjetost | last post by:
This is definitely not the smart thing to do as far as my learning goes, but desperate situations call for desperate measures. The final lab for my introduction to C programming class is due tomorrow. I was on vacation when we went over how to read files, so basically my only resources are the book, the course notes, and the examples....
5
1749
by: Jintty | last post by:
Hi, I'm trying to write a program that will read a txt file, copy it into another text file and display the number of words, lines and paragraphs. I was able to get the copying portion done, but i'm struggling with the counters. processBlank is supposed to increment the number of words whenever it hits a nonblank, so i figured using if its...
7
1650
by: Galen Somerville | last post by:
I'm doing something wrong. I made up a test app and put the ZIP file on my website http://home.surewest.net/galen/index.html under Downloads. Basically I have a Panel that will get continuous updates and I don't want any flicker. In the test app it sets up a mem map and sets it to Black. When the Button is clicked it calls a routine...
12
1855
by: nephish | last post by:
Hello there, i am getting to need to make my web stuff more OO. i have a project at work that we are porting to the internet, and i started learning php to do so. the project is now mamoth is size, and code is reused and pasted all over it. I plan to do a good re-write using better, and cleaner code. So i want to incorporate some classes....
0
3925
by: U S Contractors Offering Service A Non-profit | last post by:
Brilliant technology helping those most in need Inbox Reply U S Contractors Offering Service A Non-profit show details 10:37 pm (1 hour ago) Brilliant technology helping those most in need Inbox Reply from Craig Somerford <uscos@2barter.net> hide details 10:25 pm (3 minutes ago)
0
1704
by: raypjr | last post by:
Hi everyone. I need a little help with some parts of a word guessing game I'm working on. I have some parts done but unsure about others and could use a little advice. Any help is very much appreciated.Here is the code to give more detail: Dim GameOver As Boolean Dim NumWords As Integer, ThreeWordList(1000) As String,...
5
2025
by: bean330 | last post by:
Hey, I'm somewhat new to C# and I need a little help, please! I'm selecting a bunch of records, setting properties on a COM executable and then calling a method on that executable to run. I want to run the executable in separate threads because they can be long-running and it would be optimal for us to run a bunch simultaneously. I've...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.