comp.lang.ada
 help / color / mirror / Atom feed
* serial port programming
@ 2001-05-30 16:13 EtienneB
  2001-05-30 17:17 ` David C. Hoos, Sr.
  0 siblings, 1 reply; 8+ messages in thread
From: EtienneB @ 2001-05-30 16:13 UTC (permalink / raw)


I'd like to know if there is a way (library or anything else) to program the
serial port on a PC (is it OS dependant ?)

Thanks
Etienne Baudin





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: serial port programming
  2001-05-30 16:13 serial port programming EtienneB
@ 2001-05-30 17:17 ` David C. Hoos, Sr.
  2001-05-30 17:40   ` EtienneB
  0 siblings, 1 reply; 8+ messages in thread
From: David C. Hoos, Sr. @ 2001-05-30 17:17 UTC (permalink / raw)


It is OS-dependent -- so, naturally, that leads to the question -- which OS/

"EtienneB" <etienne.baudin@wanadoo.fr> wrote in message
news:E_8R6.2486$Au7.4142207@nnrp5.proxad.net...
> I'd like to know if there is a way (library or anything else) to program
the
> serial port on a PC (is it OS dependant ?)
>
> Thanks
> Etienne Baudin
>
>





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: serial port programming
  2001-05-30 17:17 ` David C. Hoos, Sr.
@ 2001-05-30 17:40   ` EtienneB
  2001-05-30 20:12     ` Ted Dennison
  2001-05-30 20:24     ` Stephen Leake
  0 siblings, 2 replies; 8+ messages in thread
From: EtienneB @ 2001-05-30 17:40 UTC (permalink / raw)


> It is OS-dependent -- so, naturally, that leads to the question -- which
OS/
I thought it may exist portable libs...

=>    For win9x or NT

Thanks
Etienne Baudin





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: serial port programming
  2001-05-30 17:40   ` EtienneB
@ 2001-05-30 20:12     ` Ted Dennison
  2001-05-31  3:15       ` Randy Brukardt
  2001-05-30 20:24     ` Stephen Leake
  1 sibling, 1 reply; 8+ messages in thread
From: Ted Dennison @ 2001-05-30 20:12 UTC (permalink / raw)


In article <SfaR6.2518$Fw2.4216934@nnrp5.proxad.net>, EtienneB says...
>
>I thought it may exist portable libs...
>
>=>    For win9x or NT

None that I know of (not even for non-Ada languages).

For NT there are special serial port mode setting calls you can make, which may
or may not work on 9x. You should consult a good Win32 reference manual. If you
are using Gnat, there are bindings the Win32 system calls that come with the
compiler. I believe the same goes for Aonix.

Also, there's most likely a nice, high-level way to do it with the Claw
facility.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: serial port programming
  2001-05-30 17:40   ` EtienneB
  2001-05-30 20:12     ` Ted Dennison
@ 2001-05-30 20:24     ` Stephen Leake
  2001-06-01  2:36       ` DuckE
  1 sibling, 1 reply; 8+ messages in thread
From: Stephen Leake @ 2001-05-30 20:24 UTC (permalink / raw)


"EtienneB" <etienne.baudin@wanadoo.fr> writes:

> > It is OS-dependent -- so, naturally, that leads to the question -- which
> OS/
> I thought it may exist portable libs...
> 
> =>    For win9x or NT

http://users.erols.com/leakstan/Stephe/index.html

get the "com_ports" package.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: serial port programming
  2001-05-30 20:12     ` Ted Dennison
@ 2001-05-31  3:15       ` Randy Brukardt
  2001-06-01  0:21         ` Stream IO, was " tmoran
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Brukardt @ 2001-05-31  3:15 UTC (permalink / raw)


Ted Dennison wrote in message ...
>In article <SfaR6.2518$Fw2.4216934@nnrp5.proxad.net>, EtienneB says...
>>
>>I thought it may exist portable libs...
>>
>>=>    For win9x or NT
>
>None that I know of (not even for non-Ada languages).
>
>For NT there are special serial port mode setting calls you can make,
which may
>or may not work on 9x. You should consult a good Win32 reference
manual. If you
>are using Gnat, there are bindings the Win32 system calls that come
with the
>compiler. I believe the same goes for Aonix.


The serial port mode routines do work on 9x etc.

>Also, there's most likely a nice, high-level way to do it with the Claw
>facility.


Thanks for the plug, but in fact there isn't a facility in Claw for
this. When we started building Claw, we decided to avoid creating stuff
that already exists in Ada 95. I/O clearly is in that category, although
the serial port access clearly is a special case. It would be easy
enough to build such a thing (Janus/Ada has a package for that purpose,
based on the Windows 3.1 (16-bit) version of serial access; adapting
that code to use Streams wouldn't be too hard). But, of course, we only
promise to implement new features for customers.

            Randy Brukardt
            R.R. Software, Inc.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Stream IO, was Re: serial port programming
  2001-05-31  3:15       ` Randy Brukardt
@ 2001-06-01  0:21         ` tmoran
  0 siblings, 0 replies; 8+ messages in thread
From: tmoran @ 2001-06-01  0:21 UTC (permalink / raw)


>Thanks for the plug, but in fact there isn't a facility in Claw for
>this. When we started building Claw, we decided to avoid creating stuff
>...
>that code to use Streams wouldn't be too hard).
  Directly using Stream input may block, which is often undesirable.
Claw contains a Marshalling package that makes it easy to do 'read,
'write with automatic buffers, and do the IO with a full buffer.
That's available for sockets and for the clipboard, and could be used
for serial IO equally well.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: serial port programming
  2001-05-30 20:24     ` Stephen Leake
@ 2001-06-01  2:36       ` DuckE
  0 siblings, 0 replies; 8+ messages in thread
From: DuckE @ 2001-06-01  2:36 UTC (permalink / raw)


A word of caution, this version appears to not handle overlapped I/O.  This
only comes into play if you plan on having separate tasks reading and
writing the same serial port.  If you need that capability I'm sure I can
dig up my driver that does handle overlapped I/O.

SteveD


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:uitiitwje.fsf@gsfc.nasa.gov...
> "EtienneB" <etienne.baudin@wanadoo.fr> writes:
>
> > > It is OS-dependent -- so, naturally, that leads to the question --
which
> > OS/
> > I thought it may exist portable libs...
> >
> > =>    For win9x or NT
>
> http://users.erols.com/leakstan/Stephe/index.html
>
> get the "com_ports" package.
>
> --
> -- Stephe





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-06-01  2:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-30 16:13 serial port programming EtienneB
2001-05-30 17:17 ` David C. Hoos, Sr.
2001-05-30 17:40   ` EtienneB
2001-05-30 20:12     ` Ted Dennison
2001-05-31  3:15       ` Randy Brukardt
2001-06-01  0:21         ` Stream IO, was " tmoran
2001-05-30 20:24     ` Stephen Leake
2001-06-01  2:36       ` DuckE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox