47 lines
1.5 KiB
Java
47 lines
1.5 KiB
Java
package com.safemobile.lib;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
public class RecordMSG extends TCPmsg {
|
|
|
|
private ArrayList<Recording> recordList;
|
|
|
|
public RecordMSG(TCPmsg tcp) {
|
|
super(tcp);
|
|
setRecordList(new ArrayList<>());
|
|
String date4parsing = super.data;
|
|
String[] tempArr = date4parsing.split(";");
|
|
|
|
for (String s : tempArr) {
|
|
String[] tempRec = s.split("&", -1);
|
|
if (tempRec.length < 11)
|
|
continue;
|
|
|
|
Recording recValue = new Recording();
|
|
recValue.id = Long.parseLong(tempRec[0]);
|
|
recValue.startGMT = Integer.parseInt(tempRec[1]);
|
|
recValue.endGMT = Integer.parseInt(tempRec[2]);
|
|
recValue.gwID = Integer.parseInt(tempRec[3]);
|
|
recValue.radioGWID = Integer.parseInt(tempRec[4]);
|
|
recValue.subID = (tempRec[5] == null || tempRec[5].isEmpty()) ? 0 : Integer.parseInt(tempRec[5]);
|
|
recValue.typeID = Integer.parseInt(tempRec[6]);
|
|
recValue.callType = Integer.parseInt(tempRec[7]);
|
|
recValue.groupCpsId = (tempRec[8] == null || tempRec[8].isEmpty()) ? 0 : Integer.parseInt(tempRec[8]);
|
|
recValue.dispatcherId = (tempRec[9] == null || tempRec[9].isEmpty()) ? 0 : Integer.parseInt(tempRec[9]);
|
|
recValue.groupName = tempRec[10];
|
|
|
|
getRecordList().add(recValue);
|
|
}
|
|
|
|
SM.Debug("alarmList size:" + this.getRecordList().size() + " total:" + this.getRecordList().size());
|
|
}
|
|
|
|
public ArrayList<Recording> getRecordList() {
|
|
return recordList;
|
|
}
|
|
|
|
public void setRecordList(ArrayList<Recording> recordList) {
|
|
this.recordList = recordList;
|
|
}
|
|
}
|