User Tools

Site Tools


cdc:nos2.source:nam5871:csescs

CSESCS

Table Of Contents

  • [00007] PROC CSESCS
  • [00008] SEND COUPLER STATUS.
  • [00011] SEND COUPLER STATUS.
  • [00032] PROC CSESLE
  • [00033] PROC SSBSBF
  • [00034] PROC SSTAQE
  • [00035] FUNC XCDD U

Source Code

CSESCS.txt
  1. *DECK CSESCS
  2. USETEXT TEXTOV
  3. USETEXT TEXTCS
  4. USETEXT TEXTSS
  5. USETEXT TXTAPSS
  6. USETEXT TXTSMCS
  7. PROC CSESCS;
  8. # TITLE - SEND COUPLER STATUS. #
  9. BEGIN
  10. #
  11. ** CSESCS - SEND COUPLER STATUS.
  12. *
  13. * D.K. ENDO 82/03/29
  14. *
  15. * THE PROCEDURE FORMATS THE COUPLER STATUS MESSAGE TEXT SENT WHEN A
  16. * STU/CP/U OR STU/CP/N IS RECEIVED.
  17. *
  18. * PROC CSESCS
  19. *
  20. * ENTRY 1. STU/CP/U OR STU/CP/N SM FROM THE EVENT QUEUE.
  21. *
  22. * EXIT 1. ENTRY IN OPERATOR RESPONSE QUEUE WITH THE STATUS
  23. * TEXT AND THE AUDIENCE GROUP SET TO ONE.
  24. * 2. ENTRY IN C-LAYER QUEUE WITH THE STATUS TEXT.
  25. *
  26. #
  27. #
  28. **** PROC CSESCS - XREF LIST BEGINS.
  29. #
  30. XREF
  31. BEGIN
  32. PROC CSESLE; # SEND LOG (FILE) ENTRY #
  33. PROC SSBSBF; # STORE BIT FIELD #
  34. PROC SSTAQE; # ADD QUEUE ENTRY #
  35. FUNC XCDD U; # CONVERT DECIMAL INTEGER TO DISPLAY CODE #
  36. END
  37. #
  38. ****
  39. #
  40. DEF CPS$TXTL # 50 #; # CHAR COUNT OF COUPLER STATUS TEXT #
  41. DEF HNP$TXTL # 30 #; # CHAR COUNT OF -HIP NOT PRESENT- TEXT #
  42. ITEM CNST1; # CONSTANT ---> 1 #
  43. ITEM CNST2; # CONSTANT ---> 2 #
  44. ITEM CNST3; # CONSTANT ---> 3 #
  45. ITEM I; # LOOP INDUCTION VARIABLE #
  46. ITEM ITEMP U; # UNSIGNED INTEGER TEMPORARY #
  47. ITEM J; # LOOP INDUCTION VARIABLE #
  48. #
  49.   THIS ARRAY DEFINES THE COUPLER STATUS TEXT THAT IS SENT WHEN A
  50.   STU/CP/U OR STU/CP/N IS RECEIVED.
  51. #
  52. ARRAY CPS$TXT [00:04] S(1);
  53. BEGIN
  54. ITEM CPS$TIM C(00,00,10);
  55. ITEM CPS$COUP C(01,00,08) = ["CPLER: "];
  56. ITEM CPS$CNM C(01,42,07);
  57. ITEM CPS$C1 C(02,24,01) = [","];
  58. ITEM CPS$ST C(02,30,02);
  59. ITEM CPS$C2 C(02,42,01) = [","];
  60. ITEM CPS$CNID C(02,48,03);
  61. ITEM CPS$C3 C(03,06,01) = [","];
  62. ITEM CPS$NNM C(03,12,07);
  63. ITEM CPS$C4 C(03,54,01) = ["/"];
  64. ITEM CPS$CNUM C(04,00,03);
  65. ITEM CPS$ZBYT U(04,18,42) = [ 0 ];
  66. END
  67. #
  68.   THIS ARRAY DEFINES NOT -HIP NOT PRESENT- TEXT AND IS SENT WHEN A
  69.   STU/CP/U IS RECEIVED WITH THE REASON CODE FIELD SET TO EIGHT.
  70. #
  71. ARRAY HNP$TXT [00:00] S(3);
  72. BEGIN
  73. ITEM HNP$TIM C(00,00,10) = [" "];
  74. ITEM HNP$MSG C(01,00,16) = [" HIP NOT PRESENT"];
  75. ITEM HNP$ZBYT U(02,36,24) = [ 0 ];
  76. END
  77. #
  78.   THIS ARRAY DEFINES ALL THE POSSIBLE STATUS A COUPLER CAN HAVE
  79. #
  80. DEF MX$ST # 5 #;
  81. ARRAY ST$TABLE [01:MX$ST] S(1);
  82. BEGIN
  83. ITEM ST$VAL C(00,00,02) = ["NC",
  84. "DI",
  85. "DN",
  86. "EN",
  87. "AC",
  88. ];
  89. END
  90. #
  91.   THIS ARRAY DEFINES THE NAME USED WHEN THE NAME OF THE COUPLER OR
  92.   SUPPORTING NPU IS NOT FOUND.
  93. #
  94. ARRAY UNK$TXT [00:00] S(1);
  95. BEGIN
  96. ITEM UNK$NAME C(00,18,07) = ["UNKNOWN"];
  97. END
  98. CONTROL EJECT;
  99. # #
  100. # CSESCS CODE BEGINS HERE #
  101. # #
  102. #
  103. * SEARCH THE PHYSICAL LINK XREF TABLE FOR THIS COUPLER. IF IT IS
  104. * FOUND, THEN INSERT THE COUPLER NUMBER AND NAME INTO THE STATUS
  105. * TEXT, FIND THE NPUCB OF THE NPU THAT SUPPORTS THIS COUPLER AND
  106. * IF FOUND THEN INSERT THE NPU NAME INTO THE TEXT, OTHERWISE INSERT
  107. * -UNKNOWN- FOR THE NPU NAME. IF THE COUPLER IS NOT FOUND IN THE
  108. * PHYSICAL LINK XREF TABLE, THEN INSERT -UNKNOWN- FOR THE NAMES AND
  109. * CLEAR THE COUPLER NUMBER VALUE. INSERT THE COUPLER NODE I.D. AND
  110. * STATUS FOR THE COUPLER.
  111. #
  112. FOR I=0 STEP 1 WHILE STUN1[0] NQ PLX$HNID[I] AND
  113. I LS PLXREFL/2 AND
  114. NOT PLX$TYPE[I]
  115. DO
  116. BEGIN
  117. END
  118. IF I LS PLXREFL/2
  119. THEN
  120. BEGIN
  121. CNST1 = 1;
  122. CNST2 = 42;
  123. SSBSBF(CPS$TXT,CNST1,CNST2,CNST2,B<0,42>PLX$WORD[I]);
  124. IF PLX$CPRI[I]
  125. THEN
  126. BEGIN
  127. CPS$CNUM[0] = "SEC";
  128. END
  129. ELSE
  130. BEGIN
  131. CPS$CNUM[0] = "PRI";
  132. END
  133. FOR J=0 STEP 1 WHILE PLX$CNPU[I] NQ NPU$NID[J] AND
  134. J LS CSNPCNT
  135. DO
  136. BEGIN
  137. END
  138. IF J LS CSNPCNT
  139. THEN
  140. BEGIN
  141. CPS$NNM[0] = NPU$NAME[J];
  142. END
  143. ELSE
  144. BEGIN
  145. CPS$NNM[0] = UNK$NAME[0];
  146. END
  147. END
  148. ELSE
  149. BEGIN
  150. CNST1 = 1;
  151. CNST2 = 42;
  152. SSBSBF(CPS$TXT,CNST1,CNST2,CNST2,UNK$TXT);
  153. CPS$NNM[0] = UNK$NAME[0];
  154. CPS$CNUM[0] = " ";
  155. END
  156. CPS$ST[0] = ST$VAL[STUST[0]];
  157. ITEMP = XCDD(1000 + STUN1[0]);
  158. CNST1 = 2;
  159. CNST2 = 48;
  160. CNST3 = 18;
  161. SSBSBF(CPS$TXT,CNST1,CNST2,CNST3,ITEMP);
  162. #
  163. * IF THIS SM IS STU/CP/U, THEN INSERT CURRENT TIME IN STATUS TEXT.
  164. * SEND THE TEXT OFF TO THE OPERATOR RESPONSE QUEUE WITH THE AUDIENCE
  165. * GROUP SET TO ONE, IF THE REASON CODE FIELD IS NON-ZERO THEN APPEND
  166. * THE CURRENT TIME TO THE -HIP NOT PRESENT- MESSAGE TEXT AND SEND IT
  167. * TO THE OPERATOR RESPONSE RESPONSE QUEUE WITH AN AUDIENCE GROUP OF
  168. * ONE.
  169. #
  170. IF WCB$SMID[0] EQ SMID"STUCP"
  171. THEN
  172. BEGIN
  173. CPS$TIM[0] = CTM$CLOCK[0];
  174. WCB$WORD[1] = 0;
  175. WCB$WC[1] = 2 + (CPS$TXTL / 10);
  176. ABHWORD[1] = CPS$TXTL;
  177. ABHADR[1] = AUDGR3$;
  178. ABHABN[1] = J;
  179. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],CPS$TXT[0]);
  180. CSESLE(ABHSN[0],WCBUF[1],CPS$TXT);
  181. IF STURC[0] NQ 0
  182. THEN
  183. BEGIN
  184. WCB$WC[1] = 2 + (HNP$TXTL / 10);
  185. ABHTLC[1] = HNP$TXTL;
  186. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],HNP$TXT[0]);
  187. CSESLE(ABHSN[0],WCBUF[1],HNP$TXT);
  188. END
  189. END
  190. #
  191. * IF THIS SM IS STU/CP/N, THEN SEND THE STATUS TEXT TO THE OPERATOR
  192. * VIA THE C-LAYER WITH THE INPUT ALLOWED FLAG CLEARED.
  193. #
  194. ELSE # IF NOT STU/CP/U, THEN ASSUME STU/CP/N. #
  195. BEGIN
  196. WCB$WORD[1] = 0;
  197. WCB$SMID[1] = SMID"TTEXT";
  198. WCB$WC[1] = 2 + (CPS$TXTL / 10) - 1;
  199. ABHWORD[1] = 0;
  200. ABHADR[1] = ABHCN[0];
  201. ABHTLC[1] = CPS$TXTL - 10;
  202. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CPS$TXT[1]);
  203. END
  204. RETURN; # **** RETURN **** #
  205. END # CSESCS #
  206. TERM
cdc/nos2.source/nam5871/csescs.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator