User Tools

Site Tools


cdc:nos2.source:nam5871:csestr

CSESTR

Table Of Contents

  • [00007] PROC CSESTR
  • [00008] SEND TRUNK STATUS.
  • [00011] SEND TRUNK STATUS.
  • [00035] PROC CSESLE
  • [00036] PROC SSBSBF
  • [00037] PROC SSTAQE
  • [00038] FUNC XCHD U

Source Code

CSESTR.txt
  1. *DECK CSESTR
  2. USETEXT TEXTOV
  3. USETEXT TEXTCS
  4. USETEXT TEXTSS
  5. USETEXT TXTAPSS
  6. USETEXT TXTSMCS
  7. PROC CSESTR;
  8. # TITLE - SEND TRUNK STATUS. #
  9. BEGIN
  10. #
  11. ** CSESTR - SEND TRUNK STATUS.
  12. *
  13. * D.K. ENDO 82/03/25
  14. *
  15. * THIS ROUTINE FORMATS THE TRUNK STATUS TEXT WHEN A STU/TR/U OR A
  16. * STU/TR/N SM IS RECEIVED.
  17. *
  18. * PROC CSESTR
  19. *
  20. * ENTRY 1. STU/TR/N OR STU/TR/U SM FROM THE EVENT QUEUE
  21. *
  22. * EXIT 1. ENTRY IN THE OPERATOR RESPONSE QUEUE WITH THE
  23. * STATUS TEXT, IN THE CASE OF A STU/TR/U SM.
  24. * 2. ENTRY IN THE OPERATOR RESPONSE QUEUE WITH A MSG
  25. * BASED ON THE REASON CODE (STU/TR/U).
  26. * 3. ENTRY IN CONNECTION QUEUE WITH THE STATUS TEXT,
  27. * IN THE CASE OF STU/TR/N SM.
  28. *
  29. #
  30. #
  31. **** PROC CSESTR - XREF LIST BEGINS.
  32. #
  33. XREF
  34. BEGIN
  35. PROC CSESLE; # SEND LOG (FILE) ENTRY #
  36. PROC SSBSBF; # STORE BIT FIELD #
  37. PROC SSTAQE; # ADD QUEUE ENTRY #
  38. FUNC XCHD U; # CONVERT HEX INTEGER TO DISPLAY CODE #
  39. END
  40. #
  41. ****
  42. #
  43. DEF CDP$TXTL # 60 #; # CHAR COUNT OF CE DIAG IN PROGRESS TEXT #
  44. DEF DCA$TXTL # 50 #; # CHAR COUNT OF DUPLICATE CLA ADDR TEXT #
  45. DEF IDS$TXTL # 60 #; # CHAR COUNT OF IN DESIRED STATE TEXT #
  46. DEF LPC$TXTL # 50 #; # CHAR COUNT OF LAST PATH TO A CS TEXT #
  47. DEF NLC$TXTL # 50 #; # CHAR COUNT OF NO LIP CONFIGURED TEXT #
  48. DEF TRS$TXTL # 60 #; # CHAR COUNT OF TRUNK STATUS TEXT #
  49.  
  50. ITEM CNST1; # CONSTANT ---> 1 #
  51. ITEM CNST2; # CONSTANT ---> 2 #
  52. ITEM CNST3; # CONSTANT ---> 3 #
  53. ITEM I; # LOOP INDUCTION VARIABLE #
  54. ITEM ITEMP U; # UNSIGNED INTEGER TEMPORARY #
  55. ITEM J; # LOOP INDUCTION VARIABLE #
  56. ITEM NID2; # TEMPORARY FOR THE NODE I.D. OF NPU2 #
  57. ITEM P2; # TEMPORARY FOR THE P2 VALUE #
  58. #
  59.   THIS ARRAY DEFINES THE -CE DIAG IN PROGRESS- TEXT. THIS MESSAGE
  60.   IS SENT WHEN A STU/TR/U SM IS RECEIVED AND THE REASON CODE IS SET
  61.   TO SEVEN.
  62. #
  63. ARRAY CDP$TXT [00:00] S(6);
  64. BEGIN
  65. ITEM CDP$TIM C(00,00,10) = [" "];
  66. ITEM CDP$TRK C(01,00,07) = ["TRUNK: "];
  67. ITEM CDP$TNM C(01,42,07);
  68. ITEM CDP$MSG C(02,24,26) = [", CE DIAG TEST IN PROGRESS"];
  69. ITEM CDP$ZBYT U(05,00,60) = [0];
  70. END
  71. #
  72. * THIS ARRAY IS USED TO SAVE THE CURRENT TRUNK NAME.
  73. #
  74. ARRAY CRNT$TNM [00:00] S(1);
  75. BEGIN
  76. ITEM CRNT$TRK C(00,18,07);
  77. END
  78. #
  79.   THIS ARRAY DEFINES THE -DUPLICATE CLA ADDRESS- MESSAGE TEXT. THIS
  80.   IS SENT WHEN A STU/TR/U SM IS RECEIVED WITH A REASON CODE SET TO
  81.   SIX.
  82. #
  83. ARRAY DCA$TXT [00:00] S(5);
  84. BEGIN
  85. ITEM DCA$TIM C(00,00,10) = [" "];
  86. ITEM DCA$TRK C(01,00,07) = ["TRUNK: "];
  87. ITEM DCA$TNM C(01,42,07);
  88. ITEM DCA$MSG C(02,24,23) = [", DUPLICATE CLA ADDRESS"];
  89. ITEM DCA$ZBYT U(04,42,18) = [ 0 ];
  90. END
  91. #
  92.   THIS BASED ARRAY IS USED TO POINT TO THE MESSAGE TEXT THAT WILL BE
  93.   SENT WHEN A STU/TR/U SM IS RECEIVED AND THE REASON CODE IS NON-
  94.   ZERO.
  95. #
  96. BASED ARRAY ERR$MSG [00:00] S(4);
  97. BEGIN
  98. ITEM EMS$TIM C(00,00,10);
  99. ITEM EMS$TNM C(01,42,07);
  100. END
  101. #
  102.   THIS ARRAY DEFINES THE -IN DESIRED STATE- MESSAGE TEXT. THIS IS
  103.   SENT WHEN A STU/TR/U SM IS RECEIVED WITH THE REASON CODE SET TO
  104.   EIGHT.
  105. #
  106. ARRAY IDS$TXT [00:00] S(6);
  107. BEGIN
  108. ITEM IDS$TIM C(00,00,10) = [" "];
  109. ITEM IDS$TRK C(01,00,07) = ["TRUNK: "];
  110. ITEM IDS$TNM C(01,42,07);
  111. ITEM IDS$MSG C(02,24,26) = [", IN DESIRED STATE ALREADY"];
  112. ITEM IDS$ZBYT U(05,00,60) = [0];
  113. END
  114. #
  115.   THIS ARRAY DEFINES THE -LAST PATH TO CS- MESSAGE TEXT. THIS IS
  116.   SENT WHEN A STU/TR/U SM IS RECEIVED AND THE REASON CODE IS SET TO
  117.   FOUR.
  118. #
  119. ARRAY LPC$TXT [00:00] S(5);
  120. BEGIN
  121. ITEM LPC$TIM C(00,00,10) = [" "];
  122. ITEM LPC$TRK C(01,00,07) = ["TRUNK: "];
  123. ITEM LPC$TNM C(01,42,07);
  124. ITEM LPC$MSG C(02,24,19) = [", LAST PATH TO A CS"];
  125. ITEM LPC$ZBYT U(04,18,42) = [0];
  126. END
  127. #
  128.   THIS ARRAY DEFINES THE LINE TYPE TABLE. THE VALUES IN THIS TABLE
  129.   MAP DIRECTLY TO THE NUMERICAL VALUE IN THE SM.
  130. #
  131. DEF MX$LT # 12 #;
  132. ARRAY LT$TABLE [01:MX$LT] S(1);
  133. BEGIN
  134. ITEM LT$VAL C(00,00,02) = ["S1",
  135. "S2",
  136. "S3",
  137. ,,
  138. "A1",
  139. "A2",
  140. ,
  141. "A6",
  142. "H1",
  143. "S4",
  144. "H2",
  145. ];
  146. END
  147. #
  148.   THIS ARRAY DEFINES THE -NO LIP CONFIGURED- MESSAGE TEXT. THIS IS
  149.   SENT WHEN A STU/TR/U IS RECEIVED AND THE REASON CODE IS SET TO
  150.   FIVE.
  151. #
  152. ARRAY NLC$TXT [00:00] S(5);
  153. BEGIN
  154. ITEM NLC$TIM C(00,00,10) = [" "];
  155. ITEM NLC$TRK C(01,00,07) = ["TRUNK: "];
  156. ITEM NLC$TNM C(01,42,07);
  157. ITEM NLC$MSG C(02,24,20) = [", LIP NOT CONFIGURED"];
  158. ITEM NLC$ZBYT1 U(04,24,36) = [0];
  159. END
  160. #
  161.   THIS ARRAY DEFINES THE STATUS TABLE. THE VALUES IN THIS TABLE MAP
  162.   DIRECTLY TO THE NUMERIC VALUE IN THE INCOMING SM.
  163. #
  164. DEF MX$ST # 5 #;
  165. ARRAY ST$TABLE [01:MX$ST] S(1);
  166. BEGIN
  167. ITEM ST$VAL C(00,00,02) = ["NC",
  168. "DI",
  169. "DN",
  170. "EN",
  171. "AC",
  172. ];
  173. END
  174. #
  175.   THIS ARRAY DEFINES THE TRUNK STATUS TEXT. THIS IS SENT WHEN A
  176.   STU/TR/U IS RECEIVED.
  177. #
  178. ARRAY TRS$TXT [00:05] S(1);
  179. BEGIN
  180. ITEM TRS$TIM C(00,00,10);
  181. ITEM TRS$TRNK C(01,00,07) = ["TRUNK: "];
  182. ITEM TRS$TNM C(01,42,07);
  183. ITEM TRS$C1 C(02,24,01) = [","];
  184. ITEM TRS$ST C(02,30,02);
  185. ITEM TRS$C2 C(02,42,01) = [","];
  186. ITEM TRS$LT C(02,48,02);
  187. ITEM TRS$C3 C(03,00,01) = [","];
  188. ITEM TRS$NNM1 C(03,06,07);
  189. ITEM TRS$S1 C(03,48,01) = ["/"];
  190. ITEM TRS$P1 C(03,54,02);
  191. ITEM TRS$C4 C(04,06,01) = [","];
  192. ITEM TRS$NNM2 C(04,12,07);
  193. ITEM TRS$S2 C(04,54,01) = ["/"];
  194. ITEM TRS$P2 U(05,00,12);
  195. ITEM TRS$ZBYT C(05,12,48) = [0];
  196. END
  197. #
  198.   THIS ARRAY DEFINES THE NAME USED WHEN ONE CAN NOT BE FOUND.
  199. #
  200. ARRAY UNK$TXT [00:00] S(1);
  201. BEGIN
  202. ITEM UNK$NAME C(00,18,07) = ["UNKNOWN"];
  203. END
  204. CONTROL EJECT;
  205. # #
  206. # CSESTR CODE BEGINS HERE #
  207. # #
  208. #
  209. * BUILD THE TEXT THAT REPORTS THE TRUNK STATUS. SEARCH THE PHYSICAL
  210. * LINK TABLE FOR THIS TRUNK USING THE SOURCE NODE I.D OF THIS SM AND
  211. * THE PORT I.D. IF FOUND, SEARCH THE NPUCB-S FOR THE NPU OPPOSITE
  212. * THE NPU THAT SENT THIS SM. IF AN NPUCB IS FOUND THE NAME AS NPU2
  213. * OF THE TEXT, ELSE INSERT -UNKNOWN- AS THE NAME. CONVERT P2 TO
  214. * DISPLAY CODE AND INSERT IT INTO THE TEXT. IF A PHYSICAL LINK
  215. * TABLE ENTRY WAS NOT FOUND, THEN IS -UNKNOWN- AS THE NAME OF NPU2
  216. * AND CLEAR THE P2 VALUE IN THE TEXT. SEARCH THE NPUCB-S FOR THE
  217. * NPU THAT SENT THIS MESSAGE. IF FOUND THEN INSERT THE NAME OF NPU1
  218. * INTO THE TEXT, ELSE APPEND -UNKNOWN- AS NPU1. CONVERT THE P1
  219. * VALUE AND APPEND IT TO THE TEXT. CONVERT THE STATUS AND LINE TYPE
  220. * AND APPEND THEM TO THE TEXT.
  221. #
  222. FOR I=0 STEP 1 WHILE NOT(((ABHSN[0] EQ PLX$TN1[I] AND
  223. STUP[0] EQ PLX$TP1[I]) OR
  224. (ABHSN[0] EQ PLX$TN2[I] AND
  225. STUP[0] EQ PLX$TP2[I])) AND
  226. PLX$TYPE[I]) AND
  227. I LS PLXREFL/2
  228. DO
  229. BEGIN
  230. END
  231. IF I LS PLXREFL/2
  232. THEN
  233. BEGIN
  234. IF ABHSN[0] EQ PLX$TN1[I]
  235. THEN
  236. BEGIN
  237. NID2 = PLX$TN2[I];
  238. P2 = PLX$TP2[I];
  239. END
  240. ELSE
  241. BEGIN
  242. NID2 = PLX$TN1[I];
  243. P2 = PLX$TP1[I];
  244. END
  245. FOR J=0 STEP 1 WHILE NID2 NQ NPU$NID[J] AND
  246. J LS CSNPCNT
  247. DO
  248. BEGIN
  249. END
  250. IF J LS CSNPCNT
  251. THEN
  252. BEGIN
  253. TRS$NNM2[0] = NPU$NAME[J];
  254. END
  255. ELSE
  256. BEGIN
  257. TRS$NNM2[0] = UNK$NAME[0];
  258. END
  259. TRS$P2[0] = XCHD(X"100" + P2);
  260. CNST1 = 1;
  261. CNST2 = 42;
  262. SSBSBF(TRS$TXT,CNST1,CNST2,CNST2,B<0,42>PLX$WORD[I]);
  263. CRNT$TRK[0] = PLX$NAME[I];
  264. END
  265. ELSE
  266. BEGIN
  267. TRS$NNM2[0] = UNK$NAME[0];
  268. TRS$P2[0] = "--";
  269. CNST1 = 1;
  270. CNST2 = 42;
  271. SSBSBF(TRS$TXT,CNST1,CNST2,CNST2,UNK$TXT);
  272. CRNT$TRK[0] = UNK$NAME[0];
  273. END
  274. FOR I=0 STEP 1 WHILE ABHSN[0] NQ NPU$NID[I] AND
  275. I LS CSNPCNT
  276. DO
  277. BEGIN
  278. END
  279. IF I LS CSNPCNT
  280. THEN
  281. BEGIN
  282. TRS$NNM1[0] = NPU$NAME[I];
  283. END
  284. ELSE
  285. BEGIN
  286. TRS$NNM1[0] = UNK$NAME[0];
  287. END
  288. ITEMP = XCHD(X"100" + STUP[0]);
  289. CNST1 = 3;
  290. CNST2 = 54;
  291. CNST3 = 12;
  292. SSBSBF(TRS$TXT,CNST1,CNST2,CNST3,ITEMP);
  293. TRS$ST[0] = ST$VAL[STUSTI[0]];
  294. TRS$LT[0] = LT$VAL[STULT[0]];
  295. #
  296. * IF THIS SM IS A STU/TR/U THEN APPEND THE CURRENT TIME TO THE TEXT.
  297. * SEND IT OFF TO THE OPERATOR RESPONSE QUEUE WITH THE AUDIENCE GROUP
  298. * SET TO ONE. IF THE REASON CODE FIELD IS NON-ZERO. SELECT THE
  299. * APPROPRIATE TEXT BASED ON THE REASON CODE VALUE. SEND THE TEXT
  300. * OFF TO THE OPERATOR RESPONSE QUEUE WITH THE AUDIENCE GROUP SET
  301. * TO ONE.
  302. #
  303. IF WCB$SMID[0] EQ SMID"STUTR"
  304. THEN
  305. BEGIN
  306. TRS$TIM[0] = CTM$CLOCK[0];
  307. WCB$WORD[1] = 0;
  308. WCB$WC[1] = 2 + (TRS$TXTL / 10);
  309. ABHWORD[1] = TRS$TXTL;
  310. ABHADR[1] = AUDGR3$;
  311. ABHABN[1] = I;
  312. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],TRS$TXT[0]);
  313. CSESLE(ABHSN[0],WCBUF[1],TRS$TXT);
  314. IF STURCI[0] NQ 0
  315. THEN
  316. BEGIN
  317. IF STURCI[0] EQ RRCR"ND"
  318. THEN
  319. BEGIN
  320. P<ERR$MSG> = LOC(LPC$TXT);
  321. ABHTLC[1] = LPC$TXTL;
  322. END
  323. ELSE IF STURCI[0] EQ RRCR"NL"
  324. THEN
  325. BEGIN
  326. P<ERR$MSG> = LOC(NLC$TXT);
  327. ABHTLC[1] = NLC$TXTL;
  328. END
  329. ELSE IF STURCI[0] EQ RRCI"DC"
  330. THEN
  331. BEGIN
  332. P<ERR$MSG> = LOC(DCA$TXT);
  333. ABHTLC[1] = DCA$TXTL;
  334. END
  335. ELSE IF STURCI[0] EQ RRCR"DUC"
  336. THEN
  337. BEGIN
  338. P<ERR$MSG> = LOC(CDP$TXT);
  339. ABHTLC[1] = CDP$TXTL;
  340. END
  341. ELSE IF STURCI[0] EQ RRCR"UC"
  342. THEN
  343. BEGIN
  344. P<ERR$MSG> = LOC(IDS$TXT);
  345. ABHTLC[1] = IDS$TXTL;
  346. END
  347. WCB$WC[1] = 2 + (ABHTLC[1] / 10);
  348. CNST1 = 1;
  349. CNST2 = 42;
  350. SSBSBF(ERR$MSG,CNST1,CNST2,CNST2,CRNT$TNM);
  351. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],ERR$MSG);
  352. CSESLE(ABHSN[0],WCBUF[1],ERR$MSG);
  353. END
  354. END
  355. #
  356. * IF THIS SM IS STU/TR/N, THEN SEND THE TRUNK STATUS TEXT TO THE
  357. * C-LAYER WITH THE INPUT ALLOWED FLAG CLEARED.
  358. #
  359. ELSE # IF NOT STU/TR/U, THEN ASSUME A STU/TR/N #
  360. BEGIN
  361. WCB$WORD[1] = 0;
  362. WCB$SMID[1] = SMID"TTEXT";
  363. WCB$WC[1] = 2 + (TRS$TXTL / 10) - 1;
  364. ABHWORD[1] = 0;
  365. ABHADR[1] = ABHCN[0];
  366. ABHTLC[1] = TRS$TXTL - 10;
  367. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],TRS$TXT[1]);
  368. END
  369. RETURN; # **** RETURN **** #
  370. END # CSESTR #
  371. TERM
cdc/nos2.source/nam5871/csestr.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator