*DECK CSESNS
USETEXT TEXTCS
USETEXT TEXTSS
USETEXT TXTAPSS
USETEXT TXTSMCS
PROC CSESNS;
# TITLE - SEND NPU STATUS. #
BEGIN
#
** CSESNS - SEND NPU STATUS.
*
* D.K. ENDO 82/03/18
*
* THIS PROCEDURE FORMATS NPU STATUS MESSAGES AND SENDS THEM OUT TO
* THE APPROPRIATE OPERATORS.
*
* PROC CSESNS
*
* ENTRY 1. STU/NP/U OR STU/NP/N SM.
*
* EXIT 1. ENTRY IN OPERATOR RESPONSE QUEUE WITH NPU STATUS.
* 2. NPU STATUS TO THE OPERATOR VIA THE C-LAYER QUEUE.
*
#
#
**** PROC CSESNS - XREF LIST BEGINS.
#
XREF
BEGIN
PROC CSESLE; # SEND LOG (FILE) ENTRY #
PROC SSBSBF; # STORE BIT FIELD #
PROC SSTAQE; # ADD QUEUE ENTRY #
FUNC XCDD C(10); # CONVERT DECIMAL INTEGER TO DISPLAY CODE #
END
#
****
#
DEF ASCII$Y # X"59" #; # VALUE FOR A ASCII -Y- #
DEF DOC$TXTL # 50 #; # CHAR COUNT OF -DUMP OPTION CHANGED- TEXT#
DEF NPS$TXTL # 50 #; # CHAR COUNT OF NPU STATUS TEXT #
DEF OP$GO # 1 #; # INDICATES AN OPERATOR GO IS NEEDED #
ITEM CNST1; # CONSTANT ---> 1 #
ITEM CNST2; # CONSTANT ---> 2 #
ITEM CNST3; # CONSTANT ---> 3 #
ITEM I; # LOOP INDUCTION VARIABLE #
#
THIS ARRAY IS USED TO STORE A TEXT STRING THAT WILL LATER BE ADDED
TO THE MESSAGE TEXT.
#
ARRAY CTEMP$WORD [00:00] S(1);
BEGIN
ITEM CTEMP C(00,00,10);
ITEM CTEMP3 C(00,42,03);
END
#
THIS ARRAY DEFINES THE -DUMP OPTION CHANGED- TEXT. IT IS SENT OUT
WHEN A STU/NP/U SM HAS A REASON CODE SET TO THREE.
#
ARRAY DOC$TXT [00:00] S(5);
BEGIN
ITEM DOC$TIM C(00,00,10) = [" "];
ITEM DOC$NPU C(01,00,05) = ["NPU: "];
ITEM DOC$NNM C(01,30,07);
ITEM DOC$MSG C(02,12,21) = [", DUMP OPTION CHANGED"];
ITEM DOC$ZBYT U(04,18,42) = [ 0 ];
END
#
THIS ARRAY DEFINES THE NPU STATUS MESSAGE FORMATTED FROM THE IN-
COMING SM.
#
ARRAY NPS$TXT [00:04] S(1);
BEGIN
ITEM NPS$TIM C(00,00,10);
ITEM NPS$NPU C(01,00,05) = ["NPU: "];
ITEM NPS$NNM C(01,30,07);
ITEM NPS$C1 C(02,12,01) = [","];
ITEM NPS$ST C(02,18,02) = ["AC"];
ITEM NPS$C2 C(02,30,01) = [","];
ITEM NPS$NID C(02,36,03);
ITEM NPS$C3 C(02,54,01) = [","];
ITEM NPS$GO C(03,00,06);
ITEM NPS$C4 C(03,36,01) = [","];
ITEM NPS$DP C(03,42,03);
ITEM NPS$ZBYT U(04,00,60) = [ 0 ];
END
CONTROL EJECT;
# #
# CSESNS CODE BEGINS HERE #
# #
#
* FORMAT THE NPU STATUS TEXT. SEARCH THE NPUCB-S FOR THIS NPU.
* APPEND THE NAME IN THE NPUCB TO THE TEXT. CONVERT THE NODE-ID AND
* APPEND IT TO THE TEXT. IF GO-NEEDED FLAG IS SET THE APPEND -NEED
* GO- TO THE TEXT. IF THE DUMP INDICATOR IS SET TO -Y- THEN APPEND
* -ON- TO THE TEXT, ELSE APPEND -OFF- TO THE TEXT.
#
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 = 1;
CNST2 = 30;
CNST3 = 42;
SSBSBF(NPS$TXT,CNST1,CNST2,CNST3,B<0,42>NPU$WORD[I]);
END
CTEMP[0] = XCDD(1000 + ABHSN[0]);
NPS$NID[0] = CTEMP3[0];
IF STUDP[0] EQ ASCII$Y
THEN
BEGIN
NPS$DP[0] = " ON";
END
ELSE
BEGIN
NPS$DP[0] = "OFF";
END
IF STUGO[0] EQ OP$GO
THEN
BEGIN
NPS$GO[0] = "NEEDGO";
END
ELSE
BEGIN
NPS$GO[0] = " ";
END
#
* IF THIS SM IS A STU/NP/U, THEN APPEND THE CURRENT TIME TO THE
* TEXT. SEND THE TEXT OFF TO THE OPERATOR RESPONSE QUEUE WITH AN
* AUDIENCE GROUP OF ONE. IF THE REASON CODE IS SET TO THREE (DUMP
* OPTION CHANGED), THEN APPEND THE TIME NPU NAME AND MESSAGE TO
* INDICATE THE CHANGE AND SEND IT OFF TO THE OPERATOR RESPONSE QUEUE
* WITH AN AUDIENCE GROUP OF ONE.
#
IF WCB$SMID[0] EQ SMID"STUNP"
THEN
BEGIN
NPS$TIM[0] = CTM$CLOCK[0];
WCB$WORD[1] = 0;
WCB$WC[1] = 2 + (NPS$TXTL / 10);
ABHWORD[1] = NPS$TXTL;
ABHADR[1] = AUDGR3$;
ABHABN[1] = I;
SSTAQE(P<ORQ>,WCBUF[1],ABH[1],NPS$TXT[0]);
CSESLE(ABHSN[0],WCBUF[1],NPS$TXT);
IF STURCL[0] EQ RRCN"DO"
THEN
BEGIN
CNST1 = 1;
CNST2 = 30;
CNST3 = 42;
SSBSBF(DOC$TXT,CNST1,CNST2,CNST3,B<0,42>NPU$WORD[I]);
WCB$WC[1] = 2 + (DOC$TXTL / 10);
ABHTLC[1] = DOC$TXTL;
SSTAQE(P<ORQ>,WCBUF[1],ABH[1],DOC$TXT[0]);
CSESLE(ABHSN[0],WCBUF[1],DOC$TXT);
END
END
#
* IF THIS SM IS A STU/NP/N , THEN SEND THE TEXT TO THE
* OPERATOR IDENTIFIED BY ACN VIA THE C-LAYER QUEUE WITH THE INPUT
* ALLOWED FLAG CLEARED.
#
ELSE # IF NOT STU/NP/U, THEN ASSUME THIS SM IS #
BEGIN # STU/NP/N. #
WCB$WORD[1] = 0;
WCB$SMID[1] = SMID"TTEXT";
WCB$WC[1] = 2 + (NPS$TXTL / 10) - 1;
ABHWORD[1] = 0;
ABHADR[1] = ABHCN[0];
ABHTLC[1] = NPS$TXTL - 10;
SSTAQE(P<CNQ>,WCBUF[1],ABH[1],NPS$TXT[1]);
END
RETURN; # **** RETURN **** #
END # CSESNS #
TERM