Quantasy Posted January 25, 2017 at 10:29 AM Share Posted January 25, 2017 at 10:29 AM 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. Quote Link to comment Share on other sites More sharing options...
photron Posted January 25, 2017 at 01:13 PM Share Posted January 25, 2017 at 01:13 PM 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. Quote Link to comment Share on other sites More sharing options...
Quantasy Posted January 26, 2017 at 06:01 PM Author Share Posted January 26, 2017 at 06:01 PM Misst... nun muss ich mir merken, zu welchem Relay denn diese Monoflop-Parameter gehören... Naja, ist eure Design-Entscheidung... muss ich akzeptieren. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.