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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ff1f0403676a2300 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.24.202 with SMTP id w10mr1697546wif.0.1344890191183; Mon, 13 Aug 2012 13:36:31 -0700 (PDT) MIME-Version: 1.0 Path: n2ni114756612win.0!nntp.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: Ada Networking (General/Design) Date: Mon, 13 Aug 2012 20:36:26 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <25fb2cbf-be17-44dd-9d95-22e9866be5a9@googlegroups.com> Reply-To: anon@anon.org NNTP-Posting-Host: 9FyW022dufj4+fYQicqKgA.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Date: 2012-08-13T20:36:26+00:00 List-Id: In <25fb2cbf-be17-44dd-9d95-22e9866be5a9@googlegroups.com>, Patrick writes: >Hi Dmitry > >I want to write applications to communicate with scientific instruments. >Some use RS232, some GPIB and some TCP/IP. > >Your feedback is helpful but a little scary too. > >Could you recommend a software project that gets socket programming >done right? To see an Ada example you just need to look at the file "g-socket.ads" aka "GNAT.Sockects" and instead of coping and editing the listed program "pingpong.adb". You can just download the text file from: http://www.rtems.info/ftp/pub/rtems/4.8.2/ada-examples-4.8.2/pingpong/pingpong.adb Then edit the line Group : constant String := "239.255.128.128"; to Group : constant String := "127.0.0.1"; then compile and run, if the 127.0.0.1 is setup as a local loopback. If you examine the code you will see a few logical errors in the listing. As for UART there was and might still be a UART I/O ada package on net or it might listed under Serial. Or you could use the Ada/C Serial_Port_driver in MaRTE_1.9. Then use the serial driver to build a GPIB interface packages.