*DECK CSESTR
USETEXT TEXTOV
USETEXT TEXTCS
USETEXT TEXTSS
USETEXT TXTAPSS
USETEXT TXTSMCS
PROC CSESTR;
# TITLE - SEND TRUNK STATUS. #
BEGIN
#
** CSESTR - SEND TRUNK STATUS.
*
* D.K. ENDO 82/03/25
*
* THIS ROUTINE FORMATS THE TRUNK STATUS TEXT WHEN A STU/TR/U OR A
* STU/TR/N SM IS RECEIVED.
*
* PROC CSESTR
*
* ENTRY 1. STU/TR/N OR STU/TR/U SM FROM THE EVENT QUEUE
*
* EXIT 1. ENTRY IN THE OPERATOR RESPONSE QUEUE WITH THE
* STATUS TEXT, IN THE CASE OF A STU/TR/U SM.
* 2. ENTRY IN THE OPERATOR RESPONSE QUEUE WITH A MSG
* BASED ON THE REASON CODE (STU/TR/U).
* 3. ENTRY IN CONNECTION QUEUE WITH THE STATUS TEXT,
* IN THE CASE OF STU/TR/N SM.
*
#
#
**** PROC CSESTR - XREF LIST BEGINS.
#
XREF
BEGIN
PROC CSESLE; # SEND LOG (FILE) ENTRY #
PROC SSBSBF; # STORE BIT FIELD #
PROC SSTAQE; # ADD QUEUE ENTRY #
FUNC XCHD U; # CONVERT HEX INTEGER TO DISPLAY CODE #
END
#
****
#
DEF CDP$TXTL # 60 #; # CHAR COUNT OF CE DIAG IN PROGRESS TEXT #
DEF DCA$TXTL # 50 #; # CHAR COUNT OF DUPLICATE CLA ADDR TEXT #
DEF IDS$TXTL # 60 #; # CHAR COUNT OF IN DESIRED STATE TEXT #
DEF LPC$TXTL # 50 #; # CHAR COUNT OF LAST PATH TO A CS TEXT #
DEF NLC$TXTL # 50 #; # CHAR COUNT OF NO LIP CONFIGURED TEXT #
DEF TRS$TXTL # 60 #; # CHAR COUNT OF TRUNK STATUS TEXT #
ITEM CNST1; # CONSTANT ---> 1 #
ITEM CNST2; # CONSTANT ---> 2 #
ITEM CNST3; # CONSTANT ---> 3 #
ITEM I; # LOOP INDUCTION VARIABLE #
ITEM ITEMP U; # UNSIGNED INTEGER TEMPORARY #
ITEM J; # LOOP INDUCTION VARIABLE #
ITEM NID2; # TEMPORARY FOR THE NODE I.D. OF NPU2 #
ITEM P2; # TEMPORARY FOR THE P2 VALUE #
#
THIS ARRAY DEFINES THE -CE DIAG IN PROGRESS- TEXT. THIS MESSAGE
IS SENT WHEN A STU/TR/U SM IS RECEIVED AND THE REASON CODE IS SET
TO SEVEN.
#
ARRAY CDP$TXT [00:00] S(6);
BEGIN
ITEM CDP$TIM C(00,00,10) = [" "];
ITEM CDP$TRK C(01,00,07) = ["TRUNK: "];
ITEM CDP$TNM C(01,42,07);
ITEM CDP$MSG C(02,24,26) = [", CE DIAG TEST IN PROGRESS"];
ITEM CDP$ZBYT U(05,00,60) = [0];
END
#
* THIS ARRAY IS USED TO SAVE THE CURRENT TRUNK NAME.
#
ARRAY CRNT$TNM [00:00] S(1);
BEGIN
ITEM CRNT$TRK C(00,18,07);
END
#
THIS ARRAY DEFINES THE -DUPLICATE CLA ADDRESS- MESSAGE TEXT. THIS
IS SENT WHEN A STU/TR/U SM IS RECEIVED WITH A REASON CODE SET TO
SIX.
#
ARRAY DCA$TXT [00:00] S(5);
BEGIN
ITEM DCA$TIM C(00,00,10) = [" "];
ITEM DCA$TRK C(01,00,07) = ["TRUNK: "];
ITEM DCA$TNM C(01,42,07);
ITEM DCA$MSG C(02,24,23) = [", DUPLICATE CLA ADDRESS"];
ITEM DCA$ZBYT U(04,42,18) = [ 0 ];
END
#
THIS BASED ARRAY IS USED TO POINT TO THE MESSAGE TEXT THAT WILL BE
SENT WHEN A STU/TR/U SM IS RECEIVED AND THE REASON CODE IS NON-
ZERO.
#
BASED ARRAY ERR$MSG [00:00] S(4);
BEGIN
ITEM EMS$TIM C(00,00,10);
ITEM EMS$TNM C(01,42,07);
END
#
THIS ARRAY DEFINES THE -IN DESIRED STATE- MESSAGE TEXT. THIS IS
SENT WHEN A STU/TR/U SM IS RECEIVED WITH THE REASON CODE SET TO
EIGHT.
#
ARRAY IDS$TXT [00:00] S(6);
BEGIN
ITEM IDS$TIM C(00,00,10) = [" "];
ITEM IDS$TRK C(01,00,07) = ["TRUNK: "];
ITEM IDS$TNM C(01,42,07);
ITEM IDS$MSG C(02,24,26) = [", IN DESIRED STATE ALREADY"];
ITEM IDS$ZBYT U(05,00,60) = [0];
END
#
THIS ARRAY DEFINES THE -LAST PATH TO CS- MESSAGE TEXT. THIS IS
SENT WHEN A STU/TR/U SM IS RECEIVED AND THE REASON CODE IS SET TO
FOUR.
#
ARRAY LPC$TXT [00:00] S(5);
BEGIN
ITEM LPC$TIM C(00,00,10) = [" "];
ITEM LPC$TRK C(01,00,07) = ["TRUNK: "];
ITEM LPC$TNM C(01,42,07);
ITEM LPC$MSG C(02,24,19) = [", LAST PATH TO A CS"];
ITEM LPC$ZBYT U(04,18,42) = [0];
END
#
THIS ARRAY DEFINES THE LINE TYPE TABLE. THE VALUES IN THIS TABLE
MAP DIRECTLY TO THE NUMERICAL VALUE IN THE SM.
#
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 -NO LIP CONFIGURED- MESSAGE TEXT. THIS IS
SENT WHEN A STU/TR/U IS RECEIVED AND THE REASON CODE IS SET TO
FIVE.
#
ARRAY NLC$TXT [00:00] S(5);
BEGIN
ITEM NLC$TIM C(00,00,10) = [" "];
ITEM NLC$TRK C(01,00,07) = ["TRUNK: "];
ITEM NLC$TNM C(01,42,07);
ITEM NLC$MSG C(02,24,20) = [", LIP NOT CONFIGURED"];
ITEM NLC$ZBYT1 U(04,24,36) = [0];
END
#
THIS ARRAY DEFINES THE STATUS TABLE. THE VALUES IN THIS TABLE MAP
DIRECTLY TO THE NUMERIC 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 TRUNK STATUS TEXT. THIS IS SENT WHEN A
STU/TR/U IS RECEIVED.
#
ARRAY TRS$TXT [00:05] S(1);
BEGIN
ITEM TRS$TIM C(00,00,10);
ITEM TRS$TRNK C(01,00,07) = ["TRUNK: "];
ITEM TRS$TNM C(01,42,07);
ITEM TRS$C1 C(02,24,01) = [","];
ITEM TRS$ST C(02,30,02);
ITEM TRS$C2 C(02,42,01) = [","];
ITEM TRS$LT C(02,48,02);
ITEM TRS$C3 C(03,00,01) = [","];
ITEM TRS$NNM1 C(03,06,07);
ITEM TRS$S1 C(03,48,01) = ["/"];
ITEM TRS$P1 C(03,54,02);
ITEM TRS$C4 C(04,06,01) = [","];
ITEM TRS$NNM2 C(04,12,07);
ITEM TRS$S2 C(04,54,01) = ["/"];
ITEM TRS$P2 U(05,00,12);
ITEM TRS$ZBYT C(05,12,48) = [0];
END
#
THIS ARRAY DEFINES THE NAME USED WHEN ONE CAN NOT BE FOUND.
#
ARRAY UNK$TXT [00:00] S(1);
BEGIN
ITEM UNK$NAME C(00,18,07) = ["UNKNOWN"];
END
CONTROL EJECT;
# #
# CSESTR CODE BEGINS HERE #
# #
#
* BUILD THE TEXT THAT REPORTS THE TRUNK STATUS. SEARCH THE PHYSICAL
* LINK TABLE FOR THIS TRUNK USING THE SOURCE NODE I.D OF THIS SM AND
* THE PORT I.D. IF FOUND, SEARCH THE NPUCB-S FOR THE NPU OPPOSITE
* THE NPU THAT SENT THIS SM. IF AN NPUCB IS FOUND THE NAME AS NPU2
* OF THE TEXT, ELSE INSERT -UNKNOWN- AS THE NAME. CONVERT P2 TO
* DISPLAY CODE AND INSERT IT INTO THE TEXT. IF A PHYSICAL LINK
* TABLE ENTRY WAS NOT FOUND, THEN IS -UNKNOWN- AS THE NAME OF NPU2
* AND CLEAR THE P2 VALUE IN THE TEXT. SEARCH THE NPUCB-S FOR THE
* NPU THAT SENT THIS MESSAGE. IF FOUND THEN INSERT THE NAME OF NPU1
* INTO THE TEXT, ELSE APPEND -UNKNOWN- AS NPU1. CONVERT THE P1
* VALUE AND APPEND IT TO THE TEXT. CONVERT THE STATUS AND LINE TYPE
* AND APPEND THEM TO THE TEXT.
#
FOR I=0 STEP 1 WHILE NOT(((ABHSN[0] EQ PLX$TN1[I] AND
STUP[0] EQ PLX$TP1[I]) OR
(ABHSN[0] EQ PLX$TN2[I] AND
STUP[0] EQ PLX$TP2[I])) AND
PLX$TYPE[I]) AND
I LS PLXREFL/2
DO
BEGIN
END
IF I LS PLXREFL/2
THEN
BEGIN
IF ABHSN[0] EQ PLX$TN1[I]
THEN
BEGIN
NID2 = PLX$TN2[I];
P2 = PLX$TP2[I];
END
ELSE
BEGIN
NID2 = PLX$TN1[I];
P2 = PLX$TP1[I];
END
FOR J=0 STEP 1 WHILE NID2 NQ NPU$NID[J] AND
J LS CSNPCNT
DO
BEGIN
END
IF J LS CSNPCNT
THEN
BEGIN
TRS$NNM2[0] = NPU$NAME[J];
END
ELSE
BEGIN
TRS$NNM2[0] = UNK$NAME[0];
END
TRS$P2[0] = XCHD(X"100" + P2);
CNST1 = 1;
CNST2 = 42;
SSBSBF(TRS$TXT,CNST1,CNST2,CNST2,B<0,42>PLX$WORD[I]);
CRNT$TRK[0] = PLX$NAME[I];
END
ELSE
BEGIN
TRS$NNM2[0] = UNK$NAME[0];
TRS$P2[0] = "--";
CNST1 = 1;
CNST2 = 42;
SSBSBF(TRS$TXT,CNST1,CNST2,CNST2,UNK$TXT);
CRNT$TRK[0] = UNK$NAME[0];
END
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
TRS$NNM1[0] = NPU$NAME[I];
END
ELSE
BEGIN
TRS$NNM1[0] = UNK$NAME[0];
END
ITEMP = XCHD(X"100" + STUP[0]);
CNST1 = 3;
CNST2 = 54;
CNST3 = 12;
SSBSBF(TRS$TXT,CNST1,CNST2,CNST3,ITEMP);
TRS$ST[0] = ST$VAL[STUSTI[0]];
TRS$LT[0] = LT$VAL[STULT[0]];
#
* IF THIS SM IS A STU/TR/U THEN APPEND THE CURRENT TIME TO THE TEXT.
* SEND IT OFF TO THE OPERATOR RESPONSE QUEUE WITH THE AUDIENCE GROUP
* SET TO ONE. IF THE REASON CODE FIELD IS NON-ZERO. SELECT THE
* APPROPRIATE TEXT BASED ON THE REASON CODE VALUE. SEND THE TEXT
* OFF TO THE OPERATOR RESPONSE QUEUE WITH THE AUDIENCE GROUP SET
* TO ONE.
#
IF WCB$SMID[0] EQ SMID"STUTR"
THEN
BEGIN
TRS$TIM[0] = CTM$CLOCK[0];
WCB$WORD[1] = 0;
WCB$WC[1] = 2 + (TRS$TXTL / 10);
ABHWORD[1] = TRS$TXTL;
ABHADR[1] = AUDGR3$;
ABHABN[1] = I;
SSTAQE(P<ORQ>,WCBUF[1],ABH[1],TRS$TXT[0]);
CSESLE(ABHSN[0],WCBUF[1],TRS$TXT);
IF STURCI[0] NQ 0
THEN
BEGIN
IF STURCI[0] EQ RRCR"ND"
THEN
BEGIN
P<ERR$MSG> = LOC(LPC$TXT);
ABHTLC[1] = LPC$TXTL;
END
ELSE IF STURCI[0] EQ RRCR"NL"
THEN
BEGIN
P<ERR$MSG> = LOC(NLC$TXT);
ABHTLC[1] = NLC$TXTL;
END
ELSE IF STURCI[0] EQ RRCI"DC"
THEN
BEGIN
P<ERR$MSG> = LOC(DCA$TXT);
ABHTLC[1] = DCA$TXTL;
END
ELSE IF STURCI[0] EQ RRCR"DUC"
THEN
BEGIN
P<ERR$MSG> = LOC(CDP$TXT);
ABHTLC[1] = CDP$TXTL;
END
ELSE IF STURCI[0] EQ RRCR"UC"
THEN
BEGIN
P<ERR$MSG> = LOC(IDS$TXT);
ABHTLC[1] = IDS$TXTL;
END
WCB$WC[1] = 2 + (ABHTLC[1] / 10);
CNST1 = 1;
CNST2 = 42;
SSBSBF(ERR$MSG,CNST1,CNST2,CNST2,CRNT$TNM);
SSTAQE(P<ORQ>,WCBUF[1],ABH[1],ERR$MSG);
CSESLE(ABHSN[0],WCBUF[1],ERR$MSG);
END
END
#
* IF THIS SM IS STU/TR/N, THEN SEND THE TRUNK STATUS TEXT TO THE
* C-LAYER WITH THE INPUT ALLOWED FLAG CLEARED.
#
ELSE # IF NOT STU/TR/U, THEN ASSUME A STU/TR/N #
BEGIN
WCB$WORD[1] = 0;
WCB$SMID[1] = SMID"TTEXT";
WCB$WC[1] = 2 + (TRS$TXTL / 10) - 1;
ABHWORD[1] = 0;
ABHADR[1] = ABHCN[0];
ABHTLC[1] = TRS$TXTL - 10;
SSTAQE(P<CNQ>,WCBUF[1],ABH[1],TRS$TXT[1]);
END
RETURN; # **** RETURN **** #
END # CSESTR #
TERM