473,396 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

COM port communication

Hi,

I am developing a GPS data logging application, basically a windows
service where i read GPS data from the device and write it to a text
file. I use CreateFile function passing the port number as an
argument. The GPS device outputs the data every second. I want to
identify this event i.e., i want to read from the port only when the
GPS outputs the data. Currently my program is not in sync with the
device causing my program to read only a part of the data i.e., if the
device outputs 6 lines of data my program read only the first few
lines or the last few lines of the data. I want to synchronise my
program with the device. I want to read data only when it outputs the
data. Is there a way to do this. Is there an event which i can handle
when the device outputs the data?

Thanks
bharath
Nov 22 '07 #1
5 2335
On Nov 22, 7:00 pm, bharath_r <bharath.0...@gmail.comwrote:
Hi,

I am developing a GPS data logging application, basically a windows
service where i read GPS data from the device and write it to a text
file. I use CreateFile function passing the port number as an
argument. The GPS device outputs the data every second. I want to
identify this event i.e., i want to read from the port only when the
GPS outputs the data. Currently my program is not in sync with the
device causing my program to read only a part of the data i.e., if the
device outputs 6 lines of data my program read only the first few
lines or the last few lines of the data. I want to synchronise my
program with the device. I want to read data only when it outputs the
data. Is there a way to do this. Is there an event which i can handle
when the device outputs the data?
In case you were wondering, this is a group about C++ as the language,
itself, largely independently of the hardware it's running on. Sorry,
I don't know where to get this information either. For one, you might
prefer to ask groups related to, say, the operating system you are
using, which will be nearer to the hardware.
>
Thanks
bharath
Nov 22 '07 #2
On Thu, 22 Nov 2007 03:50:48 -0800, alan wrote:
In case you were wondering, this is a group about C++ as the language,
itself, largely independently of the hardware it's running on. Sorry, I
don't know where to get this information either. For one, you might
prefer to ask groups related to, say, the operating system you are
using, which will be nearer to the hardware.
Where is the C++ framework, like C# or Java?

--
// This is my opinion.
Dec 5 '07 #3
On 2007-12-05 04:31, jebblue wrote:
On Thu, 22 Nov 2007 03:50:48 -0800, alan wrote:
>In case you were wondering, this is a group about C++ as the language,
itself, largely independently of the hardware it's running on. Sorry, I
don't know where to get this information either. For one, you might
prefer to ask groups related to, say, the operating system you are
using, which will be nearer to the hardware.

Where is the C++ framework, like C# or Java?
It is called the standard library and should be included with all
compliant compilers.

--
Erik Wikström
Dec 5 '07 #4
On Wed, 05 Dec 2007 17:43:05 +0000, Erik Wikström wrote:
On 2007-12-05 04:31, jebblue wrote:
>Where is the C++ framework, like C# or Java?

It is called the standard library and should be included with all
compliant compilers.
Fair enough as long as it contains a specified serial API (back to the OP
post which was the context in which I posted) like .NET (which is what I
should have said, not C#) or Java (the platform).

If you can show me that, I would be grateful as I do not wish to code
on .NET or Java any more than necessary.

--
// This is my opinion.
Dec 11 '07 #5
On Tue, 11 Dec 2007 06:28:14 +0100, Alf P. Steinbach wrote:
In C++ you can and must choose a framework if you want or need one, but
I suggest you take a look at Poco, <url: http://www.appinf.com/poco/>
(also, of course, Boost and the standard C++ library).
Cheers, & hth.,

- Alf
Yes, that is very interesting indeed, thank you!!

--
// This is my opinion.
Dec 12 '07 #6

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

Similar topics

1
by: mimisam | last post by:
hi, I am using Win XP and writing an application to check POS devices (printer and cash drawer).In the application I need to choose the port which the device is connected to. If the port chosen...
1
by: Andreas Horneff | last post by:
Hi @ all, I've got a problem with serial communication in Borland C++ Builder. I've already found a lot of stuff about serial communication in the internet, but it dosen't work. What I want...
3
by: Keith | last post by:
Quick question on port numbers (V8.1 or V8.2): Is it true that on HP11, db2icrt command ignores -p option for port (Non DPF)? Does DB2 always take 60000 (assuming this is the first instance), ...
3
by: MLH | last post by:
I found some code Dev Ashish posted nearly a decade ago in response to someone's inquiry describing their need to dial a number, monitor call progress and determine whether it was busy. This was...
9
by: Jimmy | last post by:
Hi, this isn't really a C question, but I do not know where else to turn to. Can anyone please tell me how to get the port number for com port 1 and com port 2? I tried searching the web but...
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
1
by: laura salhuana | last post by:
Hi: I am trying to write a serial communication GUI application. My application has the following specifications. When I set my board up in hyperterminal I do the following set up: bits per...
4
by: max_mont | last post by:
Hi all, I'm a newbie in .NET technology. I've already developed Serial communication applications in C++ (WIN32). And I wanted to migrate to .NET technology. There is a serial component in...
2
by: Adrian Chen | last post by:
please help me! I come across a problem. Now I develop a finger print management system which is based on B/S.When users click a button in the web pages, a device connected to the COM1 serial port...
0
by: Dhananjay | last post by:
Hi, I am working on an VB.Net application which I want to communicate to external device using comm port (Serial Port) . So for that first I am trying to simulate the communication on serial...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.