sendMessage ( new CreateQueryFailure ( new Response ( message.getRequest () ), new ErrorInformation ( null, String.format ( "Duplicate query id: %s", queryId ), null ) ) ); return;
sendMessage ( new CreateQueryFailure ( new Response ( message.getRequest () ), new ErrorInformation ( null, String.format ( "Duplicate query id: %s", queryId ), null ) ) ); return;
@Override public IoBuffer encodeMessage ( final BinaryContext context, final Object objectMessage ) throws Exception { final org.eclipse.scada.hd.data.message.CreateQuery value = (org.eclipse.scada.hd.data.message.CreateQuery)objectMessage; final IoBuffer data = IoBuffer.allocate ( 64 ); data.setAutoExpand ( true ); // encode message base data.putInt ( MESSAGE_CODE ); // number of fields data.put ( (byte)5 ); // encode attributes org.eclipse.scada.core.protocol.ngp.codec.Structures.encodeRequest ( context, data, (byte)1, value.getRequest () ); context.encodePrimitiveLong ( data, (byte)2, value.getQueryId () ); context.encodeString ( data, (byte)3, value.getItemId () ); context.encodePrimitiveBoolean ( data, (byte)4, value.isUpdateData () ); org.eclipse.scada.hd.protocol.ngp.codec.Structures.encodeQueryParameters ( context, data, (byte)5, value.getQueryParameters () ); data.flip (); return data; }
@Override public IoBuffer encodeMessage ( final BinaryContext context, final Object objectMessage ) throws Exception { final org.eclipse.scada.hd.data.message.CreateQuery value = (org.eclipse.scada.hd.data.message.CreateQuery)objectMessage; final IoBuffer data = IoBuffer.allocate ( 64 ); data.setAutoExpand ( true ); // encode message base data.putInt ( MESSAGE_CODE ); // number of fields data.put ( (byte)5 ); // encode attributes org.eclipse.scada.core.protocol.ngp.codec.Structures.encodeRequest ( context, data, (byte)1, value.getRequest () ); context.encodePrimitiveLong ( data, (byte)2, value.getQueryId () ); context.encodeString ( data, (byte)3, value.getItemId () ); context.encodePrimitiveBoolean ( data, (byte)4, value.isUpdateData () ); org.eclipse.scada.hd.protocol.ngp.codec.Structures.encodeQueryParameters ( context, data, (byte)5, value.getQueryParameters () ); data.flip (); return data; }