Android Open Source - final_project_android Bio Sensor






From Project

Back to project page final_project_android.

License

The source code is released under:

MIT License

If you think the Android project final_project_android 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 com.geminnu.hexagon;
//  www.j a v a2 s.c  om
public class BioSensor {
  
  //The name of the sensor
  private String mSensorName;
  
  private int mSensorId;
  private String mBase;
  
  //The type of the sensor (e.g.: generic, medical etc)
  private int mSensorType;
  
  //The signal type of the sensor (e.g.: analog or digital)
  private int mSignalType;
  
  //Constructor of the class
  public BioSensor(int sensId, int type, int signal) {
    this.mSensorId = sensId;
    this.mSensorType = type;
    this.mSignalType = signal;
    assignName(mSensorId);
    
  }
  
  private void assignName(int id) {
    switch(id) {
      case 0:
        this.mSensorName = "GLUCO";
        this.mBase = "mg/dL";
        break;
      case 1:
        this.mSensorName = "BODYTEMP";
        this.mBase = "C";
        break;
      case 2:
        this.mSensorName = "BLOOD";
        this.mBase = "%SPo2";
        break;
      case 3:
        this.mSensorName = "PULSE";
        this.mBase = "PRbpm";
        break;
      case 4:
        this.mSensorName = "AIRFLOW";
        this.mBase = "bpm";
        break;
      case 5:
        this.mSensorName = "GALVANICSKIN";
        this.mBase = "Ohm";
        break;
      case 6:
        this.mSensorName = "ECG";
        this.mBase = "V";
        break;
      case 7:
        this.mSensorName = "EMG";
        break;
      case 8:
        this.mSensorName = "PATIENTPOSITION";
        break;
        
    }
  }
  //Getters
  public String getName() {
    return mSensorName;
  }
  public String getBase() {
    return mBase;
  }
  
  public int getType() {
    return mSensorType;
  }
  public int getSensorId() {
    return mSensorId;
  }
  public int getSignal() {
    return mSignalType;
  }
}




Java Source Code List

com.geminnu.hexagon.Alert.java
com.geminnu.hexagon.ArduinoMessage.java
com.geminnu.hexagon.ArduinoParser.java
com.geminnu.hexagon.ArduinoReceiver.java
com.geminnu.hexagon.ArduinoService.java
com.geminnu.hexagon.ArduinoStatusEventListener.java
com.geminnu.hexagon.ArduinoStatusEvent.java
com.geminnu.hexagon.ArduinoStatusManager.java
com.geminnu.hexagon.ArduinoStatus.java
com.geminnu.hexagon.ArduinoTask.java
com.geminnu.hexagon.ArduinoTransmitter.java
com.geminnu.hexagon.BioSensorEventListener.java
com.geminnu.hexagon.BioSensorEvent.java
com.geminnu.hexagon.BioSensorListenerItem.java
com.geminnu.hexagon.BioSensorManagerService.java
com.geminnu.hexagon.BioSensor.java
com.geminnu.hexagon.Bluetooth.java
com.geminnu.hexagon.CoordinatorActionListener.java
com.geminnu.hexagon.Coordinator.java
com.geminnu.hexagon.MainActivity.java
com.geminnu.hexagon.MessageListener.java
com.geminnu.hexagon.MessageSender.java
com.geminnu.hexagon.MySQLiteHelper.java
com.geminnu.hexagon.Profile.java
com.geminnu.hexagon.Reading.java
com.geminnu.hexagon.Wifi.java