Home | History | Annotate | Download | only in fmtxapp
      1 /*
      2  *
      3  * Copyright 2001-2011 Texas Instruments, Inc. - http://www.ti.com/
      4  *
      5  * Licensed under the Apache License, Version 2.0 (the "License");
      6  * you may not use this file except in compliance with the License.
      7  * You may obtain a copy of the License at
      8  *
      9  *    http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  */
     17 
     18 package com.ti.fmtxapp;
     19 
     20 public interface FmTxAppConstants {
     21 
     22     /********************************************
     23      * Message Code
     24      ********************************************/
     25     public static final int EVENT_FM_TX_ENABLED = 1;
     26     public static final int EVENT_FM_TX_DISABLED = 2;
     27     public static final int EVENT_FM_TX_TUNE = 3;
     28     public static final int EVENT_FM_TX_STARTTRANSMISSION = 4;
     29     public static final int EVENT_FM_TX_STOPTRANSMISSION = 5;
     30     public static final int EVENT_FM_TX_DESTROY = 6;
     31     public static final int EVENT_FM_TX_ENABLE_RDS = 7;
     32     public static final int EVENT_FM_TX_DISABLE_RDS = 8;
     33     public static final int EVENT_FM_TX_SET_PS_DISPLAY_MODE = 9 ;
     34     public static final int EVENT_FM_TX_SET_RDS_MUSIC_SPEECH_FLAG = 10;
     35     public static final int EVENT_FM_TX_SET_TRANSMISSION_MODE = 11;
     36     public static final int EVENT_FM_TX_SET_RDS_TEXT_REPERTOIRE = 12;
     37     public static final int EVENT_FM_TX_SET_MONO_STEREO_MODE = 13;
     38     public static final int EVENT_FM_TX_SET_POWER_LEVEL = 14;
     39     public static final int EVENT_FM_TX_SET_RDS_TEXT_PS_MSG = 15;
     40     public static final int EVENT_FM_TX_SET_MUTE_MODE = 16;
     41     public static final int EVENT_FM_TX_SET_RDS_TX_GRP_MASK_RT = 17;
     42     public static final int EVENT_FM_TX_SET_RDS_TX_GRP_MASK_PS = 18;
     43     /********************************************
     44      *Fm Radio State
     45      ********************************************/
     46     public static final int STATE_ENABLED = 0;
     47     public static final int STATE_DISABLED = 1;
     48     public static final int STATE_ENABLING = 2;
     49     public static final int STATE_DISABLING = 3;
     50     public static final int STATE_PAUSE = 4;
     51     public static final int STATE_RESUME = 5;
     52     public static final int STATE_DEFAULT = 6;
     53 
     54 
     55     /********************************************
     56      *Main Screen Preference save keys
     57      ********************************************/
     58     public static final String FMENABLED = "FMENABLED";
     59     public static final String RDSENABLED = "RDSENABLED";
     60     public static final String FREQUENCY_STRING = "FREQUENCY_STRING";
     61     public static final String DEFAULT_FREQ = "90000";
     62     public static final String FMTXSTATE = "FMTXSTATE";
     63 
     64 
     65 
     66     /* Actvity result index */
     67     public static final int ACTIVITY_CONFIG = 1;
     68     public static final int ACTIVITY_ADVANCED = 2;
     69 
     70     /* Power range */
     71     public static final int POWER_MIN = 0;
     72     public static final int POWER_MAX = 31;
     73     public static final int PICODE_MIN = 0;
     74     public static final int PICODE_MAX = 65535;
     75     public static final int AFCODE_MIN = 75000;
     76     public static final int AFCODE_MAX = 108000;
     77     public static final int PTY_MIN = 0;
     78     public static final int PTY_MAX = 31;
     79     public static final int ECC_MIN = 0;
     80     public static final int ECC_MAX = 65535;
     81 
     82     public static final long RDS_RADIO_TRANSMITTED_GRP_PS_MASK = 1;
     83     public static final long RDS_RADIO_TRANSMITTED_GRP_RT_MASK = 2;
     84 
     85     public static final int RDS_TEXT_TYPE_RT_AUTO = 2;
     86     public static final int RDS_TEXT_TYPE_RT_A = 3;
     87     public static final int RDS_TEXT_TYPE_RT_B = 4;
     88 
     89 
     90     /* Config Preference save keys */
     91     public static final String DISPLAY_MODE = "DISPLAY_MODE";
     92     public static final String TX_MODE = "TX_MODE";
     93     public static final String FREQUENCY = "FREQUENCY";
     94     public static final String REPERTOIRE = "REPERTOIRE";
     95     public static final String MUSIC_SPEECH = "MUSIC_SPEECH";
     96     public static final String ECC = "ECC";
     97     public static final String ECC_STRING = "ECC_STRING";
     98     public static final String PS_STRING = "PS_STRING";
     99     public static final String RT_STRING = "RT_STRING";
    100     public static final String PTY_STRING = "PTY_STRING";
    101     public static final String PTY = "PTY";
    102     public static final String POWER = "POWER";
    103     public static final String POWER_STRING = "POWER_STRING";
    104     public static final String DEF_POWER_STRING = "4";
    105     public static final String MONO_STEREO  = "MONO_STEREO";
    106     public static final String AFCODE_STRING = "AFCODE_STRING";
    107     public static final String PICODE_STRING = "PICODE_STRING";
    108     public static final String AF_CODE = "AF_CODE";
    109     public static final String PI_CODE = "PI_CODE";
    110     public static final String EMP_FILTER = "EMP_FILTER";
    111     public static final String MUTE = "MUTE";
    112 
    113     public static final String PSENABLED = "PSENABLED";
    114     public static final String RTENABLED = "RTENABLED";
    115     public static final String ECCENABLED = "ECCENABLED";
    116 
    117 
    118        /* Default Preference values */
    119     public static final int INITIAL_VAL = -1;
    120     public static final int DEFAULT_POWER = 4;
    121     public static final int DEFAULT_PTY = 0;
    122     public static final int DEFAULT_TXMODE = 1;
    123     public static final int DEFAULT_MUSICSPEECH = 0;
    124     public static final int DEFAULT_ECC = 0;
    125     public static final int DEFAULT_REPERTOIRE = 0;
    126     public static final int DEFAULT_DISPLAYMODE = 0;
    127     public static final int DEFAULT_MONOSTEREO = 1;
    128     public static final String DEF_PS_STRING = "TI Radio PS";
    129     public static final String DEF_RT_STRING = "TI Radio RT";
    130     public static final String DEF_PTY_STRING = "0";
    131     public static final String DEF_ECC_STRING = "0";
    132     public static final int DEFAULT_AFCODE = 108000;
    133     public static final int DEFAULT_PICODE = 0;
    134     public static final int  DEFAULT_EMPFILTER = 0;
    135     public static final String DEFAULT_AFCODE_STRING = "108000";
    136     public static final String DEFAULT_PICODE_STRING = "0";
    137     public static final int DEF_FREQ = 90000;
    138     public static final int EVENT_GET_FREQUENCY = 40;
    139 
    140 
    141     /* Activity Intenets */
    142     public static final String INTENT_RDS_CONFIG = "android.intent.action.RDS_CONFIG";
    143     public static final String INTENT_PRESET = "android.intent.action.PRESET";
    144     public static final String INTENT_RXHELP = "android.intent.action.START_RXHELP";
    145     public static final String INTENT_RXTUNE = "android.intent.action.START_RXFREQ";
    146 
    147 
    148     public static final float APP_FM_FIRST_FREQ_US_EUROPE_KHZ = (float)87.5;
    149     public static final float APP_FM_LAST_FREQ_US_EUROPE_KHZ = (float)108.0;
    150 }
    151