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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,404affbee1592ab9 X-Google-Attributes: gid103376,public From: "Vladimir Olensky" Subject: Re: Project: Free OS and Other Projects Continued Date: 2000/01/16 Message-ID: #1/1 X-Deja-AN: 573423975 References: <85q9a0$92k$1@ssauraab-i-1.production.compuserve.com> Organization: Posted via Supernews, http://www.supernews.com X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: comp.lang.ada X-Complaints-To: newsabuse@supernews.com Date: 2000-01-16T00:00:00+00:00 List-Id: Ehud Lamm wrote in message ... >On Sat, 15 Jan 2000, Michael Garrett wrote: >|What about an application like the Visual Basic IDE or Symantec's Visual >|Cafe > >As a general direction this seems to me like a very worthy goal. > >I also like some of the speicifc ideas (like patterns, and componoent >lib). Many interesting ideas are implemented in the Oberon BlackBox RAD environment. And their implementation is very well described in the documentation. Have a look at at http://www.oberon.ch/prod/BlackBox/ As far as component lib is concerned I think that a general purpose communication class library (IO subsystem) which include all available means of communications ( IPC, COMMs, sockets, set of available for use protocols ) and which is very easy to use could be very useful especially for control applications that consist of several parts running separately. I just finished such library for Named Pipes under Windows NT (now only Sync Blocking Pipes) and going to implements mailslots, memory mapped files, overlapped operations ( depending on the available time). There exists also nice serial IO package that was posted here some time ago by someone (I do not remember the author name and it was not mentioned in the package info). Below is a small example of how simple could be use of WinNT Named Pipes with such class library: ------------------------ -- Simple Echo Server: ---------------------- with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO; procedure tst_Serv_Pipe is sPipe : Server_Sync_Pipe_Type; str : Unbounded_String; begin Main_Server_Loop: loop Put_Line(To_Unbounded_String("Waiting for client connection...") ); Open_Pipe(pipe =>sPipe); loop begin Read_Pipe(sPipe,str); Put(To_Unbounded_String("Client command > ")); Put_Line(str); if (str="exit") or (str="exit1") or (str="exit2") then Write_Pipe(sPipe, str ); exit Main_Server_Loop; end if; Write_Pipe(sPipe, str ); exception when Pipe_Disconnected_Exception => Put_Line(Null_Unbounded_String); Put_Line(To_Unbounded_String(" -- Pipe_Is_Broken_Exception --")); exit; when others => exit Main_Server_Loop; end; end loop; end loop Main_Server_Loop; Close_Pipe(sPipe); end tst_Serv_Pipe; ------------------------------------------------- -- Simple Client example: -------------------------------------- with Win_IPC.Simple_Named_Pipes; use Win_IPC.Simple_Named_Pipes; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO; procedure tst_Client_Pipe is sPipe : Client_Sync_Pipe_Type; str : Unbounded_String; begin Put(To_Unbounded_String("type server name -> ")); str:=Get_Line; if str = "" then Open_Pipe(pipe => sPipe); else Open_Pipe(pipe => sPipe, Server_Name => To_String(str)); end if; loop Put(To_Unbounded_String("Input_line > ")); str:=Get_Line; if str="quit" then exit; end if; Write_Pipe(sPipe,str); Read_Pipe(sPipe,str); Put_Line("Server echo : " & str); if str="exit1" then Read_Pipe(sPipe,str); elsif str="exit2" then Put(To_Unbounded_String("Type something > ")); str:=Get_Line; Write_Pipe(sPipe,str); elsif str="exit" then exit; end if; end loop; Close_Pipe(sPipe); end tst_Client_Pipe; --------------------------------------------- -- Another Pipe Client example ---------------------------------------------- with Win_IPC.Simple_Named_Pipes; use Win_IPC.Simple_Named_Pipes; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO; procedure tst_Call_Pipe is In_Msg, Out_Msg : Unbounded_String; Server_Name : Unbounded_String; begin Put(To_Unbounded_String("type server name -> ")); Server_Name := Get_Line; if Server_Name = "" then Server_Name := To_Unbounded_String("."); end if; loop Put(To_Unbounded_String("Input_line > ")); In_Msg:=Get_Line; if In_Msg="quit" then exit; end if; Call_Pipe ( Server_Name => To_String ( Server_Name ), In_Msg => In_Msg, Out_Msg => Out_Msg); Put_Line (To_Unbounded_String("Server Response : ") & Out_Msg ); end loop; end tst_Call_Pipe; --------------------------------------------- Regards, Vladimir Olensky