@Override public FactoryInformation[] handleResponse ( final GetFactoriesResponse result ) { return result.getFactories ().toArray ( new FactoryInformation[result.getFactories ().size ()] ); } };
@Override public FactoryInformation[] handleResponse ( final GetFactoriesResponse result ) { return result.getFactories ().toArray ( new FactoryInformation[result.getFactories ().size ()] ); } };
@Override public IoBuffer encodeMessage ( final BinaryContext context, final Object objectMessage ) throws Exception { final org.eclipse.scada.ca.data.message.GetFactoriesResponse value = (org.eclipse.scada.ca.data.message.GetFactoriesResponse)objectMessage; final IoBuffer data = IoBuffer.allocate ( 64 ); data.setAutoExpand ( true ); // encode message base data.putInt ( MESSAGE_CODE ); // number of fields data.put ( (byte)2 ); // encode attributes org.eclipse.scada.core.protocol.ngp.codec.Structures.encodeResponse ( context, data, (byte)1, value.getResponse () ); org.eclipse.scada.ca.protocol.ngp.codec.Structures.encodeCollectionFactoryInformation ( context, data, (byte)2, value.getFactories () ); data.flip (); return data; }
@Override public IoBuffer encodeMessage ( final BinaryContext context, final Object objectMessage ) throws Exception { final org.eclipse.scada.ca.data.message.GetFactoriesResponse value = (org.eclipse.scada.ca.data.message.GetFactoriesResponse)objectMessage; final IoBuffer data = IoBuffer.allocate ( 64 ); data.setAutoExpand ( true ); // encode message base data.putInt ( MESSAGE_CODE ); // number of fields data.put ( (byte)2 ); // encode attributes org.eclipse.scada.core.protocol.ngp.codec.Structures.encodeResponse ( context, data, (byte)1, value.getResponse () ); org.eclipse.scada.ca.protocol.ngp.codec.Structures.encodeCollectionFactoryInformation ( context, data, (byte)2, value.getFactories () ); data.flip (); return data; }