User Tools

Site Tools


cdc:nos2.source:nam5871:netxfrc

NETXFRC

Table Of Contents

  • [00011] PROC NETXFRC
  • [00056] PROC NP$MSG
  • [00057] PROC NP$SMSG
  • [00058] PROC NP$DATA
  • [00059] PROC NP$GET
  • [00060] PROC NP$XLOC
  • [00061] PROC NP$RCL
  • [00062] PROC NP$RTIM
  • [00063] PROC NP$STPR

Source Code

NETXFRC.txt
  1. *DECK NETXFRC
  2. *IF DEF,XFR
  3. USETEXT AIPDEF
  4. USETEXT NP$GETS
  5. USETEXT HEADER
  6. USETEXT NP$NWL
  7. USETEXT NP$TAA
  8. USETEXT NX$ACBX
  9. USETEXT NX$ACBF
  10. USETEXT NX$MSG
  11. PROC NETXFRC;
  12. #
  13. *1DC NETXFRC
  14. *
  15. * 1.PROC NAME AUTHOR DATE
  16. * NETXFRC L.T.NGUYEN 83/03/25
  17. *
  18. * 2.FUNCTINAL DESCRIPTION:
  19. * CONTINUE TO PROCESS FILE TRANSFER UNTIL ENCOUNTER
  20. * A NULL BLOCK.
  21. *
  22. * 3.METHOD :
  23. * SET MORETODO = TRUE
  24. * LOOP UNTIL MORETODO IS FALSE:
  25. * GET BLOCK FROM LIST 1.
  26. * IF BLOCK TYPE IS NULL
  27. * THEN SET MORETODO = FALSE.
  28. * ELSE
  29. * CALL PRDATA FOR APPROPRIATE ACTION BY STATE TABLE
  30. * PROCESSOR.
  31. * END OF LOOP
  32. *
  33. * GET CURRENT TIME.
  34. * CHECK FOR TIME EXPIRED.
  35. * IF TIME EXPIRED
  36. * THEN CALL STATE TABLE PROCESSOR WITH TIME OUT TRIGGER.
  37. * RETURN.
  38. *
  39. * 4.INPUT PARAMS:
  40. * FTTINDEX - INDEX INTO FTT TABLE ( GLOBAL ).
  41. *
  42. * 5.EXIT PARAMS:
  43. * NONE.
  44. *
  45. * 6.PROC CALLED:
  46. * NP$GET - TO GET BLOCK.
  47. * PRDATA - PROCESS DATA.
  48. *
  49. *
  50. *
  51. *
  52.  #
  53. BEGIN
  54. XREF
  55. BEGIN
  56. PROC NP$MSG ;
  57. PROC NP$SMSG ;
  58. PROC NP$DATA;
  59. PROC NP$GET ;
  60. PROC NP$XLOC ;
  61. PROC NP$RCL;
  62. PROC NP$RTIM ;
  63. PROC NP$STPR ;
  64. END
  65.  
  66. SWITCH ST$ORD ST$ORD0,ST$ORD1,ST$ORD2,ST$ORD3,CALL$ST,ST$ORD4 ;
  67. ITEM I ;
  68. ITEM BTRIG ;
  69. ITEM TRIGGER U ;
  70.  
  71. MORETODO = TRUE ; # ASSUMING THERE IS THINGS TO DO #
  72.  
  73. FOR I = I WHILE MORETODO AND (ID$FLAG NQ 0) AND (SD$FLAG EQ 0)
  74. AND (HEAD EQ FOOT)
  75. DO
  76. BEGIN # LOOP TO GET BLOCK #
  77. ACLN = XFR$LIST ; # GET ONLY FROM XFR (1) LIST #
  78. LOC$HA = LOC(DATA$WORD[0]); # APPL. BLOCK HEADER #
  79. LOC$TA = LOC(DATA$WORD[1]); # TEXT AREA #
  80. TLMX = MXIVT$SIZE ; # MAX BLOCK SIZE #
  81.  
  82. OPCODE = OP$GETL ;
  83. NWL[NEXT] = 0 ;
  84. NWL$TA[NEXT] = LOC$TA ;
  85. BS = OPABHSIZ ;
  86.  
  87. NP$GET ; # GO GET IT #
  88.  
  89. P<HEADER> = LOC$HA ;
  90. IF ABHABT[0] EQ APPNULL
  91. THEN
  92. MORETODO = FALSE ; # LIST FOR XFR IS EMPTY #
  93. ELSE
  94. BEGIN
  95. NP$XLOC(ABHADR[0]) ; # LOCATE THE FTT ENTRY #
  96. IF ABHABT[0] EQ APPCMD
  97. THEN
  98. NP$SMSG ;
  99. ELSE
  100. NP$DATA ; # CALL TO PROCESS APPROPRIATELY #
  101. END
  102.  
  103. END # LOOP TO GET #
  104. FOR I = 0 STEP 1 WHILE I LS MAXFILEXFR
  105. DO
  106. BEGIN # LOOP TO FIND TIME OUT CONN. #
  107. FTTINDEX = I ;
  108. P<STATUSWORD> = FTTSTATUS[I] ;
  109. IF FTTACN[I] NQ 0
  110. AND STATUSWD LQ IN$PROG # NO ERROR FOUND YET #
  111. THEN
  112. BEGIN # ACTIVE ENTRY #
  113. NP$RTIM(TIME$WORD) ;
  114. IF (FTTTIME[I] + FTTTIMOUT[I]) LQ TIME$SEC[0]
  115. THEN
  116. BEGIN # TIMEOUT DETECTED #
  117. GOTO ST$ORD[FTTSTORD[I]] ;
  118.  
  119. ST$ORD0: # SENDER/PRU #
  120. IF FTTSTATE[I] NQ NSPDATR
  121. THEN
  122. BEGIN # NOT IN DATA PHASE #
  123. TRIGGER = NRSTIMO; # TIME OUT TRIGGER #
  124. GOTO CALL$ST ;
  125. END
  126. ELSE
  127. GOTO ST$ORD4 ;
  128.  
  129. ST$ORD1: # RECEIVER/PRU #
  130. IF FTTSTATE[I] NQ NRPPRDA
  131. THEN
  132. BEGIN # NOT IN DATA PHASE #
  133. TRIGGER = NRSTIMO; # TIME OUT #
  134. GOTO CALL$ST ;
  135. END
  136. ELSE
  137. GOTO ST$ORD4 ;
  138.  
  139. ST$ORD2: TRIGGER = NSCTIMO; # SENDER/CHARACTER #
  140. GOTO CALL$ST;
  141. ST$ORD3: TRIGGER = NRCTIMO; # RECEIVER/CHARACTER #
  142. GOTO CALL$ST;
  143. CALL$ST: # READY TO CALL STATE TABLE #
  144. NP$STPR(FTTINDEX,TRIGGER,0) ;# CALL THE PROCESSOR #
  145.  
  146. ST$ORD4:
  147. #
  148.   CONTINUE THE FOR LOOP.
  149.   #
  150.  
  151. END # TIME OUT DETECTED #
  152. ELSE
  153. BEGIN # NO TIME OUT #
  154. IF FTTSTORD[I] EQ CHARSEND # CHAR SENDER #
  155. THEN
  156. BEGIN
  157. IF FTTSTATE[I] EQ NSCCABL # WAITING FOR WINDOW OPEN #
  158. THEN
  159. BEGIN
  160. NP$RCL(0); # TIME RECALL #
  161. END
  162. ELSE
  163. BEGIN
  164. IF FTTSTATE[I] EQ NSCDATA # IN DATA STATE #
  165. THEN
  166. BEGIN # IN SENDING DATA MODE #
  167. TRIGGER = NSCTSND ; # SEND TRIGGER TO STATE TABLE #
  168. FOR I = I WHILE TRIGGER NQ NIL
  169. DO
  170. BEGIN # LOOP UNTIL NO BACK TRIGGER #
  171. NP$STPR(FTTINDEX,TRIGGER,BTRIG) ;
  172. TRIGGER = BTRIG ;
  173. END
  174. END
  175. END
  176. END # ACTIVE ENTRY #
  177. END # LOOP TO FIND TIME OUT CONN. #
  178. END
  179. END
  180. RETURN;
  181. END
  182. TERM
  183. *ENDIF
cdc/nos2.source/nam5871/netxfrc.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator