473,386 Members | 1,795 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,386 software developers and data experts.

How to start writing a queueing class

Hello

I am writing a real time program which queues up a number of tasks for
processing. Each item in the queue must be submitted to a device
sequentially. ie it is not possible to just blast the hardware with 3
items. Instead you submit job1, wait for notification that job1 is complete
then submit job2, etc. I suppose it is a bit like a print job queueing
system.

How would I start writing a class to control this?

Angus Comber
an***@NOSPAMiteloffice.com
Jul 23 '05 #1
1 1257
You could use a std::queue to store the commands.
Then use some wait routine to wait on the interrupt of whatever I/O you
are using to communicate with the device. Then move the first message
in the queue to the machine.
Or write a callback tied to the interrupt.
Have the I/O section in a seperate thread from the part that adds
commands to the queue.
Cannot give more specific ideas since I/O (also
threading/interrupts/wait functions) is platform and in some cases
processor specific.

Jul 23 '05 #2

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

Similar topics

6
by: Waleed Seada | last post by:
Hi all I am new to C# I read the 'Oreilly.Programming.C.Sharp.3rd.Edition.eBook-LiB' I also finish 6 CD's of the learnkey I used to use PowerBuilder as a developing Tool, I need to know the same...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
16
by: Fernando Arámburu | last post by:
Hi , it´s me again. I will take another way because yesterday I make a question and, probably I didn´t make myself clear so you didn´t understand my question. I want to know if there is any...
5
by: Nick | last post by:
Hi there, This one is really doing my head in, I am attempting to start a thread using the following code, -------------------- Public Sub start() cTrdImportThread = New...
9
by: richwood | last post by:
Ok....Super newbie here in C#... I am trying to write an application (myapp.exe) that will start an application called abc.exe and if it is terminated, will restart it. (or rerun myapp.exe) I...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
11
by: Toby | last post by:
I am a little new as you can tell by this post. This is my first c# window app and I made all my forms and now trying to go back and change the start up form and it is giving me errors when I...
3
by: asadikhan | last post by:
Hi, I have a client server application where the client sends a request to the server with a filename. The server needs to read the file contents, massage the data, and then add it to the...
12
by: Sven | last post by:
Can someone point out source code for a safe circular buffer receiver transmitter? It's for sending and receiving bytes via RS232. Thanks in advance.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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...

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.