Geschrieben January 25, 2017 at 10:2925. Jan 2017 Ich glaube, Ihr habt in der getMonoflop Methode vergessen, dem Rückgabewert (Monoflop) das Relay anzugeben: Hier Euer code: public Monoflop getMonoflop(short relay) throws TimeoutException, NotConnectedException { ByteBuffer bb = ipcon.createRequestPacket((byte)9, FUNCTION_GET_MONOFLOP, this); bb.put((byte)relay); byte[] response = sendRequest(bb.array()); bb = ByteBuffer.wrap(response, 8, response.length - ; bb.order(ByteOrder.LITTLE_ENDIAN); Monoflop obj = new Monoflop(); obj.state = (bb.get()) != 0; obj.time = IPConnection.unsignedInt(bb.getInt()); obj.timeRemaining = IPConnection.unsignedInt(bb.getInt()); return obj; } Heissen sollte er aber: public Monoflop getMonoflop(short relay) throws TimeoutException, NotConnectedException { ByteBuffer bb = ipcon.createRequestPacket((byte)9, FUNCTION_GET_MONOFLOP, this); bb.put((byte)relay); byte[] response = sendRequest(bb.array()); bb = ByteBuffer.wrap(response, 8, response.length - ; bb.order(ByteOrder.LITTLE_ENDIAN); Monoflop obj = new Monoflop(); obj.relay = relay; obj.state = (bb.get()) != 0; obj.time = IPConnection.unsignedInt(bb.getInt()); obj.timeRemaining = IPConnection.unsignedInt(bb.getInt()); return obj; } Wäre es möglich, dass Ihr das Relay auch noch dort einfüllt... sonst ist das immer 0 und im weiteren Verlauf eines Programs verliert sich die Information... welches Monoflop da gemeint war.
Geschrieben January 25, 2017 at 13:1325. Jan 2017 Du hast recht, da ist ein Bug in den Java Bindings dies bezüglich. Aber der Bug ist, dass die Monoflop Klasse überhaupt das relay Member hat. Dieser Bug ist in den Heute veröffentlichen Java Bindings behoben.
Geschrieben January 26, 2017 at 18:0126. Jan 2017 Autor Misst... nun muss ich mir merken, zu welchem Relay denn diese Monoflop-Parameter gehören... Naja, ist eure Design-Entscheidung... muss ich akzeptieren.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.