Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
f83fe20
more parameters for marte2_simulink_generic
GabrieleManduchi Feb 5, 2024
6fd5924
Proceed with the new implementation
GabrieleManduchi Feb 9, 2024
3cb3313
Proceed
GabrieleManduchi Feb 13, 2024
5277c9a
Proceed
GabrieleManduchi Feb 14, 2024
fcd96ce
Proceed
GabrieleManduchi Feb 16, 2024
fff75ab
Proceed
GabrieleManduchi Feb 21, 2024
dedb012
Proceed
GabrieleManduchi Feb 27, 2024
379d82b
proceed
GabrieleManduchi Mar 1, 2024
91f0c21
Proceed
GabrieleManduchi Mar 4, 2024
9c11a9a
Proceed
GabrieleManduchi Mar 6, 2024
a94ab15
Partially tested version
GabrieleManduchi Mar 12, 2024
74f647c
Added execution times recording
GabrieleManduchi Mar 13, 2024
b5bfc94
Proceed
GabrieleManduchi Mar 14, 2024
c5d9aee
Procced with debugging
GabrieleManduchi Mar 18, 2024
881c16b
Proceed
GabrieleManduchi Mar 18, 2024
e4d3eaa
Proceed
GabrieleManduchi Mar 18, 2024
044caef
Proceed
GabrieleManduchi Mar 20, 2024
ba39332
Fixes for multisampled acquisition
Mar 20, 2024
a1756af
Remove quotes from string parameters
GabrieleManduchi Mar 22, 2024
eb9ab9d
Merge branch 'gm-new-marte' of https://github.com/MDSplus/mdsplus int…
GabrieleManduchi Mar 22, 2024
c336d3e
Minor fixes
GabrieleManduchi Mar 25, 2024
a13106d
Procced debugging
GabrieleManduchi Mar 26, 2024
5012c78
Debugging
GabrieleManduchi Mar 26, 2024
93fdcb8
More channels
GabrieleManduchi Mar 28, 2024
eff321d
Debug Distributed configuration
GabrieleManduchi Mar 29, 2024
70c5bea
Fix sognal recording for synchronized inputs
GabrieleManduchi Apr 3, 2024
bdeed2d
Further debug
GabrieleManduchi Apr 4, 2024
387f886
Further debug
GabrieleManduchi Apr 4, 2024
5fa4a6f
Small fixes
GabrieleManduchi Apr 5, 2024
aa49ec5
Close ti final version
GabrieleManduchi Apr 10, 2024
53aca64
Forgotten fix
GabrieleManduchi Apr 10, 2024
30b4ac5
Make port visible, fix parameter name
GabrieleManduchi Apr 10, 2024
b4b614c
unaligned nids
GabrieleManduchi Apr 11, 2024
54d9391
Increase DiscontinuityFactor
GabrieleManduchi Apr 11, 2024
fad74d2
Discontinuityfactor
GabrieleManduchi Apr 11, 2024
c647db1
More channels
GabrieleManduchi Apr 16, 2024
b9db605
Proceed with the new implementation
GabrieleManduchi Feb 9, 2024
ef136fe
Proceed
GabrieleManduchi Feb 13, 2024
89d632b
Proceed
GabrieleManduchi Feb 14, 2024
61c0406
Proceed
GabrieleManduchi Feb 16, 2024
7ed1419
Proceed
GabrieleManduchi Feb 21, 2024
b300187
Proceed
GabrieleManduchi Feb 27, 2024
6ec438e
proceed
GabrieleManduchi Mar 1, 2024
689b636
Proceed
GabrieleManduchi Mar 4, 2024
e26dd61
Proceed
GabrieleManduchi Mar 6, 2024
43bcc4d
Partially tested version
GabrieleManduchi Mar 12, 2024
92d7eee
Added execution times recording
GabrieleManduchi Mar 13, 2024
53fbee7
Proceed
GabrieleManduchi Mar 14, 2024
7a5a132
Procced with debugging
GabrieleManduchi Mar 18, 2024
781a3bc
Proceed
GabrieleManduchi Mar 18, 2024
48dde80
Proceed
GabrieleManduchi Mar 18, 2024
80e4af7
Proceed
GabrieleManduchi Mar 20, 2024
f4b27e3
Fixes for multisampled acquisition
Mar 20, 2024
6586939
Remove quotes from string parameters
GabrieleManduchi Mar 22, 2024
82f2edb
Minor fixes
GabrieleManduchi Mar 25, 2024
59481d9
Procced debugging
GabrieleManduchi Mar 26, 2024
c4c6a1b
Debugging
GabrieleManduchi Mar 26, 2024
e41d66f
More channels
GabrieleManduchi Mar 28, 2024
6bbd8cb
Debug Distributed configuration
GabrieleManduchi Mar 29, 2024
1d36a31
Fix sognal recording for synchronized inputs
GabrieleManduchi Apr 3, 2024
4e76e69
Further debug
GabrieleManduchi Apr 4, 2024
adfcb91
Further debug
GabrieleManduchi Apr 4, 2024
4482c0b
Small fixes
GabrieleManduchi Apr 5, 2024
a7255fc
Close ti final version
GabrieleManduchi Apr 10, 2024
02de333
Forgotten fix
GabrieleManduchi Apr 10, 2024
3c38a04
Make port visible, fix parameter name
GabrieleManduchi Apr 10, 2024
9843f44
unaligned nids
GabrieleManduchi Apr 11, 2024
2be1f8b
Increase DiscontinuityFactor
GabrieleManduchi Apr 11, 2024
4554a71
Discontinuityfactor
GabrieleManduchi Apr 11, 2024
8348720
More channels
GabrieleManduchi Apr 16, 2024
51223f6
Merge branch 'gm-new-marte' of https://github.com/MDSplus/mdsplus int…
GabrieleManduchi Apr 18, 2024
87b6ce5
Packages updated
GabrieleManduchi Apr 18, 2024
dc131c8
Remove print
GabrieleManduchi Apr 18, 2024
c45d820
Remove error messages
GabrieleManduchi Apr 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions deploy/packaging/debian/rfxdevices.noarch
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@
./usr/local/mdsplus/pydevices/RfxDevices/MARTE.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_COMPONENT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_CONVERSION.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DOUBLEH_MASTER.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DOUBLEH_SLAVE.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DTACQAI.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DTACQAO.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DUTY_CYCLE.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_EPICSCA.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_EPICS_IN.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_EPICS_OUT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_EXPR.py
Expand All @@ -51,13 +54,19 @@
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_NI6368_DAC.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_NI6368_DO.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_NI6368_SYNCH_DI.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_OPCUA_IN.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_OPCUA_OUT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_OPCUA_SERVER.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_OUT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_PYTHON.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_PYTHON_GENERIC.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_PYTHON_PID.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_PYTHON_PWM.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RAMP.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RESAMPLER.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RFXMODEL.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RTNIN.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RTNOUT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RTSM.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_SIMULINK.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_SIMULINK_DTT.py
Expand Down
9 changes: 9 additions & 0 deletions deploy/packaging/redhat/rfxdevices.noarch
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@
./usr/local/mdsplus/pydevices/RfxDevices/MARTE.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_COMPONENT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_CONVERSION.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DOUBLEH_MASTER.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DOUBLEH_SLAVE.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DTACQAI.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DTACQAO.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_DUTY_CYCLE.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_EPICSCA.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_EPICS_IN.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_EPICS_OUT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_EXPR.py
Expand All @@ -52,13 +55,19 @@
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_NI6368_DAC.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_NI6368_DO.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_NI6368_SYNCH_DI.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_OPCUA_IN.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_OPCUA_OUT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_OPCUA_SERVER.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_OUT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_PYTHON.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_PYTHON_GENERIC.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_PYTHON_PID.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_PYTHON_PWM.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RAMP.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RESAMPLER.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RFXMODEL.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RTNIN.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RTNOUT.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_RTSM.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_SIMULINK.py
./usr/local/mdsplus/pydevices/RfxDevices/MARTE2_SIMULINK_DTT.py
Expand Down
94 changes: 81 additions & 13 deletions java/devicebeans/src/main/java/DeviceInputs.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,22 @@ public class DeviceInputs extends DeviceComponent

