45 lines
1.3 KiB
Java
45 lines
1.3 KiB
Java
package net.heartshield.data;
|
|
|
|
import com.google.gson.annotations.Expose;
|
|
import com.google.gson.annotations.SerializedName;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* Waveform series data of a measurement.
|
|
*
|
|
* Contains time series of various sensors:
|
|
* * camera brightness: finger photoplethysmogram,
|
|
* * acceleration: motion during the measurement,
|
|
* * audio: ECG if available
|
|
*
|
|
* @author David Madl (git@abanbytes.eu)
|
|
* @date 2016-04-07
|
|
*/
|
|
public class MeasurementSeries {
|
|
// timestamps of `ppgData` and `bcgData` are measured in seconds since the start of measurement, `startTime`
|
|
@SerializedName("ppg_data")
|
|
public List<double[]> ppgData;
|
|
|
|
@SerializedName("bcg_data")
|
|
public List<double[]> bcgData;
|
|
|
|
private byte[] audioData = null;
|
|
|
|
@SerializedName("audio_start")
|
|
public double audioStartTime;
|
|
|
|
/** whether client has successfully transmitted the audioData */
|
|
@NoRemote
|
|
//@Expose(serialize = false, deserialize = false)
|
|
public boolean audioSynced = false;
|
|
|
|
public void setAudio(byte[] audio, double audioStartTime) {
|
|
this.audioData = audio;
|
|
this.audioStartTime = audioStartTime;
|
|
this.audioSynced = false;
|
|
}
|
|
public byte[] getAudio() { return this.audioData; }
|
|
//public double getAudioStartTime() { return this.audioStartTime; }
|
|
}
|