Envoy Application Programming Manual

Table Of Contents
Asynchronous Line Supervisor Protocol
Envoy Application Programming Manual427159-001
10-27
Asynchronous Supervisor Programming Example
The example in Example 10-10 demonstrates the sequence involved in sending a break
signal on the line.
The example in Example 10-11
demonstrates the sequence involved in enabling and
disabling a switched line.
Example 10-10. Send a Break Signal
SUBPROC break (duration);
INT duration;
BEGIN
INT old^parm[0:1];
CALL SETMODE (lineno,set^tmout,,,old^parm);
CALL SETMODE (lineno,set^tmout,duration,0);
CALL CONTROL (lineno,snd^brk);
IF < THEN
BEGIN
! handle the error.
END;
CALL SETMODE (lineno,set^tmout,old^parm[0],old^parm[1]);
END;
Example 10-11. Enable and Disable a Switched Line
PROC enable^line;
BEGIN
ENTRY disable^line;
INT type :=1,
type := 0;
disable^line:
CALL CONTROL (lineno,set^cd + type);
IF < THEN
BEGIN
! handle the error.
END;
END;