how to detect voltage on a pin of the serial interface?

From: <emanuele.lombardi_at_casaccia.enea.it>
Date: Wed, 18 Oct 2000 10:45:19 +0200 (MET DST)

Hi alpha gurus,
 today I need to check the presence of electric voltage on a pin of the
 serial interface of a alpha machine running 5.0a.

 The reason is that my UPS five minutes before "death" zeroes the
 voltage on a known pin of the serial interface. I would like to have a
 daemon checking the pin and, as soon as there is no more voltage,
 broadcast a shutdown command to all my machine (via rsh or ssh).

 I guess a C program should be able to test the presence of the voltage
 on the pin, but I have no knolewdge about this topic so I ask your
 help.
 I only need a piece of code which returns 1 or 0 according to the
 voltage level on the pin. From that code I will (I hope) be able to do
 the rest.

Thank you very much,
Ciao from Italy,
Emanuele

-- 
$$$ Emanuele Lombardi
$$$ mail:  AMB-GEM-CLIM ENEA Casaccia
$$$        I-00060 S.M. di Galeria (RM)  ITALY
$$$ mailto:emanuele.lombardi_at_casaccia.enea.it
$$$ tel	+39 06 30483366 fax	+39 06 30483591
$$$
$$$                                |||
$$$                                \|/  ;_;
$$$ What does a process need        |   /"\
$$$ to become a daemon ?            |   \v/
$$$                                 |    | 
$$$ - a fork                        o---/!\---
$$$                                 |   |_|
$$$                                 |  _/ \_
$$$* Contrary to popular belief, UNIX is user friendly.
$$$  It's just very particular about who it makes friends with.
$$$* Computers are not intelligent, but they think they are. 
$$$* True programmers never die, they just branch to an odd address
$$$* THIS TRANSMISSION WAS MADE POSSIBLE BY 100% RECYCLED ELECTRONS
Received on Wed Oct 18 2000 - 08:47:20 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT