*DECK CSTSCT USETEXT TEXTCS USETEXT TXTCTCS USETEXT TXTSMCS USETEXT TXTAPSS USETEXT TXTSUSS PROC CSTSCT; # TITLE CSTSCT - SELECT CORRECT TERMINAL. # BEGIN # CSTSCT # # ** CSTSCT - SELECT CORRECT TERMINAL. * * D. G. DEPEW. 81/10/12. * * CSTSCT SELECTS APPROPRIATE TERMINAL ENTRIES FROM THE LINE RECORDS * CONTAINED IN THE NCF DATA QUEUE, AND FOR EACH SUCH TERMINAL CALLS * PROC CSTSCD TO CONFIGURE ALL DEVICES WHICH ARE APPROPRIATE FOR * THAT TERMINAL. * * PROC CSTSCT * * ENTRY THE NCF DATA QUEUE CONTAINS ONE OR MORE COMPLETE ENTRIES, * WHICH MAY BE FOLLOWED BY AN INCOMPLETE ENTRY. * * EXIT ALL NCF DATA QUEUE ENTRIES WHICH WERE COMPLETE HAVE BEEN * DELETED (AN INCOMPLETE ENTRY, IF THERE WAS ONE, REMAINS * UNALTERED AND UNPROCESSED). * ALL CONFIGURE TERMINAL RESPONSE SM'S (NORMAL OR ABNORMAL), * CORRESPONDING TO THE NCF DATA QUEUE ENTRIES THAT WERE * PROCESSED, HAVE BEEN PLACED IN THE OUTGOING TRAFFIC * QUEUE. * * NOTES THIS ROUTINE ALONG WITH PROC CSTSCD PERFORMS THE MATCHING * LOGIC FOR AUTORECOGNITION. * THE LOGIC OF THE INNER LOOPS OF THIS ROUTINE (INDUCTION * VARIABLE J) ARE BASED ON THE FACT THAT NDL GUARANTEES AT * LEAST ONE TERMINAL DEFINITION FOR A LINE. # # **** PROC CSTSCT - XREF LIST. # XREF BEGIN PROC CSTSCD; #SELECT AND CONFIGURE CORRECT DEVICES # PROC MOVE; #MOVE STORAGE DIRECT ADDRESSING (MACREL) # PROC SSTAQE; #ACCEPT QUEUE ENTRY # PROC SSTRTS; #REMOVE STORAGE ANYWHERE IN TABLE # END # **** # ITEM I, J; #LOOP INDUCTION VARIABLES # ITEM LASTERM B; #LAST TERMINAL FLAG # ITEM LTES; #LEN OF ALL TRM NTRYS IN A LINREC (CM WDS)# BEGIN # WE BEGIN THE PROCESSING OF A SINGLE NCF DATA QUEUE ENTRY BY # # INITIALIZING A WHOLE BUNCH OF STUFF. # # THE MEMORY MANAGEMENT ROUTINES GUARANTEE ONE ADDITIONAL WORD AT # # THE END OF EACH MANAGED TABLE (ABOVE AND BEYOND THE LENGTH OF THE# # TABLE). SETTING THIS WORD NON-ZERO FOR THE NCF DATA QUEUE # # INSURES THAT THE INNER LOOPS OF THIS ROUTINE AND PROC CSTSCD DO # # NOT ACT UPON STORAGE BEYOND THE END OF THE NCF DATA QUEUE. # NDQ$WORD[NDQL] = 1; # INSURE CORRECT LOOP TERMINATION # NRDEV = 0; # INITIALIZE NUMBER OF DEVICES CONFIGURED # LASTERM = FALSE; LTES = NDQ$LRSIZE[0] - LRHDRL$; # WORD COUNT OF TRM NTRYS # P = P + NDQ$TCSIZE[0]; # BEGINNING OF LINE REC # ABHWORD[0] = NDQ$WORD[1]; # BREAK OUT CNF/TE/R SM ABH # MOVE (NDQ$TCSIZE[0]-2, NDQ[2], CSSM[0]); # AND SM BODY # # SET UP FIXED FIELDS OF CONFIGURE TERMINAL RESPONSE SM. # ABHWORD[1] = NDQ$WORD[1]; ABHSN[1] = ABHDN[0]; # REVERSE DN AND SN FOR RESPONSE SM # ABHDN[1] = ABHSN[0]; SPMSG0[1] = 0; # START CNF/TE RESPONSE SM BODY # PFCSFC[1] = CNFTEN; # DEFINED IN TXTSUSS # CNFP[1] = CNFP[0]; # PORT NUMBER. THAT'S IT FOR NOW # IF CNFTTA[0] EQ LR$AUTO[0] THEN # LINE REC AND CNF/TE/R AGREE ON AUTOREC # BEGIN P = P + LRHDRL$; # 1ST TERM NTRY IN LINREC# IF CNFTTA[0] NQ 0 THEN # AUTORECOGNITION LINE # FOR J=TE$WC[0] STEP TE$WC[0] WHILE J LQ LTES AND NOT LASTERM DO # LOOP TIL END OF LINREC OR TERMINAL MATCH# IF (TE$TIP[0] EQ CNFTTT[0] OR TE$TIP[0] EQ 0) AND (TE$STIP[0] EQ CNFSTIP[0] OR TE$STIP[0] EQ 0) AND (TE$TSPD[0] EQ CNFLCLS[0] OR TE$TSPD[0] EQ 0) AND (TE$CSET[0] EQ CNFLCCD[0] OR TE$CSET[0] EQ 0) AND (TE$A1[0] EQ CNFA1[0] OR TE$A1[0] EQ 0) THEN # THIS IS IT (THE CORRECT TERMINAL) # BEGIN # GO FOR DEVICES # LASTERM = TRUE; # ONLY ONE TERM ALLOWED FOR AUTOREC # # INSURE VALUES REQUIRED FOR CNF/TE/N ARE IN LINE RECORD FIELDS. # TE$STIP[0] = CNFSTIP[0]; TE$CSET[0] = CNFLCCD[0]; TE$A1[0] = CNFA1[0]; CSTSCD (LASTERM); # SELECT AND CONFIGURE DEVICES # END ELSE # THIS IS NOT IT # P = P + TE$WC[0]; # NXT TERM NTRY # ELSE # FIXED CONFIGURATION LINE # FOR J=TE$WC[0] STEP TE$WC[0] WHILE NOT LASTERM DO # LOOP UNTIL END OF LINE RECORD # BEGIN IF J GQ LTES # NOTE - *J* SHOULD NEVER EXCEED *LTES* # THEN # THIS IS LAST TERM ENTRY IN LINE RECORD # LASTERM = TRUE; CSTSCD (LASTERM); # CONFIGURE ALL DEVICES # P = P + TE$WC[0]; # NXT TERM NTRY # END END IF NRDEV EQ 0 THEN # NOTHING GOT CONFIGURED # BEGIN # ISSUE CNF/TE/A # ABHTLC[1] = NCNFA; # DEFINED IN TXTSMCS. ABH COMPLETE # PFCSFC[1] = CNFTEA; # DEFINED IN TXTSUSS. SM COMPLETE # SSTAQE (P, CTEAQL$, ABH[1], CSSM[1]); # QUEUE CNF/TE/A# END SSTRTS (P, 0, NDQ$ESIZE[0]); # DEL 1ST NTRY IN NCF DATA Q# END END # CSTSCT # TERM