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-05 04:31:23 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread1.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail Message-ID: <3FA8ED93.9040607@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: socket, pipe References: <56a4b188.0311040645.64f825f7@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 05 Nov 2003 12:31:23 GMT NNTP-Posting-Host: 209.165.24.37 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.atl.earthlink.net 1068035483 209.165.24.37 (Wed, 05 Nov 2003 04:31:23 PST) NNTP-Posting-Date: Wed, 05 Nov 2003 04:31:23 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:2074 Date: 2003-11-05T12:31:23+00:00 List-Id: First, it always helps if you can identify your compiler & OS version since not all features are present in all places. For dealing with raw binary data, you probably want to investigate Ada.Streams. See your Ada Reference Manual or textbook on that. (Plenty of resources on-line) Its the way Ada tends to like to deal with raw arrays of bytes and you get plenty of facilities for getting "structured" data in and out of them. Streams can be connected up to pipes or sockets and there are ways of reading/writing files as well, so they give you lots of choices. As for the communication link, as other observe, you have lots of options. Some compilers have an interface called Win32Ada which will give you access to all of the OS calls you'd need to work with Windows. If you're already a Windows programmer, it will all look familiar. From there, you could use pipes or sockets or any of the usual Windows mechanisms. If you don't want to go to that low level (who would?) there are lots of packages (mentioned elsewhere, but none of them "Standard" as part of Ada) to do things like provide a clean interface to sockets or DCOM or whatever you're most familiar with. Depending on exactly what you're trying to accomplish, there would be advantages and disadvantages for any given approach. I tend to favor sockets because it means you can run the apps on any machines you have and the TCP/IP thing tends to be portable. Other approaches might be equally (or reasonably) portable, but it depends a lot on what you have at the other end. If you're looking for resources to get the job done, keep asking here and someone can likely point you at some freebie (or low cost) code that will do what you need. Check the Ada websites for libraries and textbooks/tutorials. Lots of help is available at no cost. (Two big ones are: http://www.adapower.com/ and http://www.adaworld.com/) MDC ghostie wrote: > I'm quite the Ada newbie. I'm really a C++ programmer. But I've been > tasked with making a change to an Ada application that we have, and > would appreciate some help getting started. Please be patient. > > We want our Ada application, while running, to share a lot of binary > information with a different application, this one written in Matlab. > Each applicaton will produce output data which will be used by the > other application. Both applications will run on Win2K PCs, and they > may or may not be on the same computer. > > Is this possible? What would be the best way to do it? I've tried > looking up some information but to be honest, I don't understand the > difference between pipes and sockets and Overlapped I/O and whatever > else is available, let alone if it is possible to do these things in > Ada. All the information I'm finding is either Unix-oriented, or else > it assumes a moderate level of knowledge (which I don't have). > My Ada compiler is DACS 4.7.15d. > > TIA -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m o d c @ a m o g c n i c . r "So if I understand 'The Matrix Reloaded' correctly, the Matrix is basically a Microsoft operating system - it runs for a while and then crashes and reboots. By design, no less. Neo is just a memory leak that's too hard to fix, so they left him in... The users don't complain because they're packed in slush and kept sedated" -- Marin D. Condic ======================================================================