Google
 

Trailing-Edge - PDP-10 Archives - TOPS-20_V6.1_DECnetSrc_7-23-85 - mcb/xpt/tlitim.bli
There is 1 other file named tlitim.bli in the archive. Click here to see a list.
module TLITIM	(
		IDENT = 'X01140'
		) =
begin

!
!                    COPYRIGHT (c) 1980, 1981, 1982
!                    DIGITAL EQUIPMENT CORPORATION
!                        Maynard, Massachusetts
!
!     This software is furnished under a license and may  be  used
!     and copied only in accordance with the terms of such license
!     and with the inclusion of the above copyright notice.   This
!     software  or any other copies thereof may not be provided or
!     otherwise made available to any other person.  No  title  to
!     and ownership of the software is hereby transferred.
!
!     The information  in  this  software  is  subject  to  change
!     without  notice  and should not be construed as a commitment
!     by DIGITAL EQUIPMENT CORPORATION.
!
!     DIGITAL assumes no responsibility for the use or reliability
!     of  its  software  on  equipment  which  is  not supplied by
!     DIGITAL.
!

!++
! FACILITY:	Transport
!
! ABSTRACT:
!
!	Transport Line Interface timer service routine: updates all timers
!	and calls the timer routines LINTIM and LISTENER.
!
! ENVIRONMENT:	MCB
!
! AUTHOR: L. Webber , CREATION DATE: 19-Dec-79
!
! MODIFIED BY:
!
!	L. Webber, 19-Dec-79 : VERSION 1.00
!
! 1.01	L. Webber, 2-Apr-80
!	Modify to support node and line sub-data-bases
!
! 1.02	L. Webber, 15-Apr-80
!	Add process initialization code
!
! 1.03	L. Webber, 27-Jun-80
!	Modify to use MCBLIB macros
!
! 1.04	L. Webber, 11-Dec-80
!	Modify to support MCB 3.1
!
! 1.05	L. Webber, 20-Jan-81
!	Modify initialization procedure to:
!	  . Update _CRDAT instead of $XPTDB
!	  . No longer take NLN as a parameter
!	thus making XPE read-only.
!
! 1.06	L. Webber, 26-Jan-81
!	Added Event Logging and Counter Updating
!
! 1.07	L. Webber, 24-Feb-81
!	TLITIM is not a dispatch routine any more; it is CALL$P'd
!	from Transport.
!
! 1.08	L. Webber, 27-Feb-81
!	Add dummy "timer routine" TLINOP for process initialization.
!
! 1.09	L. Webber, 16-Mar-81
!	Make INI_LIN CALL$ linkage
!
! 1.10	L. Webber, 2-Apr-81
!	Generate the "reason" parameter item in the Event Buffer via a
!	call to EP_REASON.
!
! 1.11	L. Webber, 2-Apr-81
!	Add LIX as NMXID in event logging.
!
! 1.12	L. Webber, 6-Apr-81
!	Add initialization timer maintenance.
!
! 1.13	L. Webber, 24-Sep-81
!	Change event logging to use new macros to build event buffer.
!
! 1.14	A. Peckham, 19-Apr-82
!	Eliminate references to LOG_EVENT, GETLINE.
!       Rework Listen_clock support.
!
!--
!
!  INCLUDE FILES:
!

require 'XPTMAC';

!
! TABLE OF CONTENTS
!

forward routine
	TLITIM: CALL$ novalue,
        INITIALIZER: LINKAGE_DB novalue,
	LISTENER: LINKAGE_DB novalue,
	TLIDB: CALL$ novalue;

!
! MACROS:
!

!
! EQUATED SYMBOLS:
!

!
! OWN STORAGE:
!

!
! EXTERNAL REFERENCES:
!

external routine
    LINRVR: LINKAGE_DB novalue;
global
routine TLITIM: CALL$ novalue =