private JScrollPane scrollP;
private int numInputs;
private JTextField valuesTF[], fieldsTF[][], parametersTF[][];
private JTextField valuesTF[], dimensionsTF[], fieldsTF[][], parametersTF[][];
private JTextField typesTF[];
private boolean parametersIsText[][];
private JLabel labels[];
int numParameters[], numFields[];
static final String types[] = {"int8", "uint8", "int16", "uint16", "int32", "uint32", "int64", "uint64", "float32", "float64"};
private int stringToIdx(String type)
{
for(int i = 0; i < types.length; i++)
{
if(types[i].equals(type))
return i;
}
return 0;
}

public DeviceInputs()
{
}
Expand All @@ -33,11 +46,14 @@ protected void initializeData(String data, boolean is_on)
numInputs = subtree.getInt("GETNCI("+subtree.getFullPath(currNid)+",\'NUMBER_OF_CHILDREN\')");
}catch(Exception exc){numInputs = 0;}
valuesTF = new JTextField[numInputs];
typesTF = new JTextField[numInputs];
dimensionsTF = new JTextField[numInputs];
labels = new JLabel[numInputs];
fieldsTF = new JTextField[numInputs][];
numParameters = new int[numInputs];
numFields = new int[numInputs];
parametersTF = new JTextField[numInputs][];
parametersIsText = new boolean[numInputs][];
JPanel jp = new JPanel();
jp.setLayout(new GridLayout(numInputs, 1));
int currInputNid = currNid + 1;
Expand Down Expand Up @@ -71,6 +87,7 @@ protected void initializeData(String data, boolean is_on)
}
fieldsTF[i] = new JTextField[numFields[i]];
parametersTF[i] = new JTextField[numParameters[i]];
parametersIsText[i] = new boolean[numParameters[i]];
String inputName;
try {
inputName = subtree.getString(subtree.getDataExpr(currInputNid + 5));
Expand All @@ -85,9 +102,12 @@ protected void initializeData(String data, boolean is_on)

jp1.setLayout(new GridLayout(1 + numFields[i],1));
JPanel jp2 = new JPanel();
// jp2.setLayout(new BorderLayout());
//jp2.add(valuesTF[i] = new JTextField(), "Center");
jp2.add(new JLabel("Value:"));
jp2.add(valuesTF[i] = new JTextField(30));
jp2.add(new JLabel("Type:"));
jp2.add(typesTF[i] = new JTextField(10));
jp2.add(new JLabel("Dimensions:"));
jp2.add(dimensionsTF[i] = new JTextField(4));
for(int parIdx = 0; parIdx < numParameters[i]; parIdx++)
{
java.lang.String parName = "";
Expand All @@ -99,13 +119,19 @@ protected void initializeData(String data, boolean is_on)
}
jp2.add(new JLabel(parName+":"));
jp2.add(parametersTF[i][parIdx] = new JTextField(10));
try {
parametersIsText[i][parIdx] = subtree.getUsage(currInputNid + 8 + 1 + 3 * parIdx).equals("TEXT");
}catch(Exception exc)
{
System.out.println("OHI CANNOT TAKE USAGE");
}
}
jp1.add(jp2);
for (int fieldIdx = 0; fieldIdx < numFields[i]; fieldIdx++)
{
String fieldName;
try {
fieldName = subtree.getString(subtree.getDataExpr(currInputNid + 8 + 3 * numParameters[i] + 6 * fieldIdx + 4));
fieldName = subtree.getString(subtree.getDataExpr(currInputNid + 8 + 3 * numParameters[i] + 8 * fieldIdx + 5));
}catch(Exception exc)
{
fieldName = "";
Expand All @@ -116,7 +142,7 @@ protected void initializeData(String data, boolean is_on)
jp2.add(fieldsTF[i][fieldIdx] = new JTextField(), "Center");
jp1.add(jp2);
}
currInputNid += numInputChildren + 1 + 3 * numParameters[i] + 6 * numFields[i];
currInputNid += numInputChildren + 1 + 3 * numParameters[i] + 8 * numFields[i];
jp.add(jp1);
}
scrollP = new JScrollPane(jp);
Expand All @@ -139,15 +165,37 @@ protected void displayData(String data, boolean is_on)
System.out.println("Error getting number of input children");
}
try {
valuesTF[inputIdx].setText(subtree.getDataExpr(currInputNid + 4));
valuesTF[inputIdx].setText(subtree.getDataExpr(currInputNid + 4));
}catch(Exception exc)
{
valuesTF[inputIdx].setText("");
}
try {
String typeStr = subtree.getDataExpr(currInputNid + 1).replace("\"", "");
typesTF[inputIdx].setText(typeStr);
}catch(Exception exc)
{
typesTF[inputIdx].setText("");
}
try {
dimensionsTF[inputIdx].setText(subtree.getDataExpr(currInputNid + 2));
}catch(Exception exc)
{
dimensionsTF[inputIdx].setText("");
}
for(int parIdx = 0; parIdx < numParameters[inputIdx]; parIdx++)
{
try {
parametersTF[inputIdx][parIdx].setText(subtree.getDataExpr(currInputNid + 9 + 3 * parIdx));
String parVal = subtree.getDataExpr(currInputNid + 9 + 3 * parIdx);
if(parametersIsText[inputIdx][parIdx])
{
parametersTF[inputIdx][parIdx].setText(parVal.substring(1, parVal.length() - 1));
}
else
{
parametersTF[inputIdx][parIdx].setText(parVal);
}

}catch(Exception exc)
{
parametersTF[inputIdx][parIdx].setText("");
Expand All @@ -156,10 +204,10 @@ protected void displayData(String data, boolean is_on)
for(int fieldIdx = 0; fieldIdx < numFields[inputIdx]; fieldIdx++)
{
try {
fieldsTF[inputIdx][fieldIdx].setText(subtree.getDataExpr(currInputNid + 8 + 3 * numParameters[inputIdx] + 6 * fieldIdx + 5));
fieldsTF[inputIdx][fieldIdx].setText(subtree.getDataExpr(currInputNid + 8 + 3 * numParameters[inputIdx] + 8 * fieldIdx + 4));
}catch(Exception exc){fieldsTF[inputIdx][fieldIdx].setText("");}
}
currInputNid += numInputChildren + 1 + 3 * numParameters[inputIdx] + 6 * numFields[inputIdx];
currInputNid += numInputChildren + 1 + 3 * numParameters[inputIdx] + 8 * numFields[inputIdx];
}
}

