Android Open Source - CopresenceDataCollector Constants






From Project

Back to project page CopresenceDataCollector.

License

The source code is released under:

Copyright (c) 2014, Xiang Gao All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Re...

If you think the Android project CopresenceDataCollector listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.sesy.coco.datacollector;
// ww w  .  ja  v  a  2s  . c  o  m
public final class Constants {
  
  // Status: ready, blocked, waiting for gt, scanning, server/peer communicating
  public static final int STATUS_READY = 1;
  public static final int STATUS_BLOCKED = 2;
  public static final int STATUS_WAITGT = 3;
  public static final int STATUS_SCAN = 4;
  public static final int STATUS_COM = 5;
  
  // Connection Status: ok, peer off, server off, network off
  public static final int STATUS_CONN_READY = 1;
  public static final int STATUS_CONN_PEEROFF = 2;
  public static final int STATUS_CONN_SERVEROFF = 3;
  public static final int STATUS_CONN_NETWORKOFF = 4;
  public static final int STATUS_CONN_TIMEOUT = 5;

  // Task Status: scanning, uploading, binding/triggering/heartbeat/timeout reseting, idle
  public static final int STATUS_TASK_SCAN = 1;
  public static final int STATUS_TASK_UPLOAD = 2;
  public static final int STATUS_TASK_MSG = 3;
  public static final int STATUS_TASK_IDLE = 4;
  
  // User Block Status: no blocks, time block, prompt block
  public static final int STATUS_USER_NOBLOCK = 0;
  public static final int STATUS_USER_TIMEBLOCK = 1;
  public static final int STATUS_USER_PROMPTBLOCK = 2;
  
  // Sensor Status: null sensor, gps, wifi, bluetooth, audio...
  public static final int STATUS_SENSOR_NULL = 0;
  public static final int STATUS_SENSOR_GPS = 1;
  public static final int STATUS_SENSOR_WIFI = 2;
  public static final int STATUS_SENSOR_BT = 4;
  public static final int STATUS_SENSOR_AUDIO = 8;
  public static final int STATUS_SENSOR_GPSCOORD = 16;
  //public static final int STATUS_SENSOR_ACC = 32;
  public static final int STATUS_SENSOR_CELL = 32;
  public static final int STATUS_SENSOR_ARP= 64;
  public static final int STATUS_SENSOR_MAG= 128;
  public static final int STATUS_SENSOR_LIG= 256;
  //public static final int STATUS_SENSOR_GRAV= 1024;
  public static final int STATUS_SENSOR_TEMP= 512;
  public static final int STATUS_SENSOR_HUM= 1024;
  public static final int STATUS_SENSOR_BARO= 2048;
  //public static final int STATUS_SENSOR_ORI= 16384;
  //public static final int STATUS_SENSOR_GYRO= 32768;
  //public static final int STATUS_SENSOR_ROT= 65536;
  //public static final int STATUS_SENSOR_LACC= 131072;
  //public static final int STATUS_SENSOR_PROX= 262144;
  public static final int STATUS_SENSOR_ONBOARD= 3968;  //MAG,LIG,TEMP,HUM,BARO
  public static final int STATUS_SENSORDRONE= 4096;
  
  
  // Sensordrone masks
  public static final int SD_SENSOR_TEMPERATURE = 1;  //Ambient temperature, in Celcius
  public static final int SD_SENSOR_HUMIDITY = 2;  // Humidity, relative percentage
  public static final int SD_SENSOR_PRESSURE = 4;  // Air pressure (Pa)
  public static final int SD_SENSOR_IR_TEMPERATURE = 8;    // Object Temperature (IR), in Celcius
  public static final int SD_SENSOR_RGBC = 16;  // RGBC (Color) Properties: illuminance (lux), color temperature (K), (R,G,B) channels intensity
  public static final int SD_SENSOR_PRECISION_GAS = 32;    // Gas value ppm(CO)
  public static final int SD_SENSOR_REDUCING_GAS = 64;    // Reducing gas value (Ohm) 
  public static final int SD_SENSOR_OXIDIZING_GAS = 128;  // Oxidixing gas value (Ohm)
  public static final int SD_SENSOR_CAPACITANCE = 256;  // Proximity capacitance (fF)
  public static final int SD_SENSOR_ALTITUDE = 512;    // Altitude (m)
  
  // Sensor Status: sensor combinations
  //public static final int STATUS_SENSOR_GWB = 7;
  //public static final int STATUS_SENSOR_GWBA = 15;
  public static final int STATUS_SENSOR_GWBAC = 79;
  public static final int STATUS_SENSOR_MLTHB = 3968;
  
  // Scan params
  public static final int AUDIO_PERIOD = 10;
  public static final int BT_LOCAL_RSSI = -40;
  
  // ARP scan params
  protected final static int[] DPORTS = { 139, 445, 22, 80 };
  protected final static int TIMEOUT_SCAN = 9; // seconds
  protected final static int TIMEOUT_SHUTDOWN = 2; // seconds
  protected final static int THREADS = 10; //FIXME: Test, plz set in options again ?
  protected final static int SOCKET_TIMEOUT = 500; // socket timeout in ms
  
  // Server address
  public static final String SERVER_INET = "54.229.32.28";   
  public static final String UPLOAD_SERVER_INET = "54.229.32.28"; 
  public static final String UPLOAD_SERVER_DIR = "/dc/server/upload4.php";
  public static final String UPLOAD_SERVER_LOG_DIR = "/dc/server/uploadlog4.php";
  public static final int SERVER_PORT = 8897; 
    
