User Tools

Site Tools


cdc:nos2.source:nam5871:cssadi

CSSADI

Table Of Contents

  • [00008] PROC CSSADI
  • [00009] CSSADI - ACTION DISABLE COMMAND
  • [00013] ACTION DISABLE COMMAND.
  • [00043] FUNC SSDCDA
  • [00044] PROC SSBEBF
  • [00045] PROC MOVE
  • [00046] PROC SSBSBF
  • [00047] PROC SSTAQE
  • [00048] PROC CSESLE

Source Code

CSSADI.txt
  1. *DECK CSSADI
  2. USETEXT TEXTCS;
  3. USETEXT TEXTSS;
  4. USETEXT TXCMDCS;
  5. USETEXT TXTAPSS;
  6. USETEXT TXTSMCS;
  7. USETEXT TXTSUSS;
  8. PROC CSSADI;
  9. # TITLE CSSADI - ACTION DISABLE COMMAND #
  10.  
  11. BEGIN # CSSADI #
  12. #
  13. ** CSSADI - ACTION DISABLE COMMAND.
  14. *
  15. * C. BRION 82/04/21.
  16. *
  17. * PROC CSSADI
  18. *
  19. * ENTRY:
  20. *
  21. * HDRCMD = COMMAND HEADER WORD.
  22. *
  23. * PARMS = COMMAND PARAMETER ARRAY THAT CONTAINS THE COMMAND TEXT,
  24. * SYNTAX PARAMETER LIST AND THE ADDRESS PARAMETER LIST.
  25. *
  26. * EXIT:
  27. *
  28. * A DISABLE ELEMENT SUPERVISORY MESSAGE WILL BE SENT TO A NPU.
  29. *
  30. * THE COMMAND TEXT WILL BE ENTERED INTO THE LOG FILE.
  31. *
  32. * A READY.. MESSAGE WILL BE CAUSED TO BE SENT TO THE ORIGIN
  33. * OPERATOR.
  34. *
  35. #
  36.  
  37. #
  38. **** PROC CSSADI XREF LIST.
  39. #
  40.  
  41. XREF
  42. BEGIN
  43. FUNC SSDCDA; #SS-CONVERT DISPLAY TO ASCII#
  44. PROC SSBEBF; #SS-EXTRACT BIT FIELD#
  45. PROC MOVE; #MACREL MOVE MEMORY#
  46. PROC SSBSBF; #SS-STORE BIT FIELD#
  47. PROC SSTAQE; #SS-ACCEPT QUEUE ENTRY#
  48. PROC CSESLE ;
  49. END
  50.  
  51. #
  52. ****
  53. #
  54.  
  55. ITEM NPUORD U;
  56. ITEM ADIX U;
  57. ITEM BEGAPIX U;
  58. ITEM FINAPIX U;
  59. ITEM DORD,DBIT U;
  60. ITEM AORD,ABIT U;
  61. ITEM SINGCHAR U;
  62. ITEM ELINDX U;
  63. ITEM I U;
  64.  
  65. #
  66. * INFOELM - ARRAY THAT HOLDS INFORMATION RE: AN ELEMENT.
  67. #
  68.  
  69. ARRAY INFOELM [00:01] S(1);
  70. BEGIN
  71. ITEM INF$WORD U(00,00,60); # FULL WORD 0 REF #
  72. ITEM INF$ORD U(00,00,12); # NPU ORDINAL #
  73. ITEM INF$ADIX U(00,12,08); # INDEX VALUE FOR ADDR PARM #
  74. ITEM INF$ORDIN B(00,59,01); # NPU ORDINAL PRESENT FLAG #
  75. END
  76.  
  77. ARRAY IGNOREMSG S(6) ;
  78. BEGIN
  79. ITEM IGMSGW U(00,00,60) ;
  80. ITEM IGMSG1 C(00,00,26) =[" COMMAND IGNORED- VERSION "] ;
  81. ITEM IGMSG2 U(02,36,12) ;
  82. ITEM IGMSG3 C(02,48,30) =
  83. [" CCP UNABLE TO ACTION COMMAND "] ;
  84. ITEM IGMSG4 U(05,48,12) =[0] ;
  85. END
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94. #
  95. * INITIAILIZE INDICES AND LOCAL STORAGE.
  96. #
  97.  
  98. BEGAPIX = HDR$SPCNT[0] + HDR$TXWCNT[0]; # BEGIN ADDR LIST #
  99. FINAPIX = BEGAPIX + HDR$APCNT[0] - 1;
  100. INF$WORD[0] = 0;
  101. INF$WORD[1] = 0;
  102.  
  103. #
  104. * CHECK FOR TWO NPU ORDINALS PRESENT IN THE ADDRESS PARAMETER LIST
  105. * OF COMMAND. IF PRESENT, THEN A DISABLE OF A TRUNK OR LOGICAL LINK
  106. * COMMAND ATTEMPTED.
  107. *
  108. * SET THE LOCAL INFO ACCORDING TO THE NPU ORDINALS FOUND.
  109. #
  110.  
  111. FOR I = BEGAPIX STEP 1 UNTIL FINAPIX
  112. DO
  113.  
  114. BEGIN
  115. IF PAR$PCODE[I] EQ "NOR"
  116. THEN
  117.  
  118. BEGIN
  119. IF NOT INF$ORDIN[0] # FIRST NPU ORDINAL SEEN #
  120. THEN
  121.  
  122. BEGIN
  123. INF$ORDIN[0] = TRUE;
  124. INF$ORD[0] = PAR$ORD[I];
  125. INF$ADIX[0] = I+1; # SET INDEX FOR ADDR PARM#
  126. END
  127.  
  128. ELSE # SECOND NPU ORDINAL SEEN #
  129.  
  130. BEGIN
  131. INF$ORDIN[1] = TRUE;
  132. INF$ORD[1] = PAR$ORD[I];
  133. INF$ADIX[1] = I+1;
  134. END
  135.  
  136. END # IF PAR$PCODE EQ NOR #
  137.  
  138. END # FOR I LOOP #
  139.  
  140. #
  141. * CHECK TO SEE IF MORE THAN 1 NPU ORDINAL IN COMMAND .
  142. #
  143.  
  144. IF INF$ORDIN[0] AND INF$ORDIN[1]
  145. THEN
  146.  
  147. #
  148. * THERE ARE 2 NPU ORDINALS IN COMMAND. THE OUTGOING DISABLE SM CAN
  149. * ONLY BE SENT TO 1 NPU. THE SM IS SENT EITHER TO THE LOCAL NPU
  150. * OR IF BOTH ARE REMOTE THEN THE SM IS SENT TO THE NPU WITH THE
  151. * LOWEST NODE NUMBER.
  152. #
  153.  
  154. BEGIN
  155.  
  156. IF ((NPU$RIND[INF$ORD[0]] AND NPU$RIND[INF$ORD[1]])
  157. OR (NOT NPU$RIND[INF$ORD[0]]
  158. AND NOT NPU$RIND[INF$ORD[1]]))
  159. THEN
  160.  
  161. BEGIN
  162.  
  163. IF NPU$NID[INF$ORD[0]] LS NPU$NID[INF$ORD[1]]
  164. THEN
  165.  
  166. BEGIN
  167. NPUORD = INF$ORD[0];
  168. ADIX = INF$ADIX[0];
  169. END
  170.  
  171. ELSE
  172.  
  173. BEGIN
  174. NPUORD = INF$ORD[1];
  175. ADIX = INF$ADIX[1];
  176. END
  177.  
  178. END
  179.  
  180. ELSE # ONE NPU LOCAL #
  181.  
  182. BEGIN
  183.  
  184. IF NPU$RIND[INF$ORD[0]]
  185. THEN
  186.  
  187. BEGIN
  188. NPUORD = INF$ORD[1];
  189. ADIX = INF$ADIX[1];
  190. END
  191.  
  192. ELSE
  193.  
  194. BEGIN
  195. NPUORD = INF$ORD[0];
  196. ADIX = INF$ADIX[0];
  197. END
  198.  
  199. END
  200.  
  201. END
  202.  
  203. ELSE
  204.  
  205. #
  206. * ONLY ONE NPU ORDINAL IS IN THE COMMAND. SET ORDINAL AND ADDRESS
  207. * INDEX VALUE.
  208. #
  209.  
  210. BEGIN
  211. NPUORD = INF$ORD[0];
  212. ADIX = INF$ADIX[0];
  213. END
  214.  
  215. #
  216. * SET THE INDEX VALUE FOR THE ELEMENT KEEPING IN MIND THAT THE NOP
  217. * KEYWORD MAY CAUSE ADJUSTMENT.
  218. #
  219.  
  220. ELINDX = HDR$TXWCNT[0] + 1;
  221. IF PAR$PCODE[ELINDX] EQ "NOP"
  222. THEN
  223. ELINDX = ELINDX + 1;
  224.  
  225. #
  226. * INITIALIZE THE OUTGOING SM AND THE QUEUE ENTRY STORAGE AREAS.
  227. #
  228.  
  229. WCB$WORD[1]= 0;
  230. ABHWORD[1] = 0;
  231. SPMSG0[1] = 0;
  232. PFC[1] = DIB;
  233. ABHACT[1] = ACTCSNP$;
  234. ABHABT[1] = APPSUP;
  235. ABHBT[1] = APPSUP;
  236. ABHDN[1] = NPU$NID[NPUORD]; # DESTINATION NODE #
  237. ABHSN[1] = NPU$HID[NPUORD]; # SOURCE NODE #
  238.  
  239.  
  240. #
  241. * DETERMINE THE ELEMENT TYPE AND SET UP THE OUTGOING SM WITH THE
  242. * APPROPRIATE SM VALUES.
  243. #
  244.  
  245. IF PAR$PCODE[ELINDX] EQ "TE0" # DISABLE TERMINAL #
  246. THEN
  247.  
  248. BEGIN
  249. SFC[1] = TE;
  250.  
  251. #
  252. * CONVERT THE TERMINAL NAME FROM THE ELEMENT PARAMETER VALUE IN
  253. * THE COMMAND TO ASCII FORMAT INTO THE OUTGOING DISABLE SM.
  254. #
  255.  
  256. DORD = ELINDX;
  257. DBIT = 0;
  258. AORD = 1;
  259. ABIT = 4; # SET TO PLACE IN SM WORD 1 #
  260.  
  261. FOR I = 1 STEP 1 UNTIL 7
  262. DO
  263.  
  264. BEGIN
  265. SSBEBF(PARMS[0],DORD,DBIT,6,SINGCHAR);
  266. SINGCHAR = SSDCDA(SINGCHAR);
  267. SSBSBF(CSSM[1],AORD,ABIT,8,SINGCHAR);
  268. END
  269.  
  270. #
  271. * SET UP THE REST OF THE DISABLE TERMINAL SMAND QUEUE ENTRY.
  272. #
  273.  
  274. ABHTLC[1] = NDIBTE;
  275. WCB$SMID[1] = SMID"DIBTE";
  276. DIBP[1] = PAR$ELADDR[ADIX];
  277. WCB$WC[1] = LDIBTE + 2;
  278.  
  279. END # IF TE0 #
  280.  
  281. ELSE IF PAR$PCODE[ELINDX] EQ "LI0" # DISABLE LINE #
  282. THEN
  283.  
  284. BEGIN
  285. SFC[1] = LI;
  286. DIBP[1] = PAR$ELADDR[ADIX]; # SET PORT NUMBER IN SM #
  287. ABHTLC[1] = NDIBLI;
  288. WCB$SMID[1] = SMID"DIBLI";
  289. WCB$WC[1] = LDIBLI + 2;
  290. END
  291.  
  292. ELSE IF PAR$PCODE[ELINDX] EQ "TR0" # DISABLE TRUNK #
  293. THEN
  294.  
  295.  
  296. BEGIN
  297. SFC[1] = TR;
  298. DIBP[1] = PAR$ELADDR[ADIX]; # SET PORT NUMBER IN SM #
  299. IF PAR$PCODE[ELINDX+1] EQ "LD0"
  300. THEN
  301. BEGIN # LD PARAM SPECIFIED #
  302. IF V24FLAG
  303. THEN # AND RUNNING WITH 2.4 CCP #
  304. DIBLDF[1] = TRUE ; # SET THE LOAD FLAG #
  305. ELSE
  306. BEGIN # NOT RUNNING WITH 2.4 CCP #
  307. # SEND MESSAGE TO OPERATOR #
  308. ABHWORD[1] = 0 ;
  309. ABHTLC[1] = 6 ;
  310. ABHADR[1] = AUDGR4$ ;
  311.  
  312.  
  313. CSESLE(NPU$NID[NPUORD],8,IGMSGW[0]) ;
  314. IGMSG2[0] = CCPVERS ; # STORE VERSION TO MSG #
  315. WCB$WC[1] = 8 ;
  316.  
  317. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],IGMSGW[0]) ;
  318.  
  319. RETURN ;
  320.  
  321. END # SEND MESSAGE #
  322. END # LD PARAM SPECIFIED #
  323. ABHTLC[1] = NDIBLI;
  324. WCB$SMID[1] = SMID"DIBTR";
  325. WCB$WC[1] = LDIBLI + 2;
  326. END
  327.  
  328. ELSE IF PAR$PCODE[ELINDX] EQ "VC0" # DISABLE ARCHETYPE SVC #
  329. THEN
  330.  
  331. BEGIN
  332. SFC[1] = VC;
  333.  
  334. #
  335. * CONVERT THE ARCHETYPE SVC NAME FROM THE ELEMENT VALUE IN
  336. * THE COMMAND TO THE ASCII FORMAT INTO THE OUTGOING DISABLE SM.
  337. #
  338.  
  339. DORD = ELINDX; # BITFIELD START POSITION #
  340. DBIT = 0;
  341. AORD = 1;
  342. ABIT = 4;
  343. FOR I = 1 STEP 1 UNTIL 5
  344. DO
  345.  
  346. BEGIN
  347. SSBEBF(PARMS[0],DORD,DBIT,6,SINGCHAR); # EXTRACT BITFIELD #
  348. SINGCHAR = SSDCDA(SINGCHAR);
  349. SSBSBF(CSSM[1],AORD,ABIT,8,SINGCHAR); # STORE BITFIELD #
  350. END
  351.  
  352. #
  353. * SET UP THE REST OF THE DISABLE ARCHETYPE SVC SM
  354. #
  355.  
  356. ABHTLC[1] = NDIBVC; # LENGTH IN CHAR #
  357. DIBP[1] = PAR$ELADDR[ADIX]; # SET PORT NUMBER IN SM #
  358. FOR I = ELINDX STEP 1 UNTIL BEGAPIX
  359. DO
  360. BEGIN
  361. IF PAR$PCODE[I] EQ "NC0" # FOUND NCIR PARAMETER CODE #
  362. THEN
  363. DIBNC[1] = PAR$NCIR[I]; # STORE NO. OF SVCS TO DISABLE#
  364. END # FOR LOOP #
  365. DIBBL[1] = X"2020"; # INSERT TWO BLANKS #
  366. WCB$SMID[1] = SMID"DIBVC";
  367. WCB$WC[1] = LDIBVC + 2;
  368.  
  369. END # IF VC0 #
  370.  
  371. ELSE # DISABLE LLINK #
  372.  
  373. BEGIN
  374. SFC[1] = LL;
  375. DIBN1[1] = PAR$LLNID1[ADIX]; # SET SM COUPLER NODE NUMBER #
  376. DIBN2[1] = PAR$LLNID2[ADIX]; # SET SM NPU NODE NUMBER #
  377. ABHTLC[1] = NDIBLL;
  378. WCB$SMID[1] = SMID"DIBLL";
  379. WCB$WC[1] = LDIBLL + 2;
  380. END
  381.  
  382. #
  383. * THE OUTGOING DISABLE SM READY FOR QUEUING TO OUTPUT TRAFFIC
  384. * QUEUE.
  385. #
  386.  
  387. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  388.  
  389. #
  390. * THE COMMAND TEXT IS TO BE LOGGED INTO THE LOG FILE VIA A
  391. * SUPERVISION EVENT TO THE EVENT PROCESSOR.
  392. #
  393.  
  394. WCB$WORD[1] = 0;
  395. ABHWORD[1] = 0;
  396. WCB$SMID[1] = SMID"CMDTXT";
  397. CMD$TNAM[0] = OC$TNAM[HDR$OPORD[0]]; # SET OP TERMINAL NAME #
  398. P<MSCMD> = LOC(CMD$TEXT[0]); # SET UP FOR TEXT MOVE #
  399. MOVE(HDR$TXWCNT[0],PARMS[0],MSCMD[0]);
  400. WCB$WC[1] = HDR$TXWCNT[0] + 4;
  401. ABHTLC[1] = (HDR$TXWCNT[0] + 2) * 10; # SET CHAR LENGTH #
  402. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CMDLINE[0]);
  403.  
  404. #
  405. * SEND THE NULL TERMINAL TEXT TO THE ORIGIN OPERATOR SO AS TO
  406. * CAUSE THE READY.. MESSAGE TO BE ISSUED.
  407. #
  408.  
  409. WCB$WORD[1] = 0;
  410. ABHWORD[1] = 0;
  411. WCB$SMID[1] = SMID"TTEXT";
  412. WCB$WC[1] = 2;
  413. ABHADR[1] = HDR$OPORD[0];
  414. WCB$IAF[1] = TRUE; # INPUT ALLOWED TRUE #
  415. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CSSM[1]);
  416.  
  417. END # CSSADI #
  418. TERM
cdc/nos2.source/nam5871/cssadi.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator