User Tools

Site Tools


cdc:nos2.source:nam5871:csesod

CSESOD

Table Of Contents

  • [00006] PROC CSESOD
  • [00007] SEND ON-LINE DIAGNOSTICS.
  • [00010] SEND ON-LINE DIAGNOSTICS.
  • [00030] PROC CSESLE
  • [00031] PROC SSBSBF
  • [00032] FUNC SSDCAD U
  • [00033] PROC SSTAQE

Source Code

CSESOD.txt
  1. *DECK CSESOD
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. USETEXT TXTAPSS
  5. USETEXT TXTSMCS
  6. PROC CSESOD;
  7. # TITLE - SEND ON-LINE DIAGNOSTICS. #
  8. BEGIN
  9. #
  10. ** CSESOD - SEND ON-LINE DIAGNOSTICS.
  11. *
  12. * D.K. ENDO 82/03/29
  13. *
  14. * THIS PROCEDURE FORMATS THE ON-LINE DIAGNOSTIC DATA AND SENDS IT
  15. * TO THE OPERATOR VIA THE OPERATOR RESPONSE QUEUE.
  16. *
  17. * PROC CSESOD
  18. *
  19. * ENTRY 1. OLD/DT SM FROM THE EVENT QUEUE.
  20. *
  21. * EXIT 1. DATA TEXT TO THE OPERATOR RESPONSE QUEUE WITH THE
  22. * AUDIENCE GROUP SET TO THREE.
  23. *
  24. #
  25. #
  26. **** PROC CSESOD - XREF LIST BEGINS.
  27. #
  28. XREF
  29. BEGIN
  30. PROC CSESLE; # SEND LOG FILE ENTRY #
  31. PROC SSBSBF; # STORE BIT FIELD #
  32. FUNC SSDCAD U; # CONVERT ASCII TO DISPLAY CODE #
  33. PROC SSTAQE; # ADD QUEUE ENTRY #
  34. END
  35. #
  36. ****
  37. #
  38. DEF NONTXT$ # 3 #; # NUMBER CHARS THAT ARE NOT TEXT #
  39. DEF SNM$TXTL # 30 #; # SOURCE NPU-NAME MESSAGE TEXT LENGTH #
  40. ITEM A$CHAR; # ASCII CHAR TO BE CONVERTED #
  41. ITEM BPOS; # BIT POSITION OF CURRENT ASCII CHARACTER #
  42. ITEM CHARCNT; # CURRENT CHARACTER COUNT IN MESSAGE #
  43. ITEM CHARPOS; # BIT POSITION OF CRNT DISPLAY CODE CHAR #
  44. ITEM CNST1; # INTEGER CONSTANT ---> 1 #
  45. ITEM CNST2; # INTEGER CONSTANT ---> 2 #
  46. ITEM CNST3; # INTEGER CONSTANT ---> 3 #
  47. ITEM I; # LOOP INDUCTION VARIABLE #
  48. ITEM MCC; # MESSAGE CHARACTER LENGTH #
  49. ITEM MWC; # WORD COUNT INTO DATA MESSAGE #
  50. ITEM WC; # WORD COUNT OF OPERATOR TEXT #
  51. #
  52.   THIS ARRAY IS USED TO BUILD THE DATA TEXT TO BE SENT TO THE DIAG
  53.   OPERATOR WHEN A OLD/DT/U IS RECEIVED.
  54. #
  55. DEF MX$OLD # 7 #;
  56. ARRAY OLD$TXT [01:MX$OLD] S(1);
  57. BEGIN
  58. ITEM OLD$TIM C(00,00,10);
  59. ITEM OLD$WORD U(00,00,60);
  60. END
  61.  
  62.  
  63. #
  64.   THIS ARRAY DEFINES THE SOURCE NPU NAME TEXT SENT TO PREFIX THE ON
  65.   LINE DIAGNOSTIC TEXT.
  66. #
  67. ARRAY SNM$TXT [00:02] S(1);
  68. BEGIN
  69. ITEM SNM$TIM C(00,00,10);
  70. ITEM SNM$MSG C(01,00,18) =["FROM UNKNOWN/OLD: "];
  71. ITEM SNM$ZBYT U(02,48,12) = [0];
  72. END
  73. CONTROL EJECT;
  74. # #
  75. # CSESOD CODE BEGINS HERE #
  76. # #
  77. #
  78. * BUILD AND SEND MESSAGE INDICATING WHICH NPU THIS DIAGNOSTIC CAME
  79. * FROM. SEARCH THE NPUCB-S FOR THIS NPU. IF FOUND APPEND THE
  80. * NPU NAME TO THE TEXT, ELSE APPEND *UNKNOWN* TO THE TEXT. SEND
  81. * TEXT TO THE OPERATOR RESPONSE QUEUE.
  82. #
  83. SNM$TIM[0] = CTM$CLOCK[0];
  84. FOR I=0 STEP 1 WHILE ABHSN[0] NQ NPU$NID[I] AND
  85. I LS CSNPCNT
  86. DO
  87. BEGIN
  88. END
  89. CNST1 = 1;
  90. CNST2 = 30;
  91. CNST3 = 42;
  92. IF I LS CSNPCNT
  93. THEN
  94. BEGIN
  95. SSBSBF(SNM$TXT,CNST1,CNST2,CNST3,B<0,42>NPU$NAME[I]);
  96. END
  97. ELSE
  98. BEGIN
  99. SSBSBF(SNM$TXT,CNST1,CNST2,CNST3," UNKNOWN");
  100. END
  101. WCB$WORD[1] = 2 + SNM$TXTL/10;
  102. WCB$SMID[1] = SMID"TTEXT";
  103. ABHWORD[1] = SNM$TXTL;
  104. ABHADR[1] = OLDDO[0];
  105.  
  106.  
  107. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],SNM$TXT);
  108. CSESLE(ABHSN[0],WCBUF[1],SNM$TXT);
  109.  
  110. #
  111. * APPEND THE CURRENT TIME TO THE TEXT. CONVERT MESSAGE TO DISPLAY
  112. * CODE AND APPEND TO TEXT TO OPERATOR TEXT. SEND DIAGNOSTIC TEXT
  113. * TO OPERATOR RESPONSE QUEUE WITH AN AUDIENCE GROUP OF THREE.
  114. #
  115. OLD$TIM[1] = CTM$CLOCK[0];
  116. FOR I=2 STEP 1 UNTIL MX$OLD
  117. DO
  118. BEGIN
  119. OLD$WORD[I] = 0;
  120. END
  121. A$CHAR = 0;
  122. BPOS = 24;
  123. CHARCNT = 1;
  124. MWC = 0;
  125. MCC = ABHTLC[0] - NONTXT$;
  126.  
  127. FOR WC=2 STEP 1 WHILE CHARCNT LQ MCC AND
  128. WC LS MX$OLD
  129. DO
  130. BEGIN
  131. FOR CHARPOS=0 STEP 6 WHILE CHARCNT LQ MCC AND
  132. CHARPOS LS 60
  133. DO
  134. BEGIN
  135. IF BPOS LQ 52
  136. THEN
  137. BEGIN
  138. A$CHAR = B<BPOS,8>MSG$WORD[MWC];
  139. B<CHARPOS,6>OLD$WORD[WC] = SSDCAD(A$CHAR);
  140. BPOS = BPOS + 8;
  141. END
  142. ELSE IF BPOS EQ 56
  143. THEN
  144. BEGIN
  145. B<52,4>A$CHAR = B<BPOS,4>MSG$WORD[MWC];
  146. MWC = MWC + 1;
  147. B<56,4>A$CHAR = B<0,4>MSG$WORD[MWC];
  148. B<CHARPOS,6>OLD$WORD[WC] = SSDCAD(A$CHAR);
  149. BPOS = 4;
  150. END
  151. ELSE
  152. BEGIN
  153. MWC = MWC + 1;
  154. A$CHAR = B<0,8>MSG$WORD[MWC];
  155. B<CHARPOS,6>OLD$WORD[WC] = SSDCAD(A$CHAR);
  156. BPOS = 8;
  157. END
  158. CHARCNT = CHARCNT + 1;
  159. END
  160. END
  161. IF CHARPOS LQ 48
  162. THEN
  163. BEGIN
  164. WC = WC - 1;
  165. END
  166. WCB$WC[1] = 2 + WC;
  167. ABHTLC[1] = WC * 10;
  168. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],OLD$TXT);
  169. CSESLE(ABHSN[0],WCBUF[1],OLD$TXT);
  170. RETURN; # **** RETURN **** #
  171. END # CSESOD #
  172. TERM
cdc/nos2.source/nam5871/csesod.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator