       SUBROUTINE SAX_ACC_BT_1(IST,UNITS,INCREMENT_ROUTINE)
C
C----------------------------------------------------------------------
C
C.IDENTIFICATION: Subroutine SAX_ACC_BT_1
C.LIBRARY:        FOTLIB
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       0.0 - 10 May 93 - Original version
C                 0.1 - 30 Jan 98 - support to secondary type 3 (LECS)
C.PURPOSE:        Direct mode data wrapper for main accumulation loop
C.METHOD:         switches according to packetcap preloaded information
C.SYNTAX:         CALL  SAX_ACC_BT_1(IST,UNITS,INCREMENT_ROUTINE)
C.PARAMETERS:     IINTEGER  ist              :  secondary type code
C                 CHARACTER units            : 'BYTES' or 'BITS'
C                 EXTERNAL increment_routine : real accumulation routine
C.RESTRICTIONS:
C.NOTES:          Direct mode data correposnd to "basic type" 1 (bt=1)
C                 INCREMENT_ROUTINE is an external routine usually found
C                 with the caller program, and is the work-horse of the
C                 accumulation (is specific of the kind of accumulation)
C.FILES:
C.REFERENCES
C
C----------------------------------------------------------------------
C
C      handle Basic Type 1
       INTEGER   IST
       CHARACTER UNITS*(*)
       EXTERNAL  INCREMENT_ROUTINE
C
C      handling of DIRECT mode packets 
C      this just calls the appropriate subroutine according to Secondary Type code
C      and eventually according to UNITS being bits or bytes
       IF(IST.EQ.1)THEN
C        so far there is only one Secondary Type  supported (Laben format)
         IF(UNITS.EQ.'bytes')THEN
C           standard case of FOT data (byte-unpacked) : Laben Fot Direct
            CALL SAX_ACC_B1S1_Y(INCREMENT_ROUTINE)
         ELSE
C           dummy call for raw packed data : Laben Raw Direct
            CALL SAX_ACC_B1S1_I(INCREMENT_ROUTINE) 
         ENDIF
       ELSEIF(IST.EQ.2)THEN
CWFC >>  tentative Secondary Types for WFC 
         IF(UNITS.EQ.'bytes')THEN
C           standard case of FOT data (byte-unpacked) : SRON Fot Direct
            CALL SAX_ACC_B1S2_Y(INCREMENT_ROUTINE)
         ELSE
C           dummy call for raw packed data : SRON Raw Direct
            CALL SAX_ACC_B1S2_I(INCREMENT_ROUTINE) 
         ENDIF
       ELSEIF(IST.EQ.3)THEN
CLECS >>  tentative Secondary Type for LECS
          CALL SAX_ACC_B1S3_Y(INCREMENT_ROUTINE)
C      ELSE
C-->   add here other cases 
       ENDIF
       RETURN
       END
