Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Entry Points |  Interaction Calls
Print Page as PDF
Routine: HLCSDL2

Package: Health Level Seven

Routine: HLCSDL2


Information

HLCSDL2 ;ALB/MTC/JC - X3.28 LOWER LAYER PROTOCOL UTILITIES 2.2 - 2/28/95 ;04/25/96 10:52

Source Information

Source file <HLCSDL2.m>

Entry Points

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

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: $C(HLNAK)_$C(HLTERM)
  • Line Location: SENDNAK+6
Function Call: WRITE
  • Prompt: $C(HLDLE)_$C(@(HLACKN))_$C(HLTERM)
  • Line Location: SENDACK+8
Function Call: WRITE
  • Prompt: $C(HLENQ)_$C(HLTERM)
  • Line Location: ENQ+4
Function Call: WRITE
  • Prompt: $C(HLEOT)_$C(HLTERM)
  • Line Location: EOT+4
Function Call: READ
  • Variable: X
  • Timeout: 1
  • Line Location: RUN+11
Function Call: WRITE
  • Prompt: !,"In State : ",HLSTATE
  • Line Location: TRACE+9
Info |  Source |  Entry Points |  Interaction Calls