LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Sponsors
  • Mirrors
  • Logos
  • Contact us
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Wed Nov 30 14:09:20 CET 2005
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/05/11 30:14:09

    Added: jop/java/pc/src/kfl/ctrl .nbattrs BBSys.java ConvertLog.java
    Crc.java down.bat Echo.java Find.form Find.java
    Flash.java Log.java Msg.java PnlStation.form
    PnlStation.java Reset.java SetAddress.form
    SetAddress.java SimZS.form SimZS.java Station.java
    Status.java Stop.java Temp.java testms.bat
    TestMS.form TestMS.java UpDown.java
    Log:
    KFL pc programs moved from target to pc


    Revision Changes Path
    1.1 jop/java/pc/src/kfl/ctrl/.nbattrs

    http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/.nbattrs?rev=1.1&content-type=text/x-cvsweb-markup

    Index: .nbattrs
    ===================================================================
    <?xml version="1.0" encoding="UTF-8" ?>
    <attributes version="1.0">
    <fileobject name="SimZS.java">
    <attr name="class_dependency_javax.swing.JFrame" stringvalue="JFrame;SimZS"/>
    </fileobject>
    <fileobject name="Msg.java">
    <attr name="class_dependency_javax.comm.SerialPortEventListener" stringvalue="Msg"/>
    </fileobject>
    <fileobject name="TestMS.java">
    <attr name="class_dependency_javax.swing.JFrame" stringvalue="JFrame;TestMS"/>
    </fileobject>
    <fileobject name="SetAddress.java">
    <attr name="class_dependency_javax.swing.JFrame" stringvalue="SetAddress;Find"/>
    </fileobject>
    <fileobject name="Find.java">
    <attr name="class_dependency_javax.swing.JFrame" stringvalue="Find;JFrame"/>
    </fileobject>
    <fileobject name="PnlStation.java">
    <attr name="class_dependency_javax.swing.JPanel" stringvalue="PnlStation;JPanel"/>
    </fileobject>
    </attributes>



    1.1 jop/java/pc/src/kfl/ctrl/BBSys.java

    http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/BBSys.java?rev=1.1&content-type=text/x-cvsweb-markup

    Index: BBSys.java
    ===================================================================
    package kfl.ctrl;

    /**
    * Definition der Konstanten fuer BB Projekt.
    * IO ports, Bits, CMDs,...
    */

    public class BBSys {

    public static final int BIT_TR_ON = 0x01;
    public static final int BIT_TR_DOWN = 0x02;

    // public static final int IO_PORT = 0; not used
    public static final int IO_ADC = 4;
    public static final int IO_WD = 7;
    public static final int IO_LED = 8;
    public static final int IO_TAST = 8;
    public static final int IO_RELAIS = 9;
    public static final int IO_SENSOR = 9;
    public static final int IO_TRIAC = 14;

    public static final int BIT_TAB = 0x01;
    public static final int BIT_TAUF = 0x02;
    public static final int BIT_TNOT = 0x04;
    public static final int BIT_TUER = 0x08;

    public static final int BIT_SENSI = 0x01;
    public static final int BIT_SENSO = 0x02;
    public static final int BIT_SENSU = 0x04;

    public static final int BIT_LED_U = 0x01;
    public static final int BIT_LED_O = 0x02;
    public static final int BIT_LED_FU = 0x04;
    public static final int BIT_LED_FO = 0x08;

    public static final int BIT_UL1 = 0x01;
    public static final int BIT_UL2 = 0x02;
    public static final int BIT_UL3 = 0x04;
    public static final int BIT_IL1 = 0x08;
    public static final int BIT_IL2 = 0x10;
    public static final int BIT_IL3 = 0x20;
    public static final int BIT_IN = 0x40;

    public static final int BIT_RES_LU = 0x01;
    public static final int BIT_SET_LU = 0x02;
    public static final int BIT_RES_LO = 0x04;
    public static final int BIT_SET_LO = 0x08;

    public static final int CMD_STATUS = 1;
    public static final int CMD_UP = 2;
    public static final int CMD_DOWN = 3;
    public static final int CMD_STOP = 4;
    public static final int CMD_TIME = 5; public static final int CMD_INP = 6; public static final int CMD_OPTO = 7; public static final int CMD_SETCNT = 8; public static final int CMD_CNT = 9; public static final int CMD_RESTIM = 10; public static final int CMD_SETAD = 11; public static final int CMD_FL_PAGE = 12; public static final int CMD_FL_DATA = 13; public static final int CMD_FL_PROG = 14; public static final int CMD_FL_READ = 15; public static final int CMD_RESET = 16; public static final int CMD_VERSION = 17; public static final int CMD_SERVICECNT = 18; public static final int CMD_SET_DOWNCNT = 19; // Impulse nach Sensor unten public static final int CMD_SET_UPCNT = 20; // Impulse nach Sensor oben public static final int CMD_SET_MAXCNT = 21; // Impulse fuer gesamte Strecke public static final int CMD_ERRNR = 22; // get last Error (and reset errno) public static final int CMD_DBG_DATA = 23; // get some internal data public static final int CMD_SET_STATE = 24; // e.g. set debug state public static final int CMD_TEMP = 25; // values for MS State (Statues) public static final int MS_RESET = 0; // ??? public static final int MS_RDY = 1; public static final int MS_UP = 2; public static final int MS_DOWN = 3; public static final int MS_ERR = 4; public static final int MS_DBG = 5; public static final int MS_SERVICE = 6; // public static final int MS_ERR_NOZS = 1; } 1.1 jop/java/pc/src/kfl/ctrl/ConvertLog.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/ConvertLog.java?rev=1.1&content-type=text/x-cvsweb-markup Index: ConvertLog.java =================================================================== package kfl.ctrl; /** * really deletes log. */ import BBSys; import Msg; public class ConvertLog { private class CmdException extends Exception {}; private static final int LOG_LEN = 8192; private static final int LOG_SIZE = 64; private static final int LOG_START = 0x20000-LOG_LEN; private int[] mem; private int nr; Msg m = new Msg(); public ConvertLog() { nr = 0; // Zentrale mem = new int[LOG_LEN]; for (int i=0; i<LOG_LEN; ++i) mem[i] = 0xff; } private int cmd(int cmd, int data) throws CmdException { int ret; ret = m.exchg(nr, cmd, data); if (ret < 0) { System.out.println(); System.out.println("Error "+ret+" with station "+nr); System.out.println("\rcmd: "+cmd+" data: "+data); throw new CmdException(); } return ret; } public void doit() { int i, j; /* try { cmd(BBSys.CMD_FL_PAGE, LOG_START>>7); for (i=0; i<LOG_LEN; ++i) { mem[i] = cmd(BBSys.CMD_FL_READ, 0); } } catch (CmdException e) { System.exit(-1); } for (i=0; i<LOG_LEN; i+=LOG_SIZE) { for (j=0; j<LOG_SIZE/2; ++j) { mem[i/2+j] = mem[i+j]; } } for (i=LOG_LEN/2; i<LOG_LEN; ++i) mem[i] = 0; */ int startPage = LOG_START>>7; int pages = LOG_LEN/128; for (i=0; i<pages; ++i) { System.out.println(i); try { cmd(BBSys.CMD_FL_PAGE, startPage+i); for (j=0; j<128; ++j) { cmd(BBSys.CMD_FL_DATA, mem[i*128+j]); } cmd(BBSys.CMD_FL_PROG, 0); } catch (CmdException e) { try { Thread.sleep(1000); } catch (Exception x) {} --i; } } } public static void main (String[] args) { ConvertLog l = new ConvertLog(); l.doit(); } } 1.1 jop/java/pc/src/kfl/ctrl/Crc.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/Crc.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Crc.java =================================================================== package kfl.ctrl; public class Crc { static int check(int val) { int reg = -1; int poly = 0x07; for (int i=0; i<32; ++i) { reg <<= 1; if (val<0) reg |= 1; val <<=1; if ((reg & 0x100) != 0) reg ^= 0x07; } reg &= 0xff; return reg; } public static void main(String[] args) { int msg = 0x12345600; msg |= check(msg); System.out.println(Integer.toHexString(check(0))); System.out.println(Integer.toHexString(check(0x100))); System.out.println(Integer.toHexString(check(0x200))); System.out.println(Integer.toHexString(check(0x300))); System.out.println(Integer.toHexString(check(0xffffffff))); System.out.println(Integer.toHexString(msg)); System.out.println(Integer.toHexString(check(msg))); System.out.println(Integer.toHexString(check(msg+15))); System.out.println(Integer.toHexString(check(msg+8))); /* int cnt = 0; for (int i=1; i!=0; ++i) { int j = check(msg ^ i); if (j==0) { ++cnt; if ((cnt&0xff) == 0) System.out.println(i+" "+cnt); } } System.out.println("count: "+cnt); */ } } 1.1 jop/java/pc/src/kfl/ctrl/down.bat http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/down.bat?rev=1.1&content-type=text/x-cvsweb-markup Index: down.bat =================================================================== java Flash 1 ..\Mast.bin java Flash 2 ..\Mast.bin java Flash 3 ..\Mast.bin echo Zentrale auf DL pause java Flash 0 ..\Zentrale.bin 1.1 jop/java/pc/src/kfl/ctrl/Echo.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/Echo.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Echo.java =================================================================== package kfl.ctrl; public class Echo implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; OutputStream outputStream; SerialPort serialPort; Thread readThread; public static void main(String[] args) { try { portId = CommPortIdentifier.getPortIdentifier("COM1"); Echo e = new Echo(); } catch (Exception e) { System.out.println(e.getMessage()); } } public Echo() { try { serialPort = (SerialPort) portId.open("EchoApp", 2000); } catch (PortInUseException e) {} try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) {} /* try { serialPort.addEventListener(this); } catch (TooManyListenersException e) {} serialPort.notifyOnDataAvailable(true); */ try { serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.enableReceiveTimeout(20); } catch (UnsupportedCommOperationException e) { System.out.println(e.getMessage()); } /* readThread = new Thread(this); readThread.start(); */ int val = '0'; try { for (;;) { for (int j=0; j<4; ++j) { outputStream.write(val++); } for (int j=0; j<4; ++j) { int b = inputStream.read(); if (b==-1) { System.out.print('.'); } else { System.out.print((char) b); } } if (val>'0'+79) val = '0'; } } catch (IOException e) {} } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } public void serialEvent(SerialPortEvent event) { switch(event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } 1.1 jop/java/pc/src/kfl/ctrl/Find.form http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/Find.form?rev=1.1&content-type=text/x-cvsweb-markup Index: Find.form =================================================================== <?xml version="1.0" encoding="UTF-8" ?> <Form version="1.0" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Properties> <Property name="title" type="java.lang.String" value="Find Stations"/> </Properties> <SyntheticProperties> <SyntheticProperty name="menuBar" type="java.lang.String" value="(No Menu)"/> <SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-56,0,0,1,44"/> <SyntheticProperty name="formPosition" type="java.awt.Point" value="-84,-19,0,5,115,114,0,14,106,97,118,97,46,97,119,116,46,80,111,105,110,116,-74,-60,-118,114,52,126,-56,38,2,0,2,73,0,1,120,73,0,1,121,120,112,0,0,0,0,0,0,0,0"/> <SyntheticProperty name="formSizePolicy" type="int" value="0"/> <SyntheticProperty name="generatePosition" type="boolean" value="true"/> <SyntheticProperty name="generateSize" type="boolean" value="true"/> <SyntheticProperty name="generateCenter" type="boolean" value="true"/> </SyntheticProperties> <Events> <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="exitForm"/> </Events> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> <SubComponents> <Container class="javax.swing.JScrollPane" name="jScrollPane1"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> <BorderConstraints direction="Center"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <SubComponents> <Component class="javax.swing.JTextArea" name="txtLog"> </Component> </SubComponents> </Container> <Component class="javax.swing.JButton" name="jButton1"> <Properties> <Property name="text" type="java.lang.String" value="Refresh"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> <BorderConstraints direction="South"/> </Constraint> </Constraints> </Component> </SubComponents> </Form> 1.1 jop/java/pc/src/kfl/ctrl/Find.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/Find.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Find.java =================================================================== package kfl.ctrl; /* * Find.java * * Created on 01. Februar 2002, 14:25 */ /** * * @author Standard */ import BBSys; import Msg; public class Find extends javax.swing.JFrame { private Msg m; private boolean exit = false; /** Creates new form Find */ public Find(Msg m) { this.m = m; initComponents(); doit(); } private void doit() { txtLog.setText(""); new Thread() { public void run() { for (int i=0; i<8; ++i) { final int val = m.exchg(i, BBSys.CMD_STATUS, 0); if (val<0) { m.clear(); } final int idx = i; Runnable r = new Runnable() { public void run() { txtLog.append("Address "+idx+" ... "); if (val<0) { m.clear(); txtLog.append("timeout\n"); } else { txtLog.append("found\n"); } } }; SwingUtilities.invokeLater(r); } } }.start(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ private void initComponents() {//GEN-BEGIN:initComponents jScrollPane1 = new javax.swing.JScrollPane(); txtLog = new javax.swing.JTextArea(); jButton1 = new javax.swing.JButton(); setTitle("Find Stations"); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(evt); } }); jScrollPane1.setViewportView(txtLog); getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER); jButton1.setText("Refresh"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1, java.awt.BorderLayout.SOUTH); pack(); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setSize(new java.awt.Dimension(300, 200)); setLocation((screenSize.width-300)/2,(screenSize.height-200)/2); }//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // Add your handling code here: doit(); }//GEN-LAST:event_jButton1ActionPerformed /** Exit the Application */ private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm if (exit) { System.exit(0); } else { dispose(); } }//GEN-LAST:event_exitForm /** * @param args the command line arguments */ public static void main(String args[]) { Msg m = new Msg(); Find f = new Find(m); f.exit = true; f.show(); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea txtLog; private javax.swing.JButton jButton1; // End of variables declaration//GEN-END:variables } 1.1 jop/java/pc/src/kfl/ctrl/Flash.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/Flash.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Flash.java =================================================================== package kfl.ctrl; /** * Load new firmware into flash via BB commands. * * three file types: * * .ttf ACEX config start at 0 * .bin Java files start at 0x18000 * .txt Text for Zentrale start at 0x1c400 */ import BBSys; import Msg; public class Flash { private class CmdException extends Exception {}; private static final int MAX_MEM = 32768*3; // 96kB (acex 1k50) private static final int MAX_JAVA = 4096*4; // max. 8192 word (-1 for address) private static final int MAX_TEXT = 1024*7; // max. 7kB private static final int TEXT_START = 0x1c400; private int startPage; private int nr; private String fname; private byte[] mem; private int len; Msg m = new Msg(); public Flash(int nr, String fname) { this.nr = nr; this.fname = fname; mem = new byte[MAX_MEM]; for (int i=0; i<MAX_MEM; ++i) mem[i] = 0; } private static final int ae = 0xe1; private static final int oe = 0xef; private static final int ue = 0xf5; private static final int Ae = 0x80; private static final int Oe = 0x86; private static final int Ue = 0x8a; private void chkUml(byte[] buf) { for (int i=0; i<buf.length; ++i) { switch (buf[i]) { case (byte) 'ä': buf[i] = (byte) ae; break; case (byte) 'ö': buf[i] = (byte) oe; break; case (byte) 'ü': buf[i] = (byte) ue; break; case (byte) 'Ä': buf[i] = (byte) Ae; break; case (byte) 'Ö': buf[i] = (byte) Oe; break; case (byte) 'Ü': buf[i] = (byte) Ue; break; } } } public void read() { String line; StringTokenizer st; int pos; boolean isJava = false; boolean isTxt = false; int byteCnt = 0; len = 0; try { File f = new File(fname); String s = f.getName(); pos = s.indexOf('.'); if (pos==-1) { System.out.println("wrong filename"); System.exit(-1); } s = s.substring(pos); if (s.equals(".bin")) { isJava = true; startPage = 0x18000>>7; } else if (s.equals(".txt")) { isTxt = true; startPage = TEXT_START>>7; len = 32; // index 0 no text } else if (s.equals(".ttf")) { startPage = 0; } else { System.out.println("wrong file type: '"+s+"'"); System.exit(-1); } BufferedReader in = new BufferedReader(new FileReader(f)); while ((line = in.readLine()) != null) { if (isTxt) { int txtLen = line.length(); byte[] str = line.getBytes(); chkUml(str); if (txtLen > 20) txtLen = 20; mem[len] = (byte) txtLen; for (int i=0; i<txtLen; ++i) { mem[len+1+i] = str[i]; } len += 32; if (len>MAX_TEXT) { System.out.println("textfile to long"); System.exit(-1); } } else { if ((pos = line.indexOf('/'))!=-1) { st = new StringTokenizer(line.substring(0, pos), " \t\n\r\f,"); } else { st = new StringTokenizer(line, " \t\n\r\f,"); } while (st.hasMoreTokens()) { int val = Integer.parseInt(st.nextToken()); if (isJava) { mem[len++] = (byte) (val>>>24); mem[len++] = (byte) (val>>>16); mem[len++] = (byte) (val>>>8); mem[len++] = (byte) val; } else { mem[len++] = (byte) val; } if (len==MAX_MEM) { System.out.println("too many words"); System.exit(-1); } if (isJava && len==MAX_JAVA) { System.out.println("too many words: change jvmflash.asm"); System.exit(-1); } } } } } catch (IOException e) { System.out.println(e.getMessage()); System.exit(-1); } System.out.println(len+" bytes to program"); } private int cmd(int cmd, int data) throws CmdException { int ret; ret = m.exchg(nr, cmd, data); if (ret < 0) { System.out.println(); System.out.println("Error "+ret+" with station "+nr); System.out.println("\rcmd: "+cmd+" data: "+data); throw new CmdException(); } return ret; } public void program() { int data; try { cmd(BBSys.CMD_STATUS, 0); } catch (CmdException e) { System.out.println("Station "+nr+ " not found"); System.exit(-1); } try { if (nr!=0) cmd(BBSys.CMD_SET_STATE, BBSys.MS_DBG); } catch (CmdException x) { } int pages = (len+127)/128; for (int i=0; i<pages; ++i) { try { cmd(BBSys.CMD_FL_PAGE, startPage+i); for (int j=0; j<128; ++j) { System.out.print((i*128+j)+" \r"); data = mem[i*128+j] & 0xff; cmd(BBSys.CMD_FL_DATA, data); } cmd(BBSys.CMD_FL_PROG, 0); } catch (CmdException e) { try { Thread.sleep(1000); } catch (Exception x) {} --i; } } System.out.println("programmed"); try { cmd(BBSys.CMD_FL_PAGE, startPage); // compare for (int i=0; i<len; ++i) { System.out.print(i+"\r"); byte val = (byte) cmd(BBSys.CMD_FL_READ, 0); if (val != mem[i]) { System.out.println("wrong data"); System.exit(-1); } } } catch (CmdException e) {} System.out.println("program OK"); } public static void main (String[] args) { if (args.length != 2) { System.out.println("usage: java Flash nr file"); System.exit(-1); } Flash fl = new Flash(Integer.parseInt(args[0]), args[1]); fl.read(); fl.program(); } } 1.1 jop/java/pc/src/kfl/ctrl/Log.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/Log.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Log.java =================================================================== package kfl.ctrl; /** * Load new firmware into flash via BB commands. */ import BBSys; import Msg; public class Log { private class CmdException extends Exception {}; private static final int LOG_LEN = 8192; private static final int LOG_SIZE = 32; private static final int LOG_START = 0x20000-LOG_LEN; private String[] actTxt = { "null", "AUF / GESTARTET", "AB / GESTARTET", "AUF / OBEN ERREICHT", "AB / UNTEN ERREICHT", "FEHLER", "GESTOPPT", "NOTAUS GEDRÜCKT", "8", "9", "10", }; private String[] errTxt = { "", "KOMMUNIKATIONSFEHLER", "MAXIMALE DIFFERENZ ERREICHT", "FEHLER BEI MAST", "KEIN MAST ANTWORTET", "Text nicht belegt", "ANZAHL MS FALSCH", "SENSOR OBEN UND UNTEN GLEICHZEITIG", "KEINE IMPULSE", "KEINE ABFRAGEN", "SENSOR OBEN DEFEKT", "SENSOR UNTEN DEFEKT", "SPANNUNG L1 FEHLT", "SPANNUNG L2 FEHLT", "SPANNUNG L3 FEHLT", "ANTWORTET NICHT", "KEIN STROM L1", "KEIN STROM L2", "KEIN STROM L3", "STROM ÜBERLAST L1", "STROM ÜBERLAST L2", "STROM ÜBERLAST L3", "ZU WENIG STROM L1", "ZU WENIG STROM L2", "ZU WENIG STROM L3", "STROM IN L1", "STROM IN L2", "STROM IN L3", "xx", "yy", "zz", }; private int[] mem; private int nr; Msg m = new Msg(); private class Entry { int nr; int year; int month; int day; int s; int h; int m; int action; int errnr; int msnr; int zstemp; int minnr; int minval; int maxnr; int maxval; } public Log() { nr = 0; // Zentrale mem = new int[LOG_LEN]; for (int i=0; i<LOG_LEN; ++i) mem[i] = 0; } private int cmd(int cmd, int data) throws CmdException { int ret; ret = m.exchg(nr, cmd, data); if (ret < 0) { System.out.println(); System.out.println("Error "+ret+" with station "+nr); System.out.println("\rcmd: "+cmd+" data: "+data); throw new CmdException(); } return ret; } private String ldz(int val, int len) { String s = ""+val; for (int i=s.length(); i<len; ++i) { s = "0"+s; } return s; } public void read() { int lastNr = 0; int maxNr = 0; try { BufferedReader in = new BufferedReader(new FileReader("lastnr")); lastNr = Integer.parseInt(in.readLine()); } catch (Exception inex) { } TreeMap tm = new TreeMap(); try { cmd(BBSys.CMD_FL_PAGE, LOG_START>>7); for (int i=0; i<LOG_LEN; i+=LOG_SIZE) { System.out.print(i/LOG_SIZE+"\r"); for (int j=0; j<LOG_SIZE; ++j) { mem[j] = cmd(BBSys.CMD_FL_READ, 0); //System.out.print(mem[j]+" "); } //System.out.println(); Entry ent = new Entry(); ent.nr = mem[0]<<24; ent.nr |= mem[1]<<16; ent.nr |= mem[2]<<8; ent.nr |= mem[3]; ent.year = mem[4]<<8; ent.year |= mem[5]; ent.month = mem[6]; ent.day = mem[7]; ent.s = mem[8]<<8; ent.s |= mem[9]; ent.h = ent.s/3600; ent.m = ent.s%3600/60; ent.s %= 60; ent.action = mem[10]; ent.errnr = mem[11]; ent.msnr = mem[12]; ent.zstemp = (int) ((byte) mem[13]); ent.minnr = ent.maxnr = 0; ent.minval = 127; ent.maxval = -127; for (int k=0; k<3; ++k) { int val = (int) ((byte) mem[16+k]); if (val<ent.minval) { ent.minval = val; ent.minnr = k+1; } if (val>ent.maxval) { ent.maxval = val; ent.maxnr = k+1; } } if (ent.nr>maxNr) maxNr = ent.nr; if (ent.nr!=0 && ent.nr!=-1 && ent.nr>lastNr) { tm.put(new Integer(ent.nr), ent); } } } catch (CmdException e) { System.exit(-1); } Calendar now = Calendar.getInstance(); String fname = "log"+ ldz(now.get(Calendar.YEAR), 4) + ldz(now.get(Calendar.MONTH)+1, 2) + ldz(now.get(Calendar.DAY_OF_MONTH), 2) + ".txt"; PrintWriter out = null; try { out = new PrintWriter(new BufferedWriter(new FileWriter(fname))); } catch (IOException ioe) { System.out.println(ioe.getMessage()); System.exit(-1); } for (Iterator i = tm.entrySet().iterator(); i.hasNext(); ) { Entry ent = (Entry) ((Map.Entry) i.next()).getValue(); out.print(ent.nr+"\t"+ent.day+"."+ent.month+"."+ent.year+" "+ent.h+":"+ent.m+":"+ent.s+"\t"); out.print(ent.zstemp+"\t"+ent.minnr+"\t"+ent.minval+"\t"+ent.maxnr+"\t"+ent.maxval+"\t"); out.print((ent.action&0x80)!=0 ? "A\t" : "M\t"); ent.action &= 0x7f; try { out.print("\""+actTxt[ent.action]+"\""+"\t\""+errTxt[ent.errnr]); if (ent.msnr!=0) out.print(" MAST "+ent.msnr); out.print("\""); } catch (Exception arr) { out.print("Fehler: "+ent.action+" "+ent.errnr); } out.println(); } out.close(); try { out = new PrintWriter(new FileWriter("lastnr")); out.println(maxNr); out.close(); } catch (IOException lastnrout) { } } public static void main (String[] args) { Log l = new Log(); l.read(); } } 1.1 jop/java/pc/src/kfl/ctrl/Msg.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/Msg.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Msg.java =================================================================== package kfl.ctrl; /** * Msg. java * * communicate with jopbb via serial line. */ import BBSys; public class Msg implements SerialPortEventListener { private static final int TIMEOUT = 20; private static final int ADDR_MSK = 0x7c0000; private static final int CMD_MSK = 0x03f000; private static final int DATA_MSK = 0x000fff; private CommPortIdentifier portId; private InputStream is; private OutputStream os; private SerialPort serialPort; private byte[] buf = new byte[4]; public static void main(String[] args) { Msg e = new Msg(); for (int i=1; true; ++i) { if (i!=BBSys.CMD_UP && i!=BBSys.CMD_DOWN) { int j = e.exchg(1, i, 0); if (j==-1) e.clear(); if (j!=-1 && j!=i) { System.out.print(i+":"+j+" "); } else { System.out.print(j+" "); } } try { Thread.sleep(1000); } catch (Exception x) {} } } public Msg() { try { portId = CommPortIdentifier.getPortIdentifier("COM2"); serialPort = (SerialPort) portId.open("Msg", 2000); is = serialPort.getInputStream(); os = serialPort.getOutputStream(); /* serialPort.addEventListener(this); serialPort.notifyOnDataAvailable(true); */ serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.enableReceiveTimeout(TIMEOUT); serialPort.enableReceiveThreshold(4); } catch (Exception e) { System.out.println(e.getMessage()); System.exit(-1); } } /** * claculate crc value with polynom x^8 + x^2 + x + 1 * and initial value 0xff * on 32 bit data */ int crc(int val) { int reg = -1; int poly = 0x07; for (int i=0; i<32; ++i) { reg <<= 1; if (val<0) reg |= 1; val <<=1; if ((reg & 0x100) != 0) reg ^= 0x07; } reg &= 0xff; return reg; } /** * send and receive a 24 bit message (high byte first). * -1 means timeout, -2 crc error. */ synchronized public int exchg(int addr, int cmd, int data) { int val; int b; addr <<= 18; cmd <<= 12; data &= DATA_MSK; val = 0x800000 | addr | cmd | data; val <<= 8; val |= crc(val); // append crc for (int j=0; j<4; ++j) { buf[j] = (byte) (val>>>((3-j)*8)); } try { os.write(buf); int cnt = 0; for (int i=0; i<100/TIMEOUT && cnt<4; ++i) { // try max. 100 ms cnt += is.read(buf, cnt, 4-cnt); } if (cnt<4) { return -1; } } catch (Exception e) {} val = 0; for (int j=0; j<4; ++j) { val <<= 8; val |= ((int) buf[j])&0xff; } if (crc(val)!=0) { return -2; } if (val<0) { // response have a 0 as MSB return -3; } val >>>= 8; if ((val & ADDR_MSK) != addr) { return -4; } // System.out.println("cmd: "+(cmd>>>12)+" cmdval: "+((val&CMD_MSK)>>>12)); if ((val & CMD_MSK) != cmd) { return -5; } val &= DATA_MSK; // mask out cmd and address field return val; } /** * try to read 4 pending bytes from serial line after timeout. */ // wenn das serial timeout hoch genug ist, ist clear nicht notwendig! synchronized public void clear() { int cnt = 0; try { for (int j=0;cnt<4 && j<6; ++j) { if (is.read()!=-1) ++cnt; } } catch (IOException e) {} } /** not used */ public void serialEvent(SerialPortEvent event) { switch(event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); } System.out.print(new String(readBuffer)); } catch (IOException e) {} break; } } } 1.1 jop/java/pc/src/kfl/ctrl/PnlStation.form http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/PnlStation.form?rev=1.1&content-type=text/x-cvsweb-markup Index: PnlStation.form =================================================================== <?xml version="1.0" encoding="UTF-8" ?> <Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> <BevelBorder/> </Border> </Property> </Properties> <SyntheticProperties> </SyntheticProperties> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JLabel" name="lblStation"> <Properties> <Property name="text" type="java.lang.String" value="Station"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="-1" gridY="-1" insetsBottom="7" insetsLeft="5" insetsRight="5" insetsTop="7" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkU1"> <Properties> <Property name="text" type="java.lang.String" value="L1 Spannung"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="1" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkU2"> <Properties> <Property name="text" type="java.lang.String" value="L2 Spannung"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="2" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkU3"> <Properties> <Property name="text" type="java.lang.String" value="L3 Spannung"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="3" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkI1"> <Properties> <Property name="text" type="java.lang.String" value="L1 Strom"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="1" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkI2"> <Properties> <Property name="text" type="java.lang.String" value="L2 Strom"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="2" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkI3"> <Properties> <Property name="text" type="java.lang.String" value="L3 Strom"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="3" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkIN"> <Properties> <Property name="text" type="java.lang.String" value="N Strom"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="4" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkSU"> <Properties> <Property name="text" type="java.lang.String" value="Sensor unten"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="6" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkSO"> <Properties> <Property name="text" type="java.lang.String" value="Sensor oben"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="5" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JCheckBox" name="chkSI"> <Properties> <Property name="text" type="java.lang.String" value="Sensor Impuls"/> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="6" insetsBottom="0" insetsLeft="5" insetsRight="5" insetsTop="0" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> <Property name="text" type="java.lang.String" value="Impulse:"/> <Property name="horizontalAlignment" type="int" value="4"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="13" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="7" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JTextField" name="txtImp"> <Properties> <Property name="columns" type="int" value="5"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="7" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JLabel" name="jLabel2"> <Properties> <Property name="text" type="java.lang.String" value="Status"/> <Property name="horizontalAlignment" type="int" value="4"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="13" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="8" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JComboBox" name="cmbStatus"> <Properties> <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> <StringArray count="7"> <StringItem index="0" value="Reset"/> <StringItem index="1" value="Ready"/> <StringItem index="2" value="Hinauf"/> <StringItem index="3" value="Herunter"/> <StringItem index="4" value="Error"/> <StringItem index="5" value="Debug"/> <StringItem index="6" value="Service"/> </StringArray> </Property> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="8" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JLabel" name="jLabel3"> <Properties> <Property name="text" type="java.lang.String" value="Strom:"/> <Property name="horizontalAlignment" type="int" value="4"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="13" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="9" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JTextField" name="txtStrom"> <Properties> <Property name="columns" type="int" value="5"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="9" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> </SubComponents> </Form> 1.1 jop/java/pc/src/kfl/ctrl/PnlStation.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/PnlStation.java?rev=1.1&content-type=text/x-cvsweb-markup Index: PnlStation.java =================================================================== package kfl.ctrl; import BBSys; /* * PnlStation.java * * Created on 06. Februar 2002, 16:27 */ /** * * @author Standard */ public class PnlStation extends javax.swing.JPanel { private int nr; /** Creates new form PnlStation */ public PnlStation(int nr, int ver) { initComponents(); this.nr = nr; lblStation.setText("Station "+nr+" V "+(ver>>6)+"."+(ver&0x3f)); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ private void initComponents() {//GEN-BEGIN:initComponents lblStation = new javax.swing.JLabel(); chkU1 = new javax.swing.JCheckBox(); chkU2 = new javax.swing.JCheckBox(); chkU3 = new javax.swing.JCheckBox(); chkI1 = new javax.swing.JCheckBox(); chkI2 = new javax.swing.JCheckBox(); chkI3 = new javax.swing.JCheckBox(); chkIN = new javax.swing.JCheckBox(); chkSU = new javax.swing.JCheckBox(); chkSO = new javax.swing.JCheckBox(); chkSI = new javax.swing.JCheckBox(); jLabel1 = new javax.swing.JLabel(); txtImp = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); cmbStatus = new javax.swing.JComboBox(); jLabel3 = new javax.swing.JLabel(); txtStrom = new javax.swing.JTextField(); setLayout(new java.awt.GridBagLayout()); java.awt.GridBagConstraints gridBagConstraints1; setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.RAISED)); lblStation.setText("Station"); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(7, 5, 7, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(lblStation, gridBagConstraints1); chkU1.setText("L1 Spannung"); chkU1.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 1; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkU1, gridBagConstraints1); chkU2.setText("L2 Spannung"); chkU2.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 2; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkU2, gridBagConstraints1); chkU3.setText("L3 Spannung"); chkU3.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 3; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkU3, gridBagConstraints1); chkI1.setText("L1 Strom"); chkI1.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 1; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkI1, gridBagConstraints1); chkI2.setText("L2 Strom"); chkI2.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 2; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkI2, gridBagConstraints1); chkI3.setText("L3 Strom"); chkI3.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 3; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkI3, gridBagConstraints1); chkIN.setText("N Strom"); chkIN.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 4; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkIN, gridBagConstraints1); chkSU.setText("Sensor unten"); chkSU.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 6; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkSU, gridBagConstraints1); chkSO.setText("Sensor oben"); chkSO.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 5; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkSO, gridBagConstraints1); chkSI.setText("Sensor Impuls"); chkSI.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 6; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(0, 5, 0, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(chkSI, gridBagConstraints1); jLabel1.setText("Impulse:"); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 7; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(5, 5, 5, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST; add(jLabel1, gridBagConstraints1); txtImp.setColumns(5); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 7; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(5, 5, 5, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(txtImp, gridBagConstraints1); jLabel2.setText("Status"); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 8; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(5, 5, 5, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST; add(jLabel2, gridBagConstraints1); cmbStatus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Reset", "Ready", "Hinauf", "Herunter", "Error", "Debug", "Service" })); cmbStatus.setEnabled(false); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 8; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(5, 5, 5, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(cmbStatus, gridBagConstraints1); jLabel3.setText("Strom:"); jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 9; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(5, 5, 5, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST; add(jLabel3, gridBagConstraints1); txtStrom.setColumns(5); gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 9; gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.insets = new java.awt.Insets(5, 5, 5, 5); gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; add(txtStrom, gridBagConstraints1); }//GEN-END:initComponents public void setOpto(int val) { chkU1.setSelected((val&BBSys.BIT_UL1)!=0); chkU2.setSelected((val&BBSys.BIT_UL2)!=0); chkU3.setSelected((val&BBSys.BIT_UL3)!=0); chkI1.setSelected((val&BBSys.BIT_IL1)!=0); chkI2.setSelected((val&BBSys.BIT_IL2)!=0); chkI3.setSelected((val&BBSys.BIT_IL3)!=0); chkIN.setSelected((val&BBSys.BIT_IN)!=0); } public void setInp(int val) { val >>>= 4; // Sensor and Tast chkSU.setSelected((val&BBSys.BIT_SENSU)!=0); chkSO.setSelected((val&BBSys.BIT_SENSO)!=0); chkSI.setSelected((val&BBSys.BIT_SENSI)!=0); } public void setStatus(int val) { cmbStatus.setSelectedIndex(val); } public void setImpuls(int val) { txtImp.setText(""+val); } public void setStrom(int i1, int i2, int i3) { txtStrom.setText(""+i1+" "+i2+" "+i3); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel lblStation; private javax.swing.JCheckBox chkU1; private javax.swing.JCheckBox chkU2; private javax.swing.JCheckBox chkU3; private javax.swing.JCheckBox chkI1; private javax.swing.JCheckBox chkI2; private javax.swing.JCheckBox chkI3; private javax.swing.JCheckBox chkIN; private javax.swing.JCheckBox chkSU; private javax.swing.JCheckBox chkSO; private javax.swing.JCheckBox chkSI; private javax.swing.JLabel jLabel1; private javax.swing.JTextField txtImp; private javax.swing.JLabel jLabel2; private javax.swing.JComboBox cmbStatus; private javax.swing.JLabel jLabel3; private javax.swing.JTextField txtStrom; // End of variables declaration//GEN-END:variables } 1.1 jop/java/pc/src/kfl/ctrl/Reset.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/Reset.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Reset.java =================================================================== package kfl.ctrl; /** * Send reset msg. */ import BBSys; import Msg; public class Reset { public static void main (String[] args) { if (args.length != 1) { System.out.println("usage: java Reset nr"); System.exit(-1); } Msg m = new Msg(); m.exchg(Integer.parseInt(args[0]), BBSys.CMD_RESET, 0); } } 1.1 jop/java/pc/src/kfl/ctrl/SetAddress.form http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/SetAddress.form?rev=1.1&content-type=text/x-cvsweb-markup Index: SetAddress.form =================================================================== <?xml version="1.0" encoding="UTF-8" ?> <Form version="1.0" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Properties> <Property name="title" type="java.lang.String" value="Find Stations"/> </Properties> <SyntheticProperties> <SyntheticProperty name="menuBar" type="java.lang.String" value="(No Menu)"/> <SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-56,0,0,1,44"/> <SyntheticProperty name="formPosition" type="java.awt.Point" value="-84,-19,0,5,115,114,0,14,106,97,118,97,46,97,119,116,46,80,111,105,110,116,-74,-60,-118,114,52,126,-56,38,2,0,2,73,0,1,120,73,0,1,121,120,112,0,0,0,0,0,0,0,0"/> <SyntheticProperty name="formSizePolicy" type="int" value="0"/> <SyntheticProperty name="generatePosition" type="boolean" value="true"/> <SyntheticProperty name="generateSize" type="boolean" value="true"/> <SyntheticProperty name="generateCenter" type="boolean" value="true"/> </SyntheticProperties> <Events> <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="exitForm"/> </Events> <AuxValues> </AuxValues> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> <SubComponents> <Component class="javax.swing.JButton" name="jButton1"> <Properties> <Property name="text" type="java.lang.String" value="Set"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> <BorderConstraints direction="South"/> </Constraint> </Constraints> </Component> <Container class="javax.swing.JPanel" name="jPanel1"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> <BorderConstraints direction="North"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"> <Property name="alignment" type="int" value="0"/> <Property name="horizontalGap" type="int" value="10"/> </Layout> <SubComponents> <Component class="javax.swing.JLabel" name="jLabel3"> <Properties> <Property name="text" type="java.lang.String" value="old Address:"/> </Properties> </Component> <Component class="javax.swing.JTextField" name="txtOldAddress"> <Properties> <Property name="columns" type="int" value="3"/> <Property name="horizontalAlignment" type="int" value="4"/> </Properties> </Component> <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> <Property name="text" type="java.lang.String" value="new Address:"/> </Properties> </Component> <Component class="javax.swing.JTextField" name="txtNewAddress"> <Properties> <Property name="columns" type="int" value="3"/> <Property name="text" type="java.lang.String" value="1"/> <Property name="horizontalAlignment" type="int" value="4"/> </Properties> </Component> </SubComponents> </Container> <Container class="javax.swing.JPanel" name="jPanel2"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> <BorderConstraints direction="Center"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> <SubComponents> <Component class="javax.swing.JLabel" name="jLabel2"> <Properties> <Property name="text" type="java.lang.String" value="Status:"/> </Properties> </Component> <Component class="javax.swing.JTextField" name="txtLog"> <Properties> <Property name="columns" type="int" value="10"/> </Properties> </Component> </SubComponents> </Container> </SubComponents> </Form> 1.1 jop/java/pc/src/kfl/ctrl/SetAddress.java http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/SetAddress.java?rev=1.1&content-type=text/x-cvsweb-markup Index: SetAddress.java =================================================================== package kfl.ctrl; /* * Find.java * * Created on 01. Februar 2002, 14:25 */ /** * * @author Standard */ import BBSys; import Msg; public class SetAddress extends javax.swing.JFrame { private boolean exit = false; private Msg m; /** Creates new form Find */ public SetAddress(Msg m, int a) { this.m = m; initComponents(); txtOldAddress.setText(""+a); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ private void initComponents() {//GEN-BEGIN:initComponents jButton1 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); txtOldAddress = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); txtNewAddress = new javax.swing.JTextField(); jPanel2 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); txtLog = new javax.swing.JTextField(); setTitle("Find Stations"); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(evt); } }); jButton1.setText("Set"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1, java.awt.BorderLayout.SOUTH); jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 10, 5)); jLabel3.setText("old Address:"); jPanel1.add(jLabel3); txtOldAddress.setColumns(3); txtOldAddress.setHorizontalAlignment(javax.swing.JTextField.RIGHT); jPanel1.add(txtOldAddress); jLabel1.setText("new Address:"); jPanel1.add(jLabel1); txtNewAddress.setColumns(3); txtNewAddress.setText("1"); txtNewAddress.setHorizontalAlignment(javax.swing.JTextField.RIGHT); jPanel1.add(txtNewAddress); getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH); jLabel2.setText("Status:"); jPanel2.add(jLabel2); txtLog.setColumns(10); jPanel2.add(txtLog); getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER); pack(); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setSize(new java.awt.Dimension(300, 200)); setLocation((screenSize.width-300)/2,(screenSize.height-200)/2); }//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // Add your handling code here: txtLog.setText(""); int newAddr = Integer.parseInt(txtNewAddress.getText()); int oldAddr = Integer.parseInt(txtOldAddress.getText()); m.exchg(oldAddr, BBSys.CMD_SET_STATE, BBSys.MS_DBG); int val = m.exchg(oldAddr, BBSys.CMD_SETAD, newAddr); if (val<0) { m.clear(); txtLog.setText("Fehler "+val); } else { txtLog.setText("OK"); txtOldAddress.setText(""+newAddr); } }//GEN-LAST:event_jButton1ActionPerformed /** Exit the Application */ private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm if (exit) { System.exit(0); } else { dispose(); } }//GEN-LAST:event_exitForm public static void main(String args[]) { Msg m = new Msg(); SetAddress f = new SetAddress(m, 0); f.exit = true; f.show(); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JPanel jPanel1; private javax.swing.JLabel jLabel3; private javax.swing.JTextField txtOldAddress; private javax.swing.JLabel jLabel1; private javax.swing.JTextField txtNewAddress; private javax.swing.JPanel jPanel2; private javax.swing.JLabel jLabel2; private javax.swing.JTextField txtLog; // End of variables declaration//GEN-END:variables } 1.1 jop/java/pc/src/kfl/ctrl/SimZS.form http://www.opencores.org/cvsweb.shtml/jop/java/pc/src/kfl/ctrl/SimZS.form?rev=1.1&content-type=text/x-cvsweb-markup Index: SimZS.form =================================================================== <?xml version="1.0" encoding="UTF-8" ?> <Form version="1.0" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Properties> <Property name="title" type="java.lang.String" value="Simulate ZS"/> </Properties> <SyntheticProperties> <SyntheticProperty name="menuBar" type="java.lang.String" value="(No Menu)"/> <SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-56,0,0,1,44"/> <SyntheticProperty name="formPosition" type="java.awt.Point" value="-84,-19,0,5,115,114,0,14,106,97,118,97,46,97,119,116,46,80,111,105,110,116,-74,-60,-118,114,52,126,-56,38,2,0,2,73,0,1,120,73,0,1,121,120,112,0,0,0,0,0,0,0,0"/> <SyntheticProperty name="formSizePolicy" type="int" value="0"/> <SyntheticProperty name="generatePosition" type="boolean" value="true"/> <SyntheticProperty name="generateSize" type="boolean" value="false"/> <SyntheticProperty name="generateCenter" type="boolean" value="true"/> </SyntheticProperties> <Events> <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="exitForm"/> </Events> <AuxValues> </AuxValues> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> <SubComponents> <Container class="javax.swing.JPanel" name="pnlMain"> <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> <EmptyBorder bottom="10" left="10" right="10" top="10"/> </Border> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> <BorderConstraints direction="Center"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Container class="javax.swing.JPanel" name="pnlStationen"> <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> <EtchetBorder/> </Border> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="1" gridHeight="1" gridWidth="2" gridX="-1" gridY="-1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Container class="javax.swing.JPanel" name="pnlDetail"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="1" gridHeight="1" gridWidth="1" gridX="-1" gridY="-1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="1.0"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> </Container> <Container class="javax.swing.JPanel" name="pnlDiff"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="1" gridHeight="1" gridWidth="1" gridX="0" gridY="1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"> <Property name="horizontalGap" type="int" value="20"/> <Property name="verticalGap" type="int" value="0"/> </Layout> <SubComponents> <Component class="javax.swing.JLabel" name="jLabel5"> <Properties> <Property name="text" type="java.lang.String" value="max. Differenz:"/> </Properties> </Component> <Component class="javax.swing.JTextField" name="txtDiff"> <Properties> <Property name="editable" type="boolean" value="false"/> <Property name="columns" type="int" value="5"/> </Properties> </Component> <Component class="javax.swing.JCheckBox" name="chkUpdate"> <Properties> <Property name="text" type="java.lang.String" value="autom. Aktualisieren"/> </Properties> </Component> </SubComponents> </Container> </SubComponents> </Container> <Container class="javax.swing.JPanel" name="pnlMainButton"> <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> <EtchetBorder/> </Border> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="1" gridHeight="1" gridWidth="2" gridX="0" gridY="1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JButton" name="btnUp"> <Properties> <Property name="text" type="java.lang.String" value="Hinauf"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnUpActionPerformed"/> </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="1" gridHeight="1" gridWidth="1" gridX="-1" gridY="-1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.5" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JButton" name="btnDown"> <Properties> <Property name="text" type="java.lang.String" value="Herunter"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnDownActionPerformed"/> </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="1" gridHeight="1" gridWidth="1" gridX="1" gridY="0" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.5" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JButton" name="btnStop"> <Properties> <Property name="text" type="java.lang.String" value="Stop"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnStopActionPerformed"/> </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="1" gridHeight="2" gridWidth="2" gridX="0" gridY="1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.5" weightY="1.0"/> </Constraint> </Constraints> </Component> </SubComponents> </Container> <Container class="javax.swing.JPanel" name="pnlButton"> <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> <EtchetBorder/> </Border> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="1" gridHeight="1" gridWidth="1" gridX="0" gridY="2" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"> <Property name="rows" type="int" value="0"/> <Property name="columns" type="int" value="2"/> <Property name="horizontalGap" type="int" value="5"/> <Property name="verticalGap" type="int" value="5"/> </Layout> <SubComponents> <Component class="javax.swing.JButton" name="btnInfo"> <Properties> <Property name="text" type="java.lang.String" value="Info"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnInfoActionPerformed"/> </Events> </Component> <Component class="javax.swing.JButton" name="btnResCnt"> <Properties> <Property name="text" type="java.lang.String" value="res. Cnt"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnResCntActionPerformed"/> </Events> </Component> <Component class="javax.swing.JButton" name="btnResTim"> <Properties> <Property name="text" type="java.lang.String" value="res. Time"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnResTimActionPerformed"/> </Events> </Component> <Component class="javax.swing.JButton" name="btnReset"> <Properties> <Property name="text" type="java.lang.String" value="Reset"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnResetActionPerformed"/> </Events> </Component> </SubComponents> </Container> <Container class="javax.swing.JPanel" name="pnlCmd"> <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> <EtchetBorder/> </Border> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="17" fill="1" gridHeight="1" gridWidth="1" gridX="1" gridY="2" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> <Property name="text" type="java.lang.String" value="Address:"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="2" gridHeight="1" gridWidth="1" gridX="-1" gridY="-1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JLabel" name="jLabel2"> <Properties> <Property name="text" type="java.lang.String" value="Command:"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="2" gridHeight="1" gridWidth="1" gridX="-1" gridY="-1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JLabel" name="jLabel3"> <Properties> <Property name="text" type="java.lang.String" value="Data:"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="2" gridHeight="1" gridWidth="1" gridX="-1" gridY="-1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JLabel" name="jLabel4"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="2" gridHeight="1" gridWidth="1" gridX="-1" gridY="-1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JTextField" name="txtAddr"> <Properties> <Property name="text" type="java.lang.String" value="1"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="2" gridHeight="1" gridWidth="1" gridX="0" gridY="1" insetsBottom="5" insetsLeft="5" insetsRight="5" insetsTop="5" ipadX="0" ipadY="0" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JTextField" name="txtCmd"> <Properties> <Property name="text" type="java.lang.String" value="1"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints anchor="10" fill="2" gridHeight="1" gridWidth="1" gridX="1" gridY="1" insetsBottom="5" in