comp.lang.ada
 help / color / mirror / Atom feed
From: "news.oxy.com" <Vladimir_Olensky@oxy.com>
Subject: Re: Win NT + Object Ada: serial port I/O
Date: 1999/02/03
Date: 1999-02-03T00:00:00+00:00	[thread overview]
Message-ID: <799g51$p0p$1@remarQ.com> (raw)
In-Reply-To: 79952r$2t$1@nnrp1.dejanews.com


lynch@cci.de wrote in message <79952r$2t$1@nnrp1.dejanews.com>...
>Hi,
>
>I have been asked to write a DLL which will be used to talk to a display
(LCD)
>connected via an RS-485 serial line (DIN 66 019 protocol). The card
apparently
>comes with a driver which makes it act like a standard COM-Port.


Almost all  Communication boards come with a driver that act like a standard
COM-Port.
One of the examples in industry is multiport DigiBoard product line.

>2) Use the Win32Ada binding with CreateFile, SetCommTimeouts etc. however
the
> help file provided with Object Ada is utterly useless. I have yet to find
>the section which "describes [...] the transformation rules (from C to
Ada)"
>Also the guy who will be using this DLL is worried about all the type
>conversions etc. ("why use an Ada compiler if you're writing C anyway...")


You should use Win32.hlp file instead.  It contains all the needed
information.

>Are there any alternative (higher-level) "COM-Port"-Bindings available?
>All I need to do is write a stream of ASCII characters and read characters
>with a timeout after x ms, in case somebody pulled the plug or whatever.


Probably some time in a future we will have such OO Communication Libraries.
Some time ago I suggested to RR Software (namely to Randall Brukardt) to
think about developing and including high-level OO communication library
into their future CLAW releases (to make it more closer to Delphi). Idea was
that these  OO libraries could use any available communication means (comm
ports, sockets, pipes,mailslots, memory mapped files,NetBios e.tc.) for
programs and equipment intercommunications. There are a lot of needs for
that in a real life (in telecommunications area). May be they will do this.
Maybe some others will be the first.
Later I found that all that was already implemented as Adaptive
Communication Environment (ACE) developed by
Douglas C. Washington University in Saint Louis
(http://siesta.cs.wustl.edu/~schmidt/ACE.html) .
The only problem that it was written in  C++. Maybe someone sometime will
rewrite it totaly in Ada 95.
This toolkit is freely available and may be used as an excellet example.

>If anyone has some sample code that accesses a COM-port using Object Ada
>I would be most grateful for a quick peek at it!

There are many software components for COM ports written for Borland Delphi.
Many of them  can be easily rewritten in Ada 95. It is much more easy to
translate code from Turbo Pascal to Ada 95 than from C++ to Ada.
Also that things are invaluable knowledge base of high-level OOP programming
under Windows NT.
Delphi comes with source code and is very useful in that respect.
There are also many professional communication tools from 3d party
companies.
Just have a look at (http://www.inprise.com/delphi/deltools.html)
Communication Tools section and especially to the "Async Professional"
toolkit from TurboPower Software Company.
(http://www.turbopower.com/products/) .

>(This is my second-ever
>MS-Windows project, I hope it will be my last...)


The Windows NT is not such bad thing at all. When you get grasp of it'
concepts many things will appear very simple. Windows NT programming is
definitely much more complex then DOS-like programming. It requires many
calls to low-level APIs and programmer should know them very well to write
good code. That's why Companies that make this process more easier have a
lot of success.

On the other hand Window NT is designed to make life easier for  the "end
users" and not for the programmer. It is well protected from programmers
errors and badly written applications. It  just shuts down application that
is trying to do something wrong (e.g. directly access some system resources
or other program resources). Only badly written drivers can put WindowsNT on
the knees.
Each system has it's own set of rules. If you do not obey that rules for any
reason (e.g. - you just do not know them) then you may feel frustrated quite
very often. This is just the same as with Ada.

Regards,
Vladimir Olensky
(vladimir_olensky@yahoo.com)
(Vladimir_Olensky@oxy.com)
Telecommunication specialist,
Occidental C.I.S. Service, Inc. ( www.oxy.com )
Moscow,
Russia.









  reply	other threads:[~1999-02-03  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-03  0:00 Win NT + Object Ada: serial port I/O lynch
1999-02-03  0:00 ` news.oxy.com [this message]
1999-02-04  0:00   ` lynch
1999-02-04  0:00     ` news.oxy.com
1999-02-04  0:00 ` dennison
1999-02-04  0:00   ` Tom Moran
1999-02-16  0:00   ` lynch
1999-02-16  0:00     ` dennison
1999-02-17  0:00       ` Peter Hend�n
1999-02-16  0:00     ` Steve Doiel
1999-02-16  0:00     ` dennison
1999-02-16  0:00     ` David C. Hoos, Sr.
1999-02-16  0:00       ` dennison
replies disabled

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