Added comments and modified some test

This commit is contained in:
2013-08-29 08:11:35 +02:00
parent 7f59fc1ab2
commit cbef08682a
4 changed files with 20 additions and 4 deletions

View File

@@ -61,6 +61,12 @@ public class AcquisitionEngineNG {
System.setProperty("python.options.internalTablesImpl", "weak");
}
/**
* Execute the specified script/logic while using the specified resources and paramters
* @param resourceDescriptors
* @param script
* @param parameter
*/
public void execute(Map<String, ?> resourceDescriptors, String script, List<String> parameter){
// TODO Remove debugging messages
@@ -94,6 +100,14 @@ public class AcquisitionEngineNG {
}
}
/**
* Create resources based on the passed rDescriptors
* Supported descriptor types are:
* ChannelDescriptor, ShellDescriptor, ProbeDescriptor
*
* @param resourceDescriptors
* @return
*/
private Map<String,?> createResources(Map<String, ?> resourceDescriptors){
Map<String,Object> resources = new HashMap<>();
for(String k: resourceDescriptors.keySet()){
@@ -122,7 +136,8 @@ public class AcquisitionEngineNG {
throw new RuntimeException("Unable to create resource for channel: "+s.getName(),e);
}
}
resources.put(k, new ChannelProbeResource(channels, outQueue));
// TODO Remove workaround ...
resources.put(k, new ChannelProbeResource(channels, outQueue)); // Configure the probe to use the acquisitions out queue for writing data into
// engine.put(k, new ChannelProbeResource(channels, outQueue));
}
else{

View File

@@ -52,7 +52,7 @@ import ch.psi.jcae.util.ComparatorOR;
import ch.psi.jcae.util.ComparatorREGEX;
/**
* @author ebner
* Mapper to transform a FDA v1 xml into the new internal model
*
*/
public class ScanMapperNG {
@@ -177,7 +177,7 @@ public class ScanMapperNG {
// Use readback
probeDescriptor.getSensors().add(new ChannelDescriptor<>(type, positioner.getReadback(), false));
}
System.out.println(positioner.getId());
// System.out.println(positioner.getId());
dataMessageMetadata.getComponents().add(new ComponentMetadata(positioner.getId(), (dimensions.size()-1-index)));
// TODO Done resource

View File

@@ -30,6 +30,7 @@ import ch.psi.jcae.ChannelDescriptor;
public class ProbeDescriptor {
private List<ChannelDescriptor<?>> sensors = new ArrayList<>();
public List<ChannelDescriptor<?>> getSensors(){
return sensors;
}

View File

@@ -121,7 +121,7 @@ public class ScanMapperNGTest {
positioner.setName(TestChannels.ANALOG_OUT);
positioner.setStart(0.1);
positioner.setEnd(2.2);
positioner.setStepSize(0.1);
positioner.setStepSize(0.000001);
d.getPositioner().add(positioner);