User Tools

Site Tools


cdc:nos2.source:nam5871:nvfcput

NVFCPUT

Table Of Contents

  • [00006] PROC NVFCPUT
  • [00007] NVFCPUT - PREPARE USER TEXT.
  • [00011] PREPARE USER TEXT.
  • [00057] PROC ABORT
  • [00058] PROC MESSAGE
  • [00059] PROC MOVE
  • [00060] PROC NVFCFCE
  • [00061] PROC SSTAQE
  • [00062] PROC SSTETS

Source Code

NVFCPUT.txt
  1. *DECK NVFCPUT
  2. USETEXT TEXTSS
  3. USETEXT TXTAPSS
  4. USETEXT TEXTNVF
  5. USETEXT TXTANVF
  6. PROC NVFCPUT;
  7. # TITLE NVFCPUT - PREPARE USER TEXT. #
  8.  
  9. BEGIN # NVFCPUT #
  10. #
  11. ** NVFCPUT - PREPARE USER TEXT.
  12. *
  13. * S. H. FISCHER. 81/12/04.
  14. *
  15. * THIS PROCEDURE PROCESSES TEXT LINES (TERMINAL TEXT) AND
  16. * SYNCHRONOUS SUPERVISORY MESSAGES EMANATING FROM THE INNER(I)
  17. * LAYER AND DESTINED FOR A USER. ITS MAIN FUNCTION IS TO FORMAT
  18. * THE TEXT INTO A NETWORK BLOCK AND EITHER ISSUE IT, QUEUE IT OR
  19. * DISCARD IT AS APPROPRIATE.
  20. *
  21. * PROC NVFCPUT
  22. *
  23. * ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
  24. * TRAFFIC QUEUE (*CTQ*) ENTRY (CONTAINS THE
  25. * INPUT ALLOWED FLAG).
  26. * ABHBUF[0] = APPLICATION BLOCK HEADER FOR THE TEXT OR SM
  27. * (BASED ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
  28. * MSGBUF[0] = DISPLAY CODED TEXT LINE OR SM BODY (BASED
  29. * ARRAY *APSM* IN *TXTAPSS* POINTS HERE). THE
  30. * POSSIBLE PFC/SFC VALUES FOR THE SYNCHRONOUS
  31. * SMS ARE: CTRL/DEF AND CTRL/RTC.
  32. *
  33. * EXIT ONE OR MORE OF THE FOLLOWING DEPENDING UPON THE STATE OF
  34. * THE CONNECTION, WHETHER APPLICATION BLOCK LIMIT HAS BEEN
  35. * REACHED, AND WHETHER THE CONNECTION HAS BEEN INITIALIZED:
  36. * - A NETWORK DATA BLOCK FOR THE TEXT HAS BEEN PLACED IN
  37. * THE OUTGOING TRAFFIC QUEUE (*OTQ*).
  38. * - AN ENTRY FOR THE SYNCHRONOUS SM HAS BEEN PLACED IN THE
  39. * OUTGOING TRAFFIC QUEUE (*OTQ*).
  40. * - THE TEXT OR SM HAS BEEN PLACED IN THE WAITING BLOCK
  41. * QUEUE (*WBQ*) PENDING RECEIPT OF A BLOCK ACKNOWLEDGEMENT
  42. * OR A FLOW CONTROL INITIALIZED SM FOR THE CONNECTION.
  43. * - THE TEXT OR SYNCHRONOUS SM HAS BEEN DISCARDED.
  44. *
  45. * NOTE PROCESSING IS IN ACCORDANCE WITH THE NVF/USER C-LAYER
  46. * STATE DIAGRAM.
  47. #
  48.  
  49.  
  50.  
  51.  
  52. #
  53. **** PROC NVFCPUT - XREF LIST.
  54. #
  55. XREF
  56. BEGIN
  57. PROC ABORT; # ABORT PROGRAM #
  58. PROC MESSAGE; # SEND MESSAGE TO DAYFILE #
  59. PROC MOVE; # MOVE BLOCK OF MEMORY #
  60. PROC NVFCFCE; # FIND CONNECTION ENTRY #
  61. PROC SSTAQE; # ACCEPT QUEUE ENTRY #
  62. PROC SSTETS; # ENLARGE TABLE SPACE #
  63. END
  64. #
  65. ****
  66. #
  67.  
  68.  
  69.  
  70.  
  71. ITEM J I; # SCRATCH #
  72. ITEM I I; # LOOP VARIABLE #
  73. ITEM NEWACN B; # TRUE IF ACN NOT FOUND IN ACN LIST #
  74. ITEM AE I; # ORD OF MATCHED ACN LIST ENTRY #
  75. ITEM ACNN I; # ACN OF ENTRY #
  76. ITEM ROUT I; # ORDINAL OF ENTRY LOCATED IN WBQ #
  77.  
  78.  
  79.  
  80.  
  81. # ADJUST BLOCK TYPE TO OUTPUT RANGE. #
  82.  
  83.  
  84.  
  85. ABHABT[0] = ABHABT[0] - 6; # (APPTTX$ - APPBLK) = 6 #
  86.  
  87. ACNN = ABHADR[0];
  88.  
  89. NVFCFCE( ACNN, AE, NEWACN );
  90.  
  91.  
  92.  
  93.  
  94. $BEGIN
  95. IF NEWACN
  96. THEN
  97. BEGIN
  98. MESSAGE( " ACN LOST - NVFCPUT", 0 );
  99. ABORT;
  100. END
  101. $END
  102. IF NEWACN
  103. THEN
  104. BEGIN
  105. RETURN; # IGNORE ENTRY #
  106. END
  107.  
  108.  
  109.  
  110.  
  111. #
  112. * MAP MSG BLOCK IN BRKCMD STATE TO ACTIVE STATE.
  113. #
  114. IF ACN$STATE[AE] EQ ACNST"BRKCMD"
  115. AND ABHABT[0] EQ APMSG
  116. THEN
  117. BEGIN
  118. ABHABT[0] = APPBLK;
  119. ACN$STATE[AE] = ACNST"ACTIVE";
  120. END
  121.  
  122.  
  123.  
  124.  
  125. #
  126. * DETERMINE IF THE CONNECTION IS IN A STATE TO KEEP THE BLOCK.
  127. *
  128. #
  129.  
  130.  
  131. IF ACN$STATE[AE] EQ ACNST"ACTIVE"
  132. OR ACN$STATE[AE] EQ ACNST"CLEARI"
  133. OR ACN$STATE[AE] EQ ACNST"BRKCMD"
  134. THEN
  135. BEGIN
  136.  
  137.  
  138.  
  139.  
  140. #
  141. * IF THE CONNECTION HAS BEEN INITIALIZED AND OUTSTANDING BLOCK
  142. * LIMIT HAS NOT BEEN REACHED THEN THE BLOCK CAN BE SENT
  143. * IMMEDIATELY. OTHERWISE THE BLOCK MUST BE QUEUED.
  144. #
  145.  
  146. IF ACN$INIT[AE]
  147. AND ACN$BLCNT[AE] LS ACN$ABL[AE]
  148. THEN
  149. BEGIN # CAN SEND BLOCK IMMEDIATELY #
  150. ABHABN[0] = ACN$ABN[AE];
  151. ACN$ABN[AE] = ACN$ABN[AE] + 1;
  152. ACN$BLCNT[AE] = ACN$BLCNT[AE] + 1;
  153. SSTAQE( P<OTQ>, WCBUF, ABHBUF, MSGBUF );
  154. END
  155. ELSE
  156. BEGIN # MUST QUEUE BLOCK #
  157.  
  158.  
  159.  
  160.  
  161. #
  162. * CMD BLOCKS CAN ONLY BE ADDED AT THE END OF THE QUEUE,
  163. * BLK AND MSG BLOCKS CAN BE APPENDED TO THE LAST BLOCK
  164. * IF IT IS A BLK BLOCK. SEARCH ONLY IF THERE IS A EXISTING
  165. * BLOCK.
  166. #
  167.  
  168. IF ABHABT[0] NQ APPCMD
  169. AND ACN$WBCNT[AE] NQ 0
  170. THEN
  171. BEGIN # MUST SEARCH QUEUE FOR LAST BLOCK #
  172. J = 0;
  173. FOR I =0 STEP WBQ$ESIZE[I]
  174. WHILE J LS ACN$WBCNT[AE]
  175. DO
  176. BEGIN
  177. IF WBQ$ABHACN[I] EQ ACNN
  178. THEN
  179. BEGIN
  180. J = J + 1;
  181. ROUT = I;
  182. END
  183. END
  184.  
  185.  
  186.  
  187.  
  188. #
  189. * IF THE LAST BLOCK IS A BLK BLOCK THEN APPEND TO THE NEW
  190. * BLOCK IF IT CAN HOLD BOTH BLOCKS AND THE CHARACTER TYPE
  191. * AND FORMAT EFFECTORS MATCH. CHANGE TYPE TO MSG IF ADDED
  192. * TEXT WAS FROM MSG BLOCK.
  193. #
  194.  
  195. IF WBQ$ABT[ROUT] EQ APPBLK
  196. AND WBQ$NCP[ROUT] EQ ABHNCP[0]
  197. AND WBQ$ACT[ROUT] EQ ABHACT[0]
  198. AND WBQ$NFE[ROUT] EQ ABHNFE[0]
  199. AND (WBQ$TLC[ROUT] + ABHTLC[0]) LQ ACN$DBZ[AE]
  200. THEN
  201. BEGIN # CAN APPEND TO THE BLOCK #
  202. J = WCB$WC[0] -2; # WORDS TO ADD #
  203. SSTETS( P<WBQ>, I, J );
  204. MOVE( J, MSGBUF[0], WBQ[I] );
  205. WBQ$ESIZE[ROUT] = WBQ$ESIZE[ROUT] + J;
  206. WBQ$TLC[ROUT] = WBQ$TLC[ROUT] + ABHTLC[0];
  207. WBQ$ABT[ROUT] = ABHABT[0];
  208. RETURN;
  209.  
  210. END
  211. END
  212. # MUST ADD BLOCK TO END OF WBQ. #
  213. SSTAQE( P<WBQ>, WCBUF, ABHBUF, MSGBUF );
  214. ACN$WBCNT[AE] = ACN$WBCNT[AE] + 1 ;
  215. END
  216. END
  217.  
  218. # ALL OTHER STATES JUST DISCARD THE BLOCK. #
  219.  
  220. END # NVFCPUT #
  221. TERM
cdc/nos2.source/nam5871/nvfcput.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator