/*
*-------------------------------------------------------------------------
*
*   Copyright (C), 1994-1998 Aware Inc. All Rights Reserved.
*   Aware DMT Technology. Proprietary and Confidential.
*
*   40 Middlesex Turnpike, Bedford, MA 01730-1413
*   Phone (781) 276 - 4000
*   Fax   (781) 276 - 4001
*
*  CONFIG.TXT
*
*  G.dmt CPE Modem configuration notes
*
*-------------------------------------------------------------------------
*/

This note explains to the higher layer or the vendor, the G.dmt modem parameters that can be configured
on the CPE side.

The variables and structures that need to be configured and the location where they can be
found are given below:

For handshake:
--------------

1. If the higher layer is selecting the parameters for the capability list, then set
   the variable gft_Network_Determined_CL should be set to TRUE. Otherwise set it to FALSE.
   This variable can be found in file gdata.c

2. structure ModemConfig_t defined in typedef.h. The members of this structure
   that need to be set are

   ft_ADSL_Type   - set to either G992_1_A or G992_1_B or G992_1_C or G992_2_AB, G992_2_C

   ft_R_ACK       - set to either R_ACK1 or R_ACK2

   ft_TranMode    - set to ATM or STM

   ft_RS_support  - set to RS16 (for 16 check bytes) or 0 (for 8 check bytes). For
                  G992_1, RS16 is mandatory

   s_DsNumChannels   - No. of bearer channels to use in DS (max is 7)

   sa_DsPriority[]  - the list of bearer channels to be used in DS.
               where each entry should be set to DS_ASx_BEARER_CHANNEL for x = 0,1,2,3
               or DS_LSy_BEARER_CHANNEL for y = 0, 1, 2

   s_UsNumChannels   - No. of bearer channels to use in US (max is 3)

   sa_UsPriority[]  - the list of bearer channels to be used in US in the descending order of priority
               where each entry should be set to US_LSx_BEARER_CHANNEL for x = 0,1,2

   The default values of this structure are set in file config.c.

   Example: s_DsNumChannels = 2
         sa_DsPriority[] = {DS_LS0_BEARER_CHANNEL, DS_AS0_BEARER_CHANNEL, 0, 0, 0, 0, 0}

   In the above example, two DS bearer channels, AS0 and LS0, are desired to be transmitted.

3. Also select the value for the following constants defined in config.h

   MAX_NET_DATARATE_US (**)
   MIN_NET_DATARATE_US (**)
   AVG_NET_DATARATE_US (**)

   MAX_NET_DATARATE_DS (**)
   MIN_NET_DATARATE_DS (**)
   AVG_NET_DATARATE_DS (**)

   MAX_LATENCY_US (***)
   AVG_LATENCY_US (***)
   MAX_LATENCY_DS (***)
   AVG_LATENCY_DS (***)

   (**) - For data rates y (in Mbits/sec (Mbps)) >= 2Mbits/sec, this value should be equal to 32+(y/2)
        - Eg: for y = 14Mbps, this value should be 32+(14/2) = 39
        - For data rates y (in kbps) < 2Mbps, this value should be equal to (y/64)
        - Eg: for y = 640kbps, this value should be (640/64) = 10
        - we can have multiples of 64kbps or multiples of 2Mbps only

   (***) - For latency y (in msec) <= 31ms, this value should be equal to (y/1) 32+(y/2)
           Eg: for y = 6ms, this value should be 6
           For latency y (in ms) >= 40ms, this value should be equal to 32+(y/10)-4
           Eg: for y = 60ms, this value should be 32+(60/10)-4 = 34
           we can have multiples of 1ms upto 31ms and thereafter we can have multiples of 10ms only

4. Set the following constants defined in ghs.h

   REVISION
   COUNTRY_CODE
   VENDOR_ID

5. If the higher layer is not selecting the parameters to prepare the capability
   list then the parameters in the function InitializeInfoField() that is
   in file hndshk1.c should be appropriately set. An example setting is given
   in the function currently.


NOTE: All the parameters mentioned above except for fta_DsPathType[], sa_DsMinRate[], sa_DsMaxRate[],
fta_UsPathType[], sa_UsMinRate[], sa_UsMaxRate[] are necessary for handshake. These six parameters are used
by bitloading.


The parameters that need to be configured by the higher layer for EOC are

1. structure TxEocNetworkStruct_t defined in eoc.h. The members of this structure
   that need to be set are

    uc_EocAction        -   type of autonomous msg to be transmitted. CLEAR_EOC (for clear eoc command)
                            REQPDN ( for requesting powerdown)
    c_tx_eoc_info_buf   -   Buffer containing data for clear EOC transmission
