if (scanResult.getSensorsList() != null) {
Map<ISensor, DataArray> dataSensorMap = new HashMap<ISensor, DataArray>();
Map<IActuator, DataArray> dataActuatorMap = new HashMap<IActuator, DataArray>();
DataArray dataTime = null;
Object component;
ISensor sensorComponent;
IActuator actuatorComponent;
for (String dataName : yAxisComponents) {
component = getComponent(scanResult, dataName);
if (component instanceof ISensor) {
sensorComponent = (ISensor) component;
DataArray dataArray = new DataArray();
dataArray.setId(sensorComponent.getName());
dataArray.setDisplayName(sensorComponent.getName());
dataArray.setFormat(getFormat());
dataArray.setReadOnly(true);
dataList.add(dataArray);
dataSensorMap.put(sensorComponent, dataArray);
}
else if (component instanceof IActuator) {
actuatorComponent = (IActuator) component;
DataArray dataArray = new DataArray();
dataArray.setId(actuatorComponent.getName());
dataArray.setDisplayName(actuatorComponent.getName());
dataArray.setFormat(getFormat());
dataArray.setReadOnly(true);
dataList.add(dataArray);
dataActuatorMap.put(actuatorComponent, dataArray);
}
else {
dataTime = new DataArray();
dataTime.setId(dataName);
dataTime.setDisplayName(dataName);
dataTime.setFormat(getFormat());
dataTime.setReadOnly(true);
dataList.add(dataTime);
}
}
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);
}