comp.lang.ada
 help / color / mirror / Atom feed
* HELP!  Two-way Task Communication in Ada (Ada83/Ada95)???
@ 1996-11-24  0:00 ericferg
  0 siblings, 0 replies; only message in thread
From: ericferg @ 1996-11-24  0:00 UTC (permalink / raw)



I have a question concerning task communication in Ada95.  I have a
DOS-based Ada95 program which runs several independent tasks, each of
which is supposed to represent a distinct object in a dynamic simulation
of an Air Traffic Control System.

The scenario looks something like this ...
=================================================================

Task Communication Model ---

1)  Controlled Airspace (CAS) object can only pass messages to ATCS driver

2)  ATCS driver sends/receives messages from CAS or external objects.

CPES ---------------------------------->  |----ATCS Task----|  <------>  
|---- CAS ----|

Aircraft Radar  --------------------------->  |----ATCS Task----| 
<------>   |---- CAS ----|

Weather Radar  ---------------------------->  |----ATCS Task----| 
<------>   |---- CAS ----|

FPIS  <------------------------------------------>   |----ATCS Task----| 
<------>   |---- CAS ----|
                                                             
                                                                     
Log  <---------------------------------------------------  |----ATCS
Task----|  <------>   |---- CAS ----|
DISPLAY  <-------------------------------------------  |----ATCS Task----|
 <------>   |---- CAS ----|
FAA  <--------------------------------------------------  |----ATCS
Task----|  <------>   |---- CAS ----|

Remote ATCS  <------------------------------------>  |----ATCS Task----| 
<------>   |---- CAS ----|

Notice the arrowheads ... they denote the possible directions of the
communications between the objects above.

===============================================================

BACKGROUND ---

The ATCS object (ATCS_Task) needs two-way communication with just about
all other objects/tasks.  It acts as a middleman between the external
objects (everything to the left of ATCS_Task) and the CAS.  The ATCS_Task
can be considered as a buffer that shields the CAS from the external
world.  All communication between the CAS and the external world is done
through the ATCS_Task.

Cohen's "Ada as a Second Language" text has an examples of how to get two
independent tasks to talk to each other (mainly, put the task specs in one
library unit (e.g., main procedure), and put each task body in a
separately compiled library unit of its own).

MY PROBLEM ---

I patterned my simulation program after Cohen's example, but the two-way
task communication doesn't seem to work.  Let me say right now that I'm
not an Ada novice (e.g., I'm currently using GNAT 3.05 --- have used GNAT
since it's first release ... I also have Aonix's ObjectAda environment). 
For some strange reason, I just can't get >> two-way communication <<
between independent tasks.  One-way communication works just fine.

MY REQUEST --- 

Does anyone have a SHORT example of two-way task communication that they
can post to this newsgroup (i.e., two tasks which have full visibility of
each other, and which can accept entry calls from each other)?  

I'm posting this plea on 23 Nov 96.  If you have an example for me, please
post it within a week --- I'll check back daily.

I don't want to be overwhelmed by replies --- and don't want to clog up
this newsgroup, either --- so please DO NOT respond to my plea after 30
Nov 96.

Thanks in advance for any help you can provide.

Eric Ferguson




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-11-24  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-24  0:00 HELP! Two-way Task Communication in Ada (Ada83/Ada95)??? ericferg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox