/*MAIN
 Overview
 
 CS_DT is a procedure called by procedure BFST_FILL_TIMES.  Its purpose is to count
    and report on the number of major frame datetimes unpacked in a conseq.
MAIN*/

/*ARGUMENTS
  Arguments
 
  CS_DT takes the following arguments, all of  which have an IN
  parameter mode except for S_CS_DT and NUM_DT:
   - NEW_ID1 (NUMBER).  Represents the lower bound of the conseq under examination.

   - NEW_ID2 (NUMBER).  Represents the upper bound of the conseq under examination.

   - S_CS_DT (NUMBER).  Represents an indicator of what occurred within procedure
     CS_DT: S_CS_DT = 0 (there were no unpacked major frame datetimes in the conseq),
     S_CS_DT = 1 (there was one unpacked major frame datetime in the conseq), and 
     S_CS_DT = 2 (there were two or more unpacked major frame datetimes in the conseq).

   - NUM_DT (INTEGER).  Represents the number of major frame datetimes unpacked in
     the conseq.
ARGUMENTS*/

/*DEPENDENCIES
 Dependencies
 
 The following are the procedures called by CS_DT (listed in their
 order of call):
   - SWITCH.  This is the package that manipulates the switches for all
     the reconstruction rules.

   - RULES_STATES.  This is a package of three procedures and one function all
     of which track and post reconstruction states for all rules as they become
     available, in the temporary table LOGT.

   - RULE.  This is the stored package that manipulates the reconstruction rules
     numbers, name and version number.

   - COUNT_ALL.  This is a stored function created to count all entries in any
     table.  This function takes in as argument the name of the table to count
     from (as a varchar2), and any "where" clause that may be used to constraint
     the count (as a varchar2).  Note that if no "where" clause is to be used in
     a count, the second argument to this function is optional.

   - POST_STATE.  This is a package of three procedures and one function all
     of which serve the role of writing the states of all rules as they become
     available, in the system_state table.

   - LOG_FILE.  This is a package of procedures which handle the tasks of
     creating the file in which reconstruction output messages will be written
     to, writing to the latter file, and closing it at the end of
     reconstruction.
DEPENDENCIES*/

/*VARIABLES
 Variables

 The following are variables used in the procedure:
   - COUNT_DT (INTEGER).  The number of distinct major frame datetimes in a conseq.
VARIABLES*/

/*EXAMPLES
  Examples
 
  Here is a call to CS_DT: 
 
   DECLARE S_CS_DT NUMBER; NUM_DT NUMBER;

   BEGIN
       CS_DT (1, 50, S_CS_DT, NUM_DT);
   END;
   /

EXAMPLES*/

/*EXCEPTIONS
 Exceptions

 There are no named exceptions for this procedure, except for the generic one
   WHEN OTHERS.  When the latter is triggered, the error message is outputted
   along with the name of the module that erred.
EXCEPTIONS*/

/*ERRORS
 Errors

 There are no errors that this procedure is known to generate.  Should an
   error occur, take action based on the description of the error. 
ERRORS*/

/*TABLES
 Tables
 
 The following tables are referenced in this procedure:
  - UNIQUE_TIME.  This temporary table contains all not null unpacked major frame
    datetimes from the BFST for minor frames that are not failed (MNFFF = 1), and
    don't have their DATEERR flag raised.

 For more information on this and other tables, see the documentation on tables.
TABLES*/

/*OTHERS
 Others
 
 For more details on this procedure see the reconstruction documentation.
OTHERS*/
