Envoy Application Programming Manual

Table Of Contents
BISYNC Multipoint Tributary Protocol
Envoy Application Programming Manual427159-001
5-40
Programming Examples
Example 5-15. Program Code for BISYNC Multipoint Tributary (Page 1 of 7)
?LMAP*
! line buffer message format (transparent text)
!
! byte
! [0] [2] [3] [4] [5] [7]
! MCW DLE STX <s> <d>,-<text>-ETX
!
! MCW = message control word
!
! s = source station identity, one byte: S = supervisor,
! 0:3 = tributary
! d = destination station identity.
!
INT termfnum, ! terminal file number.
.termbuf[0:66], ! terminal buffer.
termlen, ! terminal count read.
term^done, ! terminal completion flag.
linefnum, ! line file number.
linebuf[0:69], ! line buffer.
linelen, ! line length.
line^done; ! line completion flag.
LITERAL
linecnt = 140; ! line read count.
STRING
.stermbuf := @termbuf ’<<’ 1,
.slinebuf := @linebuf ’<<’ 1;
! useful ASCII characters.
LITERAL
STX = %02,
ETX = %03,
ENQ = %05,
DLE = %20,
SYN = %26;
! define address list.
LITERAL
addr^size = 2, ! address size in words.
num^entries = 2, ! number of address-list entries.
poll^count = 1, ! number of poll-list entries.
no^poll = %200;! sets station to "inactive."