User Tools

Site Tools


cdc:nos2.source:nam5871:csessm

CSESSM

Table Of Contents

  • [00007] PROC CSESSM
  • [00008] SEND SUPERVISION MESSAGE.
  • [00011] SEND SUPERVISION MESSAGE.
  • [00030] PROC CSESLE
  • [00031] PROC SSCATR
  • [00032] PROC SSBSBF
  • [00033] PROC SSTAQE
  • [00034] FUNC XCDD C(10)
  • [00035] FUNC XCHD U
  • [00131] PROC GETS INVOKED. IT IS THE FIRST TEXT SENT.

Source Code

CSESSM.txt
  1. *DECK CSESSM
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. USETEXT TXTAPSS
  5. USETEXT TXTSMCS
  6. USETEXT TXTSUSS
  7. PROC CSESSM;
  8. # TITLE - SEND SUPERVISION MESSAGE. #
  9. BEGIN
  10. #
  11. ** CSESSM - SEND SUPERVISION MESSAGE.
  12. *
  13. * D.K. ENDO 82/03/18
  14. *
  15. * THIS PROCEDURE SEND MESSAGES TO OPERATORS INDICATING THE SUPERVI-
  16. * SION OF AN NPU BY CS.
  17. *
  18. * PROC CSESSM
  19. *
  20. * ENTRY 1. SUP/IN/R, SUP/CB/R, OR SUP/IN/A SM.
  21. *
  22. * EXIT 2. ENTRIES IN THE OPERATOR RESPONSE QUEUE WITH THE
  23. * MESSAGES INFORMING SUPERVISION STATUS.
  24. #
  25. #
  26. **** PROC CSESSM - XREF LIST BEGINS.
  27. #
  28. XREF
  29. BEGIN
  30. PROC CSESLE; # SEND LOG (FILE) ENTRY #
  31. PROC SSCATR; # ACCEPT TIMER REQUEST #
  32. PROC SSBSBF; # STORE BIT FIELD #
  33. PROC SSTAQE; # ADD QUEUE ENTRY #
  34. FUNC XCDD C(10); # CONVERT DECIMAL INTEGER TO DISPLAY CODE #
  35. FUNC XCHD U; # CONVERT HEX INTEGER TO DISPLAY CODE #
  36. END
  37. #
  38. ****
  39. #
  40. DEF GOR$TXTL # 30 #; # CHAR COUNT OF -GO REQUIRED- TEXT #
  41. DEF LEM$TXTL # 70 #; # CHAR COUNT OF -LEVEL MISMATCH- TEXT #
  42. DEF LSP$TXTL # 50 #; # CHAR COUNT OF -LOST SUPERVISION- TEXT #
  43. DEF NCM$TXTL # 80 #; # CHAR COUNT OF -NCF MISMATCH- TEXT #
  44. DEF NPS$TXTL # 40 #; # CHAR COUNT OF NPU STATUS TEXT #
  45. DEF PCN$TXTL # 60 #; # CHAR COUNT OF -PREVIOUS NS/CS- TEXT #
  46. DEF SPG$TXTL # 40 #; # CHAR COUNT OF -SUPERVISION GAIN- TEXT #
  47. DEF UNS$TXTL # 50 #; # CHAR COUNT OF -UNKNOWN NPU- TEXT #
  48. DEF VLV$TXTL # 60 #; # CHAR COUNT OF -VERSION/LEVEL/VARIENT- TX#
  49.  
  50.  
  51. ITEM CNST1; # CONSTANT ---> 1 #
  52. ITEM CNST2; # CONSTANT ---> 2 #
  53. ITEM CNST3; # CONSTANT ---> 3 #
  54. ITEM NODE$ID; # NPU NODE I.D. #
  55. ITEM I; # LOOP INDUCTION VARIABLE #
  56.  
  57.  
  58. #
  59.   THIS ARRAY DEFINES A TEMPORARY FOR STORING A CHARACTER STRING TO
  60.   BE LATER PLACED IN A TEXT
  61. #
  62. ARRAY CTEMP$WORD [00:00] S(1);
  63. BEGIN
  64. ITEM CTEMP C(00,00,10);
  65. ITEM CTEMP3 C(00,42,03);
  66. END
  67.  
  68.  
  69. #
  70.   THIS ARRAY DEFINES THE -GO REQUIRED- MESSAGE TEXT THAT IS SENT
  71.   OUT WHEN A SUP/GO/R IS RECEIVED.
  72. #
  73. ARRAY GOR$TXT [00:00] S(3);
  74. BEGIN
  75. ITEM GOR$TIM C(00,00,10) = [" "];
  76. ITEM GOR$MSG C(01,00,15) = [" GO IS REQUIRED"];
  77. ITEM GOR$ZBYT U(02,30,30) = [0];
  78. END
  79.  
  80.  
  81. #
  82.   THIS ARRAY DEFINES THE -LEVEL MISMATCH- MESSAGE TEXT SENT WHEN A
  83.   SUP/IN/A SM IS SENT WITH NPU$STAT OF LEVMIS.
  84. #
  85. ARRAY LEM$TXT [00:00] S(7);
  86. BEGIN
  87. ITEM LEM$TIM C(00,00,10) =[" "];
  88. ITEM LEM$MSG C(01,00,41) =
  89. [" NCF / CCP VERSION MISMATCH, RELOAD WITH "];
  90. ITEM LEM$VE1 U(05,06,12) ;
  91. ITEM LEM$DOT C(05,18,1) = ["."];
  92. ITEM LEM$VE2 U(05,24,6);
  93. ITEM LEM$LEV C(05,30,09) = [" CCP VERSION"];
  94. ITEM LEM$ZBYT U(06,36,24) = [ 0 ];
  95. END
  96.  
  97.  
  98. #
  99.   THIS ARRAY DEFINES THE -LOST SUPERVISION- MESSAGE TEXT THAT IS
  100.   SENT OUT WHEN A SUP/CB/R IS RECEIVED.
  101. #
  102. ARRAY LSP$TXT [00:00] S(5);
  103. BEGIN
  104. ITEM LSP$TIM C(00,00,10) = [" "];
  105. ITEM LSP$MSG C(01,00,36) =
  106. [" CONNECTION BROKEN, SUPERVISION LOST"];
  107. ITEM LSP$ZBYT U(04,36,24) = [ 0 ];
  108. END
  109.  
  110.  
  111. #
  112.   THIS ARRAY DEFINES THE -NCF MISMATCH- MESSAGE TEXT SENT WHEN A
  113.   SUP/IN/A SM IS SENT AND NPU$STAT IS NCFMIS.
  114. #
  115. ARRAY NCM$TXT [00:00] S(8);
  116. BEGIN
  117. ITEM NCM$TIM C(00,00,10) =[" "];
  118. ITEM NCM$MSG C(01,00,31) =
  119. [" NCF MISMATCH/CCP NCF VERSION: "];
  120. ITEM NCM$VE1 U(04,06,18);
  121. ITEM NCM$LEV C(04,24,09) = [", LEVEL: "];
  122. ITEM NCM$LE1 U(05,18,18);
  123. ITEM NCM$VAR C(05,36,11) = [", VARIANT: "];
  124. ITEM NCM$VA1 U(06,42,18);
  125. ITEM NCM$ZBYT U(07,00,60) = [ 0 ];
  126. END
  127.  
  128.  
  129. #
  130.   THIS ARRAY DEFINES THE NPU STATUS MESSAGE THAT IS SENT WHEN THIS
  131.   PROC GETS INVOKED. IT IS THE FIRST TEXT SENT.
  132. #
  133. ARRAY NPS$TXT [00:00] S(4);
  134. BEGIN
  135. ITEM NPS$TIM C(00,00,10);
  136. ITEM NPS$NPU C(01,00,05) = ["NPU: "];
  137. ITEM NPS$NNM C(01,30,07);
  138. ITEM NPS$ST C(02,12,04) = [",AC,"];
  139. ITEM NPS$NID C(02,36,03);
  140. ITEM NPS$ZBYT1 U(02,54,06) = [ 0 ];
  141. ITEM NPS$ZBYT2 U(03,00,60) = [ 0 ];
  142. END
  143.  
  144.  
  145. #
  146.   THIS ARRAY DEFINES THE -PREVIOUS CS/NS- MESSAGE TEXT SENT WENT A
  147.   SUP/IN/R SM IS RECEIVED.
  148. #
  149. ARRAY PCN$TXT [00:00] S(6);
  150. BEGIN
  151. ITEM PCN$TIM C(00,00,10) =[" "];
  152. ITEM PCN$PCS C(01,00,19) = [" PREVIOUS CS NODE: "];
  153. ITEM PCN$PS C(02,54,03);
  154. ITEM PCN$PNC C(03,12,20) = [", PREVIOUS NS NODE: "];
  155. ITEM PCN$PL C(05,12,03);
  156. ITEM PCN$ZBYT U(05,30,30) = [ 0 ];
  157. END
  158.  
  159.  
  160. #
  161.   THIS ARRAY DEFINES THE -SUPERVISION GAINED- MESSAGE TEXT SENT WHEN
  162.   A SUP/IN/R SM IS RECEIVED.
  163. #
  164. ARRAY SPG$TXT [00:00] S(4);
  165. BEGIN
  166. ITEM SPG$TIM C(00,00,10) = [" "];
  167. ITEM SPG$MSG C(01,00,19) = [" SUPERVISION GAINED"];
  168. ITEM SPG$ZBYT1 U(02,54,06) = [ 0 ];
  169. ITEM SPG$ZBYT2 U(03,00,60) = [ 0 ];
  170. END
  171.  
  172.  
  173. #
  174.   THIS ARRAY DEFINES THE TIMER REQUEST BLOCK USED TO REPEAT THE
  175.   *NEED GO* MESSAGE IF A *GO* HAS NOT BEEN GIVEN BY AN NPU.
  176. #
  177. ARRAY TRB [00:00] S(4);
  178. BEGIN
  179. ITEM TRB$SMID U(00,00,12) = [SMID"SUPGOI"];
  180. ITEM TRB$WC U(00,48,12) = [4];
  181. ITEM TRB$DN U(01,06,08); # DESINTATION NODE #
  182. ITEM TRB$CNUM U(01,18,18); # CANCEL NUMBER #
  183. ITEM TRB$PFCSFC U(03,00,08) = [SUPGO]; # PFC SFC FOR SUP/GO #
  184. ITEM TRB$DELAY U(03,24,18) = [DTIME$]; # SEND EVERY MINUTE #
  185. ITEM TRB$QNUM U(03,42,18); # QUEUE NUMBER #
  186. END
  187.  
  188.  
  189. #
  190.   THIS ARRAY DEFINES THE -UNKNOWN NPU SUPERVISION- MESSAGE, SENT
  191.   WHEN A SUP/IN/UN SM IS RECEIVED.
  192. #
  193. ARRAY UNS$TXT [00:00] S(5);
  194. BEGIN
  195. ITEM UNS$TIM C(00,00,10) = [" "];
  196. ITEM UNS$MSG1 C(01,00,20) = [" SUPERVISION REQUEST"];
  197. ITEM UNS$MSG2 C(03,00,17) = [" FROM UNKNOWN NPU"];
  198. ITEM UNS$ZBYT U(04,42,18) = [ 0 ];
  199. END
  200.  
  201.  
  202. #
  203.   THIS ARRAY DEFINES THE -VERSION/LEVEL/VARIANT- MESSAGE TEXT SENT
  204.   WHEN A SUP/IN/R SM IS RECEIVED.
  205. #
  206. ARRAY VLV$TXT [00:00] P(7) ;
  207. BEGIN
  208. ITEM VLV$TIM C(00,00,10) = [" "];
  209. ITEM VLV$VER C(01,00,14) = [" CCP VERSION: "];
  210. ITEM VLV$VE1 U(02,24,24);
  211. ITEM VLV$LEV C(03,00,10) = [", LEVEL: "];
  212. ITEM VLV$LE1 U(04,00,24);
  213. ITEM VLV$VAR C(04,24,11) = [", VARIANT: "];
  214. ITEM VLV$VA1 U(05,30,24);
  215. ITEM VLV$ZBYT U(05,54,06) = [0];
  216. ITEM VLV$ZWRD U(06,00,60) = [0] ;
  217. END
  218. CONTROL EJECT;
  219. # #
  220. # CSESSM CODE BEGINS HERE #
  221. # #
  222. #
  223. * IF THIS SM IS SUP/IN/A THEN SET THE AUDIENCE GROUP TO TWO (HOP AND
  224. * CONTROLLING NOP) AND SET THE NODE I.D. TO THE DESTINATION NODE
  225. * VALUE, ELSE SET THE AUDIENCE GROUP TO ONE (HOP AND ALL NOP-S) AND
  226. * SET THE NODE I.D. TO THE SOURCE NODE I.D. VALUE. APPEND THE
  227. * CURRENT TIME, THE NPU NAME, AND THE NODE I.D. TO THE MESSAGE.
  228. * SEND THE MESSAGE OFF TO THE OPERATOR RESPONSE QUEUE,
  229. #
  230.  
  231.  
  232. WCB$WORD[1] = 0;
  233. WCB$WC[1] = 2 + (NPS$TXTL / 10);
  234.  
  235.  
  236. ABHWORD[1] = 0;
  237. ABHTLC[1] = NPS$TXTL;
  238.  
  239.  
  240. IF WCB$SMID[0] EQ SMID"SUPINA" OR
  241. WCB$SMID[0] EQ SMID"SUPGO" OR
  242. WCB$SMID[0] EQ SMID"SUPGOI" OR
  243. WCB$SMID[0] EQ SMID"SUPINUN"
  244. THEN
  245. BEGIN
  246. ABHADR[1] = AUDGR4$;
  247. END
  248. ELSE
  249. BEGIN
  250. ABHADR[1] = AUDGR1$;
  251. END
  252.  
  253.  
  254. IF WCB$SMID[0] EQ SMID"SUPCB" OR
  255. WCB$SMID[0] EQ SMID"SUPGO" OR
  256. WCB$SMID[0] EQ SMID"SUPINUN"
  257. THEN
  258. BEGIN
  259. NODE$ID = ABHSN[0];
  260. END
  261. ELSE
  262. BEGIN
  263. NODE$ID = ABHDN[0];
  264. END
  265.  
  266.  
  267. NPS$TIM[0] = CTM$CLOCK;
  268.  
  269.  
  270. FOR I=0 STEP 1 WHILE NODE$ID NQ NPU$NID[I] AND
  271. I LS CSNPCNT
  272. DO
  273. BEGIN
  274. END
  275.  
  276. CNST1 = 1;
  277. CNST2 = 30;
  278. CNST3 = 42;
  279.  
  280. IF I LS CSNPCNT
  281. THEN
  282. BEGIN
  283. IF (WCB$SMID[0] EQ SMID"SUPGO" OR WCB$SMID[0] EQ SMID"SUPGOI")
  284. AND NPU$CNOP[I] EQ 0
  285. THEN
  286. BEGIN
  287. ABHADR[1] = AUDGR2$;
  288. END
  289. SSBSBF(NPS$TXT,CNST1,CNST2,CNST3,B<0,42>NPU$WORD[I]);
  290. END
  291. ELSE
  292. BEGIN
  293. SSBSBF(NPS$TXT,CNST1,CNST2,CNST3," UNKNOWN");
  294. END
  295.  
  296. #
  297. * IF THIS SM IS AN INTERNAL SUP/GO REQUEST AND A GO WAS ALREADY
  298. * RECEIVED(GO FLAG IS NOT SET), THEN EXIT.
  299. #
  300. IF WCB$SMID[0] EQ SMID"SUPGOI" AND
  301. NOT NPU$GFLAG[I]
  302. THEN
  303. BEGIN
  304. RETURN; # **** RETURN **** #
  305. END
  306.  
  307.  
  308. ABHABN[1] = I;
  309. CTEMP[0] = XCDD(1000 + NODE$ID);
  310. NPS$NID[0] = CTEMP3[0];
  311.  
  312.  
  313. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],NPS$TXT[0]);
  314. CSESLE(NODE$ID,WCBUF[1],NPS$TXT);
  315.  
  316.  
  317. #
  318. * IF THIS SM IS SUP/IN/R, THEN SEND THE -SUPERVISION GAINED- MSG
  319. * OFF TO THE OPERATOR RESPONSE QUEUE.
  320. #
  321. IF WCB$SMID[0] EQ SMID"SUPINN"
  322. THEN
  323. BEGIN
  324. WCB$WC[1] = 2 + (SPG$TXTL / 10);
  325.  
  326.  
  327. ABHTLC[1] = SPG$TXTL;
  328. ABHADR[1] = AUDGR3$ ;
  329.  
  330.  
  331.  
  332.  
  333. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],SPG$TXT[0]);
  334. CSESLE(NODE$ID,WCBUF[1],SPG$TXT);
  335.  
  336.  
  337. #
  338. * CONVERT THE CCP VERSION, LEVEL, AND VARIANT VALUES AND APPEND THEM
  339. * TO THE MESSAGE TEXT AND SEND IT OFF TO THE OPERATOR RESPONSE Q.
  340. #
  341.  
  342.  
  343. VLV$VE1[0] = XCHD(SUPVCVE[0]);
  344. IF SUPVCVE[0] GQ X"0037"
  345. THEN
  346. BEGIN # CCP VERSION IS 2.4.X #
  347. V24FLAG = TRUE ;
  348. CCPVERS = XCHD(SUPVCVE[0]) ; # ACTUAL VERSION OF CCP #
  349. END
  350.  
  351.  
  352. VLV$LE1[0] = XCHD(SUPVCLE[0]);
  353.  
  354.  
  355. VLV$VA1[0] = XCHD(SUPVCVA[0]);
  356.  
  357.  
  358. WCB$WC[1] = 2 + (VLV$TXTL / 10);
  359.  
  360.  
  361. ABHTLC[1] = VLV$TXTL;
  362.  
  363.  
  364. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],VLV$TXT[0]);
  365. CSESLE(NODE$ID,WCBUF[1],VLV$TXT);
  366.  
  367.  
  368. #
  369. * AND CONVERT THE PREVIOUS CS AND NS NODE I.D.-S AND APPEND THEM TO
  370. * THE TEXT AND SEND THE TEXT OFF TO THE OPERATOR RESPONSE QUEUE.
  371. #
  372. CTEMP[0] = XCDD(1000 + SUPPS[0]);
  373. CNST1 = 2;
  374. CNST2 = 54;
  375. CNST3 = 18;
  376. SSBSBF(PCN$TXT,CNST1,CNST2,CNST3,CTEMP$WORD);
  377.  
  378.  
  379. CTEMP[0] = XCDD(1000 + SUPPL[0]);
  380. PCN$PL[0] = CTEMP3[0];
  381.  
  382.  
  383. WCB$WC[1] = 2 + (PCN$TXTL / 10);
  384. ABHTLC[1] = PCN$TXTL;
  385.  
  386.  
  387.  
  388.  
  389. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],PCN$TXT[0]);
  390. CSESLE(NODE$ID,WCBUF[1],PCN$TXT);
  391. END
  392. #
  393. * IF THIS SM IS SUP/CB/R, THEN SEND THE -LOST SUPERVISION-MESSAGE
  394. * TEXT OFF TO THE OPERATOR RESPONSE QUEUE.
  395. #
  396. ELSE IF WCB$SMID[0] EQ SMID"SUPCB"
  397. THEN
  398. BEGIN
  399.  
  400.  
  401. WCB$WC[1] = 2 + (LSP$TXTL / 10);
  402. ABHTLC[1] = LSP$TXTL;
  403. ABHADR[1] = AUDGR3$ ;
  404.  
  405.  
  406. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],LSP$TXT);
  407. CSESLE(NODE$ID,WCBUF[1],LSP$TXT);
  408. END
  409. #
  410. * IF THIS SM IS SUP/IN/A, THEN SEND THE -NCF/CCP MISMATC TEXT TO
  411. * THE OPERATOR RESPONSE QUEUE.
  412. #
  413. ELSE IF WCB$SMID[0] EQ SMID"SUPINA"
  414. THEN
  415. IF NPU$STAT[I] EQ SUPSTAT"NCFMIS" THEN
  416. BEGIN
  417.  
  418.  
  419. NCM$VE1[0] = XCHD(SUPVCVE[0]);
  420.  
  421.  
  422. NCM$LE1[0] = XCHD(SUPVCLE[0]);
  423.  
  424.  
  425. NCM$VA1[0] = XCHD(SUPVCVA[0]);
  426.  
  427.  
  428. WCB$WC[1] = 2 + (NCM$TXTL / 10);
  429. ABHTLC[1] = NCM$TXTL;
  430.  
  431.  
  432. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],NCM$TXT);
  433. CSESLE(NODE$ID,WCBUF[1],NCM$TXT);
  434. END
  435. ELSE # NPU$STAT EQ SUPSTAT"LEVMIS" #
  436. BEGIN
  437.  
  438. LEM$VE1[0] = XCHD(B<4,8>SUPVCVE[0]); # SET HIGH LEVEL NUM #
  439.  
  440. LEM$VE2[0] = B<12,6>CSNCFLEV; # LST DIGIT OF NCF LVL TO MSG #
  441.  
  442. WCB$WC[1] = 2 + (LEM$TXTL / 10);
  443. ABHTLC[1] = LEM$TXTL;
  444.  
  445. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],LEM$TXT);
  446. CSESLE(NODE$ID,WCBUF[1],LEM$TXT);
  447. END
  448.  
  449. #
  450. * IF THIS SM IS SUP/GO/R, THEN CHECK IF A -GO- HAS BEEN RECEIVED
  451. * YET. IF NOT, THEN SEND THE -GO REQUIRE- MESSAGE TEXT OF TO THE
  452. * OPERATOR RESPONSE QUEUE AND MAKE A TIMER REQUEST FOR ANOTHER -GO-
  453. * MESSAGE TO BE SENT.
  454. #
  455. ELSE IF WCB$SMID[0] EQ SMID"SUPGO" OR
  456. WCB$SMID[0] EQ SMID"SUPGOI"
  457. THEN
  458. BEGIN
  459.  
  460. IF WCB$SMID[0] EQ SMID"SUPGO"
  461. THEN
  462. BEGIN
  463. NPU$GFLAG[I] = TRUE;
  464. END
  465.  
  466. IF NPU$GFLAG[I]
  467. THEN
  468. BEGIN
  469.  
  470. WCB$WC[1] = 2 +(GOR$TXTL / 10);
  471. ABHTLC[1] = GOR$TXTL;
  472.  
  473. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],GOR$TXT[0]);
  474. CSESLE(NODE$ID,WCBUF[1],GOR$TXT);
  475.  
  476. TRB$DN[0] = NODE$ID;
  477. TRB$QNUM[0] = LOC(P<EVQ>);
  478. SSCATR(TRB);
  479.  
  480. NPU$CNUM[I] = TRB$CNUM[0];
  481. END
  482. END
  483.  
  484.  
  485. #
  486.   IF THIS SM IS SUP/IN/UN, THEN SEND THE -UNKNOWN NPU- MESSAGE OFF
  487.   TO THE OPERATOR RESPONSE QUEUE.
  488. #
  489. ELSE IF WCB$SMID[0] EQ SMID"SUPINUN"
  490. THEN
  491. BEGIN
  492.  
  493. WCB$WC[1] = 2 + (UNS$TXTL / 10);
  494.  
  495. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],UNS$TXT);
  496. CSESLE(NODE$ID,WCBUF[1],UNS$TXT);
  497. END
  498.  
  499.  
  500. RETURN; # **** RETURN **** #
  501. END # CSESSM #
  502. TERM
cdc/nos2.source/nam5871/csessm.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator