509 lines
17 KiB
Java
509 lines
17 KiB
Java
package org.hwo.pulscounter.ui;
|
|
|
|
import java.awt.BorderLayout;
|
|
import java.awt.EventQueue;
|
|
|
|
import javax.swing.JFrame;
|
|
import javax.swing.JPanel;
|
|
import javax.swing.border.EmptyBorder;
|
|
import javax.swing.event.ChangeEvent;
|
|
import javax.swing.event.ChangeListener;
|
|
|
|
import org.hwo.pulscounter.PulsCounter2Application;
|
|
import org.hwo.servicelink.ServiceLink;
|
|
import org.hwo.servicelink.ServiceLinkException;
|
|
import org.hwo.servicelink.ServiceLinkRequestFailedException;
|
|
|
|
import java.awt.GridLayout;
|
|
import javax.swing.JTabbedPane;
|
|
import java.awt.GridBagLayout;
|
|
import java.awt.GridBagConstraints;
|
|
import javax.swing.JLabel;
|
|
import java.awt.Insets;
|
|
import java.awt.Dimension;
|
|
import javax.swing.JComboBox;
|
|
import java.awt.event.ActionListener;
|
|
import java.io.IOException;
|
|
import java.math.BigInteger;
|
|
import java.awt.event.ActionEvent;
|
|
import javax.swing.JCheckBox;
|
|
import javax.swing.JSpinner;
|
|
import javax.swing.SpinnerNumberModel;
|
|
import javax.swing.JButton;
|
|
|
|
import org.hwo.bitfields.BitField;
|
|
import org.hwo.bitfields.Field;
|
|
import org.hwo.bitfields.ui.BitFieldEditor;
|
|
import org.hwo.models.TableMapper.TableColumn;
|
|
import org.hwo.models.TableMapper.TableMapper;
|
|
import org.hwo.ui.JTimeSpanEditor;
|
|
import java.awt.event.FocusAdapter;
|
|
import java.awt.event.FocusEvent;
|
|
import javax.swing.JScrollPane;
|
|
import javax.swing.JTable;
|
|
|
|
public class DeviceConfiguration extends JFrame {
|
|
|
|
private JPanel contentPane;
|
|
|
|
|
|
int currentChannel;
|
|
private BitFieldEditor bfeIntervall;
|
|
private JTimeSpanEditor tseI3;
|
|
private JTimeSpanEditor tseI2;
|
|
private JTimeSpanEditor tseI1;
|
|
private JTimeSpanEditor tseI0;
|
|
|
|
private TableMapper tmSettings;
|
|
|
|
int outputs,
|
|
pullups,
|
|
inverts,
|
|
trigger;
|
|
|
|
int[] filter,
|
|
windows;
|
|
private JTable tSettings;
|
|
|
|
|
|
|
|
/**
|
|
* Create the frame.
|
|
*/
|
|
public DeviceConfiguration() {
|
|
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
|
setBounds(100, 100, 860, 498);
|
|
contentPane = new JPanel();
|
|
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
|
setContentPane(contentPane);
|
|
GridBagLayout gbl_contentPane = new GridBagLayout();
|
|
gbl_contentPane.columnWidths = new int[] {30, 0, 0};
|
|
gbl_contentPane.rowHeights = new int[] {183, 0};
|
|
gbl_contentPane.columnWeights = new double[]{1.0, 0.0, 0.0};
|
|
gbl_contentPane.rowWeights = new double[]{1.0, 0.0};
|
|
contentPane.setLayout(gbl_contentPane);
|
|
|
|
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
|
GridBagConstraints gbc_tabbedPane = new GridBagConstraints();
|
|
gbc_tabbedPane.gridwidth = 3;
|
|
gbc_tabbedPane.fill = GridBagConstraints.BOTH;
|
|
gbc_tabbedPane.insets = new Insets(0, 0, 5, 0);
|
|
gbc_tabbedPane.gridx = 0;
|
|
gbc_tabbedPane.gridy = 0;
|
|
contentPane.add(tabbedPane, gbc_tabbedPane);
|
|
|
|
JPanel panel_2 = new JPanel();
|
|
tabbedPane.addTab("Intervalle", null, panel_2, null);
|
|
GridBagLayout gbl_panel_2 = new GridBagLayout();
|
|
gbl_panel_2.columnWidths = new int[]{0, 0, 0};
|
|
gbl_panel_2.rowHeights = new int[]{0, 0, 0, 0, 0, 0};
|
|
gbl_panel_2.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
|
|
gbl_panel_2.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
|
|
panel_2.setLayout(gbl_panel_2);
|
|
|
|
bfeIntervall = new BitFieldEditor();
|
|
bfeIntervall.setToolTipText("<html>\n<b>Tagesbasierte Intervalle</b><br/>\n<br/>\nTagesbasierte Intervalle werden immer auf 0:00:00 Uhr des aktuellen Tages bezogen ausgeführt.<br/>\nDies ermöglicht nicht nur eine Regelmäßige Aufzeichnung, sondern erzwingt auch eine Aufzeichnung<br/>\nin einem festgelegten immer gleichen Raster.<br/>\n<br/>\nNicht tageszeitbasierte Intervalle werden mit Bezug auf den 1.1.1970 0:00:00 Uhr ausgeführt.<br/>\nDiese ermöglichen eine stete regelmäßige Aufzeichnung bei der die tageszeit ignoriert wird.\n</html>");
|
|
bfeIntervall.addChangeListener(new ChangeListener() {
|
|
public void stateChanged(ChangeEvent e) {
|
|
int v = bfeIntervall.getIntValue();
|
|
tseI0.setDaysEnabled(((v & 0x01)==0));
|
|
tseI1.setDaysEnabled(((v & 0x02)==0));
|
|
tseI2.setDaysEnabled(((v & 0x04)==0));
|
|
tseI3.setDaysEnabled(((v & 0x08)==0));
|
|
|
|
ServiceLink sl = PulsCounter2Application.getApplication().getServiceLink();
|
|
try {
|
|
|
|
sl.writeInt(13, 0, 0x1003, bfeIntervall.getIntValue());
|
|
|
|
} catch (ServiceLinkRequestFailedException e1) {
|
|
e1.printStackTrace();
|
|
} catch (IOException e1) {
|
|
e1.printStackTrace();
|
|
} catch (ServiceLinkException e1) {
|
|
e1.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
|
|
JLabel lblTageszeitabhngigkeit = new JLabel("Tageszeitabhängigkeit:");
|
|
GridBagConstraints gbc_lblTageszeitabhngigkeit = new GridBagConstraints();
|
|
gbc_lblTageszeitabhngigkeit.fill = GridBagConstraints.HORIZONTAL;
|
|
gbc_lblTageszeitabhngigkeit.insets = new Insets(0, 0, 5, 5);
|
|
gbc_lblTageszeitabhngigkeit.gridx = 0;
|
|
gbc_lblTageszeitabhngigkeit.gridy = 0;
|
|
panel_2.add(lblTageszeitabhngigkeit, gbc_lblTageszeitabhngigkeit);
|
|
GridBagConstraints gbc_bfeIntervall = new GridBagConstraints();
|
|
gbc_bfeIntervall.anchor = GridBagConstraints.NORTH;
|
|
gbc_bfeIntervall.insets = new Insets(0, 0, 5, 0);
|
|
gbc_bfeIntervall.fill = GridBagConstraints.HORIZONTAL;
|
|
gbc_bfeIntervall.gridx = 1;
|
|
gbc_bfeIntervall.gridy = 0;
|
|
panel_2.add(bfeIntervall, gbc_bfeIntervall);
|
|
|
|
JLabel lblIntervall = new JLabel("Intervall 0:");
|
|
lblIntervall.setToolTipText("<html>\n<b>Intervall</b><br/>\n<br/>\nStellen Sie die gewünschten Intervalllängen ein.<br/>\n<br/>\nEinheiten: <b>Tage, Stunden, Minuten, Sekunden</b>\n</html>");
|
|
GridBagConstraints gbc_lblIntervall = new GridBagConstraints();
|
|
gbc_lblIntervall.fill = GridBagConstraints.HORIZONTAL;
|
|
gbc_lblIntervall.insets = new Insets(0, 0, 5, 5);
|
|
gbc_lblIntervall.gridx = 0;
|
|
gbc_lblIntervall.gridy = 1;
|
|
panel_2.add(lblIntervall, gbc_lblIntervall);
|
|
|
|
tseI0 = new JTimeSpanEditor();
|
|
tseI0.setToolTipText("<html>\n<b>Intervall</b><br/>\n<br/>\nStellen Sie die gewünschten Intervalllängen ein.<br/>\n<br/>\nEinheiten: <b>Tage, Stunden, Minuten, Sekunden</b>\n</html>");
|
|
tseI0.addFocusListener(new FocusAdapter() {
|
|
@Override
|
|
public void focusLost(FocusEvent e) {
|
|
System.err.println("FOCUS LOST 0");
|
|
ServiceLink sl = PulsCounter2Application.getApplication().getServiceLink();
|
|
try {
|
|
|
|
sl.writeInt(13, 0, 0x1010, (Integer)tseI0.getValue());
|
|
|
|
} catch (ServiceLinkRequestFailedException e1) {
|
|
e1.printStackTrace();
|
|
} catch (IOException e1) {
|
|
e1.printStackTrace();
|
|
} catch (ServiceLinkException e1) {
|
|
e1.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
GridBagConstraints gbc_tseI0 = new GridBagConstraints();
|
|
gbc_tseI0.anchor = GridBagConstraints.WEST;
|
|
gbc_tseI0.insets = new Insets(0, 0, 5, 0);
|
|
gbc_tseI0.gridx = 1;
|
|
gbc_tseI0.gridy = 1;
|
|
panel_2.add(tseI0, gbc_tseI0);
|
|
|
|
JLabel lblIntervall_1 = new JLabel("Intervall 1:");
|
|
lblIntervall_1.setToolTipText("<html>\n<b>Intervall</b><br/>\n<br/>\nStellen Sie die gewünschten Intervalllängen ein.<br/>\n<br/>\nEinheiten: <b>Tage, Stunden, Minuten, Sekunden</b>\n</html>");
|
|
GridBagConstraints gbc_lblIntervall_1 = new GridBagConstraints();
|
|
gbc_lblIntervall_1.fill = GridBagConstraints.HORIZONTAL;
|
|
gbc_lblIntervall_1.insets = new Insets(0, 0, 5, 5);
|
|
gbc_lblIntervall_1.gridx = 0;
|
|
gbc_lblIntervall_1.gridy = 2;
|
|
panel_2.add(lblIntervall_1, gbc_lblIntervall_1);
|
|
|
|
tseI1 = new JTimeSpanEditor();
|
|
tseI1.setToolTipText("<html>\n<b>Intervall</b><br/>\n<br/>\nStellen Sie die gewünschten Intervalllängen ein.<br/>\n<br/>\nEinheiten: <b>Tage, Stunden, Minuten, Sekunden</b>\n</html>");
|
|
tseI1.addFocusListener(new FocusAdapter() {
|
|
@Override
|
|
public void focusLost(FocusEvent e) {
|
|
|
|
ServiceLink sl = PulsCounter2Application.getApplication().getServiceLink();
|
|
try {
|
|
|
|
sl.writeInt(13, 0, 0x1011, (Integer)tseI1.getValue());
|
|
|
|
} catch (ServiceLinkRequestFailedException e1) {
|
|
e1.printStackTrace();
|
|
} catch (IOException e1) {
|
|
e1.printStackTrace();
|
|
} catch (ServiceLinkException e1) {
|
|
e1.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
GridBagConstraints gbc_tseI1 = new GridBagConstraints();
|
|
gbc_tseI1.anchor = GridBagConstraints.WEST;
|
|
gbc_tseI1.insets = new Insets(0, 0, 5, 0);
|
|
gbc_tseI1.gridx = 1;
|
|
gbc_tseI1.gridy = 2;
|
|
panel_2.add(tseI1, gbc_tseI1);
|
|
|
|
JLabel lblIntervall_2 = new JLabel("Intervall 2:");
|
|
lblIntervall_2.setToolTipText("<html>\n<b>Intervall</b><br/>\n<br/>\nStellen Sie die gewünschten Intervalllängen ein.<br/>\n<br/>\nEinheiten: <b>Tage, Stunden, Minuten, Sekunden</b>\n</html>");
|
|
GridBagConstraints gbc_lblIntervall_2 = new GridBagConstraints();
|
|
gbc_lblIntervall_2.fill = GridBagConstraints.HORIZONTAL;
|
|
gbc_lblIntervall_2.insets = new Insets(0, 0, 5, 5);
|
|
gbc_lblIntervall_2.gridx = 0;
|
|
gbc_lblIntervall_2.gridy = 3;
|
|
panel_2.add(lblIntervall_2, gbc_lblIntervall_2);
|
|
|
|
tseI2 = new JTimeSpanEditor();
|
|
tseI2.setToolTipText("<html>\n<b>Intervall</b><br/>\n<br/>\nStellen Sie die gewünschten Intervalllängen ein.<br/>\n<br/>\nEinheiten: <b>Tage, Stunden, Minuten, Sekunden</b>\n</html>");
|
|
tseI2.addFocusListener(new FocusAdapter() {
|
|
@Override
|
|
public void focusLost(FocusEvent e) {
|
|
ServiceLink sl = PulsCounter2Application.getApplication().getServiceLink();
|
|
try {
|
|
|
|
sl.writeInt(13, 0, 0x1012, (Integer)tseI2.getValue());
|
|
|
|
} catch (ServiceLinkRequestFailedException e1) {
|
|
e1.printStackTrace();
|
|
} catch (IOException e1) {
|
|
e1.printStackTrace();
|
|
} catch (ServiceLinkException e1) {
|
|
e1.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
GridBagConstraints gbc_tseI2 = new GridBagConstraints();
|
|
gbc_tseI2.anchor = GridBagConstraints.WEST;
|
|
gbc_tseI2.insets = new Insets(0, 0, 5, 0);
|
|
gbc_tseI2.gridx = 1;
|
|
gbc_tseI2.gridy = 3;
|
|
panel_2.add(tseI2, gbc_tseI2);
|
|
|
|
JLabel lblIntervall_3 = new JLabel("Intervall 3:");
|
|
lblIntervall_3.setToolTipText("<html>\n<b>Intervall</b><br/>\n<br/>\nStellen Sie die gewünschten Intervalllängen ein.<br/>\n<br/>\nEinheiten: <b>Tage, Stunden, Minuten, Sekunden</b>\n</html>");
|
|
GridBagConstraints gbc_lblIntervall_3 = new GridBagConstraints();
|
|
gbc_lblIntervall_3.fill = GridBagConstraints.HORIZONTAL;
|
|
gbc_lblIntervall_3.insets = new Insets(0, 0, 0, 5);
|
|
gbc_lblIntervall_3.gridx = 0;
|
|
gbc_lblIntervall_3.gridy = 4;
|
|
panel_2.add(lblIntervall_3, gbc_lblIntervall_3);
|
|
|
|
tseI3 = new JTimeSpanEditor();
|
|
tseI3.setToolTipText("<html>\n<b>Intervall</b><br/>\n<br/>\nStellen Sie die gewünschten Intervalllängen ein.<br/>\n<br/>\nEinheiten: <b>Tage, Stunden, Minuten, Sekunden</b>\n</html>");
|
|
tseI3.addFocusListener(new FocusAdapter() {
|
|
@Override
|
|
public void focusLost(FocusEvent e) {
|
|
ServiceLink sl = PulsCounter2Application.getApplication().getServiceLink();
|
|
try {
|
|
|
|
sl.writeInt(13, 0, 0x1013, (Integer)tseI3.getValue());
|
|
|
|
} catch (ServiceLinkRequestFailedException e1) {
|
|
e1.printStackTrace();
|
|
} catch (IOException e1) {
|
|
e1.printStackTrace();
|
|
} catch (ServiceLinkException e1) {
|
|
e1.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
GridBagConstraints gbc_tseI3 = new GridBagConstraints();
|
|
gbc_tseI3.anchor = GridBagConstraints.WEST;
|
|
gbc_tseI3.gridx = 1;
|
|
gbc_tseI3.gridy = 4;
|
|
panel_2.add(tseI3, gbc_tseI3);
|
|
|
|
JPanel panel_1 = new JPanel();
|
|
tabbedPane.addTab("Kanäle", null, panel_1, null);
|
|
GridBagLayout gbl_panel_1 = new GridBagLayout();
|
|
gbl_panel_1.columnWidths = new int[] {100};
|
|
gbl_panel_1.rowHeights = new int[] {30};
|
|
gbl_panel_1.columnWeights = new double[]{1.0};
|
|
gbl_panel_1.rowWeights = new double[]{1.0};
|
|
panel_1.setLayout(gbl_panel_1);
|
|
|
|
JScrollPane scrollPane = new JScrollPane();
|
|
GridBagConstraints gbc_scrollPane = new GridBagConstraints();
|
|
gbc_scrollPane.fill = GridBagConstraints.BOTH;
|
|
gbc_scrollPane.gridx = 0;
|
|
gbc_scrollPane.gridy = 0;
|
|
panel_1.add(scrollPane, gbc_scrollPane);
|
|
|
|
tSettings = new JTable();
|
|
tSettings.setRowHeight(32);
|
|
tSettings.setFillsViewportHeight(true);
|
|
tSettings.setCellSelectionEnabled(true);
|
|
scrollPane.setViewportView(tSettings);
|
|
|
|
JButton btnSchliessen = new JButton("abbrechen");
|
|
btnSchliessen.addActionListener(new ActionListener() {
|
|
public void actionPerformed(ActionEvent e) {
|
|
setVisible(false);
|
|
}
|
|
});
|
|
|
|
JButton btnOk = new JButton("OK");
|
|
btnOk.addActionListener(new ActionListener() {
|
|
public void actionPerformed(ActionEvent e) {
|
|
writeDevice();
|
|
setVisible(false);
|
|
}
|
|
});
|
|
GridBagConstraints gbc_btnOk = new GridBagConstraints();
|
|
gbc_btnOk.fill = GridBagConstraints.BOTH;
|
|
gbc_btnOk.insets = new Insets(0, 0, 0, 5);
|
|
gbc_btnOk.gridx = 1;
|
|
gbc_btnOk.gridy = 1;
|
|
contentPane.add(btnOk, gbc_btnOk);
|
|
GridBagConstraints gbc_btnSchliessen = new GridBagConstraints();
|
|
gbc_btnSchliessen.fill = GridBagConstraints.BOTH;
|
|
gbc_btnSchliessen.gridx = 2;
|
|
gbc_btnSchliessen.gridy = 1;
|
|
contentPane.add(btnSchliessen, gbc_btnSchliessen);
|
|
|
|
this.initialize();
|
|
}
|
|
|
|
private Integer intOr0(Integer i){
|
|
if (i==null)
|
|
return 0;
|
|
return i;
|
|
}
|
|
|
|
private void initialize(){
|
|
currentChannel = -1;
|
|
filter = new int[32];
|
|
windows = new int[32];
|
|
tmSettings = new TableMapper(ChannelConfiguration.class, tSettings);
|
|
|
|
BitField bf = new BitField();
|
|
bf.clear();
|
|
bf.addField(new Field(bf, 0, 1, "Intervall 0 basiert auf Tageszeit"));
|
|
bf.addField(new Field(bf, 1, 1, "Intervall 1 basiert auf Tageszeit"));
|
|
bf.addField(new Field(bf, 2, 1, "Intervall 2 basiert auf Tageszeit"));
|
|
bf.addField(new Field(bf, 3, 1, "Intervall 3 basiert auf Tageszeit"));
|
|
bfeIntervall.setBitField(bf);
|
|
for (int i=0;i<32;i++){
|
|
tmSettings.addRow(new ChannelConfiguration(i));
|
|
}
|
|
|
|
|
|
readDevice();
|
|
}
|
|
|
|
private void readDevice(){
|
|
Integer v;
|
|
|
|
ServiceLink sl = PulsCounter2Application.getApplication().getServiceLink();
|
|
|
|
outputs = intOr0(sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1008));
|
|
pullups = intOr0(sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1009));
|
|
inverts = intOr0(sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x100A));
|
|
trigger = intOr0(sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x100B));
|
|
|
|
bfeIntervall.setIntValue(sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1003));
|
|
|
|
for (int i=0;i<32;i++){
|
|
filter[i] = intOr0( sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1020 + i));
|
|
windows[i] = intOr0( sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1280 + i));
|
|
}
|
|
|
|
|
|
v = sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1010);
|
|
if (v!=null){
|
|
tseI0.setValue(v);
|
|
}
|
|
v = sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1011);
|
|
if (v!=null){
|
|
tseI1.setValue(v);
|
|
}
|
|
v = sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1012);
|
|
if (v!=null){
|
|
tseI2.setValue(v);
|
|
}
|
|
v = sl.getServiceRegisterCache().getCachedInteger(13, 0, 0x1013);
|
|
if (v!=null){
|
|
tseI3.setValue(v);
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
private void writeDevice(){
|
|
ServiceLink sl = PulsCounter2Application.getApplication().getServiceLink();
|
|
try {
|
|
sl.writeInt(13, 0, 0x1008, outputs);
|
|
sl.writeInt(13, 0, 0x1009, pullups);
|
|
sl.writeInt(13, 0, 0x100A, inverts);
|
|
sl.writeInt(13, 0, 0x100B, trigger);
|
|
|
|
sl.writeInt(13, 0, 0x1003, bfeIntervall.getIntValue());
|
|
|
|
for (int i=0;i<32;i++){
|
|
sl.writeInt(13, 0, 0x1020 + i, filter[i]);
|
|
sl.writeInt(13, 0, 0x1280 + i, windows[i]);
|
|
}
|
|
|
|
|
|
sl.writeInt(13, 0, 0x1010, tseI0.getValue());
|
|
sl.writeInt(13, 0, 0x1011, tseI1.getValue());
|
|
sl.writeInt(13, 0, 0x1012, tseI2.getValue());
|
|
sl.writeInt(13, 0, 0x1013, tseI3.getValue());
|
|
|
|
/* Konfiguration auf Live-System übertragen */
|
|
sl.writeInt(13, 0, 0x1001, 1);
|
|
} catch (Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
class ChannelConfiguration{
|
|
|
|
int channel;
|
|
|
|
public ChannelConfiguration(int channel) {
|
|
this.channel = channel;
|
|
}
|
|
|
|
@TableColumn(label="Channel",width=80,order=0)
|
|
public int getChannel(){
|
|
return channel;
|
|
}
|
|
|
|
@TableColumn(label="Ausgang",width=80,order=10)
|
|
public Boolean getOutput(){
|
|
return (outputs & 1<<channel) == 0 ? false : true;
|
|
}
|
|
public void setOutput(Boolean value){
|
|
outputs &= ~(1<<channel);
|
|
if (value){
|
|
outputs |= (1<<channel);
|
|
}
|
|
}
|
|
|
|
@TableColumn(label="Passiver Schalter",width=80,order=20)
|
|
public Boolean getPullup(){
|
|
return (pullups & 1<<channel) == 0 ? false : true;
|
|
}
|
|
public void setPullup(Boolean value){
|
|
pullups &= ~(1<<channel);
|
|
if (value){
|
|
pullups |= (1<<channel);
|
|
}
|
|
}
|
|
|
|
@TableColumn(label="Invertiert",width=80,order=30)
|
|
public Boolean getInvert(){
|
|
return (inverts & 1<<channel) == 0 ? false : true;
|
|
}
|
|
public void setInvert(Boolean value){
|
|
inverts &= ~(1<<channel);
|
|
if (value){
|
|
inverts |= (1<<channel);
|
|
}
|
|
}
|
|
|
|
@TableColumn(label="Löst Snapshot aus",width=80,order=40)
|
|
public Boolean getTrigger(){
|
|
return (trigger & 1<<channel) == 0 ? false : true;
|
|
}
|
|
public void setTrigger(Boolean value){
|
|
trigger &= ~(1<<channel);
|
|
if (value){
|
|
trigger |= (1<<channel);
|
|
}
|
|
}
|
|
|
|
@TableColumn(label="Signalfenster",width=80,order=200)
|
|
public Integer getWindow(){
|
|
return windows[channel];
|
|
}
|
|
public void setWindow(Integer value){
|
|
windows[channel] = value;
|
|
}
|
|
|
|
@TableColumn(label="Signalfilter",width=80,order=210)
|
|
public Integer getFilter(){
|
|
return filter[channel];
|
|
}
|
|
public void setFilter(Integer value){
|
|
filter[channel] = value;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|