User Tools

Site Tools


cdc:nos2.source:nam5871:cssaed

CSSAED

Table Of Contents

  • [00008] PROC CSSAED
  • [00009] CSSAED - ACTION END COMMAND
  • [00014] ACTION END COMMAND.
  • [00043] PROC SSBTBW
  • [00044] PROC SSTAQE

Source Code

CSSAED.txt
  1. *DECK CSSAED
  2. USETEXT TEXTCS;
  3. USETEXT TEXTSS;
  4. USETEXT TXCMDCS;
  5. USETEXT TXTAPSS;
  6. USETEXT TXTSUSS;
  7. USETEXT TXTSMCS;
  8. PROC CSSAED;
  9. # TITLE CSSAED - ACTION END COMMAND #
  10.  
  11. BEGIN # CSSAED #
  12.  
  13. #
  14. ** CSSAED - ACTION END COMMAND.
  15. *
  16. * C. BRION 82/05/06.
  17. *
  18. * THIS PROCEDURE PROCESSES THE END, BYE, HELLO, LOGIN, LOGOUT,
  19. * OR GOODBYE COMMANDS.
  20. *
  21. * CSSAED
  22. *
  23. * ENTRY
  24. * 1. HDRCMD[0] = COMMAND HEADER WORD.
  25. * 2. PARMS[0] = COMMAND BLOCK CONTAINING THE ORIGINAL TYPEIN
  26. * AND THE SYNTAX PARAMETER LIST.
  27. *
  28. * EXIT
  29. * 1. IF NOP:
  30. * A. CON/END/R TO THE CONNECTION TRAFFIC QUEUE
  31. * B. IF CONTROLLING NOP -- CTRL/OFF TO THE EVENT QUEUE.
  32. * 2. IF HOP:
  33. * TERMINAL TEXT TO THE CONNECTION TRAFFIC QUEUE
  34. * INDICATING ILLEGAL COMMAND.
  35. #
  36.  
  37. #
  38. **** PROC CSSAED XREF LIST
  39. #
  40.  
  41. XREF
  42. BEGIN
  43. PROC SSBTBW; # SS-TEST BIT IN WORD #
  44. PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY #
  45. END
  46. #
  47. ****
  48. #
  49.  
  50. ITEM OORD U; # OPERATOR ORDINAL #
  51. ITEM DVAR;
  52. ITEM I U; # LOOP INDUCTION VARIABLE #
  53. ITEM TNAME C(10); # TERMINAL NAME #
  54. ITEM BEGSYIX U; # START INDEX OF SYNTAX LIST#
  55. ITEM FINSYIX U; # FINAL INDEX OF SYNTAX LIST#
  56. ITEM NAPFLAG B; # NEXT APPL PRESENT FLAG #
  57. ITEM NAPINDX U; # INDEX LOC OF NAP PARAMETER#
  58. ITEM RUNNING B; # OLD RUNNING FLAG #
  59.  
  60.  
  61. #
  62. * FLG$WORD - BASED ARRAY THAT POINTS TO THE FLAG WORD INDICATING
  63. * OPERATORS RUNNING ONLINE DIAGNOSTICS.
  64. #
  65. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  66. BEGIN
  67. ITEM FW$WORD I(00,00,60);
  68. END
  69.  
  70. #
  71. * RESCMD - COMMAND RESTRICTED MESSAGE.
  72. #
  73.  
  74. ARRAY RESCMD [00:00] S(4);
  75. BEGIN
  76. ITEM RES$TXT C(00,00,20) = ["COMMAND RESTRICTED T"];
  77. ITEM RES$TXT1 C(02,00,15) = ["O NPU OPERATORS"];
  78. ITEM RES$ZERO U(03,30,30)= [0];
  79. END
  80.  
  81.  
  82.  
  83.  
  84.  
  85. OORD = HDR$OPORD[0]; # SET OCB ORDINAL #
  86.  
  87. #
  88. * IF HOP OPERATOR ENTERED COMMAND, NOT ALLOWED. SEND ERROR MSG.
  89. #
  90.  
  91. IF OC$TYPE[OORD] EQ OPTYP"HOP"
  92. THEN
  93. BEGIN
  94. ABHADR[1] = OORD;
  95. WCB$SMID[1] = SMID"TTEXT";
  96. WCB$WC[1] = 6;
  97. WCB$IAF[1] = TRUE;
  98. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],RESCMD[0]);
  99. GOTO ENDEXIT;
  100. END
  101.  
  102. #
  103. * NPU OPERATOR ENTERED COMMAND. SET UP THE WORD COUNT WORD AND ABH
  104. * WORD OF THE OUTGOING OVERLAY/TM SM THAT WILL TERMINATE ANY TEST
  105. * ON ANY NPU THAT THE ORIGIN OPERATOR MAY HAVE IN PROGRESS.
  106. *
  107. * FOR EACH NPU THAT HAS THE ORIGIN OPERATOR AS THE CURRENT OVERLAY
  108. * OPERATOR, SEND THE OVERLAY/TM SM TO TERMINATE THE TEST.
  109. * IF THE OPERATOR HAS REQUESTED A CONNECTION TO OLD AND HAS YET TO
  110. * BE CONFIRMED, SET THE CURRENT OVERLAY OPERATOR OF THE NPUCB TO AN
  111. * OUT OF RANGE VALUE SO AS TO INTERLOCK THE NPU UNTIL THE RESPONSE
  112. * TO THE REQUEST IS RECEIVED.
  113. #
  114.  
  115. WCB$WORD[1] = 0;
  116. ABHWORD[1] = 0;
  117. PFCSFC[1] = OLDTM;
  118. OLDDO[1] = OORD;
  119. ABHABT[1] = APPSUP;
  120. ABHBT[1] = APPSUP;
  121. ABHACT[1] = ACTCSNP$;
  122. ABHTLC[1] = 2;
  123. WCB$WC[1] = 3;
  124.  
  125. FOR I = 0 STEP 1 WHILE I LS CSNPCNT
  126. DO
  127. BEGIN
  128. P<FLG$WORD> = LOC(NPU$OVFLGS[I]);
  129. SSBTBW(FLG$WORD,OORD,RUNNING);
  130. IF RUNNING
  131. THEN
  132. BEGIN
  133. ABHDN[1] = NPU$NID[I];
  134. ABHSN[1] = NPU$HID[I];
  135. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  136. END
  137. END
  138.  
  139. #
  140. * SEARCH THE NPUCB-S AND FOR EACH NPU THAT THIS OPERATOR CONTROLS,
  141. * SEND AN EVENT INDICATING LOSE OF CONTROL, CLEAR THE CONTROLLING
  142. * NOP FIELD, AND IF THERE IS AN OPERATOR WITH AUTO CONTROL STATUS,
  143. * THEN ASSIGN THAT OPERATOR CONTROL OF THE NPU.
  144. #
  145. IF CSACNOP EQ OORD
  146. THEN
  147. BEGIN
  148. CSACNOP = 0;
  149. END
  150.  
  151. FOR I=0 STEP 1 WHILE I LS CSNPCNT
  152. DO
  153. BEGIN
  154. IF NPU$STAT[I] EQ SUPSTAT"SUP" AND
  155. NPU$CNOP[I] EQ OORD
  156. THEN
  157. BEGIN
  158.  
  159. WCB$WORD[1] = 3;
  160. WCB$SMID[1] = SMID"CTRLOFF";
  161. ABHSN[1] = I;
  162. TNAME = OC$TNAM[OORD];
  163. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],TNAME);
  164.  
  165. NPU$CNOP[I] = 0;
  166.  
  167. IF CSACNOP NQ 0
  168. THEN
  169. BEGIN
  170. NPU$CNOP[I] = CSACNOP;
  171.  
  172. WCB$SMID[1] = SMID"CTRLON";
  173. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],TNAME);
  174. END
  175. END
  176. END
  177.  
  178.  
  179. #
  180. * IF THE COMMAND IS END, SEARCH THE SYNTAX LIST OF PARMS FOR THE
  181. * NEXT APPLICATION NAME (NAP). IF PRESENT, INSERT INTO THE CON/
  182. * END/R PROTOCOL RESPONSE.
  183. #
  184.  
  185. IF HDR$VERB[0] EQ "END"
  186. THEN
  187. BEGIN
  188. BEGSYIX = HDR$TXWCNT[0] + 1;
  189. FINSYIX = HDR$TXWCNT[0] + HDR$SPCNT[0];
  190. NAPFLAG = FALSE;
  191. FOR I = BEGSYIX STEP 1 WHILE (I LS FINSYIX AND NOT NAPFLAG)
  192. DO
  193. BEGIN
  194. IF PAR$PCODE[I] EQ "NAP"
  195. THEN
  196. BEGIN
  197. NAPINDX = I;
  198. NAPFLAG = TRUE;
  199. END
  200. END
  201.  
  202. CONUANM[1] = 0;
  203.  
  204. IF NAPFLAG
  205. THEN
  206. CONANM[1] = PAR$ELNAME[NAPINDX];
  207.  
  208. END
  209.  
  210. ELSE
  211.  
  212. #
  213. * NOT THE END COMMAND BUT ONE OF THE OTHERS.
  214. #
  215.  
  216.  
  217. BEGIN
  218. #
  219. * IF HELLO, SET NEXT APPLICATION NAME TO LOGIN, OTHERWISE SET TO
  220. * LOGOUT.
  221. #
  222. IF HDR$VERB[0] EQ "HEL"
  223. THEN
  224. CONANM[1] = "LOGIN ";
  225. ELSE
  226. CONANM[1] = "LOGOUT ";
  227.  
  228. END
  229.  
  230. #
  231. * SET UP CON/END/R PROTOCOL RESPONSE TO C LAYER.
  232. #
  233.  
  234. WCB$SMID[1] = SMID"CONENDR";
  235. WCB$WC[1] = LCONEN + 2;
  236. ABHADR[1] = OORD;
  237. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CSSM[1]);
  238. OC$TNAM[OORD] = " ";
  239. OC$UNAM[OORD] = " ";
  240. OC$NCNT[OORD] = 0;
  241. OC$CBPD[OORD] = FALSE;
  242. OC$NTO[OORD] = FALSE;
  243. OC$WORD2[OORD] = 0;
  244.  
  245. ENDEXIT:
  246. DVAR = 1;
  247.  
  248.  
  249. END #CSSAED#
  250.  
  251. TERM
cdc/nos2.source/nam5871/cssaed.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator