HLCSDL2 ;ALB/MTC/JC - X3.28 LOWER LAYER PROTOCOL UTILITIES 2.2 - 2/28/95 ;04/25/96 10:52
Source file <HLCSDL2.m>
| Name | Comments | DBIA/ICR reference | 
|---|---|---|
| SENDNAK | ;-- This function will send an nack for the block specified
 ; by the parameter HLBK. ; OUTPUT: NONE  | 
|
| SENDACK(HLBK) | ;-- This function will send an ack for the block specified
 ; by the parameter HLBK. ; INPUT : HLBK current sequence (block) ; OUTPUT: NONE  | 
|
| READACK(HLBK) | ;-- This function will read the input device for an ackN
 ; specified by HLBK. ; INPUT : HLBK - Expected AckN ; OUTPUT: 1- Ok 0-Fails  | 
|
| RDACKQ | ||
| READENQ() | ;-- This function will read the input device for an ENQ
 | 
|
| RETRY | ||
| RDENQ | ||
| READBK(HLTEXT,LEN,BLOCK,CHKSUM,BTERM) | ; This function will read a block of data from the input device
 ; and store the result in the array specified by HLTEXT. ; INPUT : HLTEXT - Array reference to store data ; LEN - Passed by reference will get message lenght ; BLOCK - Passed by refence will get message block # ; CHKSUM - Passed by refence will get message BCC ; BTERM - Passed by reference will block termination char ; OUTPUT : 1 - OK, 0 - Fails ; If EOT is encountered HLTEXT=EOT ; If TimeOut is encountered then HLTEXT="-1^TIMEOUT"  | 
|
| BLOOP | ;-- block read loop
 | 
|
| BLOOP2 | ||
| READBKQ | ||
| BUILD(HLTEXT,HLSEQ,HLEND,HLHEAD,HLFOOT) | ;-- This function will build the block to write.
 ; INPUT : HLTEXT - Array to write/format ; : HLSEQ - Sequence in message ; : HLEND - ETX or ETB ; : HLHEAD - Passed by reference - will be the header portion ; : HLFOOT - Passed by reference - will be the footer portion  | 
|
| ENQ | ;-- this function will send an ENQ to the secondary station
 ; to establish a master/slave relationship for transmissions.  | 
|
| EOT | ;-- this function will send an EOT to the secondary station
 ; to end the master/stave relationship.  | 
|
| HEXCON(%) | ;-- converts a decimal #<128 to a two byte hex #
 ; INPUT : % - Decimal to convert  | 
|
| HEXQ | ||
| RUN() | ;-- This function will determine if this occurance of the LLP
 ; should still be running. ; INPUT : NONE  | 
|
| VALID(HLTEXT,HLBLK,LEN,BLOCK,CHKSUM,BTERM) | ;-- This function will validate the incoming message as in should
 ; conform to the X3.28 protocol. No other error checking is perfomred ; for this validation. If this function is successful a ; 1 is returned else 0. ; INPUT : HLTEXT - The block that was read in from the device ; : HLBLK - Current block expected ; : LEN - xmitted length ; : BLOCK - xmitted block number ; : CHKSUM - xmitted checksum ; : BTERM - Block termination char (ETX or ETB) ; OUTPUT : 1 ok, 0 fails  | 
|
| VALIDQ | ||
| TRACE(HLSTATE) | ;-- This function is used during for debug. It will print
 ; the current state of the X3.28 protocol. Each state is passed in ; through the variable HLSTATE  | 
| Name | Line Occurrences | 
|---|---|
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: READ | 
  | 
| Function Call: WRITE | 
  |