protected static org.eclipse.scada.core.data.OperationParameters makeParameters ( final OperationParameters operationParameters ) { if ( operationParameters == null ) { return null; } final Map<String, String> properties = new HashMap<String, String> ( 0 ); UserInformation userInformation = null; if ( operationParameters.getUserInformation () != null ) { userInformation = new UserInformation ( operationParameters.getUserInformation ().getName () ); } return new org.eclipse.scada.core.data.OperationParameters ( userInformation, properties ); }
public org.eclipse.scada.core.data.OperationParameters asData () { final org.eclipse.scada.core.data.UserInformation ui = this.userInformation == null ? null : new org.eclipse.scada.core.data.UserInformation ( this.userInformation.getName () ); return new org.eclipse.scada.core.data.OperationParameters ( ui, this.properties ); } }
protected static void inlineEncodeUserInformation ( final BinaryContext context, final IoBuffer data, final org.eclipse.scada.core.data.UserInformation value ) throws Exception { // number of fields data.put ( (byte)1 ); // encode attributes context.encodeString ( data, (byte)1, value.getName () ); }
protected static org.eclipse.scada.core.data.UserInformation inlindeDecodeUserInformation ( final BinaryContext _context, final IoBuffer _data ) throws Exception { // number of fields final byte numberOfFields = _data.get (); // decode attributes String name = null; logger.trace ( "Decoding {} fields", numberOfFields ); for ( int i = 0; i < numberOfFields; i++ ) { final byte fieldNumber = _data.get (); switch ( fieldNumber ) { case 1: { name = _context.decodeString ( _data ); } break; default: logger.warn ( "Received unknown field number: {}", fieldNumber ); break; } } // create object return new org.eclipse.scada.core.data.UserInformation ( name ); }
protected static void inlineEncodeUserInformation ( final BinaryContext context, final IoBuffer data, final org.eclipse.scada.core.data.UserInformation value ) throws Exception { // number of fields data.put ( (byte)1 ); // encode attributes context.encodeString ( data, (byte)1, value.getName () ); }
protected static org.eclipse.scada.core.data.UserInformation inlindeDecodeUserInformation ( final BinaryContext _context, final IoBuffer _data ) throws Exception { // number of fields final byte numberOfFields = _data.get (); // decode attributes String name = null; logger.trace ( "Decoding {} fields", numberOfFields ); for ( int i = 0; i < numberOfFields; i++ ) { final byte fieldNumber = _data.get (); switch ( fieldNumber ) { case 1: { name = _context.decodeString ( _data ); } break; default: logger.warn ( "Received unknown field number: {}", fieldNumber ); break; } } // create object return new org.eclipse.scada.core.data.UserInformation ( name ); }