Envoy Application Programming Manual

Table Of Contents
BISYNC Multipoint Tributary Protocol
Envoy Application Programming Manual427159-001
5-44
Programming Examples
Example 5-15. Program Code for BISYNC Multipoint Tributary (Page 5 of 7)
! format the message.
linebuf := 0;
slinebuf[2] ’:=’ [ DLE, STX, 0 ] -> @s;
s ’:=’ array FOR length & [ETX] -> @s;
! send the message.
CALL WRITE (linefnum, linebuf, @s ’-’ @slinebuf);
CALL AWAITIO (linefnum);
IF = THEN ! done, so set poll inactive.
CALL CHANGELIST (linefnum, 0,1);
END; ! send.
! This procedure issues nowait reads on the terminal and the
! line.
!
! The command format from the terminal is:
!
! <d>,<text>
!
! <d> = destination {0:4}, <text> is message to be sent.
!
! First, the terminal is checked for a completion. If the
! completion indicates that a message is to be sent, the
! CHANGELIST procedure is called to set the station’s poll
! state to "active."
!