User Tools

Site Tools


cdc:nos2.source:nam5871:csstns

CSSTNS

Table Of Contents

  • [00006] PROC CSSTNS
  • [00007] CSSTNS - TERMINATE NPU SUPERVISION
  • [00010] TERMINATE NPU SUPERVISION.
  • [00041] PROC MESSAGE
  • [00042] PROC SSTAQE
  • [00043] PROC SSBCBW
  • [00044] PROC SSBSBF
  • [00045] PROC SSBTBW
  • [00046] PROC SSCCTR

Source Code

CSSTNS.txt
  1. *DECK CSSTNS
  2. USETEXT TEXTSS
  3. USETEXT TEXTCS
  4. USETEXT TXTSMCS
  5. USETEXT TXTAPSS
  6. PROC CSSTNS;
  7. # TITLE CSSTNS - TERMINATE NPU SUPERVISION #
  8. BEGIN # CSSTNS #
  9. #
  10. ** CSSTNS - TERMINATE NPU SUPERVISION.
  11. *
  12. * C. BRION 82/04/13.
  13. *
  14. * THIS PROCEDURE PROCESSES SUPERVISION BROKEN SMS FROM NPUS.
  15. * IF CURRENT OPERATOR ACTION IS ONGOING, THE OPERATOR (S) ARE
  16. * CLEARED FROM THE NPUCB AND NOTIFIED OF THE NPUCB SITUATION.
  17. * AN EVENT MESSAGE IS ISSUED THROUGH THE EVENT PROCESSOR QUEUE
  18. * TO THE APPROPRIATE AUDIENCE GROUP.
  19. *
  20. * PROC CSSTNS
  21. *
  22. * ENTRY:
  23. * WCARY = ONE WORD CONTAINING THE WORD COUNT OF THE ENTRY.
  24. * ABHARY = APPLICATION BLOCK HEADER.
  25. * TXTARA = BODY OF THE SUPERVISION BROKEN SM.
  26. *
  27. * EXIT:
  28. * A NPU SUPERVISION LOST EVENT ISSUED IF NEEDED.
  29. * AN OPERATOR MESSAGE INFORMING OF POSSIBLE DATA LOST IS
  30. * ISSUED IF NEEDED VIA A TERMINAL TEXT QUEUE ENTRY.
  31. * A ROUTED SOLICITED STATUS EVENT TO INDICATE STATUS DONE
  32. * MAY BE ISSUED. (THIS CAUSES A READY.. MESSAGE TO THE
  33. * OPERATOR.
  34. #
  35. #
  36. **** PROC CSSTNS XREF LIST
  37. #
  38.  
  39. XREF
  40. BEGIN
  41. PROC MESSAGE;
  42. PROC SSTAQE;
  43. PROC SSBCBW; # CLEAR BIT IN WORD #
  44. PROC SSBSBF; # STORE BIT FIELD #
  45. PROC SSBTBW; # TEST BIT IN WORD #
  46. PROC SSCCTR; # CANCEL TIMER REQUEST #
  47. END
  48.  
  49. #
  50. ****
  51. #
  52.  
  53. #
  54. * DEFS
  55. #
  56.  
  57. DEF NULLSTATE$ # 99 #; # NULL STATE VALUE #
  58. DEF LDAMSGL$ # 50 #; # LOST DATA MSG LENGTH #
  59.  
  60.  
  61. #
  62. * ITEMS
  63. #
  64.  
  65. ITEM CNST1; # CONSTANT ---> 1 #
  66. ITEM CNST2; # CONSTANT ---> 2 #
  67. ITEM CNST3; # CONSTANT ---> 3 #
  68. ITEM I; # LOOP VARIABLE #
  69. ITEM OCBORD U; # OCB ORDINAL CELL #
  70. ITEM PENDING B; # COMMAND PENDING FLAG #
  71. ITEM SUCCESS B; # SET AFTER BY CANCEL TIMER #
  72. ITEM TNAME C(10); # TERMINAL NAME OF CTRL NOP #
  73.  
  74. #
  75. * ARRAYS
  76. *
  77. #
  78.  
  79. #
  80. * FLG$WORD - BASED ARRAY THAT POINTS TO THE FLAG WORDS IN THE
  81. * NPUCB.
  82. #
  83. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  84. BEGIN
  85. ITEM FW$WORD I(00,00,60);
  86. END
  87.  
  88. #
  89. * LDAMSG - LOST DATA MESSAGE.
  90. *
  91. * MESSAGE ARRAY ISSUED WHEN A POSSIBLE LOSS OF A DATA MESSAGE
  92. * MAY HAVE OCCURRED WHEN AN ONGOING ACTIVITY ON AN NPUCB IS
  93. * TERMINATED.
  94. #
  95.  
  96. ARRAY LDAMSG [00:00] S(5);
  97. BEGIN
  98. ITEM LDA$TXT1 C(00,00,05) = ["NPU: "];
  99. ITEM LDA$NAME C(00,30,07);
  100. ITEM LDA$TXT2 C(01,12,01) = [","];
  101. ITEM LDA$NID C(01,18,03);
  102. ITEM LDA$TXT3 C(01,36,27) = [",MESSAGE MAY HAVE BEEN LOST"];
  103. ITEM LDA$ZERO U(04,18,42) = [0];
  104. END
  105.  
  106.  
  107.  
  108.  
  109. CONTROL EJECT;
  110.  
  111. #
  112. * START MAIN PROCEDURE
  113. #
  114.  
  115. #
  116. * SEARCH FOR THE NPUCB WITH THE SAME NPU NODE NUMBER AND SAME
  117. * HOST NODE NUMBER. INSURE SEARCH SUCCESS BY PRESETTING THE LAST
  118. * NPUCB WITH THE SEARCH KEYS AND A NULL STATE.
  119. #
  120.  
  121. NPU$NID[CSNPCNT] = ABHSN[0];
  122. NPU$HID[CSNPCNT] = ABHDN[0];
  123. NPU$STAT[CSNPCNT] = NULLSTATE$;
  124.  
  125. FOR I = 0 STEP 1 WHILE
  126. NPU$NID[I] NQ ABHSN[0]
  127. OR NPU$HID[I] NQ ABHDN[0]
  128. DO
  129. BEGIN
  130. END
  131.  
  132. #
  133. * IF NO NPUCB WAS FOUND, THEN IGNORE THIS SM.
  134. #
  135.  
  136. IF NPU$STAT[I] EQ NULLSTATE$
  137. THEN
  138. BEGIN
  139. RETURN; # **** RETURN **** #
  140. END
  141.  
  142. ABHWORD[1] = 0; # CLEAR OUTGOING ABH WORD #
  143.  
  144. #
  145. * A GOOD SUPERVISION BROKEN SM HAS BEEN RECEIVED SINCE A NPUCB WITH
  146. * MATCHING NPU AND HOST NODE NUMBERS WAS FOUND.
  147. * CHECK IF CURRENT SEND ACTION ONGOING, CLEAR THE ACTION AND THE
  148. * SEND OPERATOR FROM THE NPUCB. INFORM THE SEND OPERATOR OF POSSIBLE
  149. * MESSAGE LOSS VIA A TERMINAL TEXT ENTRY TO THE CONNECTION TRAFFIC
  150. * QUEUE.
  151. #
  152.  
  153. IF (NPU$OPSD[I] GR 0
  154. AND NPU$OPSD[I] LQ MAXACN$)
  155. THEN
  156. BEGIN
  157. FOR OCBORD=HOPORD$ STEP 1 UNTIL MAXACN$
  158. DO
  159. BEGIN
  160. P<FLG$WORD> = LOC(NPU$SDFLGS[I]);
  161. SSBTBW(FLG$WORD,OCBORD,PENDING);
  162.  
  163. IF PENDING
  164. THEN
  165. BEGIN
  166. SSBCBW(FLG$WORD,OCBORD);
  167. OC$CNPU[OCBORD] = 0; # CLEAR NPUCB FROM OCB #
  168. OC$NCNT[OCBORD] = OC$NCNT[OCBORD] - 1; # NUM SEND NPUS #
  169.  
  170. #
  171. * SEND MESSAGE TO SEND OPERATOR.
  172. #
  173.  
  174. CNST1 = 0;
  175. CNST2 = 30;
  176. CNST3 = 42;
  177. SSBSBF(LDAMSG,CNST1,CNST2,CNST3,B<00,42>NPU$NAME[I]);
  178. LDA$NID[0] = NPU$DNID[I];
  179. WCB$SMID[1] = SMID"TTEXT";
  180. WCB$IAF[1] = TRUE; # SET INPUT ALLOWED FLAG #
  181.  
  182. #
  183. * CHECK IF MULTIPLE SEND COMMAND IN PROGRESS PRIOR TO
  184. * CLEARING THE OCB. IF MULTIPLE, SET INPUT ALLOWED FLAG TO
  185. * NOT ALLOW NEXT COMMAND. IF SEND COMMAND FINISHED,
  186. * CLEAR THE OCB VERB AND SET IAF TRUE.
  187. #
  188.  
  189. IF OC$NCNT[OCBORD] NQ 0
  190. THEN
  191. WCB$IAF[1] = FALSE;
  192. ELSE
  193. OC$UVERB[OCBORD] = 0;
  194.  
  195. ABHTLC[1] = LDAMSGL$;
  196. ABHADR[1] = OCBORD;
  197. WCB$WC[1] = (LDAMSGL$/10) + 2;
  198. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],LDAMSG);
  199. END
  200. END
  201. END
  202.  
  203. #
  204. * CLEAR SEND OPERATOR FROM NPUCB.
  205. #
  206.  
  207. NPU$OPSD[I] = 0;
  208.  
  209. #
  210. * CHECK IF ONGOING STATUS ACTIVITY ON NPUCB. IF SO, CLEAR THE
  211. * STATUS OPERATOR FROM THE NPUCB AND ISSUE A STATUS FINISHED
  212. * EVENT TO THE EVENT PROCESSOR IF THIS CLEARED NPUCB HAS
  213. * CAUSED THE NPU COUNT FOR THE STATUS OPERATOR TO REACH ZERO.
  214. * IF THE STATUS ACTIVITY IS FINISHED, CLEAR THE ACTIVE VERB
  215. * FOR THE OPERATOR.
  216. #
  217.  
  218. IF (NPU$OPST[I] GR 0
  219. AND NPU$OPST[I] LQ MAXACN$)
  220. THEN
  221. BEGIN
  222. FOR OCBORD=HOPORD$ STEP 1 UNTIL MAXACN$
  223. DO
  224. BEGIN
  225. P<FLG$WORD> = LOC(NPU$STFLGS[I]);
  226. SSBTBW(FLG$WORD,OCBORD,PENDING);
  227.  
  228. IF PENDING
  229. THEN
  230. BEGIN
  231. SSBCBW(FLG$WORD,OCBORD);
  232.  
  233. IF OC$CNPU[OCBORD] EQ I
  234. THEN
  235. OC$CNPU[OCBORD] = 0;
  236. OC$NCNT[OCBORD] = OC$NCNT[OCBORD] - 1;
  237.  
  238. IF OC$NCNT[OCBORD] EQ 0
  239. THEN
  240. BEGIN
  241. WCB$SMID[1] = SMID"STUFIN";
  242. WCB$WC[1] = 2;
  243. ABHADR[1] = OCBORD;
  244. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CSSM[1]);
  245. OC$VERB[OCBORD] = " ";
  246. END
  247. END
  248. END
  249. END # IF NPU$OPST #
  250.  
  251. NPU$OPST[I] = 0;
  252.  
  253. #
  254. * IF THERE IS A CONTROLLING NOP FOR THIS NPU, THEN CLEAR THE
  255. * CONTROLLING NOP FIELD AND SEND AN EVENT INDICATING CONTROL
  256. * IS LOST.
  257. #
  258. IF NPU$CNOP[I] NQ 0
  259. THEN
  260. BEGIN
  261. WCB$WORD[1] = 3;
  262. WCB$SMID[1] = SMID"CTRLOFF";
  263. ABHSN[1] = I;
  264. TNAME = OC$TNAM[NPU$CNOP[I]];
  265. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],TNAME);
  266.  
  267. NPU$CNOP[I] = 0;
  268. END
  269.  
  270. #
  271. * CLEAR THE OVERLAY OPERATOR FOR THE NPUCB.
  272. #
  273.  
  274. NPU$OVFLGS[I] = 0;
  275.  
  276.  
  277. #
  278. * IF REQUIRED GO IS OUTSTANDING, THEN CANCEL THE TIMER REQUEST AND
  279. * CLEAR THE GO FLAG.
  280. #
  281. IF NPU$GFLAG[I]
  282. THEN
  283. BEGIN
  284. SSCCTR(NPU$CNUM[I],SUCCESS);
  285.  
  286. NPU$GFLAG[I] = FALSE;
  287. END
  288.  
  289.  
  290. #
  291. * PREPARE A SUPERVISION LOST EVENT AND SEND TO THE EVENT PROCESS
  292. #
  293.  
  294. NPU$STAT[I] = SUPSTAT"SUPLOST"; # SET STATE OF NPUCB #
  295. ABHWORD[1] = ABHWORD[0];
  296. WCB$SMID[1] = SMID"SUPCB";
  297. WCB$WC[1] = 2;
  298. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CSSM[1]);
  299. NPU$HID[I] = 0; # CLEAR HID OF NPUCB #
  300. NPU$LRF[I] = FALSE; # CLEAR THE LOAD REQ FLAG #
  301. NPU$DMPF[I] = FALSE; # CLEAR THE DUMP FLAG #
  302.  
  303. END # CSSTNS #
  304.  
  305. TERM
  306.  
  307.  
  308.  
  309.  
  310.  
cdc/nos2.source/nam5871/csstns.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator