Object xComponent = getComponent(scanResult, xAxisComponent);
List<IScanPoint> scanPointList = scanResult.getScanPointsList();
Double xx;
DataArray dataArray;
Point point;
ISensor sensor;
IActuator actuator;
for (IScanPoint scanPoint : scanPointList) {
if (xComponent instanceof IActuator) {
xx = scanPoint.getValue((IActuator) xComponent);
}
else if (xComponent instanceof ISensor) {
xx = scanPoint.getValue((ISensor) xComponent);
}
else {
xx = scanPoint.getTime();
}
for (Map.Entry<ISensor, DataArray> dataSensorEntry : dataSensorMap.entrySet()) {
sensor = dataSensorEntry.getKey();
dataArray = dataSensorEntry.getValue();
point = new Point(xx, scanPoint.getValue(sensor));
dataArray.add(point);
}
for (Map.Entry<IActuator, DataArray> dataActuatorEntry : dataActuatorMap
.entrySet()) {
actuator = dataActuatorEntry.getKey();
dataArray = dataActuatorEntry.getValue();
point = new Point(xx, scanPoint.getValue(actuator));
dataArray.add(point);
}
if (dataTime != null) {
point = new Point(xx, scanPoint.getTime());
dataTime.add(point);
}
}
}
}