Polling Comm Ports 
Author Message
 Polling Comm Ports

I am new to Rexx and programing in general so I guess this is the place
to ask my (probably somewhat ignorant) questions. I am trying to poll
the comm port to see if any new data has arrived. What I need to know is
how to check the port without using a LineIn, or CharIn function. The
Lines and Chars functions dont work on transient streams, and the
Stream(Port, 'S' Query Exists) Or Stream(port, 'S' Query Size) always
returns "Ready" regardless of whether there is data there or not.

Better than that, would be some sort of interupt driven, or On Comm
event, but I havent seen anything like that in any of the books I have.
Any help would be appreciated. Thanks

                                      Bill



Thu, 02 Sep 1999 03:00:00 GMT  
 Polling Comm Ports

for those that feel the overriding need to touch the registers of a com port using rexx, try
rxasync.zip on hobbes and elsewhere.



Fri, 03 Sep 1999 03:00:00 GMT  
 Polling Comm Ports

Quote:

> I am new to Rexx and programing in general so I guess this is the place
> to ask my (probably somewhat ignorant) questions. I am trying to poll
> the comm port to see if any new data has arrived. What I need to know is
> how to check the port without using a LineIn, or CharIn function. The
> Lines and Chars functions dont work on transient streams, and the
> Stream(Port, 'S' Query Exists) Or Stream(port, 'S' Query Size) always
> returns "Ready" regardless of whether there is data there or not.

> Better than that, would be some sort of interupt driven, or On Comm
> event, but I havent seen anything like that in any of the books I have.
> Any help would be appreciated. Thanks

>                                       Bill

Bill,

try one of the DLL mentioned below.

 Name     Asynchronously Communication for REXX
 Version  2.0, 26.12.1994
 Author   Ian Timms
          (see EMail Addresses)
 Distrib. Freeware
 Type     REXX DLL
 Price    -
 Note     w/ source
 Source   BBS
          Name: RXASYN20.*

 This DLL provides functions to use the ASYNC
 communications API in REXX programs. Also supported
 are some higher level functions to simplify the task
 for enabling REXX to be used as a scripting language
 for serial communications control.
 The DLL is distributed with C source code.  

 Name     RxComm - serial communication in REXX
 Version  v1.0, 12/90
 Author   Mark C. Smith
          2638 Marrietta
          Farmersvilles, Tx 75234
          USA
 Distrib. Freeware
 Type     REXX DLL
 Price    -
 Note     w/ source
 Source   BBS
          Name: RXCOMM.*

 This DLL provides some functions for serial
 communications in REXX.  

regards

--

Bernd Schemmer [TeamOS/2, Author of REXX Tips & Tricks]

--------------------------------------------------------------------------------
The opinion expressed above is that of the author and should not be
understood
or interpreted as equivalent to the opinion of Deutsche Bank AG or any
of its
subsidiary companies.
--------------------------------------------------------------------------------



Fri, 03 Sep 1999 03:00:00 GMT  
 Polling Comm Ports

Quote:

> ... I am trying to poll
> the comm port to see if any new data has arrived. ... and the
> Stream(Port, 'S' Query Exists) Or Stream(port, 'S' Query Size) always
> returns "Ready" regardless of whether there is data there or not.

   Stream(Port, 'S' Query Exists)

and

   Stream(port, 'S' Query Size)

do the same thing as

   Stream(port, 'S')

That is, returns the STATUS of the stream.
What you are looking for is

   Stream(port, 'C', 'Query Size')

and

   Stream(port, 'C', 'Query Exists')

However, this will not tell you anything usefull about comm ports. But,
if you have other rexx programs checking on existance or size of
non-transient streams, these changes will help.

--



Fri, 03 Sep 1999 03:00:00 GMT  
 Polling Comm Ports


Quote:

>I am new to Rexx and programing in general so I guess this is the place
>to ask my (probably somewhat ignorant) questions. I am trying to poll
>the comm port to see if any new data has arrived. What I need to know is
>how to check the port without using a LineIn, or CharIn function. The
>Lines and Chars functions dont work on transient streams, and the
>Stream(Port, 'S' Query Exists) Or Stream(port, 'S' Query Size) always
>returns "Ready" regardless of whether there is data there or not.

You'll have to go third party for that type of function.  Browes for
RXASYN20.ZIP for a WONDERFUL library of functions that allow your rexx
scripts to access the serial ports of your computer.  I use it quite a
bit, in everything from paging me via my motorola pager, to a fully
functional BBS...

Quote:

>Better than that, would be some sort of interupt driven, or On Comm
>event, but I havent seen anything like that in any of the books I have.
>Any help would be appreciated. Thanks

See above... Yes, interrupt is better than polling...

--

/---------------------------------------\

\---------------------------------------/



Fri, 03 Sep 1999 03:00:00 GMT  
 Polling Comm Ports

Quote:

> You'll have to go third party for that type of function.  Browes for
> RXASYN20.ZIP for a WONDERFUL library of functions that allow your rexx................
> /---------------------------------------\

> \---------------------------------------/

Thanks for the reply, Jerry, I downloaded RxAsync, and am looking It
over now
                   Bill


Sun, 05 Sep 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Comm Ports over comm 10

2. Using Comm ports in APL

3. watching comm ports

4. Linux/Unix Comm Port

5. Comm port access on NT

6. simple comm port

7. Comm Ports

8. Reading comm port?

9. Comm ports in c4

10. Comm Port detection in C4

11. Win XP and legacy comm ports and expanded memory

12. Connecting to comm port

 

 
Powered by phpBB® Forum Software