cdc:nos2.source:nam5871:netxfrc
Table of Contents
NETXFRC
Table Of Contents
- [00011] PROC NETXFRC
- [00056] PROC NP$MSG
- [00057] PROC NP$SMSG
- [00058] PROC NP$DATA
- [00059] PROC NP$GET
- [00060] PROC NP$XLOC
- [00061] PROC NP$RCL
- [00062] PROC NP$RTIM
- [00063] PROC NP$STPR
Source Code
- NETXFRC.txt
- *DECK NETXFRC
- *IF DEF,XFR
- USETEXT AIPDEF
- USETEXT NP$GETS
- USETEXT HEADER
- USETEXT NP$NWL
- USETEXT NP$TAA
- USETEXT NX$ACBX
- USETEXT NX$ACBF
- USETEXT NX$MSG
- PROC NETXFRC;
- #
- *1DC NETXFRC
- *
- * 1.PROC NAME AUTHOR DATE
- * NETXFRC L.T.NGUYEN 83/03/25
- *
- * 2.FUNCTINAL DESCRIPTION:
- * CONTINUE TO PROCESS FILE TRANSFER UNTIL ENCOUNTER
- * A NULL BLOCK.
- *
- * 3.METHOD :
- * SET MORETODO = TRUE
- * LOOP UNTIL MORETODO IS FALSE:
- * GET BLOCK FROM LIST 1.
- * IF BLOCK TYPE IS NULL
- * THEN SET MORETODO = FALSE.
- * ELSE
- * CALL PRDATA FOR APPROPRIATE ACTION BY STATE TABLE
- * PROCESSOR.
- * END OF LOOP
- *
- * GET CURRENT TIME.
- * CHECK FOR TIME EXPIRED.
- * IF TIME EXPIRED
- * THEN CALL STATE TABLE PROCESSOR WITH TIME OUT TRIGGER.
- * RETURN.
- *
- * 4.INPUT PARAMS:
- * FTTINDEX - INDEX INTO FTT TABLE ( GLOBAL ).
- *
- * 5.EXIT PARAMS:
- * NONE.
- *
- * 6.PROC CALLED:
- * NP$GET - TO GET BLOCK.
- * PRDATA - PROCESS DATA.
- *
- *
- *
- *
- #
- BEGIN
- XREF
- BEGIN
- PROC NP$MSG ;
- PROC NP$SMSG ;
- PROC NP$DATA;
- PROC NP$GET ;
- PROC NP$XLOC ;
- PROC NP$RCL;
- PROC NP$RTIM ;
- PROC NP$STPR ;
- END
- SWITCH ST$ORD ST$ORD0,ST$ORD1,ST$ORD2,ST$ORD3,CALL$ST,ST$ORD4 ;
- ITEM I ;
- ITEM BTRIG ;
- ITEM TRIGGER U ;
- MORETODO = TRUE ; # ASSUMING THERE IS THINGS TO DO #
- FOR I = I WHILE MORETODO AND (ID$FLAG NQ 0) AND (SD$FLAG EQ 0)
- AND (HEAD EQ FOOT)
- DO
- BEGIN # LOOP TO GET BLOCK #
- ACLN = XFR$LIST ; # GET ONLY FROM XFR (1) LIST #
- LOC$HA = LOC(DATA$WORD[0]); # APPL. BLOCK HEADER #
- LOC$TA = LOC(DATA$WORD[1]); # TEXT AREA #
- TLMX = MXIVT$SIZE ; # MAX BLOCK SIZE #
- OPCODE = OP$GETL ;
- NWL[NEXT] = 0 ;
- NWL$TA[NEXT] = LOC$TA ;
- BS = OPABHSIZ ;
- NP$GET ; # GO GET IT #
- P<HEADER> = LOC$HA ;
- IF ABHABT[0] EQ APPNULL
- THEN
- MORETODO = FALSE ; # LIST FOR XFR IS EMPTY #
- ELSE
- BEGIN
- NP$XLOC(ABHADR[0]) ; # LOCATE THE FTT ENTRY #
- IF ABHABT[0] EQ APPCMD
- THEN
- NP$SMSG ;
- ELSE
- NP$DATA ; # CALL TO PROCESS APPROPRIATELY #
- END
- END # LOOP TO GET #
- FOR I = 0 STEP 1 WHILE I LS MAXFILEXFR
- DO
- BEGIN # LOOP TO FIND TIME OUT CONN. #
- FTTINDEX = I ;
- P<STATUSWORD> = FTTSTATUS[I] ;
- IF FTTACN[I] NQ 0
- AND STATUSWD LQ IN$PROG # NO ERROR FOUND YET #
- THEN
- BEGIN # ACTIVE ENTRY #
- NP$RTIM(TIME$WORD) ;
- IF (FTTTIME[I] + FTTTIMOUT[I]) LQ TIME$SEC[0]
- THEN
- BEGIN # TIMEOUT DETECTED #
- GOTO ST$ORD[FTTSTORD[I]] ;
- ST$ORD0: # SENDER/PRU #
- IF FTTSTATE[I] NQ NSPDATR
- THEN
- BEGIN # NOT IN DATA PHASE #
- TRIGGER = NRSTIMO; # TIME OUT TRIGGER #
- GOTO CALL$ST ;
- END
- ELSE
- GOTO ST$ORD4 ;
- ST$ORD1: # RECEIVER/PRU #
- IF FTTSTATE[I] NQ NRPPRDA
- THEN
- BEGIN # NOT IN DATA PHASE #
- TRIGGER = NRSTIMO; # TIME OUT #
- GOTO CALL$ST ;
- END
- ELSE
- GOTO ST$ORD4 ;
- ST$ORD2: TRIGGER = NSCTIMO; # SENDER/CHARACTER #
- GOTO CALL$ST;
- ST$ORD3: TRIGGER = NRCTIMO; # RECEIVER/CHARACTER #
- GOTO CALL$ST;
- CALL$ST: # READY TO CALL STATE TABLE #
- NP$STPR(FTTINDEX,TRIGGER,0) ;# CALL THE PROCESSOR #
- ST$ORD4:
- #
- CONTINUE THE FOR LOOP.
- #
- END # TIME OUT DETECTED #
- ELSE
- BEGIN # NO TIME OUT #
- IF FTTSTORD[I] EQ CHARSEND # CHAR SENDER #
- THEN
- BEGIN
- IF FTTSTATE[I] EQ NSCCABL # WAITING FOR WINDOW OPEN #
- THEN
- BEGIN
- NP$RCL(0); # TIME RECALL #
- END
- ELSE
- BEGIN
- IF FTTSTATE[I] EQ NSCDATA # IN DATA STATE #
- THEN
- BEGIN # IN SENDING DATA MODE #
- TRIGGER = NSCTSND ; # SEND TRIGGER TO STATE TABLE #
- FOR I = I WHILE TRIGGER NQ NIL
- DO
- BEGIN # LOOP UNTIL NO BACK TRIGGER #
- NP$STPR(FTTINDEX,TRIGGER,BTRIG) ;
- TRIGGER = BTRIG ;
- END
- END
- END
- END # ACTIVE ENTRY #
- END # LOOP TO FIND TIME OUT CONN. #
- END
- END
- RETURN;
- END
- TERM
- *ENDIF
cdc/nos2.source/nam5871/netxfrc.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator