From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7df2baf73b28aa5d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-04 07:22:12 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!feed.news.qwest.net!namche.sun.com!news1nwk.sfbay.sun.com!new-usenet.uk.sun.com!not-for-mail From: Ole-Hjalmar Kristensen Newsgroups: comp.lang.ada Subject: Re: socket, pipe Date: 04 Nov 2003 16:14:32 +0100 Organization: Sun Microsystems Message-ID: References: <56a4b188.0311040645.64f825f7@posting.google.com> NNTP-Posting-Host: khepri06.norway.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: new-usenet.uk.sun.com 1067958873 22215 129.159.112.195 (4 Nov 2003 15:14:33 GMT) X-Complaints-To: usenet@new-usenet.uk.sun.com NNTP-Posting-Date: 4 Nov 2003 15:14:33 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:2046 Date: 2003-11-04T15:14:33+00:00 List-Id: >>>>> "g" == ghostie writes: g> I'm quite the Ada newbie. I'm really a C++ programmer. But I've been g> tasked with making a change to an Ada application that we have, and g> would appreciate some help getting started. Please be patient. g> We want our Ada application, while running, to share a lot of binary g> information with a different application, this one written in Matlab. g> Each applicaton will produce output data which will be used by the g> other application. Both applications will run on Win2K PCs, and they g> may or may not be on the same computer. g> Is this possible? What would be the best way to do it? I've tried g> looking up some information but to be honest, I don't understand the g> difference between pipes and sockets and Overlapped I/O and whatever g> else is available, let alone if it is possible to do these things in g> Ada. All the information I'm finding is either Unix-oriented, or else g> it assumes a moderate level of knowledge (which I don't have). g> My Ada compiler is DACS 4.7.15d. g> TIA First, you can call any C function from Ada by importing it, so you can always solve the problem the same way you would approach it in C. Probably the toughest decision is how to actually share the binary data between Matlab and Ada (or C). If you can get your applications to read and write a common format, this can be used for sharing, either via files or the network. What about simply writing tha data to file and share the files? The Distributed Systems Annex can be used for sharing data between Ada applications running on different computers if you have an implementation of it for your compiler. Otherwise, you can exchange your data with sockets or COM/DCOM. The AdaSockets package makes it relatively easy to build Ada applications which use sockets. Don't know if it works with your compiler, though. -- Strange attractors stole my wife