comp.lang.ada
 help / color / mirror / Atom feed
From: Nick Roberts <nick.roberts@acm.org>
Subject: Re: Unchecked_Conversion help needed
Date: Wed, 22 Dec 2004 03:29:31 +0000
Date: 2004-12-22T03:29:31+00:00	[thread overview]
Message-ID: <gemini.i93tp6001bo1s02fg.nick.roberts@acm.org> (raw)

"rcarnesiii" <reid_carnes@yahoo.com> wrote:

> I meant I have two apps talking to each other.

This is a problem that may be addressed (pardon the pun) by Annex E of the
Ada 95 Reference Manual (RM95). I believe there is an Open Source
implementation, but I forget the name. Alternatively, some Object Request
Broker (ORB) system might be what you need.

In any case, the essence of communication between two Ada programs (or
partitions) usually involves using streams and serialisation -- see RM95
section 13.13 -- to perform what is called 'marshalling' of data.

Values of a type T are serialised and deserialised by the T'Write and T'Read
procedures or the T'Output procedure and T'Input function, as described in
the RM95.

To transfer a set of values from one program to another, the source program
marshalls (serialises) the values into a stream (using T'Write or T'Output),
then the stream is transferred from the source program to the target program
(how this is done depends on a lot of things), then the values are
unmarshalled (deserialised) into variables (using T'Read or T'Input) in the
target program.

A stream which represents a shared file or shared memory area may be used to
effect the transfer of data. In the case of programs which are running on
different machines, a stream which represents a (buffered) network channel
between the machines may be used.

For some types (typically limited and access types), you will need to write
your own serialisation code (you then use a 'use' clause to declare them as
the implementations of T'Write and T'Read and/or T'Output and T'Input).

Please reply if you need more help.

-- 
Nick Roberts



             reply	other threads:[~2004-12-22  3:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-22  3:29 Nick Roberts [this message]
2004-12-22  8:03 ` Unchecked_Conversion help needed Jerome Hugues
2004-12-22  9:24   ` Pascal Obry
2004-12-22  9:55   ` Martin Krischik
2004-12-22 12:46     ` Pascal Obry
2004-12-22 14:14       ` Jerome Hugues
2004-12-22 14:30         ` Pascal Obry
2004-12-22 14:09     ` Jerome Hugues
2004-12-22 18:33       ` Martin Krischik
2004-12-22 22:05         ` CORBA/Ada [Was: Re: Unchecked_Conversion help needed] Jerome Hugues
2004-12-23  7:41           ` CORBA/Ada Martin Krischik
  -- strict thread matches above, loose matches on Subject: below --
2004-12-21 21:22 Unchecked_Conversion help needed rcarnesiii
2004-12-21 21:49 ` rcarnesiii
2004-12-21 21:53 ` tmoran
2004-12-22  0:17   ` Jeffrey Carter
2004-12-22  5:41     ` Brian May
2004-12-23  0:32       ` Jeffrey Carter
2004-12-22  9:21 ` Adrien Plisson
replies disabled

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