添加数据模型

This commit is contained in:
liujing
2021-07-30 19:04:54 +08:00
parent ae0586d572
commit 8e646ed9ee
2 changed files with 130 additions and 9 deletions

View File

@@ -13,7 +13,7 @@ import java.util.ArrayList;
public class CheckItemInfo implements Serializable {
private TypeEnum type;
private String title;
private ArrayList<ItemInfo> itemList;
private ArrayList itemList;
public TypeEnum getType() {
return type;
@@ -31,20 +31,139 @@ public class CheckItemInfo implements Serializable {
this.title = title;
}
public ArrayList<ItemInfo> getItemList() {
public ArrayList getItemList() {
return itemList;
}
public void setItemList(ArrayList<ItemInfo> itemList) {
public void setItemList(ArrayList itemList) {
this.itemList = itemList;
}
}
class ItemInfo implements Serializable {
private String checkDescription;
private String checkResult;
/**
* 系统检测-鹰眼
*/
class SystemResultForYingYan implements Serializable {
//版本
private String version;
//电量
private String battery;
//网络
private String netStatus;
//cpu占比
private String cpu;
//内存占比
private String memory;
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getBattery() {
return battery;
}
public void setBattery(String battery) {
this.battery = battery;
}
public String getNetStatus() {
return netStatus;
}
public void setNetStatus(String netStatus) {
this.netStatus = netStatus;
}
public String getCpu() {
return cpu;
}
public void setCpu(String cpu) {
this.cpu = cpu;
}
public String getMemory() {
return memory;
}
public void setMemory(String memory) {
this.memory = memory;
}
@Override
public String toString() {
return "SystemResultForYingYan{" +
"version='" + version + '\'' +
", battery='" + battery + '\'' +
", netStatus='" + netStatus + '\'' +
", cpu='" + cpu + '\'' +
", memory='" + memory + '\'' +
'}';
}
}
/**
* 系统检查-自动驾驶系统
*/
class SystemResultForADAS implements Serializable {
}
/**
* 软件检测-鹰眼
*/
class SoftwareForYingYan implements Serializable {
//数据时延
private long adasDataTime;
//定位时延
private long locationTime;
public long getAdasDataTime() {
return adasDataTime;
}
public void setAdasDataTime(long adasDataTime) {
this.adasDataTime = adasDataTime;
}
public long getLocationTime() {
return locationTime;
}
public void setLocationTime(long locationTime) {
this.locationTime = locationTime;
}
@Override
public String toString() {
return "SoftwareForYingYan{" +
"adasDataTime=" + adasDataTime +
", locationTime=" + locationTime +
'}';
}
}
/**
* 软件检测-ADAS
*/
class SoftwareForADAS implements Serializable {
}
/**
* 硬件检测-ADAS
*/
class HardwareForADAS implements Serializable {
}
interface TypeEnum {
String TITLE_TYPE = "title_type";
String LIST_TYPE = "list_type";

View File

@@ -94,7 +94,9 @@ public class CheckActivity extends AppCompatActivity {
* 版本检测
*/
public void versionCheckResult() {
//应用版本号
//adas
//鹰眼
String verCodeStr = CommonUtils.getVersionName(context, true);
Log.d(TAG, "版本检测结果:鹰眼" + verCodeStr);
}
@@ -143,8 +145,8 @@ public class CheckActivity extends AppCompatActivity {
*/
public void time() {
final long start = System.nanoTime();
long time = TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start));
Log.i("ADAS数据延时", "接收数据 -> 发出 cost :" + time + "ms");
long adasDataTime = TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start));
Log.i("ADAS数据延时", "接收数据 -> 发出 cost :" + adasDataTime + "ms");
}
/**