int nbTrame; int ftHandle; FloatBuffer valR2 = FloatBuffer.allocate(0x1000); float val2; ShortBuffer typeR2 = ShortBuffer.allocate(0x1000); short type2; ShortBuffer moduleR2 = ShortBuffer.allocate(0x1000); short module2; synchronized public void run() { DLL jna = (DLL)Native.loadLibrary("dllIHM3", DLL.class); nbTrame = jna.read_CAN_buffer (ftHandle, typeR2, moduleR2, valR2); } public read(int ftHandle) throws InterruptedException { this.ftHandle = ftHandle; this.setPriority ( 8 ); this.start(); this.join(); for (int i=0;i<nbTrame;i++) { this.type2 = this.typeR2.get(i); this.module2 = moduleR2.get(i); this.val2 = valR2.get(i); MAJ maj = new MAJ(type2, module2, val2); maj.join(); } }
int nbTrame; int ftHandle; FloatBuffer valR2 = FloatBuffer.allocate(0x1000); float val2; ShortByReference[] typeR2 = new ShortByReference[200]; short type2; ShortByReference[] moduleR2 = new ShortByReference[200]; short module2; synchronized public void run() { DLL jna = (DLL)Native.loadLibrary("dllIHM3", DLL.class); nbTrame = jna.read_CAN_buffer (ftHandle, typeR2, moduleR2, valR2); } public read(int ftHandle) throws InterruptedException { this.ftHandle = ftHandle; this.setPriority ( 8 ); this.start(); this.join(); for (int i=0;i<nbTrame;i++) { this.type2 = this.typeR2[i]; this.module2 = moduleR2[i]; this.val2 = valR2.get(i); MAJ maj = new MAJ(type2, module2, val2); maj.join(); } }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question