!++
! FUNCTIONAL DESCRIPTION:
!
! This routine is called once every time interval.  It updates Listen_clock
! and then calls the routines INITIALIZER or LISTENER if it expires.
! It also initiates resource recovery if a line needs it.
!
! FORMAL PARAMETERS
!
!	NONE.
!
! IMPLICIT INPUTS
!
!	Listen_clock, LINEfunction
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
!	NONE.
!
! SIDE EFFECTS:
!
!	See the timer routines.
!
!--

begin
require 'XPTSYM';
label LISTEN_CHECKER;

$XPT_for_each_LINEb_do_begin
     if .Listen_clock neq 0
     then if (Listen_clock = .Listen_clock - 1) eql 0
          then case .LINEstate from HA to RU of
                   set
                   [RU]:
                       begin
                       Listen_clock = .Listen_timer;
                       LISTENER(.LINEb);
                       end;
                   [TI,TV,TC]:
                       INITIALIZER(.LINEb);
                   [inrange]:
                       ;
                   tes;

     if .LINEfunction gtr 0 then LINRVR(.LINEb);

$XPT_next_LINEb_end;

end;				!End of TLITIM
routine INITIALIZER (LINEb): LINKAGE_DB novalue =

!++
! FUNCTIONAL DESCRIPTION:
!
!  INITIALIZATION TIMER
!
!  If a circuit is in its initialization sequence (TI, TV or TC state), a
!  timer will be kept.  If the timer expires without the circuit going to RU
!  state or the initialization failing, the circuit is reinitialized.
!
! FORMAL PARAMETERS
!
!	NONE.
!
! IMPLICIT INPUTS
!
!	None
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
!	NONE.
!
! SIDE EFFECTS:
!
!	Retries an initialization function.
!
!--

begin
require 'XPTSYM';

COUNTER_INCREMENT(LINEb,XPTini_fail);   ! Increment the init. fails ctr
$NM_LOG_BEGIN();                        ! declare a "line down" event
PARAMETER_C_1(5,uplit(5));
$NM_LOG_END(4^6+$XPT$E_ILF,.NMXid);
CALL$L(INI_LIN,.LINEb);
end;				!End of INITIALIZER
routine LISTENER (LINEb): LINKAGE_DB novalue =

!++
! FUNCTIONAL DESCRIPTION:
!
! This routine is called on a time interval.  For each active line with
! a Phase III neighbor, it checks LINEflags to be sure that at least one
! message has been received since T4 last expired.  If no message has been
! received on the tine, the line is brought down.
!
! FORMAL PARAMETERS
!
!	NONE.
!
! IMPLICIT INPUTS
!
!	T4, LINEstate, Nty, LINEflags
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
!	NONE.
!
! SIDE EFFECTS:
!
!	One or more lines may be restarted.
!
!--

begin
require 'XPTSYM';

!
!  Check the line for aptness
!

selectoneu .Nty of
    set
    [Full, Small]:
        begin
!
!  If we got here, no data has been received to reset the timer.
!
        COUNTER_INCREMENT(LINEb,XPTlinedn);!  increment "line downs" ctr,
        $NM_LOG_BEGIN();                !  log "line failed -
        PARAMETER_C_1(5,uplit(10));     !  listener timeout" event
        $NM_LOG_END(4^6+$XPT$E_LLF,.NMXid);
        CALL$L(INI_LIN,.LINEb);         !  and restart the line
        end;
     [otherwise]:
         ;
     tes;

end;				!End of LISTENER
global
routine TLIDB (DBADDR): CALL$ novalue =

!++
! FUNCTIONAL DESCRIPTION:
!
! This routine is called from the XPT process on initialization
! and passes the address of the Transport data base.
!
! FORMAL PARAMETERS
!
!	DBADDR	The address of the Transport data base
!
! IMPLICIT INPUTS
!
!	NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
!	NONE.
!
! SIDE EFFECTS:
!
!	NONE.
!
!--

begin
external
    MCB$GAW_PROCESS_DATA_BASE: vector[2];

MCB$GAW_PROCESS_DATA_BASE[1] = .DBADDR;	! Save the data base address
end;				!End of TLIDB

end				!End of module TLITIM
eludom