  // Message Ids
    public static final String REQ_UUID = "REQ_UUID";
    public static final String ACK_UUID = "ACK_UUID";
    public static final String UP_BIND = "UP_BIND";
    public static final String REQ_GETQ = "REQ_GETQ";
    public static final String ACK_GETQ = "ACK_GETQ";
    public static final String REQ_VALQ = "REQ_VALQ";
    public static final String ACK_VALQ = "ACK_VALQ";
    public static final String REQ_ALIVE = "REQ_ALIVE";
    public static final String ACK_ALIVE = "ACK_ALIVE";
    public static final String REQ_UNBIND = "REQ_UNBIND";
    public static final String ACK_UNBIND = "ACK_UNBIND";
    public static final String REQ_TASK = "REQ_TASK";
    public static final String ACK_TASK = "ACK_TASK";
    public static final String REQ_AGREE = "REQ_AGREE";
    public static final String ACK_AGREE = "ACK_AGREE";
    public static final String SEND = "SEND";
    
    // Preference items
    public static final String KEY_PREF_AUD = "cbox_aud";
  public static final String KEY_PREF_MOD = "cbox_mod";
  public static final String KEY_PREF_MOR = "list_mor";
  public static final String KEY_PREF_AFT = "list_aft";
  public static final String KEY_PREF_EVE = "list_eve";
  public static final String KEY_PREF_NIG = "list_nig";
  public static final String KEY_PREF_BHR = "list_bhr";
  public static final String PBLOCK = "cbox_pbl";
  public static final String RTALLOW = "cbox_rtg";
  public static final String INALLOW = "cbox_wid";
  public static final String KEY_PREF_VER = "ver_pref";
  public static final String KEY_PREF_ID = "id_pref";
  
  // Preference items for sensors
  public static final String KEY_PREF_SENSORDRONE = "cbox_sd";
  public static final String KEY_PREF_SENSOR_GPS = "cbox_gps";
  public static final String KEY_PREF_SENSOR_WIFI = "cbox_wifi";
  public static final String KEY_PREF_SENSOR_BT = "cbox_bt";
  public static final String KEY_PREF_SENSOR_AUD = "cbox_audio";
  public static final String KEY_PREF_SENSOR_CELL = "cbox_cell";
  public static final String KEY_PREF_SENSOR_ARP = "cbox_arp";
  public static final String KEY_PREF_SENSOR_MAG = "cbox_mag";
  public static final String KEY_PREF_SENSOR_LIG = "cbox_lig";
  public static final String KEY_PREF_SENSOR_TEMP = "cbox_temp";
  public static final String KEY_PREF_SENSOR_HUM = "cbox_hum";
  public static final String KEY_PREF_SENSOR_BARO = "cbox_baro";
}




Java Source Code List

org.sesy.coco.datacollector.ARPWorker.java
org.sesy.coco.datacollector.AlarmService.java
org.sesy.coco.datacollector.AppLauncher.java
org.sesy.coco.datacollector.AudioProc.java
org.sesy.coco.datacollector.AudioWorker.java
org.sesy.coco.datacollector.BindActivity.java
org.sesy.coco.datacollector.BluetoothWorker.java
org.sesy.coco.datacollector.CellWorker.java
org.sesy.coco.datacollector.Constants.java
org.sesy.coco.datacollector.DaemonService.java
org.sesy.coco.datacollector.DataMonitor.java
org.sesy.coco.datacollector.GpsWorker.java
org.sesy.coco.datacollector.HelpActivity.java
org.sesy.coco.datacollector.MainActivity.java
org.sesy.coco.datacollector.MyPreference.java
org.sesy.coco.datacollector.MyWidgetProvider.java
org.sesy.coco.datacollector.PluginManager.java
org.sesy.coco.datacollector.PrefManager.java
org.sesy.coco.datacollector.ReportErrActivity.java
org.sesy.coco.datacollector.SDSetupActivity.java
org.sesy.coco.datacollector.SensorActivity.java
org.sesy.coco.datacollector.SensorListener.java
org.sesy.coco.datacollector.SensordroneWorker.java
org.sesy.coco.datacollector.SettingActivity.java
org.sesy.coco.datacollector.StatusActivity.java
org.sesy.coco.datacollector.StatusManager.java
org.sesy.coco.datacollector.TriggerService.java
org.sesy.coco.datacollector.UpdateWidgetService.java
org.sesy.coco.datacollector.WifiWorker.java
org.sesy.coco.datacollector.WorkerService.java
org.sesy.coco.datacollector.audio.Convolution.java
org.sesy.coco.datacollector.audio.CrossCorrelation.java
org.sesy.coco.datacollector.audio.ExtAudioRecorder.java
org.sesy.coco.datacollector.audio.XCorrAndDistFromWav.java
org.sesy.coco.datacollector.communication.HttpFileUploader.java
org.sesy.coco.datacollector.database.Entry.java
org.sesy.coco.datacollector.file.FileHelper.java
org.sesy.coco.datacollector.log.ConfigureLog4J.java
org.sesy.coco.datacollector.net.NetInfo.java
org.sesy.coco.datacollector.plugin.PlugInterface.java
wei.mark.standout.StandOutWindow.java
wei.mark.standout.Utils.java
wei.mark.standout.WindowCache.java
wei.mark.standout.constants.StandOutFlags.java
wei.mark.standout.ui.TouchInfo.java
wei.mark.standout.ui.Window.java