TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To:
"\"\\\\\"\\\\'[\\\\\"Craig Spannring\\\\\" <[log in to unmask]>'\\\\ Servers[\\\\Craig Spannring\\\\\\\"\\\" ]" <[log in to unmask]>
Date:
Thu, 6 May 1999 07:54:02 -0600
Reply-To:
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
Content-Type:
text/plain; charset="iso-8859-1"
From:
"Martin C. Carlisle" <[log in to unmask]>
Parts/Attachments:
text/plain (99 lines)
I don't know how "nice" this binding is, but I have one with the following
spec.  Let me know if you are interested.  (Requires Win32Ada binding)

--Martin

--************************************************************************
--  serial.ads
--
--  Written by:  C1C Hugh O'Donnell
--               C1C Robin Stephens
--               Lt. Col. Joiner
--
--  Description:  This program is an example of serial port communication
--                via Win32 binding.  Must
--                       be run on a computer running Windoze 95 or Windoze NT.
--************************************************************************
with tlm_std;

package serial is

--************************************************************************
--  Function:     open
--
--  Parameters:   port : a four letter string that needs to be either
--                       COM1 or COM2
--
--  Description:  Establishes a connection to the serial port.
--************************************************************************
  procedure open(port : in string);


--************************************************************************
--  Function:     close
--
--  Parameters:   None
--
--  Description:  Terminates the connection to the serial port.
--************************************************************************
   procedure close;


--************************************************************************
--  Function:     set_up_port
--
--  Parameters:   Baud : an integer that sets the baud rate (needs to be
--                       one of these numbers:  1200, 2400, 4800, 9600)
--
--  Description:  Sets the port up with predetermined settings.
--************************************************************************
   procedure set_up_port(baud : in integer;
                         Done : OUT Boolean);

--************************************************************************
--  Function:     get
--
--  Parameters:   Item : A byte of data that is received at the serial port
--
--  Description:  Reads an item from the serial port.
--************************************************************************
   procedure get(item : out tlm_std.byte);


--************************************************************************
--  Function:     put
--
--  Parameters:   Item : A byte of data to put to the serial port
--
--  Description:  Writes an item to the serial port.
--************************************************************************
   procedure put(item : in tlm_std.byte);


--************************************************************************
--  Function:     port_status
--
--  Parameters:   None
--
--  Description:  Returns whether the port is ready to be written/read.
--************************************************************************
   function  port_status return boolean;

end serial;

-----Original Message-----
From: "Craig Spannring" <[log in to unmask]>
[mailto:[log in to unmask]]
Sent: Wednesday, May 05, 1999 11:35 PM
To: SMTP@ontime1@Servers[<[log in to unmask]>]
Subject: Ada95 library for Win32 serial communications?


I could have sworn that I saw an Ada library for doing serial
communications but I can't seem to find it now.  Does anybody know
where I can find a nice thick binding for serial communications for
Win32?


--

ATOM RSS1 RSS2