User Tools

Site Tools


cdc:nos2.source:nam5871:netdbg

NETDBG

Table Of Contents

  • [00006] PROC NETDBG ((OPT1),(OPT2),DBSTAT)
  • [00097] PROC NP$PIOE
  • [00098] PROC NP$WRTW
  • [00099] PROC NP$RTIM
  • [00100] PROC NP$ERR
  • [00117] ENTRY PROC QTDBG((OPT1),(OPT2),DBSTAT)

Source Code

NETDBG.txt
  1. *DECK NETDBG
  2. USETEXT AIPDEF
  3. USETEXT NP$DB
  4. USETEXT NP$MODE
  5. USETEXT NP$NWL
  6. PROC NETDBG ((OPT1),(OPT2),DBSTAT);
  7.  
  8. *IF,DEF,IMS
  9. #
  10. *1DC NETDBG
  11. *
  12. * 1. PROC NAME AUTHOR DATE
  13. * NETDBG J. P. YOUNG 77/04/08
  14. *
  15. * 2. FUNCTIONAL DESCRIPTION
  16. * PROCESSES THE NETDBG CALL FROM AN APPLICATION. THE DEBUG
  17. * OPTIONS ARE SET AS SPECIFIED WHEN AIP IS COMPILED WITH
  18. * *DEFINE,DEBUG. OTHERWISE STATUS IS RETURNED INDICATING THE
  19. * DEBUG OPTION IS NOT AVAILABLE (STATUS = 1).
  20. *
  21. * 3. METHOD USED
  22. * MOST OF THE LOGIC IN THIS PROCEDURE IS CONDITIONALLY COMPILED.
  23. * WHEN *DEFINE,DEBUG IS NOT USED, STATUS IS SET EQUAL TO 1 AND
  24. * CONTROL IS RETURNED TO CALLER. WHEN *DEFINE,DEBUG IS USED,
  25. * DB$SM IS SET TRUE IF OPT1 = 0 OR FALSE OTHERWISE. DB$DM IS
  26. * SET TRUE IF OPT2 = 0 OR FALSE OTHERWISE. STATUS IS SET EQUAL
  27. * TO ZERO. THE CALL TO NETDBG IS LOGGED ON FILE ZZZZZDN.
  28. * WHEN DEBUG OPTION IS DEFINED A TWO WORD ENTRY IS WRITTEN TO
  29. * THE DEBUG LOG FILE.
  30. * WORD 0
  31. * 2
  32. * 0 4
  33. * I-------------------------I----------------I
  34. * I I I
  35. * I SECONDS SINCE DEADSTART I MILLISECONDS I
  36. * I I I
  37. * I-------------------------I----------------I
  38. *
  39. * WORD 1
  40. * 2 4 5
  41. * 0 1 2 4 2 3
  42. * I--------I--------I-----I---------I----I--------I
  43. * I I I I I I I
  44. * I DB$SMF I DB$DMF I I DB$CAL I I DB$OPC I
  45. * I I I I I I I
  46. * I--------I--------I-----I---------I----I--------I
  47. *
  48. * DB$SMF - SUPERVISORY MESSAGE LOGGING
  49. * =1 IF ON
  50. * DB$DMF - DATA MESSAGE LOGGING
  51. * =1 IF ON
  52. * DB$CAL - CALLING ADDRESS
  53. * DB$OPC - NETDBG OPCODE (=20)
  54. *
  55. *
  56. * 4. ENTRY CONDITIONS
  57. * OPT1 = 0 LOG SUPERVISORY MESSAGES, EXCEPT FC/ACK
  58. * NOT 0 NO LOGGING OF SUPERVISORY MESSAGES
  59. * OPT2 = 0 LOG DATA MESSAGES AND FC/ACK
  60. * NOT 0 NO LOGGING OF DATA MESSAGES
  61. *
  62. * 5. EXIT CONDITIONS
  63. * DBSTAT = 0 DEBUG OPTION AVAILABLE
  64. * = 1 DEBUG OPTION NOT AVAILABLE (I.E. AIP LOADED WAS
  65. * NOT COMPILED WITH *DEFINE,DEBUG)
  66. * DB$SM AND DB$DM (COMMON BLOCK NP$DB) ARE SET TRUE OR FALSE
  67. * AS REQUESTED
  68. *
  69. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  70. * AIPDEF NP$CRT
  71. * NP$DB NP$DBA NP$MODE NP$NWL
  72. *
  73. * 7. PROCEDURES/FUNCTIONS CALLED
  74. * NP$PIOE - PROCESS I/O ERROR ON DEBUG LOG FILE
  75. * NP$RTIM - RETURNS CURRENT TIME FROM DEADSTART IN SECONDS
  76. * AND MILLISECONDS
  77. * NP$WRTW - WRITES WORDS TO FILE - NOS DATA TRANSFER MACRO
  78. * NP$ERR - DAYFILE ERROR MESSAGE AND ABORT.
  79. *
  80. * 8. DAYFILE/DIAGNOSTIC MESSAGES
  81. * NETWORK APPLICATION ABORTED, RC = 34.
  82. * NETDBG: REQUEST INVALID BEFORE NETON.
  83. *
  84.  #
  85. *ENDIF
  86.  
  87. BEGIN
  88.  
  89. *CALL NP$CRT
  90. # PARAMETERS #
  91. # #
  92. ITEM OPT1; # LOG SUPERVISORY MESSAGE OPTION #
  93. ITEM OPT2; # LOG DATA MESSAGE OPTION #
  94. ITEM DBSTAT; # DEBUG AVAILABILITY STATUS RETURNED #
  95. XREF
  96. BEGIN
  97. PROC NP$PIOE; # PROCESS I/O ERROR #
  98. PROC NP$WRTW; # WRITES WORDS TO DEBUG LOG #
  99. PROC NP$RTIM; # REAL TIME #
  100. PROC NP$ERR; # DAYFILE ERROR. #
  101. END
  102. *IF,DEF,DEBUG
  103.  
  104. CONTROL LIST; # NETDBG USES VARIABLE NSUPWRD.#
  105.  
  106. #
  107.   LOCAL VARIABLES
  108. #
  109. ITEM TIMEWD U; # REAL TIME SINCE DEADSTART #
  110.  
  111. ARRAY DBGLOG P(2); # LOG NETDBG CALL #
  112. *CALL NP$DBA
  113. *ENDIF
  114. #**********************************************************************#
  115. # NETDBG EXECUTION BEGINS HERE #
  116.  
  117. ENTRY PROC QTDBG((OPT1),(OPT2),DBSTAT); # QTRM ENTRY PT FOR PROC #
  118.  
  119. # #
  120. # INITIALIZE STATUS #
  121.  
  122. *IF,-DEF,DEBUG
  123. DBSTAT = 1;
  124. *ENDIF
  125. *IF,DEF,DEBUG
  126.  
  127. DBSTAT = 0;
  128. *ENDIF
  129.  
  130. IF NOT ACCEPTED
  131. THEN
  132. NP$ERR("34"); # REQUEST INVALID BEFORE NETON. #
  133. *IF,DEF,DEBUG
  134.  
  135. # SET DEBUG OPTIONS #
  136.  
  137. IF OPT1 EQ 0
  138. THEN DB$SM = TRUE;
  139. ELSE DB$SM = FALSE;
  140.  
  141. IF OPT2 EQ 0
  142. THEN DB$DM = TRUE;
  143. ELSE DB$DM = FALSE;
  144.  
  145. # FORMAT LOG FILE ENTRY #
  146.  
  147. P<CALLADR> = LOC(NETDBG); # GET CALL ADDRESS #
  148. NP$RTIM(TIMEWD); # REAL TIME SINCE DEADSTART #
  149. DB$TIME[0] = TIMEWD;
  150. DB$SMF[0] = DB$SM;
  151. DB$DMF[0] = DB$DM;
  152. DB$CAL[0] = CALLADDR[0];
  153. DB$OPC[0] = OP$DBG;
  154. NP$WRTW (DB$FET,DBGLOG,2);
  155. #
  156.   NSUPWRD BASED ARRAY POINTER TO THE USER COMMUNICATION WORD
  157.   WAS SET BY NETON. THE ARRAY IS LOCATED IN NP$NWL COMDECK.
  158.  
  159.   UPDATE MSGCNT IN NSUP COMMUNICATION WORD.
  160. #
  161. MSGCNT[0] = MSGCNT[0] + 1;
  162. #
  163.   CHECK FOR I/O ERROR IN DEBUG LOG FILE
  164. #
  165. IF FET$AT[0] NQ 0
  166. THEN # I/O ERROR HAS OCCURRED ON FILE#
  167. BEGIN
  168. NP$PIOE(DB$FET); # PROCESS I/O ERROR #
  169. END
  170. *ENDIF
  171.  
  172. END # NETDBG #
  173.  
  174. TERM # NETDBG #
cdc/nos2.source/nam5871/netdbg.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator