diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 5a126c9..3074ba1 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -196,6 +196,7 @@ public class TestingList extends Panel { public class NetbeansPluginPanel extends MonitoredPanel { Logger logger = Logger.getLogger("TestsLog"); + HashMap mParameters = new HashMap(); //these paths are converted to unix or win path according to host OS private final String TESTS_DEVICES_DEFAULT_DIR = new java.io.File(".").getCanonicalPath() + FilenameUtils.separatorsToSystem("/home/script/tests/devices/"); @@ -626,7 +627,8 @@ public class TestingList extends Panel { try{ args.put("DEVICE", sDeviceName); args.put("ret", ""); - args.put("status", false); + args.put("status", false); + args.put("parameters", buildParametersMap()); runAsync(sTestPath, args); } catch (Exception ex) { SwingUtils.showMessage(this, "executeTest()", ex.toString()); @@ -729,6 +731,16 @@ public class TestingList extends Panel { } logger.log(Level.INFO, iCounter + " tests loaded."); } + + + private HashMap buildParametersMap(){ + HashMap mParameters = new HashMap(); + mParameters.put("repeatTimes", 2); + mParameters.put("midPoint", 40.0); + mParameters.put("spanFromMidPoint", 10.0); + + return mParameters; + } public void selectFile() { final JFileChooser fc = new JFileChooser(); diff --git a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py index 36463d0..8c19575 100644 --- a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py +++ b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py @@ -9,6 +9,8 @@ ret = 'Test failed' status = False #DEVICE = 'PO2DV-NCS-LS' +print parameters + #TODO: Set the diplay names of positioners and detectors #scan = ManualScan(['idX', 'idInkr'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [-0.5, 0.0], [4.0, 3000.0], [3000, 20]) scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20])