Removed Gson.

Changed logged throughput to long instead of double.
Fixed 3g cellid in logs
This commit is contained in:
Ziver Koc 2014-08-13 13:42:11 +02:00
parent bd82634b6b
commit 79e336c1cc
8 changed files with 20 additions and 7 deletions

View file

@ -9,10 +9,14 @@ import org.apache.log4j.Logger;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.Writer;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
@ -22,7 +26,7 @@ import java.util.List;
public class UeControlExecutor implements Runnable, UeBehaviour.DataHandledListener {
private static final Logger log = Logger.getLogger(UeControlExecutor.class);
private List<UeBehaviour> behaviours;
private ArrayList<UeBehaviour> behaviours;
private UeBehaviour currentlyActive;
private boolean terminate;
private Thread thread;

View file

@ -71,8 +71,8 @@ public class CSVWriter {
StringBuilder line = new StringBuilder();
line.append(getTime()).append(DELIMITER);
line.append(behaviour).append(DELIMITER);
line.append(down).append(DELIMITER);
line.append(up).append(DELIMITER);
line.append((long)down).append(DELIMITER);
line.append((long)up).append(DELIMITER);
line.append(getRat()).append(DELIMITER);
line.append(getCellIds()).append(DELIMITER);
line.append(getSSID()).append(DELIMITER);
@ -135,9 +135,18 @@ public class CSVWriter {
StringBuilder data = new StringBuilder();
GsmCellLocation location = (GsmCellLocation) telMan.getCellLocation();
if(location != null)
return ""+location.getCid();
if(location != null) {
switch(telMan.getNetworkType()){
case TelephonyManager.NETWORK_TYPE_UMTS:
case TelephonyManager.NETWORK_TYPE_HSPA:
case TelephonyManager.NETWORK_TYPE_HSDPA:
case TelephonyManager.NETWORK_TYPE_HSUPA:
case TelephonyManager.NETWORK_TYPE_HSPAP:
return ""+(location.getCid() & 0xFFFF);
default:
return ""+location.getCid();
}
}
/*List<NeighboringCellInfo> cellList = telMan.getNeighboringCellInfo();
if(cellList != null) {
for (int i = 0; i < cellList.size(); i++) {