Added log function to detection report
This commit is contained in:
parent
1576719d10
commit
d04d166e14
@ -1,19 +1,31 @@
|
|||||||
package com.example.ueberwachungssystem.VideoDetection;
|
package com.example.ueberwachungssystem.VideoDetection;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
/** Detection Report Class */
|
/** Detection Report Class */
|
||||||
|
|
||||||
public class DetectionReport {
|
public class DetectionReport {
|
||||||
public String timeStamp;
|
public String timeStamp;
|
||||||
public String detectionType;
|
public String detectionType;
|
||||||
public float detectedAmplitude;
|
public float detectedValue;
|
||||||
public String detectorID;
|
public String detectorID;
|
||||||
|
|
||||||
public DetectionReport(String detectorID, String detectionType, float detectedAmplitude) {
|
public DetectionReport(String detectorID, String detectionType, float detectedAmplitude) {
|
||||||
this.timeStamp = String.valueOf(Calendar.getInstance().getTime());
|
this.timeStamp = String.valueOf(Calendar.getInstance().getTime());
|
||||||
this.detectionType = detectionType;
|
this.detectionType = detectionType;
|
||||||
this.detectedAmplitude = detectedAmplitude;
|
this.detectedValue = detectedAmplitude;
|
||||||
this.detectorID = detectorID;
|
this.detectorID = detectorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Debug Report */
|
||||||
|
public void log(String tag) {
|
||||||
|
String time = "Time: [" + this.timeStamp + "]";
|
||||||
|
String type = "Type: [" + this.detectionType + "]";
|
||||||
|
String value = "Value: [" + this.detectedValue + "]";
|
||||||
|
String id = "ID: [" + this.detectorID + "]";
|
||||||
|
|
||||||
|
String message = String.join("\t", time, type, value, id);
|
||||||
|
Log.d(tag, message);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user