*DECK KDSTIN USETEXT NIPDEF USETEXT DRHDR USETEXT AT USETEXT PT USETEXT ACB USETEXT LLCB USETEXT NBT USETEXT KDIS USETEXT KINITBF USETEXT DISTAIL USETEXT KHDRX USETEXT PARAMP USETEXT TNT USETEXT KSTTAB USETEXT FREETAB USETEXT INPARUT USETEXT SYSTIME PRGM KDSTIN; # PROCESS DYNAMIC STATUS DISPLAY # STARTIMS; # *1DC KDSTIN * * 1.PROC NAME AUTHOR DATE * KDSTIN A.BEN-ARTZI 82/01/06 M.GIBIAN 83/12/20 * * 2.FUNCTIONAL DESCRIPTION. * * INITIATE THE STATUS DISPLAY SCREEN. IF CREATION CALL, * ALLOCATE VIEW WINDOW BUFFER AND INITIALIZE VIEW TABLE. * DISPLAY ALL LINES CURRENTLY IN VIEW WINDOW. * * 3.METHOD USED. * * IF THIS IS A CREATION CALL THEN * SET BLANK FLAG TO TRUE * SAVE ORIGINAL BUFFER * ALLOCATE VIEW WINDOW BUFFER AND CHAIN INTO PLACE * INITIALIZE THE VIEW TABLE BY * INITIALIZING THE APPLICATION START LINE * SCAN ACB-S, NBTE-S, AND LLCB-S TO COUNT THE NUMBER * OF LINES FOR EACH TYPE OF DISPLAY LINE. ASSIGN * A RELATIVE LINE NUMBER TO EACH ENTRY, AND STORE * THE MAXIMUM OF EACH TYPE IN THE VIEW TABLE. * * RESET THE SLOW UPDATE TIMER * IF THE BLANK FLAG IS SET, BLANK THE VIEW WINDOW, SET THE * STATUS TO CREATE, AND CLEAR THE BLANK FLAG. * CHECK ALL ACB-S, NBTE-S, AND LLCB-S AND DISPLAY ALL LINES * INDICATED AS BEING DISPLAYED BY THE VIEW TABLE. * IF CREATE IS SET, UPDATE THE MAIN HEADER * SET THE STATUS TO UPDATE * * LATER,EVERY ROUTINE,UPDATING A DATA WITCH IS SHOWN ON THE * DISPLAY(WHILE ST-DISPLAY IS ON) SHALL BE RESPONSIBLE TO * USE IT-S INDEX AND UPDATE IN THE BLOCK TOO. * * 4.ENTRY PARAMETERS. * * PARAMP1 = 1 - DO ONLY STATUS-DISPLAY UPDATE * * 5.OUTPUT PARAMETERS. * * 6.COMDECKS AND TEXTS USED. * * NIPDEF DRHDR AT PT ACB LLCB * NBT KDIS KSTTAB DISTAIL * KHDRX KINITBF PARAMP TNT * FREETAB INPARUT SYSTIME OSIZE * * 7.ROUTINES CALLED. * * MGETS ALLOCATE BUFFER * XTRACE RECORD PROCESSOR CALLS * KPUT PUTS VALUES IN BUFFER+CONVERT FROM B TO DISPLAY * KDISLN DISPLAY A SINGLE LINE IN THE VIEW WINDOW * KUPVTAB UPDATE THE VIEW TABLE * * 8.DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION * THIS IS AN OVERSIZED PRIMARY OVERLAY CALLED * BY XEXEC. * W A R N I N G-THIS OVERSIZED PRIMARY OVERLAY CANNOT EXCEED *CALL OSIZE * # STOPIMS; # EXTERNAL CALLS # XREF BEGIN PROC MGETS; PROC KDISLN; PROC KPUT; PROC KUPVTAB; PROC XTRACE; LABEL RJMAIN ; END # INTERNAL VARIABLES # ITEM BUF U=0 ; # ADDRESS OF VIEW BUFFER # ITEM KREM I=0; # NUMBER OF LINES REMAINING IN VIEW BUFFER # # # ITEM KINDEX I=0; # COUNTER # ITEM KSIZE I=0; # TOTAL SIZE OF VIEW BUFFER # ITEM KN I=0; # INDEX INTO DATA BLOCK # #**********************************************************************# BEGIN CONTROL IFEQ DEBUG,1; XTRACE("KDSTN"); CONTROL FI; # SET POINTERS AND INDICATE STATUS DISPLAY IS BEING SHOWN # KDST[0] = TRUE; # CHECK IF ONLY UPDATE IS REQUIRED # IF KDIS$STAT EQ STM"STM$UPDATE" THEN BEGIN BUF = KHDRNP[0] ; # GET VIEW POINTER FROM HEADER BLOCK # GOTO KUPDAT ; END KDBLNK=TRUE; # SAVE ORIGINAL BUFFER # P=KDBP[0]; BACKPTR[0]=LOC(KORIGBP[0]); NEXTPTR[0]=BACKPTR[0]; BLKID[0]=DRIDVALUE; KORIGBP[0]=P; KORIGFP[0]=P; KDORIG[0]=FALSE; # ALLOCATE AND CHAIN INTO PLACE THE VIEW BUFFER # KSIZE = (KDVWLN[0]*KSTBLK) + BLKHSIZE + KHDRSIZE + 1; MGETS(KSIZE,BUF,TRUE); P=0; KDTYPE[BUF+BLKHSIZE] = 0; K7777[BUF+KSIZE-1] = O"7777"; KDSTAIL[BUF+KSIZE-1] = LOC(KDTLNAM)+1; KDFP[0] = LOC(KHDRBP[0]); # SET KDIS FORWARD ==> KHDRX # KHDRBP[0] = LOC(KDFP[0]); # SET KHDRX BACKWARD ==> KDIS FORWARD# KHDRNP[0] = BUF; # SET HEADER FORWARD POINTER TO VIEW BUFFER # P = 0; NEXTPTR[BUF] = LOC(KDFP[0]); # VIEW NEXT ==> KDIS FORWARD # BACKPTR[BUF] = LOC(KHDRNP[0]); # VIEW BACK ==> KHDRX FORWARD # BLKID [BUF] = KDISIDVALUE; KHXNEXT[0] = BUF + BLKHSIZE + KHDRSIZE; # KHDRX 7777 CHAIN PTR # KDLSTOP[0] = LOC(KHDRX1); # CHAIN KDIS 7777 CHAIN PTR TO KHDRX# # INITIALIZE VIEW TABLE # KDAPPST[0] = 2; #FIRST DISPLAY STARTS WITH FIRST APPLICATION # KDIS$RT = KDST[0] AND KFAST[0]; KN=3; FOR KINDEX = 1 STEP 1 UNTIL ATHAN[0] DO BEGIN IF ATACBA[KINDEX] NQ 0 THEN BEGIN P = ATACBA[KINDEX]; # WE WILL WRITE A LINE FRM THIS ACB# KN = KN+1 ; ACBKNDX[0] = KN; # THIS WILL BE ITS INDEX INTO DATA BLOCK # END END KDAPPMX[0] = KN; # NOW SEARCH THE SAME WAY ALL NBT ENTRIES # KN = 3 ; FOR KINDEX = 0 STEP NBTFETNO UNTIL NBTMAXID DO BEGIN IF NBTIUF[KINDEX] THEN # YES, THIS IS A LIVING ENTRY # BEGIN KN = KN + 1 ; NBTKNDX[KINDEX] = KN ; END END KDESTMX[0]=KN; # LAST REPEAT PROCESS FOR LOGICAL LINKS # KN = 3 ; FOR KINDEX = 1 STEP 1 UNTIL TNTBS[0]-1 DO BEGIN IF TNTLLAD[KINDEX] NQ 0 THEN BEGIN P = TNTLLAD[KINDEX];#THIS IS AN LL WE SHOULD USE LATER # KL1: KN = KN + 1 ; IF LLCBHN[0] NQ 0 THEN LLCBKNDX[0] = KN ; # INDEX INTO K-DISPLAY ST BUFFER # ELSE BEGIN # THIS IS A FAKE INTRA HOST LLK # KN = KN - 1 ; LLCBKNDX[0] = 0 ; END IF LLCBFP[0] NQ 0 THEN # OH, WE HAVE ONE MORE LINK IN THIS ENTRY # BEGIN P=LLCBFP[0]; # SO, GET THIS ONE TWO # GOTO KL1; # AND DO TO IT THE SAME THING # END END END KDLGLMX[0]=KN; # END VIEW BUFFER/STATUS DISPLAY INITIALIZATION # KUPDAT: KSLOWTM[0] = RTSECS[0] ; KUPVTAB; # REVISE THE VIEW WINDOW # IF KDBLNK THEN # IF BLANK IS SET, CLEAR VIEW WINDOW + REDISPLAY # BEGIN P=BUF+BLKHSIZE+KHDRSIZE; FOR KINDEX = 1 STEP 1 UNTIL KDVWLN[0] DO BEGIN KAPPDTA[KINDEX-1] = " "; KAPPEND[KINDEX-1] = 0; END KDBLNK=FALSE; END # START LOOKING FOR DATA IN THE AT # # PROCESS APPLICATIONS IF ANY ARE DISPLAYED # IF (KDAPPST[0] NQ 0) THEN BEGIN IF KDAPPST LQ 2 THEN KDISLN(2,0,KST"APP"); # DISPLAY HEADER LINE # # CHECK ALL ACB-S TO SEE IF THEY ARE BEING DISPLAYED # FOR KINDEX = 1 STEP 1 UNTIL ATHAN[0] DO BEGIN P = ATACBA[KINDEX]; IF ATACBA[KINDEX] NQ 0 # ACB EXISTS # AND ACBKNDX[0] NQ 0 # STATUS DISPLAY LINE EXISTS # AND ACBKNDX[0] GQ KDAPPST[0] #GREATER THAN FIRST LIN # AND ACBKNDX[0] LQ KDAPPND[0] #LESS THAN LAST LINE # THEN # UPDATE APPLICATION STATUS LINE # KDISLN(ACBKNDX[0],ATACBA[KINDEX],KST"APP"); END END # PROCESS ANY EST THAT IS DISPLAYED # IF KDESTST[0] NQ 0 THEN BEGIN IF KDESTST[0] LQ 2 AND KDESTND[0] GQ 2 THEN KDISLN(2,0,KST"EST"); # START LOOKING FOR DATA IN THE EST HEADER # FOR KINDEX = 0 STEP NBTFETNO UNTIL NBTMAXID DO BEGIN IF NBTIUF[KINDEX] AND NBTKNDX[KINDEX] NQ 0 # STATUS DISPLAY LINE EXISTS # AND NBTKNDX[KINDEX] GQ KDESTST[0] #GTR THAN 1ST EST LN# AND NBTKNDX[KINDEX] LQ KDESTND[0] #LE LAST EST Y LINE # THEN KDISLN(NBTKNDX[KINDEX],KINDEX,KST"EST"); # GO DISPLAY# END END # DISPLAY ANY LOGICAL LINK LINES # IF KDLGLST[0] NQ 0 THEN BEGIN IF KDLGLST[0] LQ 2 AND KDLGLND[0] GQ 2 THEN KDISLN(2,0,KST"LLK"); # START LOOKING FOR INFO ABOUT LOGICAL LINKS # FOR KINDEX=1 STEP 1 UNTIL TNTBS[0]-1 DO BEGIN P = TNTLLAD[KINDEX]; KLMORE: IF P NQ 0 THEN # LLCB EXISTS # BEGIN IF LLCBKNDX[0] NQ 0 # STATUS DISPLAY LINE EXISTS # AND LLCBKNDX[0] GQ KDLGLST[0] # AFTER/IS FIRST LGL LN # AND LLCBKNDX[0] LQ KDLGLND[0] # BEFORE/IS LAST LGL LN # THEN # UPDATE LOGICAL LINK STATUS LINE # KDISLN(LLCBKNDX[0],P,KST"LLK"); # BEFORE WE QUIT,CHECK FOR ANY MORE LL SERVING THE TNT # IF LLCBFP[0] NQ 0 THEN BEGIN P = LLCBFP[0]; # GO GET DATA FROM THIS LLCB TOO # GOTO KLMORE; END # END LLCB SEARCH # END END END # UPDATE FIELDS IN MAIN HEADER # IF KDIS$STAT EQ STM"STM$CREATE" THEN BEGIN KPUT(LOC(KHDRXNM),0,KPHXNAP,KDAPPMX[0]-3); KPUT(LOC(KHDRXNM),0,KPHXNIN,INPNIN[1]); KPUT(LOC(KHDRXNM),0,KPHXRGL,HRL); KPUT(LOC(KHDRXNM),0,KPHXMFL,MAXFL); # AND UPDATE TIMER FOR STATISTICS # KSTATIM[0] = RTSECS[0] ; END KDIS$STAT=STM"STM$UPDATE"; GOTO RJMAIN ; END TERM