private void handleUpdateQueryData ( final UpdateQueryData message ) { final QueryImpl query = this.queries.get ( message.getQueryId () ); if ( query == null ) { logger.info ( "Query is already closed" ); return; } query.handleUpdateData ( message.getIndex (), message.getValues (), message.getValueInformation () ); }
private void handleUpdateQueryData ( final UpdateQueryData message ) { final QueryImpl query = this.queries.get ( message.getQueryId () ); if ( query == null ) { logger.info ( "Query is already closed" ); return; } query.handleUpdateData ( message.getIndex (), message.getValues (), message.getValueInformation () ); }
@Override public IoBuffer encodeMessage ( final BinaryContext context, final Object objectMessage ) throws Exception { final org.eclipse.scada.hd.data.message.UpdateQueryData value = (org.eclipse.scada.hd.data.message.UpdateQueryData)objectMessage; final IoBuffer data = IoBuffer.allocate ( 64 ); data.setAutoExpand ( true ); // encode message base data.putInt ( MESSAGE_CODE ); // number of fields data.put ( (byte)4 ); // encode attributes context.encodePrimitiveLong ( data, (byte)1, value.getQueryId () ); context.encodePrimitiveInt ( data, (byte)2, value.getIndex () ); org.eclipse.scada.hd.protocol.ngp.codec.Structures.encodeCollectionValueInformation ( context, data, (byte)3, value.getValueInformation () ); org.eclipse.scada.hd.protocol.ngp.codec.Structures.encodeCollectionValueEntry ( context, data, (byte)4, value.getValues () ); data.flip (); return data; }
@Override public IoBuffer encodeMessage ( final BinaryContext context, final Object objectMessage ) throws Exception { final org.eclipse.scada.hd.data.message.UpdateQueryData value = (org.eclipse.scada.hd.data.message.UpdateQueryData)objectMessage; final IoBuffer data = IoBuffer.allocate ( 64 ); data.setAutoExpand ( true ); // encode message base data.putInt ( MESSAGE_CODE ); // number of fields data.put ( (byte)4 ); // encode attributes context.encodePrimitiveLong ( data, (byte)1, value.getQueryId () ); context.encodePrimitiveInt ( data, (byte)2, value.getIndex () ); org.eclipse.scada.hd.protocol.ngp.codec.Structures.encodeCollectionValueInformation ( context, data, (byte)3, value.getValueInformation () ); org.eclipse.scada.hd.protocol.ngp.codec.Structures.encodeCollectionValueEntry ( context, data, (byte)4, value.getValues () ); data.flip (); return data; }