use of com.att.aro.core.peripheral.pojo.UserEvent in project VideoOptimzer by attdevsupport.
the class PktAnazlyzerTimeRangeImpl method getUserEventsForTheTimeRange.
private void getUserEventsForTheTimeRange(TraceDirectoryResult result, double beginTime, double endTime) {
List<UserEvent> orifilteredUserEvents = result.getUserEvents();
List<UserEvent> filteredUserEvents = new ArrayList<UserEvent>();
for (UserEvent userEvent : orifilteredUserEvents) {
if (userEvent.getPressTime() >= beginTime && userEvent.getReleaseTime() <= endTime) {
filteredUserEvents.add(userEvent);
}
}
result.setUserEvents(filteredUserEvents);
}
use of com.att.aro.core.peripheral.pojo.UserEvent in project VideoOptimzer by attdevsupport.
the class TraceDataReaderImpl method readFileUtil.
/**
* some of the trace files read here
*
* Parses the user event trace
*
* @throws IOException
*
* Reads the screen rotations information contained in the
* "screen_rotations" file found inside the trace directory and adds
* them to the user events list.
* @throws IOException
* Reads the CPU trace information from the CPU file.
*
* @throws IOException
* Method to read the GPS data from the trace file and store it in
* the gpsInfos list. It also updates the active duration for GPS.
* Method to read the Bluetooth data from the trace file and store
* it in the bluetoothInfos list. It also updates the active
* duration for Bluetooth.
*
* @throws IOException
* Method to read the Camera data from the trace file and store it
* in the cameraInfos list. It also updates the active duration for
* Camera.
*
* Method to read the WIFI data from the trace file and store it in
* the wifiInfos list. It also updates the active duration for Wifi.
*
* Method to read the Screen State data from the trace file and
* store it in the ScreenStateInfos list.
*
* Method to read the Battery data from the trace file and store it
* in the batteryInfos list.
*
* Method to read the alarm event from the trace file and store it
* in the alarmInfos list.
*
* Reads the Radio data from the file and stores it in the
* RadioInfo.
* @param result
*/
public void readFileUtil(TraceDirectoryResult result) {
NetworkTypeObject obj = networktypereader.readData(result.getTraceDirectory(), result.getPcapTime0(), result.getTraceDuration());
if (obj != null) {
result.setNetworkTypeInfos(obj.getNetworkTypeInfos());
result.setNetworkTypesList(obj.getNetworkTypesList());
}
CollectOptions collectOptions = collectOptionsReader.readData(result.getTraceDirectory());
result.setCollectOptions(collectOptions);
List<UserEvent> userEvents = usereventreader.readData(result.getTraceDirectory(), result.getEventTime0(), result.getPcapTime0());
result.setUserEvents(userEvents);
List<UserEvent> list = this.screenrotationreader.readData(result.getTraceDirectory(), result.getPcapTime0());
result.setScreenRotationCounter(list.size());
result.getUserEvents().addAll(list);
List<TemperatureEvent> temperatureEvents = cputemperaturereader.readData(result.getTraceDirectory(), result.getPcapTime0());
result.setTemperatureInfos(temperatureEvents);
List<LocationEvent> locationEvents = locationreader.readData(result.getTraceDirectory(), result.getPcapTime0());
result.setLocationEventInfos(locationEvents);
CpuActivityList cpuActivityList = cpureader.readData(result.getTraceDirectory(), result.getPcapTime0());
result.setCpuActivityList(cpuActivityList);
List<GpsInfo> gpsInfos = gpsreader.readData(result.getTraceDirectory(), result.getPcapTime0(), result.getTraceDuration());
result.setGpsInfos(gpsInfos);
result.setGpsActiveDuration(gpsreader.getGpsActiveDuration());
List<BluetoothInfo> bluetoothInfos = bluetoothreader.readData(result.getTraceDirectory(), result.getPcapTime0(), result.getTraceDuration());
result.setBluetoothInfos(bluetoothInfos);
result.setBluetoothActiveDuration(bluetoothreader.getBluetoothActiveDuration());
List<WifiInfo> wifiInfos = wifireader.readData(result.getTraceDirectory(), result.getPcapTime0(), result.getTraceDuration());
result.setWifiInfos(wifiInfos);
result.setWifiActiveDuration(wifireader.getWifiActiveDuration());
List<CameraInfo> cameraInfos = camerareader.readData(result.getTraceDirectory(), result.getPcapTime0(), result.getTraceDuration());
result.setCameraInfos(cameraInfos);
result.setCameraActiveDuration(camerareader.getActiveDuration());
List<ThermalStatusInfo> thermalStatusInfos = new ThermalStatusReaderImpl(filereader).readData(result.getTraceDirectory(), result.getPcapTime0(), result.getTraceDuration());
result.setThermalstatusInfos(thermalStatusInfos);
List<ScreenStateInfo> screenStateInfos = screenstatereader.readData(result.getTraceDirectory(), result.getPcapTime0(), result.getTraceDuration());
result.setScreenStateInfos(screenStateInfos);
List<BatteryInfo> batteryInfos = batteryinforeader.readData(result.getTraceDirectory(), result.getPcapTime0());
result.setBatteryInfos(batteryInfos);
// alarm info from kernel log file
List<AlarmInfo> alarmInfos = alarminforeader.readData(result.getTraceDirectory(), result.getDumpsysEpochTimestamp(), result.getDumpsysElapsedTimestamp(), result.getTraceDateTime());
result.setAlarmInfos(alarmInfos);
List<RadioInfo> radioInfos = radioinforeader.readData(result.getTraceDirectory(), result.getPcapTime0());
result.setRadioInfos(radioInfos);
VideoStreamStartupData videoStreamStartupData = videoStartupReader.readData(result.getTraceDirectory());
result.setVideoStartupData(videoStreamStartupData);
result.setMetaData(metaDataReadWrite.readData(result.getTraceDirectory()));
}
use of com.att.aro.core.peripheral.pojo.UserEvent in project VideoOptimzer by attdevsupport.
the class StartupDelayDialog method makeInitialSelections.
/**
* Sets initial start times and selected table items
*
* @param videoStream
*/
public void makeInitialSelections(VideoStream videoStream) {
if (startTime == 0) {
setStartTime(videoStream.getFirstSegment().getDLLastTimestamp());
}
segmentFramePanel.setImage(frameMap.firstEntry().getValue());
if (!allUserEventList.isEmpty()) {
double timestamp;
if ((selectedVideoEvent = makeSegmentSelection(0)) != null) {
selectedUserEvent = videoStreamStartup.getUserEvent();
if (getUserEventTimeStamp(selectedUserEvent) > manifestRequestTime) {
UserEvent tempUserEvent = findPriorUserEvent(manifestRequestTime);
selectedUserEvent = tempUserEvent != null ? tempUserEvent : selectedUserEvent;
}
if ((timestamp = videoStreamStartup.getPlayRequestedTime()) == 0) {
timestamp = getUserEventTimeStamp(selectedUserEvent);
updateUserEventSelection(timestamp);
} else {
int index = findUserEventIndex(selectedUserEvent);
makeUserEventSelection(index);
updateUserEventSelection(index);
setTimeJTextField(playRequestedTime, timestamp);
}
updateStartTime(playRequestedTime, userEventSlider);
} else {
makeUserEventSelection(0);
}
updateUserEventJListData();
userEventJList.repaint();
}
updateSegmentJListData();
segmentJList.repaint();
}
use of com.att.aro.core.peripheral.pojo.UserEvent in project VideoOptimzer by attdevsupport.
the class StartupDelayDialog method prepUserEvents.
public void prepUserEvents(List<UserEvent> userEventList) {
allUserEventList.clear();
if (!userEventList.isEmpty()) {
double pivotTime = -1.0;
int totalUserEvents = 0;
int skipEvent = 0;
for (UserEvent userEvent : userEventList) {
if (UserEventType.SCREEN_TOUCH.equals(userEvent.getEventType())) {
totalUserEvents++;
double deltaTime = userEvent.getPressTime() - pivotTime;
if (deltaTime >= 1) {
activeUserEventMap.put(userEvent.getPressTime(), userEvent);
allUserEventList.add(userEvent);
pivotTime = userEvent.getPressTime();
} else {
LOG.debug("skip time event : " + userEvent.getPressTime() + " delta time: " + deltaTime);
skipEvent++;
}
}
}
LOG.debug("Skip event: " + skipEvent + " Total touch event: " + totalUserEvents);
}
}
use of com.att.aro.core.peripheral.pojo.UserEvent in project VideoOptimzer by attdevsupport.
the class StartupDelayDialog method makeUserEventSelection.
/**
* Locate UserEvent in allUserEventList/userEventTableItems
* Report index in field variable selectedIdxUE
* make selection in userEventJTable and firePropertyChange
*
* @param indexKey
* @return UserEvent
*/
public UserEvent makeUserEventSelection(int indexKey) {
UserEventItem userEventItem;
selectedIdxUE = 0;
if (indexKey < 0 || indexKey >= allUserEventList.size()) {
userEventItem = userEventItemList.get(selectedIdxUE);
} else {
UserEvent userEvent = allUserEventList.get(indexKey);
userEventItem = userEventItemList.get(indexKey);
if (userEventItem.getUserEvent().equals(userEvent)) {
selectedIdxUE = indexKey;
} else {
for (int index = 0; index < userEventItemList.size(); index++) {
if (userEventItemList.get(index).getUserEvent().equals(userEvent)) {
userEventItem = userEventItemList.get(index);
selectedIdxUE = index;
break;
}
}
}
userEventItem.setSelected(true);
}
return userEventItem.getUserEvent();
}
Aggregations