User Tools

Site Tools


cdc:nos2.source:nam5871:csesll

CSESLL

Table Of Contents

  • [00007] PROC CSESLL
  • [00008] SEND LOGICAL LINK STATUS.
  • [00011] SEND LOGICAL LINK STATUS.
  • [00031] PROC CSESLE
  • [00032] PROC SSBSBF
  • [00033] PROC SSTAQE
  • [00034] FUNC XCDD C(10)

Source Code

CSESLL.txt
  1. *DECK CSESLL
  2. USETEXT TEXTOV
  3. USETEXT TEXTCS
  4. USETEXT TEXTSS
  5. USETEXT TXTAPSS
  6. USETEXT TXTSMCS
  7. PROC CSESLL;
  8. # TITLE - SEND LOGICAL LINK STATUS. #
  9. BEGIN
  10. #
  11. ** CSESLL - SEND LOGICAL LINK STATUS.
  12. *
  13. * D.K. ENDO 82/03/19
  14. *
  15. * THIS PROCEDURE FORMATS THE LOGICAL LINK MESSAGE AND SENDS IT OUT
  16. * TO THE OPERATORS.
  17. *
  18. * PROC CSESLL
  19. *
  20. * ENTRY 1. STU/LL/U, STU/LL/N, OR MSG/LL/A SM.
  21. *
  22. * EXIT 1. ENTRY IN THE OPERATOR RESPONSE QUEUE WITH THE TEXT
  23. * 2. MESSAGE TO THE C-LAYER VIA THE CONNECTION QUEUE.
  24. *
  25. #
  26. #
  27. **** PROC CSESLL - XREF LIST BEGINS.
  28. #
  29. XREF
  30. BEGIN
  31. PROC CSESLE; # SEND LOG (FILE) ENTRY #
  32. PROC SSBSBF; # STORE BIT FIELD #
  33. PROC SSTAQE; # ADD QUEUE ENTRY #
  34. FUNC XCDD C(10); # CONVERT DECIMAL INTEGER TO DISPLAY CODE #
  35. END
  36. #
  37. ****
  38. #
  39. DEF LLS$TXTL # 70 #; # CHAR COUNT OF LOGLINK STATUS TEXT #
  40. DEF LT$HN # 1 #; # LINK TYPE -- HOST-NPU #
  41. DEF MNS$TXTL # 40 #; # CHAR COUNT OF -MESSAGE NOT SENT- TEXT #
  42. DEF UNC$TXTL # 40 #; # CHAR COUNT OF -UNACTIONED COMMAND- TEXT #
  43.  
  44.  
  45. ITEM CNST ; # CONSTANT ---> 1 #
  46. ITEM CNST2; # CONSTANT ---> 2 #
  47. ITEM CNST3; # CONSTANT ---> 3 #
  48. ITEM HID1; # NODE I.D. OF LLINK SUPPORTED BY NPU1 #
  49. ITEM HID2; # NODE I.D. OF LLINK SUPPORTED BY NPU2 #
  50. ITEM I; # LOOP INDUCTION VARIABLE #
  51. ITEM J; # LOOP INDUCTION VARIABLE #
  52. ITEM NID1; # NODE I.D. ONE #
  53. ITEM NID2; # NODE I.D. TWO #
  54.  
  55.  
  56. #
  57.   THIS ARRAY IS USED AS A TEMPORARY TO STORE CHARACTER STRINGS THAT
  58.   WILL LATER BE PUT INTO A TEXT.
  59. #
  60. ARRAY CTEMP$WORD [00:00] S(1);
  61. BEGIN
  62. ITEM CTEMP C(00,00,10);
  63. ITEM CTEMP1 C(00,54,01);
  64. ITEM CTEMP3 C(00,42,03);
  65. END
  66.  
  67.  
  68. #
  69.   THIS ARRAY DEFINES THE LOGICAL LINK STATUS MESSAGE TEXT TO BE SENT
  70.   WHEN THIS PROC IS INVOKED.
  71. #
  72. ARRAY LLS$TXT [00:06] S(1);
  73. BEGIN
  74. ITEM LLS$TIM C(00,00,10);
  75. ITEM LLS$LLK C(01,00,07) = ["LLINK: "];
  76. ITEM LLS$LLN C(01,42,07);
  77. ITEM LLS$C1 C(02,24,01) = [","];
  78. ITEM LLS$ST C(02,30,02);
  79. ITEM LLS$REG C(02,42,04) = [",RL="];
  80. ITEM LLS$RL C(03,06,01);
  81. ITEM LLS$C2 C(03,12,01) = [","];
  82. ITEM LLS$LT C(03,18,03);
  83. ITEM LLS$C3 C(03,36,01) = [","];
  84. ITEM LLS$NN1 C(03,42,07);
  85. ITEM LLS$SL1 C(04,24,01) = ["/"];
  86. ITEM LLS$NID1 C(04,30,03);
  87. ITEM LLS$C4 C(04,48,01) = [","];
  88. ITEM LLS$NN2 C(04,54,07);
  89. ITEM LLS$SL2 C(05,36,01) = ["/"];
  90. ITEM LLS$NID2 C(05,42,03);
  91. ITEM LLS$ZBYT U(06,00,60) = [ 0 ];
  92. END
  93.  
  94.  
  95. #
  96.   THIS ARRAY DEFINES THE -MESSAGE NOT SENT- TEXT SENT WHEN A
  97.   MSG/LL/A IS RECEIVED.
  98. #
  99. ARRAY MNS$TXT [00:00] S(4);
  100. BEGIN
  101. ITEM MNS$LLK C(00,00,07) = ["LLINK: "];
  102. ITEM MNS$LNM C(00,42,07);
  103. ITEM MNS$MSG C(01,24,18) = [", MESSAGE NOT SENT"];
  104. ITEM MNS$ZBYT U(04,12,48) = [ 0 ];
  105. END
  106.  
  107.  
  108. #
  109.   THIS TABLE CONTAINS ALL THE POSSIBLE STATUS THAT A LOGICAL LINK
  110.   CAN HAVE. THE STATUS VALUE CAN BE USED TO INDEX INTO THIS TABLE.
  111. #
  112. DEF MX$ST # 5 #;
  113. ARRAY ST$TABLE [01:MX$ST] S(1);
  114. BEGIN
  115. ITEM ST$VAL C(00,00,02) = [,
  116. "DI",
  117. "DN",
  118. "EN",
  119. "AC"
  120. ];
  121. END
  122.  
  123.  
  124. #
  125.   THIS ARRAY DEFINES THE -UNACTIONED COMMAND- MESSAGE TEXT THAT IS
  126.   SENT WHEN A STU/LL/U HAS A REASON CODE OF EIGHT.
  127. #
  128. ARRAY UNC$TXT [00:00] S(4);
  129. BEGIN
  130. ITEM UNC$TIM C(00,00,10) = [" "];
  131. ITEM UNC$MSG C(01,00,19) = [" UNACTIONED COMMAND"];
  132. ITEM UNC$ZBYT1 U(02,54,06) = [ 0 ];
  133. ITEM UNC$ZBYT2 U(03,00,60) = [ 0 ];
  134. END
  135.  
  136.  
  137. #
  138.   THIS ARRAY DEFINES THE NAME USED WHEN A NAME CAN NOT BE FOUND
  139. #
  140. ARRAY UNK$TXT [00:00] S(1);
  141. BEGIN
  142. ITEM UNK$UNK C(00,18,07) = ["UNKNOWN"];
  143. END
  144. CONTROL EJECT;
  145. # #
  146. # CSESLL CODE BEGINS HERE #
  147. # #
  148. #
  149. * FORMAT THE LOGICAL LINK STATUS MESSAGE TEXT. SEARCH THE LOGICAL
  150. * LINK XREF TABLE FOR THIS LOGICAL LINK. IF FOUND THEN INSERT THE
  151. * LOGLINK NAME, SEARCH THE NPUCB-S FOR THE NAMES OF THE NPU-S
  152. * SUPPORTING THE LINK. INSERT THEM INTO THE TEXT. CONVERT THE NODE
  153. * I.D.-S OF THE NPU-S AND INSERT THEM INTO THE TEXT. IF AN ENTRY WAS
  154. * NOT FOUND, THEN INSERT -UNKNOWN- FOR THE LOGLINK AND NPU NAMES.
  155. * CONVERT THE STATUS, REGULATION LEVEL, AND LINK TYPE AND APPEND
  156. * THEM TO THE TEXT.
  157. #
  158. FOR I=0 STEP 1 WHILE NOT((STUN1[0] EQ LLX$HID1[I] AND
  159. STUN2[0] EQ LLX$HID2[I]) OR
  160. (STUN1[0] EQ LLX$HID2[I] AND
  161. STUN2[0] EQ LLX$HID1[I])) AND
  162. I LS LLXREFL/2
  163. DO
  164. BEGIN
  165. END
  166.  
  167.  
  168. IF I LS LLXREFL/2
  169. THEN
  170. BEGIN
  171. CNST = 1;
  172. CNST2 = 42;
  173. SSBSBF(LLS$TXT,CNST,CNST2,CNST2,B<0,42>LLX$WORD[I]);
  174.  
  175.  
  176. IF LLX$HID1[I] EQ STUN1[0]
  177. THEN
  178. BEGIN
  179. NID1 = LLX$NID1[I];
  180. NID2 = LLX$NID2[I];
  181. HID1 = LLX$HID1[I];
  182. HID2 = LLX$HID2[I];
  183. END
  184. ELSE
  185. BEGIN
  186. NID1 = LLX$NID2[I];
  187. NID2 = LLX$NID1[I];
  188. HID1 = LLX$HID2[I];
  189. HID2 = LLX$HID1[I];
  190. END
  191.  
  192.  
  193. FOR J=0 STEP 1 WHILE NID1 NQ NPU$NID[J] AND
  194. J LS CSNPCNT
  195. DO
  196. BEGIN
  197. END
  198. IF J LS CSNPCNT
  199. THEN
  200. BEGIN
  201. CNST = 3;
  202. CNST2 = 42;
  203. SSBSBF(LLS$TXT,CNST,CNST2,CNST2,B<0,42>NPU$WORD[J]);
  204. END
  205. ELSE
  206. BEGIN
  207. CNST = 3;
  208. CNST2 = 42;
  209. SSBSBF(LLS$TXT,CNST,CNST2,CNST2,UNK$TXT);
  210. END
  211.  
  212.  
  213. CTEMP[0] = XCDD(1000 + HID1);
  214. LLS$NID1[0] = CTEMP3[0];
  215.  
  216.  
  217. FOR J=0 STEP 1 WHILE NID2 NQ NPU$NID[J] AND
  218. J LS CSNPCNT
  219. DO
  220. BEGIN
  221. END
  222. IF J LS CSNPCNT
  223. THEN
  224. BEGIN
  225. CNST = 4;
  226. CNST2 = 54;
  227. CNST3 = 42;
  228. SSBSBF(LLS$TXT,CNST,CNST2,CNST3,B<0,42>NPU$WORD[J]);
  229. END
  230. ELSE
  231. BEGIN
  232. CNST = 4;
  233. CNST2 = 54;
  234. CNST3 = 42;
  235. SSBSBF(LLS$TXT,CNST,CNST2,CNST3,UNK$TXT);
  236. END
  237.  
  238.  
  239. CTEMP[0] = XCDD(1000 + HID2);
  240. LLS$NID2[0] = CTEMP3[0];
  241. END
  242. ELSE
  243. BEGIN
  244. CNST = 1;
  245. CNST2 = 42;
  246. SSBSBF(LLS$TXT,CNST,CNST2,CNST2,UNK$TXT);
  247.  
  248.  
  249. CNST = 3;
  250. CNST2 = 42;
  251. SSBSBF(LLS$TXT,CNST,CNST2,CNST2,UNK$TXT);
  252. CTEMP[0] = XCDD(1000 + STUN1[0]);
  253. LLS$NID1[0] = CTEMP3[0];
  254.  
  255.  
  256. CNST = 4;
  257. CNST2 = 42;
  258. CNST3 = 54;
  259. SSBSBF(LLS$TXT,CNST,CNST3,CNST2,UNK$TXT);
  260. CTEMP[0] = XCDD(1000 + STUN2[0]);
  261. LLS$NID2[0] = CTEMP3[0];
  262. END
  263.  
  264.  
  265. LLS$ST[0] = ST$VAL[STUSTL[0]];
  266.  
  267.  
  268. CTEMP[0] = XCDD(STURL[0]);
  269. LLS$RL[0] = CTEMP1[0];
  270.  
  271.  
  272. IF STULT[0] EQ LT$HN
  273. THEN
  274. BEGIN
  275. LLS$LT[0] = "H-N";
  276. END
  277. ELSE
  278. BEGIN
  279. LLS$LT[0] = "H-H";
  280. END
  281. #
  282. * IF THIS SM IS STU/LL/U, THEN APPEND THE TIME TO THE MESSAGE, SEND
  283. * THE TEXT OFF TO THE OPERATOR RESPONSE QUEUE WITH AN AUDIENCE GROUP
  284. * OF ONE (HOP AND ALL NOP-S). IF THE REASON CODE IS NON-ZERO THEN
  285. * APPEND THE TIME TO THE -UNACTIONED COMMAND- TEXT AND SEND IT OFF
  286. * TO THE OPERATOR RESPONSE QUEUE WITH AN AUDIENCE GROUP OF ONE.
  287. #
  288. IF WCB$SMID[0] EQ SMID"STULL"
  289. THEN
  290. BEGIN
  291. LLS$TIM[0] = CTM$CLOCK;
  292.  
  293.  
  294. WCB$WORD[1] = 0;
  295. WCB$WC[1] = 2 + (LLS$TXTL / 10);
  296.  
  297.  
  298. ABHWORD[1] = LLS$TXTL;
  299. ABHADR[1] = AUDGR3$;
  300. FOR J=0 STEP 1 WHILE NPU$NID[J] NQ ABHSN[0] AND
  301. J LS CSNPCNT
  302. DO
  303. BEGIN
  304. END
  305. ABHABN[1] = J;
  306.  
  307.  
  308. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],LLS$TXT[0]);
  309. CSESLE(ABHSN[0],WCBUF[1],LLS$TXT);
  310.  
  311.  
  312. IF STURCL[0] NQ 0
  313. THEN
  314. BEGIN
  315.  
  316.  
  317. WCB$WC[1] = 2 + (UNC$TXTL / 10);
  318. ABHTLC[1] = UNC$TXTL;
  319.  
  320.  
  321. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],UNC$TXT);
  322. CSESLE(ABHSN[0],WCBUF[1],UNC$TXT);
  323. END
  324. END
  325. #
  326. * IF THIS SM IS STU/LL/N OR MSG/LL/A, THEN SEND THE TEXT TO THE
  327. * OPERATOR IDENTIFIED BY THE ACN VIA THE C-LAYER, WITH THE INPUT
  328. * ALLOWED FLAG CLEARED.
  329. #
  330. ELSE # THIS SM IS NOT STU/LL/U, ASSUME IT TO BE#
  331. BEGIN # STU/LL/N OR MSG/LL/A. #
  332. WCB$WORD[1] = 0;
  333. WCB$SMID[1] = SMID"TTEXT";
  334. WCB$WC[1] = 2 + (LLS$TXTL / 10) - 1;
  335.  
  336.  
  337. ABHWORD[1] = 0;
  338. ABHADR[1] = ABHCN[0];
  339. ABHTLC[1] = LLS$TXTL - 10;
  340.  
  341.  
  342. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],LLS$TXT[1]);
  343. #
  344. * IF THIS SM IS MSG/LL/A, SEND A -MESSAGE NOT SENT- TEXT TO THE
  345. * OPERATOR VIA THE C-LAYER.
  346. #
  347. IF WCB$SMID[0] EQ SMID"MSGLLA"
  348. THEN
  349. BEGIN
  350. WCB$WC[1] = 2 + (MNS$TXTL / 10);
  351. ABHTLC[1] = MNS$TXTL;
  352. WCB$IAF[1] = TRUE; # SET INPUT ALLOWED #
  353.  
  354.  
  355. CNST = 0;
  356. CNST2 = 42;
  357. SSBSBF(MNS$TXT,CNST,CNST2,CNST2,B<0,42>LLX$WORD[I]);
  358.  
  359.  
  360. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],MNS$TXT);
  361. END
  362. END
  363.  
  364.  
  365. RETURN; # **** RETURN **** #
  366. END # CSESLL #
  367. TERM
cdc/nos2.source/nam5871/csesll.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator