Phonetics Sensaphone ISACC 5000 Manuale Utente
95
Chapter 8: C Programming
IS_ALARM
Summary:
int is_alarm(n);
int n;
Input number
Description:
The is_alarm function checks if there is an active dialout alarm on the input specified
by n. This follows the unacknowledged status on the alarm, so after the alarm is ac-
knowledged by someone, it is no longer considered an alarm even if the physical
condition is still there.
by n. This follows the unacknowledged status on the alarm, so after the alarm is ac-
knowledged by someone, it is no longer considered an alarm even if the physical
condition is still there.
Return value:
The is_alarm function returns a zero if there in no alarm on input n, or a 1 if there is
an alarm.
an alarm.
Example:
This program will set output number 3 on if input 3 is alarming. Otherwise it sets
output 3 off. When input 3 goes into alarm status, the output will be turned on. As
soon as that alarm is acknowledged by someone, the output will be turned off.
output 3 off. When input 3 goes into alarm status, the output will be turned on. As
soon as that alarm is acknowledged by someone, the output will be turned off.
main()
{
if (is_alarm(3) == 1)
{
output(3,1);
}
else
{
output(3,0);
}
}