From 6e6c4fef1abb5465792ada98a74a344659e59588 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 3 Jan 2024 16:30:03 +0300 Subject: [PATCH] added EcgData file --- .../ble/utils/EcgData.java | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/ble/utils/EcgData.java diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/ble/utils/EcgData.java b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/ble/utils/EcgData.java new file mode 100644 index 00000000..23014698 --- /dev/null +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/ble/utils/EcgData.java @@ -0,0 +1,57 @@ +package com.cloud.diplomaticquarterapp.ble.utils; + +import java.util.Arrays; + +public class EcgData { + + private long startTime; // 时间戳s + private int duration; + private String fileName; + private byte[] data; + private short[] shortData; + + public long getStartTime() { + return startTime; + } + + public void setStartTime(long startTime) { + this.startTime = startTime; + } + + public int getDuration() { + return duration; + } + + public void setDuration(int duration) { + this.duration = duration; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public byte[] getData() { + return data; + } + + public void setData(byte[] data) { + this.data = data; + } + + public short[] getShortData() { + return shortData; + } + + public void setShortData(short[] shortData) { + this.shortData = shortData; + } + + @Override + public String toString() { + return "{" + "startTime:" + startTime + ", duration:" + duration + ", fileName:'" + fileName + '\'' + ", data:" + Arrays.toString(data) + ", shortData:" + Arrays.toString(shortData) + '}'; + } +}