|
| 1 | +package tarik.board.control; |
| 2 | + |
| 3 | +import com.sun.jna.ptr.IntByReference; |
| 4 | + |
| 5 | +import com.sun.jna.*; |
| 6 | +/** |
| 7 | + * Interface für das UsbBoard. |
| 8 | + * Um eine neue Instanz zu bekommen, führe die Methode USBBoard.getBoard() aus. |
| 9 | + * @author Tarik A. |
| 10 | + * |
| 11 | + */ |
| 12 | +public interface TWUsbBoard extends Library { |
| 13 | + int OpenDevice(int CardAddress); |
| 14 | + void CloseDevice(); |
| 15 | + int SearchDevices(); |
| 16 | + int SetCurrentDevice(int lngCardAddress); |
| 17 | + int Version(); |
| 18 | + int ReadAnalogChannel(int Channel); |
| 19 | + void ReadAllAnalog(IntByReference Data1, IntByReference Data2); |
| 20 | + void OutputAnalogChannel(int Channel, int Data); |
| 21 | + void OutputAllAnalog(int Data1, int Data2); |
| 22 | + void ClearAnalogChannel(int Channel); |
| 23 | + void ClearAllAnalog(); |
| 24 | + void SetAnalogChannel(int Channel); |
| 25 | + void SetAllAnalog(); |
| 26 | + void WriteAllDigital(int Data); |
| 27 | + void ClearDigitalChannel(int Channel); |
| 28 | + void ClearAllDigital(); |
| 29 | + void SetDigitalChannel(int Channel); |
| 30 | + void SetAllDigital(); |
| 31 | + boolean ReadDigitalChannel(int Channel); |
| 32 | + int ReadAllDigital(); |
| 33 | + void ResetCounter(int CounterNr); |
| 34 | + int ReadCounter(int CounterNr); |
| 35 | + void SetCounterDebounceTime(int CounterNr, int DebounceTime); |
| 36 | + int ReadBackDigitalOut(); |
| 37 | + void ReadBackAnalogOut(IntByReference Buffer); |
| 38 | + |
| 39 | + // Field descriptor #6 Ljava/lang/String; |
| 40 | + public static final java.lang.String VERSION_TWUSB = "1.0"; |
| 41 | + |
| 42 | + // Field descriptor #6 Ljava/lang/String; |
| 43 | + public static final java.lang.String TWUSB_DLL_NAME = "TWUsb"; |
| 44 | + |
| 45 | + // Field descriptor #14 I |
| 46 | + public static final int ADDRESSE_0 = 0; |
| 47 | + |
| 48 | + // Field descriptor #14 I |
| 49 | + public static final int ADDRESSE_1 = 1; |
| 50 | + |
| 51 | + // Field descriptor #14 I |
| 52 | + public static final int ADDRESSE_2 = 2; |
| 53 | + |
| 54 | + // Field descriptor #14 I |
| 55 | + public static final int ADDRESSE_3 = 3; |
| 56 | + |
| 57 | + // Field descriptor #14 I |
| 58 | + public static final int ADDRESSE_AUTO_SEARCH = 99; |
| 59 | + |
| 60 | + // Field descriptor #14 I |
| 61 | + public static final int DIGITALER_AUSGABE_KANAL_1 = 1; |
| 62 | + |
| 63 | + // Field descriptor #14 I |
| 64 | + public static final int DIGITALER_AUSGABE_KANAL_2 = 2; |
| 65 | + |
| 66 | + // Field descriptor #14 I |
| 67 | + public static final int DIGITALER_AUSGABE_KANAL_3 = 3; |
| 68 | + |
| 69 | + // Field descriptor #14 I |
| 70 | + public static final int DIGITALER_AUSGABE_KANAL_4 = 4; |
| 71 | + |
| 72 | + // Field descriptor #14 I |
| 73 | + public static final int DIGITALER_AUSGABE_KANAL_5 = 5; |
| 74 | + |
| 75 | + // Field descriptor #14 I |
| 76 | + public static final int DIGITALER_AUSGABE_KANAL_6 = 6; |
| 77 | + |
| 78 | + // Field descriptor #14 I |
| 79 | + public static final int DIGITALER_AUSGABE_KANAL_7 = 7; |
| 80 | + |
| 81 | + // Field descriptor #14 I |
| 82 | + public static final int DIGITALER_AUSGABE_KANAL_8 = 8; |
| 83 | + |
| 84 | + // Field descriptor #14 I |
| 85 | + public static final int DIGITALER_EINGABE_KANAL_1 = 1; |
| 86 | + |
| 87 | + // Field descriptor #14 I |
| 88 | + public static final int DIGITALER_EINGABE_KANAL_2 = 2; |
| 89 | + |
| 90 | + // Field descriptor #14 I |
| 91 | + public static final int DIGITALER_EINGABE_KANAL_3 = 3; |
| 92 | + |
| 93 | + // Field descriptor #14 I |
| 94 | + public static final int DIGITALER_EINGABE_KANAL_4 = 4; |
| 95 | + |
| 96 | + // Field descriptor #14 I |
| 97 | + public static final int DIGITALER_EINGABE_KANAL_5 = 5; |
| 98 | + |
| 99 | + // Field descriptor #43 Z |
| 100 | + public static final boolean DIGITALER_EINGABE_KANAL_AN = true; |
| 101 | + |
| 102 | + // Field descriptor #43 Z |
| 103 | + public static final boolean DIGITALER_EINGABE_KANAL_AUS = false; |
| 104 | + |
| 105 | + // Field descriptor #43 Z |
| 106 | + public static final boolean DIGITALER_EINGABE_KANAL_TASTE_GEDRUECKT = true; |
| 107 | + |
| 108 | + // Field descriptor #43 Z |
| 109 | + public static final boolean DIGITALER_EINGABE_KANAL_TASTE_NICHT_GEDRUECKT = false; |
| 110 | + |
| 111 | + // Field descriptor #14 I |
| 112 | + public static final int ANALOGER_EINGABE_KANAL_1 = 1; |
| 113 | + |
| 114 | + // Field descriptor #14 I |
| 115 | + public static final int ANALOGER_EINGABE_KANAL_2 = 2; |
| 116 | + |
| 117 | + // Field descriptor #14 I |
| 118 | + public static final int ANALOGER_AUSGABE_KANAL_1 = 1; |
| 119 | + |
| 120 | + // Field descriptor #14 I |
| 121 | + public static final int ANALOGER_AUSGABE_KANAL_2 = 2; |
| 122 | + |
| 123 | + // Field descriptor #14 I |
| 124 | + public static final int COUNTER_KANAL_1 = 1; |
| 125 | + |
| 126 | + // Field descriptor #14 I |
| 127 | + public static final int COUNTER_KANAL_2 = 2; |
| 128 | + |
| 129 | + // Field descriptor #14 I |
| 130 | + public static final int MAX_DATA = 255; |
| 131 | + |
| 132 | + // Field descriptor #14 I |
| 133 | + public static final int MIN_DATA = 0; |
| 134 | + |
| 135 | + // Field descriptor #14 I |
| 136 | + public static final int MAX_ENTPRELL_ZEIT = 5000; |
| 137 | + |
| 138 | + // Field descriptor #14 I |
| 139 | + public static final int MIN_ENTPRELL_ZEIT = 0; |
| 140 | + |
| 141 | + // Field descriptor #43 Z |
| 142 | + public static final boolean DEVICE_IS_CONNECT = true; |
| 143 | + |
| 144 | + // Field descriptor #43 Z |
| 145 | + public static final boolean DEVICE_NOT_CONNECT = false; |
| 146 | + |
| 147 | + // Field descriptor #14 I |
| 148 | + public static final int DEVICE_NOT_FOUND = -1; |
| 149 | + |
| 150 | + // Field descriptor #14 I |
| 151 | + public static final int DATA_FEHLER = -1; |
| 152 | + |
| 153 | + // Field descriptor #65 J |
| 154 | + public static final long ABFRAGE_INTERVAL_100_MILLISEKUNDEN = 100L; |
| 155 | + |
| 156 | + // Field descriptor #65 J |
| 157 | + public static final long ABFRAGE_INTERVAL_500_MILLISEKUNDEN = 500L; |
| 158 | + |
| 159 | + // Field descriptor #65 J |
| 160 | + public static final long ABFRAGE_INTERVAL_1_SEKUNDEN = 1000L; |
| 161 | + |
| 162 | + // Field descriptor #65 J |
| 163 | + public static final long ABFRAGE_INTERVAL_5_SEKUNDEN = 5000L; |
| 164 | + |
| 165 | + // Field descriptor #65 J |
| 166 | + public static final long ABFRAGE_INTERVAL_10_SEKUNDEN = 10000L; |
| 167 | + |
| 168 | + // Field descriptor #65 J |
| 169 | + public static final long START_IN_1_SEKUNDE = 1000L; |
| 170 | + |
| 171 | + // Field descriptor #65 J |
| 172 | + public static final long START_IN_10_SEKUNDEN = 10000L; |
| 173 | + |
| 174 | + // Field descriptor #65 J |
| 175 | + public static final long START_IN_1_MINUTE = 60000L; |
| 176 | + |
| 177 | + // Field descriptor #65 J |
| 178 | + public static final long START_IN_10_MINUTEN = 600000L; |
| 179 | +} |
0 commit comments