*DECK CSSTNS USETEXT TEXTSS USETEXT TEXTCS USETEXT TXTSMCS USETEXT TXTAPSS PROC CSSTNS; # TITLE CSSTNS - TERMINATE NPU SUPERVISION # BEGIN # CSSTNS # # ** CSSTNS - TERMINATE NPU SUPERVISION. * * C. BRION 82/04/13. * * THIS PROCEDURE PROCESSES SUPERVISION BROKEN SMS FROM NPUS. * IF CURRENT OPERATOR ACTION IS ONGOING, THE OPERATOR (S) ARE * CLEARED FROM THE NPUCB AND NOTIFIED OF THE NPUCB SITUATION. * AN EVENT MESSAGE IS ISSUED THROUGH THE EVENT PROCESSOR QUEUE * TO THE APPROPRIATE AUDIENCE GROUP. * * PROC CSSTNS * * ENTRY: * WCARY = ONE WORD CONTAINING THE WORD COUNT OF THE ENTRY. * ABHARY = APPLICATION BLOCK HEADER. * TXTARA = BODY OF THE SUPERVISION BROKEN SM. * * EXIT: * A NPU SUPERVISION LOST EVENT ISSUED IF NEEDED. * AN OPERATOR MESSAGE INFORMING OF POSSIBLE DATA LOST IS * ISSUED IF NEEDED VIA A TERMINAL TEXT QUEUE ENTRY. * A ROUTED SOLICITED STATUS EVENT TO INDICATE STATUS DONE * MAY BE ISSUED. (THIS CAUSES A READY.. MESSAGE TO THE * OPERATOR. # # **** PROC CSSTNS XREF LIST # XREF BEGIN PROC MESSAGE; PROC SSTAQE; PROC SSBCBW; # CLEAR BIT IN WORD # PROC SSBSBF; # STORE BIT FIELD # PROC SSBTBW; # TEST BIT IN WORD # PROC SSCCTR; # CANCEL TIMER REQUEST # END # **** # # * DEFS # DEF NULLSTATE$ # 99 #; # NULL STATE VALUE # DEF LDAMSGL$ # 50 #; # LOST DATA MSG LENGTH # # * ITEMS # ITEM CNST1; # CONSTANT ---> 1 # ITEM CNST2; # CONSTANT ---> 2 # ITEM CNST3; # CONSTANT ---> 3 # ITEM I; # LOOP VARIABLE # ITEM OCBORD U; # OCB ORDINAL CELL # ITEM PENDING B; # COMMAND PENDING FLAG # ITEM SUCCESS B; # SET AFTER BY CANCEL TIMER # ITEM TNAME C(10); # TERMINAL NAME OF CTRL NOP # # * ARRAYS * # # * FLG$WORD - BASED ARRAY THAT POINTS TO THE FLAG WORDS IN THE * NPUCB. # BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$); BEGIN ITEM FW$WORD I(00,00,60); END # * LDAMSG - LOST DATA MESSAGE. * * MESSAGE ARRAY ISSUED WHEN A POSSIBLE LOSS OF A DATA MESSAGE * MAY HAVE OCCURRED WHEN AN ONGOING ACTIVITY ON AN NPUCB IS * TERMINATED. # ARRAY LDAMSG [00:00] S(5); BEGIN ITEM LDA$TXT1 C(00,00,05) = ["NPU: "]; ITEM LDA$NAME C(00,30,07); ITEM LDA$TXT2 C(01,12,01) = [","]; ITEM LDA$NID C(01,18,03); ITEM LDA$TXT3 C(01,36,27) = [",MESSAGE MAY HAVE BEEN LOST"]; ITEM LDA$ZERO U(04,18,42) = [0]; END CONTROL EJECT; # * START MAIN PROCEDURE # # * SEARCH FOR THE NPUCB WITH THE SAME NPU NODE NUMBER AND SAME * HOST NODE NUMBER. INSURE SEARCH SUCCESS BY PRESETTING THE LAST * NPUCB WITH THE SEARCH KEYS AND A NULL STATE. # NPU$NID[CSNPCNT] = ABHSN[0]; NPU$HID[CSNPCNT] = ABHDN[0]; NPU$STAT[CSNPCNT] = NULLSTATE$; FOR I = 0 STEP 1 WHILE NPU$NID[I] NQ ABHSN[0] OR NPU$HID[I] NQ ABHDN[0] DO BEGIN END # * IF NO NPUCB WAS FOUND, THEN IGNORE THIS SM. # IF NPU$STAT[I] EQ NULLSTATE$ THEN BEGIN RETURN; # **** RETURN **** # END ABHWORD[1] = 0; # CLEAR OUTGOING ABH WORD # # * A GOOD SUPERVISION BROKEN SM HAS BEEN RECEIVED SINCE A NPUCB WITH * MATCHING NPU AND HOST NODE NUMBERS WAS FOUND. * CHECK IF CURRENT SEND ACTION ONGOING, CLEAR THE ACTION AND THE * SEND OPERATOR FROM THE NPUCB. INFORM THE SEND OPERATOR OF POSSIBLE * MESSAGE LOSS VIA A TERMINAL TEXT ENTRY TO THE CONNECTION TRAFFIC * QUEUE. # IF (NPU$OPSD[I] GR 0 AND NPU$OPSD[I] LQ MAXACN$) THEN BEGIN FOR OCBORD=HOPORD$ STEP 1 UNTIL MAXACN$ DO BEGIN P = LOC(NPU$SDFLGS[I]); SSBTBW(FLG$WORD,OCBORD,PENDING); IF PENDING THEN BEGIN SSBCBW(FLG$WORD,OCBORD); OC$CNPU[OCBORD] = 0; # CLEAR NPUCB FROM OCB # OC$NCNT[OCBORD] = OC$NCNT[OCBORD] - 1; # NUM SEND NPUS # # * SEND MESSAGE TO SEND OPERATOR. # CNST1 = 0; CNST2 = 30; CNST3 = 42; SSBSBF(LDAMSG,CNST1,CNST2,CNST3,B<00,42>NPU$NAME[I]); LDA$NID[0] = NPU$DNID[I]; WCB$SMID[1] = SMID"TTEXT"; WCB$IAF[1] = TRUE; # SET INPUT ALLOWED FLAG # # * CHECK IF MULTIPLE SEND COMMAND IN PROGRESS PRIOR TO * CLEARING THE OCB. IF MULTIPLE, SET INPUT ALLOWED FLAG TO * NOT ALLOW NEXT COMMAND. IF SEND COMMAND FINISHED, * CLEAR THE OCB VERB AND SET IAF TRUE. # IF OC$NCNT[OCBORD] NQ 0 THEN WCB$IAF[1] = FALSE; ELSE OC$UVERB[OCBORD] = 0; ABHTLC[1] = LDAMSGL$; ABHADR[1] = OCBORD; WCB$WC[1] = (LDAMSGL$/10) + 2; SSTAQE(P,WCBUF[1],ABH[1],LDAMSG); END END END # * CLEAR SEND OPERATOR FROM NPUCB. # NPU$OPSD[I] = 0; # * CHECK IF ONGOING STATUS ACTIVITY ON NPUCB. IF SO, CLEAR THE * STATUS OPERATOR FROM THE NPUCB AND ISSUE A STATUS FINISHED * EVENT TO THE EVENT PROCESSOR IF THIS CLEARED NPUCB HAS * CAUSED THE NPU COUNT FOR THE STATUS OPERATOR TO REACH ZERO. * IF THE STATUS ACTIVITY IS FINISHED, CLEAR THE ACTIVE VERB * FOR THE OPERATOR. # IF (NPU$OPST[I] GR 0 AND NPU$OPST[I] LQ MAXACN$) THEN BEGIN FOR OCBORD=HOPORD$ STEP 1 UNTIL MAXACN$ DO BEGIN P = LOC(NPU$STFLGS[I]); SSBTBW(FLG$WORD,OCBORD,PENDING); IF PENDING THEN BEGIN SSBCBW(FLG$WORD,OCBORD); IF OC$CNPU[OCBORD] EQ I THEN OC$CNPU[OCBORD] = 0; OC$NCNT[OCBORD] = OC$NCNT[OCBORD] - 1; IF OC$NCNT[OCBORD] EQ 0 THEN BEGIN WCB$SMID[1] = SMID"STUFIN"; WCB$WC[1] = 2; ABHADR[1] = OCBORD; SSTAQE(P,WCBUF[1],ABH[1],CSSM[1]); OC$VERB[OCBORD] = " "; END END END END # IF NPU$OPST # NPU$OPST[I] = 0; # * IF THERE IS A CONTROLLING NOP FOR THIS NPU, THEN CLEAR THE * CONTROLLING NOP FIELD AND SEND AN EVENT INDICATING CONTROL * IS LOST. # IF NPU$CNOP[I] NQ 0 THEN BEGIN WCB$WORD[1] = 3; WCB$SMID[1] = SMID"CTRLOFF"; ABHSN[1] = I; TNAME = OC$TNAM[NPU$CNOP[I]]; SSTAQE(P,WCBUF[1],ABH[1],TNAME); NPU$CNOP[I] = 0; END # * CLEAR THE OVERLAY OPERATOR FOR THE NPUCB. # NPU$OVFLGS[I] = 0; # * IF REQUIRED GO IS OUTSTANDING, THEN CANCEL THE TIMER REQUEST AND * CLEAR THE GO FLAG. # IF NPU$GFLAG[I] THEN BEGIN SSCCTR(NPU$CNUM[I],SUCCESS); NPU$GFLAG[I] = FALSE; END # * PREPARE A SUPERVISION LOST EVENT AND SEND TO THE EVENT PROCESS # NPU$STAT[I] = SUPSTAT"SUPLOST"; # SET STATE OF NPUCB # ABHWORD[1] = ABHWORD[0]; WCB$SMID[1] = SMID"SUPCB"; WCB$WC[1] = 2; SSTAQE(P,WCBUF[1],ABH[1],CSSM[1]); NPU$HID[I] = 0; # CLEAR HID OF NPUCB # NPU$LRF[I] = FALSE; # CLEAR THE LOAD REQ FLAG # NPU$DMPF[I] = FALSE; # CLEAR THE DUMP FLAG # END # CSSTNS # TERM