*DECK CSESLS USETEXT TEXTOV USETEXT TEXTCS USETEXT TEXTSS USETEXT TXTAPSS USETEXT TXTSMCS PROC CSESLS; # TITLE - SEND LINE STATUS. # BEGIN # ** CSESLS - SEND LINE STATUS. * * D.K. ENDO 82/03/17 * * THIS PROCEDURE FORMATS A LINE STATUS TEXT AND SENDS IT OUT TO THE * OPERATORS. * * PROC CSESLS * * ENTRY 1. STU/LI/U, STU/LI/N, OR MSG/LI/A SM. * * EXIT 1. LINE STATUS TEXT IN THE OPERATOR RESPONSE QUEUE. * 2. TEXT SENT TO THE C-LAYER VIA THE CONNECTION QUEUE. * # # **** PROC CSESLS - XREF LIST BEGINS. # XREF BEGIN PROC CSESLE; # SEND LOG (FILE) ENTRY # PROC SSBSBF; # STORE BIT FIELD # PROC SSTAQE; # ADD QUEUE ENTRY # FUNC XCHD C(10); # CONVERT HEX INTEGER TO DISPLAY CODE # END # **** # DEF ADS$TXTL # 40 #; # CHAR COUNT OF ALREADY IN STATE TEXT # DEF CDP$TXTL # 40 #; # CHAR COUNT OF CE DIAG IN PROGRESS TEXT # DEF DCA$TXTL # 40 #; # CHAR COUNT OF DUP CLA ADDRESS TEXT # DEF LNS$TXTL # 50 #; # CHAR COUNT OF LINE STATUS TEXT # DEF MNS$TXTL # 40 #; # CHAR COUNT OF MSG NOT SENT TEXT # DEF NTC$TXTL # 40 #; # CHAR COUNT OF NO TERMS CONFIG TEXT # DEF NTE$TXTL # 40 #; # CHAR COUNT OF NO TERMS ENABLED TEXT # DEF TNC$TXTL # 40 #; # CHAR COUNT OF TIP NOT CONFIGURED TEXT # ITEM CNST1; # CONSTANT ---> 1 # ITEM CNST2; # CONSTANT ---> 2 # ITEM CNST3; # CONSTANT ---> 3 # ITEM I; # LOOP INDUCTION VARIABLE # ITEM GOODRC B; # FLAG INDICATING GOOD REASON CODE # # THIS ARRAY DEFINES THE -ALREADY IN DESIRED STATE- MESSAGE TEXT. IT IS SENT WHEN A STU/LI/U SM COMES IN AND THE REASON CODE FIELD IS EIGHT. # ARRAY ADS$TXT [00:00] S(4); BEGIN ITEM ADS$TIM C(00,00,10) = [" "]; ITEM ADS$MSG C(01,00,25) = [" ALREADY IN DESIRED STATE"]; ITEM ADS$ZBYT1 U(03,30,30) = [ 0 ]; END # THIS ARRAY DEFINES THE -CE DIAGNOSTICS IN PROGRESS- MESSAGE TEXT. IT IS SENT WHEN A STU/LI/U SM COMES IN AND THE REASON CODE FIELD IS SET TO SEVEN. # ARRAY CDP$TXT [00:00] S(4); BEGIN ITEM CDP$TIM C(00,00,10) = [" "]; ITEM CDP$MSG C(01,00,25) = [" CE DIAG TEST IN PROGRESS"]; ITEM CDP$ZBYT1 U(03,30,30) = [ 0 ]; END # THIS ARRAY IS USED AS A TEMPORY FOR STORING A CHARACTER STRING TO BE LATER PLACE IN THE TEXT. # ARRAY CTEMP$WORD [00:00] S(1); BEGIN ITEM CTEMP C(00,00,10); ITEM CTEMP2 C(00,48,02); END # THIS ARRAY DEFINES THE -DUPLICATE CLA ADDRESS- MESSAGE TEXT. IT IS SENT OUT WHEN AN INCOMING STU/LI/U HAS A REASON CODE SET TO SIX # ARRAY DCA$TXT [00:00] S(4); BEGIN ITEM DCA$TIM C(00,00,10) = [" "]; ITEM DCA$MSG C(01,00,22) = [" DUPLICATE CLA ADDRESS"]; ITEM DCA$ZBYT U(03,12,48) = [ 0 ]; END # THIS BASED ARRAY IS USED AS A TEMPLATE TO GO OVER ONE OF THE MESSAGES SENT WHEN THE REASON CODE FIELD OF THE STU/LI/U SM IS NON ZERO. # BASED ARRAY ERR$MSG [00:00] S(6); BEGIN ITEM ERM$TIM C(00,00,10); ITEM ERM$LNM C(01,36,07); END # THIS ARRAY DEFINES THE LINE STATUS TEXT SENT TO THE OPERATORS. # ARRAY LNS$TXT [00:04] S(1); BEGIN ITEM LNS$TIM C(00,00,10); ITEM LNS$LIN C(01,00,06) = ["LINE: "]; ITEM LNS$LNM C(01,36,07); ITEM LNS$C1 C(02,18,01) = [","]; ITEM LNS$ST C(02,24,02); ITEM LNS$C2 C(02,36,01) = [","]; ITEM LNS$LT C(02,42,02); ITEM LNS$C3 C(02,54,01) = [","]; ITEM LNS$NNM C(03,00,07); ITEM LNS$S1 C(03,42,01) = ["/"]; ITEM LNS$PRT C(03,48,02); ITEM LNS$ZBYT U(04,00,60) = [ 0 ]; END # THIS TABLE CONTAINS ALL THE POSSIBLE LINE TYPES. THE NUMERIC VALUE MAPS DIRECTLY INTO THE TABLE. # DEF MX$LT # 12 #; ARRAY LT$TABLE [01:MX$LT] S(1); BEGIN ITEM LT$VAL C(00,00,02) = ["S1", "S2", "S3", ,, "A1", "A2", , "A6", "H1", "S4", "H2" ]; END # THIS ARRAY DEFINES THE -MESSAGE NOT SENT- MESSAGE TEXT. IT IS SENT WHEN THERE IS AN INCOMING MSG/LI/A SM. # ARRAY MNS$TXT [00:00] S(4); BEGIN ITEM MNS$NPU C(00,00,05) = ["NPU: "]; ITEM MNS$NNM C(00,30,07); ITEM MNS$MSG C(01,12,18) = [", MESSAGE NOT SENT"]; ITEM MNS$ZBYT U(03,00,60) = [ 0 ]; END # THIS ARRAY DEFINES THE -NO TERMINALS CONFIGUED- MESSAGE TEXT. IT IS SENT OUT WHEN AN INCOMING STU/LI/U HAS A REASON CODE SET TO TWO. # ARRAY NTC$TXT [00:00] S(4); BEGIN ITEM NTC$TIM C(00,00,10) = [" "]; ITEM NTC$MSG C(01,00,24) = [" NO TERMINALS CONFIGURED"]; ITEM NTC$ZBYT U(03,24,36) = [ 0 ]; END # THIS ARRAY DEFINES THE -NO TERMINALS ENABLED- MESSAGE TEXT. IT IS SENT OUT WHEN AN INCOMING STU/LI/U HAS A REASON CODE SET TO ONE. # ARRAY NTE$TXT [00:00] S(4); BEGIN ITEM NTE$TIM C(00,00,10) = [" "]; ITEM NTE$MSG C(01,00,21) = [" NO TERMINALS ENABLED"]; ITEM NTE$ZBYT U(03,06,54) = [ 0 ]; END # THIS CONTAINS ALL THE POSSIBLE STATUS THAT THE LINE CAN HAVE. IT CAN BE MAPPED DIRECT TO THE NUMERIC STATUS VALUE IN THE INCOMING SM. # DEF MX$ST # 5 #; ARRAY ST$TABLE [01:MX$ST] S(1); BEGIN ITEM ST$VAL C(00,00,02) = ["NC", "DI", "DN", "EN", "AC", ]; END # THIS ARRAY DEFINES THE -TIP NOT CONFIGURED- MESSAGE TEXT. IT IS SENT WHEN AN INCOMING STU/LI/U SM HAS A REASON CODE SET TO FIVE. # ARRAY TNC$TXT [00:00] S(4); BEGIN ITEM TNC$TIM C(00,00,10) = [" "]; ITEM TNC$MSG C(01,00,20) = [" TIP NOT CONFIGURED"]; ITEM TNC$ZBYT U(03,00,60) = [ 0 ]; END # THIS ARRAY IS USED TO STORE THE LINE NAME TO BE INSERTED INTO THE TEXT WHEN ONE IS NOT FOUND. # ARRAY UNK$TXT [00:00] S(1); BEGIN ITEM UNK$NAM C(00,18,07) = ["UNKNOWN"]; END CONTROL EJECT; # # # CSESLS CODE BEGINS HERE # # # # * FORMAT THE LINE STATUS TEXT. SEARCH THE LINE XREF TABLE, GIVEN * THE PORT AND NODE I.D. AND FIND THE NAME FOR THIS LINE. IF A NAME * IS FOUND INSERT NAME INTO TEXT, ELSE INSERT -UNKNOWN- INTO TEXT. * INSERT THE STATUS AND LTYPE INTO THE TEXT. SEARCH NPUCB-S FOR THE * NAME OF THE NPU SUPPORTING THE LINE. IF FOUND, INSERT NAME INTO * TEXT. CONVERT THE PORT NUMBER AND APPEND IT TO THE TEXT. # FOR I=0 STEP 1 WHILE NOT(STUP[0] EQ LIX$PORT[I] AND ABHSN[0] EQ LIX$NID[I]) AND I LS LIXL DO BEGIN END IF I LS LIXL THEN BEGIN CNST1 = 1; CNST2 = 36; CNST3 = 42; SSBSBF(LNS$TXT,CNST1,CNST2,CNST3,B<0,42>LIX$WORD[I]); END ELSE BEGIN CNST1 = 1; CNST2 = 36; CNST3 = 42; SSBSBF(LNS$TXT,CNST1,CNST2,CNST3,UNK$TXT); END LNS$ST[0] = ST$VAL[STUSTI[0]]; LNS$LT[0] = LT$VAL[STULT[0]]; FOR I=0 STEP 1 WHILE ABHSN[0] NQ NPU$NID[I] AND I LS CSNPCNT DO BEGIN END IF I LS CSNPCNT THEN BEGIN LNS$NNM[0] = NPU$NAME[I]; END ELSE BEGIN LNS$NNM[0] = " "; END CTEMP[0] = XCHD(STUP[0] + X"100"); LNS$PRT[0] = CTEMP2[0]; # * IF THIS SM IS STU/LI/U, APPEND THE CURRENT TIME TO THE TEXT. SET * THE AUDIENCE GROUP TO ONE AND SEND IT OFF TO THE OPERATOR RESPONSE * QUEUE. IF THE REASON CODE IS NOT ZERO, THEN APPEND A MESSAGE, * BASED ON THE RC, TO THE TIME AND SEND THE MESSAGE OFF TO THE ORQ * WITH AN AUDIENCE GROUP OF ONE. # IF WCB$SMID[0] EQ SMID"STULI" THEN BEGIN LNS$TIM[0] = CTM$CLOCK[0]; WCB$WORD[1] = 0; WCB$WC[1] = 2 + (LNS$TXTL / 10); ABHWORD[1] = LNS$TXTL; ABHADR[1] = AUDGR3$; ABHABN[1] = I; SSTAQE(P,WCBUF[1],ABH[1],LNS$TXT[0]); CSESLE(ABHSN[0],WCBUF[1],LNS$TXT); IF STURCL[0] NQ 0 THEN BEGIN GOODRC = FALSE; IF STURCL[0] EQ RRCI"N1" THEN # NO TERMS ENABLED, RC=1 # BEGIN P = LOC(NTE$TXT); ABHTLC[1] = NTE$TXTL; GOODRC = TRUE; END ELSE IF STURCL[0] EQ RRCI"N2" THEN # NO TERMS CONFIGURED, RC=2 # BEGIN P = LOC(NTC$TXT); ABHTLC[1] = NTC$TXTL; GOODRC = TRUE; END ELSE IF STURCL[0] EQ RRCI"NT" THEN # TIP NOT CONFIGURED, RC=5 # BEGIN P = LOC(TNC$TXT); ABHTLC[1] = TNC$TXTL; GOODRC = TRUE; END ELSE IF STURCL[0] EQ RRCI"DC" THEN # DUPLICATE CLA ADDRESS, RC=6 # BEGIN P = LOC(DCA$TXT); ABHTLC[1] = DCA$TXTL; GOODRC = TRUE; END ELSE IF STURCL[0] EQ RRCI"CD" THEN # CE DIAGNOSTICS IN PROGESS,RC=7# BEGIN P = LOC(CDP$TXT); ABHTLC[1] = CDP$TXTL; GOODRC = TRUE; END ELSE IF STURCL[0] EQ RRCI"UC" THEN # ALREADY IN DESIRED STATE, RC=8# BEGIN P = LOC(ADS$TXT); ABHTLC[1] = ADS$TXTL; GOODRC = TRUE; END IF GOODRC THEN BEGIN WCB$WC[1] = 2 + (ABHTLC[1] / 10 ); SSTAQE(P,WCBUF[1],ABH[1],ERR$MSG[0]); CSESLE(ABHSN[0],WCBUF[1],ERR$MSG); END END END # * IF THIS SM IS STU/LI/N OR MSG/LI/A, THEN SEND THE STATUS TEXT TO * THE OPERATOR IDENTIFIED BY THE ACN WITH THE INPUT ALLOW FLAG * CLEARED. IF THIS SM IS MSG/LI/A, APPEND THE NPU NAME TO THE -NOT * SENT- MESSAGE AND SEND IT TO THE OPERATOR WITH THE INPUT ALLOWED * FLAG SET. # ELSE # THE SM WAS NOT STU/LI/U, ASSUME IT IS # BEGIN # STU/LI/N OR MSG/LI/A # WCB$WORD[1] = 0; WCB$SMID[1] = SMID"TTEXT"; WCB$WC[1] = 2 + (LNS$TXTL / 10) - 1; ABHWORD[1] = 0; ABHADR[1] = ABHCN[0]; ABHTLC[1] = LNS$TXTL - 10; SSTAQE(P,WCBUF[1],ABH[1],LNS$TXT[1]); IF WCB$SMID[0] EQ SMID"MSGLIA" THEN BEGIN FOR I=0 STEP 1 WHILE ABHSN[0] NQ NPU$NID[I] AND I LS CSNPCNT DO BEGIN END IF I LS CSNPCNT THEN BEGIN CNST1 = 0; CNST2 = 30; CNST3 = 42; SSBSBF(MNS$TXT,CNST1,CNST2,CNST3,B<0,42>NPU$WORD[I]); END WCB$IAF[1] = TRUE; WCB$WC[1] = 2 + (MNS$TXTL / 10); ABHTLC[1] = MNS$TXTL; SSTAQE(P,WCBUF[1],ABH[1],MNS$TXT[0]); END END RETURN; END # CSESLS # TERM