2017-01-02 01:58:37 +01:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.hplus;
|
|
|
|
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
|
|
|
|
2017-01-04 02:46:24 +01:00
|
|
|
/*
|
|
|
|
* @author João Paulo Barraca <jpbarraca@gmail.com>
|
|
|
|
*/
|
|
|
|
|
2017-01-02 01:58:37 +01:00
|
|
|
|
|
|
|
public class HPlusDataRecord {
|
|
|
|
public final static int TYPE_SLEEP = 1;
|
|
|
|
public int activityKind = ActivityKind.TYPE_UNKNOWN;
|
|
|
|
|
2017-01-05 01:03:54 +01:00
|
|
|
/**
|
|
|
|
* Time of this record in seconds
|
|
|
|
*/
|
2017-01-02 01:58:37 +01:00
|
|
|
public int timestamp;
|
2017-01-05 01:03:54 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Raw data as sent from the device
|
|
|
|
*/
|
2017-01-02 01:58:37 +01:00
|
|
|
public byte[] rawData;
|
|
|
|
|
|
|
|
public HPlusDataRecord(byte[] data){
|
|
|
|
rawData = data;
|
|
|
|
}
|
|
|
|
|
|
|
|
public byte[] getRawData() {
|
|
|
|
|
|
|
|
return rawData;
|
|
|
|
}
|
|
|
|
|
|
|
|
public class RecordInterval {
|
2017-01-05 01:03:54 +01:00
|
|
|
/**
|
|
|
|
* Start time of this interval in seconds
|
|
|
|
*/
|
2017-01-02 01:58:37 +01:00
|
|
|
public int timestampFrom;
|
2017-01-05 01:03:54 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* End time of this interval in seconds
|
|
|
|
*/
|
2017-01-02 01:58:37 +01:00
|
|
|
public int timestampTo;
|
2017-01-05 01:03:54 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Type of activity {@link ActivityKind}
|
|
|
|
*/
|
2017-01-02 01:58:37 +01:00
|
|
|
public int activityKind;
|
|
|
|
|
|
|
|
RecordInterval(int timestampFrom, int timestampTo, int activityKind) {
|
|
|
|
this.timestampFrom = timestampFrom;
|
|
|
|
this.timestampTo = timestampTo;
|
|
|
|
this.activityKind = activityKind;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|