Expand All @@ -180,6 +228,18 @@ public void apply() throws Exception
{
System.out.println("Error getting number of input children");
}
try {
subtree.putDataExpr(currInputNid + 1, "\""+typesTF[inputIdx].getText()+"\"");
}catch(Exception exc)
{
JOptionPane.showMessageDialog(null, ""+exc, "Error in input field "+inputIdx, JOptionPane.WARNING_MESSAGE);
}
try {
subtree.putDataExpr(currInputNid + 2, dimensionsTF[inputIdx].getText());
}catch(Exception exc)
{
JOptionPane.showMessageDialog(null, ""+exc, "Error in input field "+inputIdx, JOptionPane.WARNING_MESSAGE);
}
try {
subtree.putDataExpr(currInputNid + 4, valuesTF[inputIdx].getText());
}catch(Exception exc)
Expand All @@ -189,23 +249,31 @@ public void apply() throws Exception
for(int parIdx = 0; parIdx < numParameters[inputIdx]; parIdx++)
{
try {
subtree.putDataExpr(currInputNid + 9 + 3 * parIdx, parametersTF[inputIdx][parIdx].getText());
}catch(Exception exc)
String parVal = parametersTF[inputIdx][parIdx].getText();
if(parametersIsText[inputIdx][parIdx])
{
subtree.putDataExpr(currInputNid + 9 + 3 * parIdx, "\'"+parVal+"\'");
}
else
{
subtree.putDataExpr(currInputNid + 9 + 3 * parIdx, parVal);
}
}catch(Exception exc)
{
JOptionPane.showMessageDialog(null, ""+exc, "Error in paremeter field "+inputIdx, JOptionPane.WARNING_MESSAGE);
}
}
for(int fieldIdx = 0; fieldIdx < numFields[inputIdx]; fieldIdx++)
{
try {
subtree.putDataExpr(currInputNid + 8 + 3 * numParameters[inputIdx] + 6 * fieldIdx + 5, fieldsTF[inputIdx][fieldIdx].getText());
subtree.putDataExpr(currInputNid + 8 + 3 * numParameters[inputIdx] + 8 * fieldIdx + 4, fieldsTF[inputIdx][fieldIdx].getText());
}catch(Exception exc)
{
JOptionPane.showMessageDialog(null, ""+exc, "Error in subfield of input field "+inputIdx, JOptionPane.WARNING_MESSAGE);
}

}
currInputNid += numInputChildren + 1 + 3 * numParameters[inputIdx] + 6 * numFields[inputIdx];
currInputNid += numInputChildren + 1 + 3 * numParameters[inputIdx] + 8 * numFields[inputIdx];
}
}
}
Loading