public static Short extractToShort(final DeviceData deviceDataArgout) throws DevFailed {
	final Object value = CommandHelper.extract(deviceDataArgout);
	Short argout = null;
	if (value instanceof Short) {
	    argout = (Short) value;
	} else if (value instanceof String) {
	    try {
		argout = Short.valueOf((String) value);
	    } catch (final Exception e) {
		Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value
			+ " is not a numerical", "CommandHelper.extractToShort(deviceDataArgin)");
	    }
	} else if (value instanceof Integer) {
	    argout = Short.valueOf(((Integer) value).shortValue());
	} else if (value instanceof Long) {
	    argout = Short.valueOf(((Long) value).shortValue());
	} else if (value instanceof Float) {
	    argout = Short.valueOf(((Float) value).shortValue());
	} else if (value instanceof Boolean) {
	    if (((Boolean) value).booleanValue()) {
		argout = Short.valueOf((short) 1);
	    } else {
		argout = Short.valueOf((short) 0);
	    }
	} else if (value instanceof Double) {
	    argout = Short.valueOf(((Double) value).shortValue());
	} else if (value instanceof DevState) {
	    argout = Short.valueOf(Integer.valueOf(((DevState) value).value()).shortValue());
	} else {
	    Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value.getClass()
		    + " not supported",
		    "CommandHelper.extractToShort(Object value,deviceDataArgin)");
	}

	return argout;
    }
public static Short extractToShort ( final DeviceData deviceDataArgout ) throws DevFailed { final Object value = CommandHelper . extract ( deviceDataArgout ) ; Short argout = null ; if ( value instanceof Short ) { argout = ( Short ) value ; } else if ( value instanceof String ) { try { argout = Short . valueOf ( ( String ) value ) ; } catch ( final Exception e ) { Except . throw_exception ( "TANGO_WRONG_DATA_ERROR" , "output type " + value + " is not a numerical" , "CommandHelper.extractToShort(deviceDataArgin)" ) ; } } else if ( value instanceof Integer ) { argout = Short . valueOf ( ( ( Integer ) value ) . shortValue ( ) ) ; } else if ( value instanceof Long ) { argout = Short . valueOf ( ( ( Long ) value ) . shortValue ( ) ) ; } else if ( value instanceof Float ) { argout = Short . valueOf ( ( ( Float ) value ) . shortValue ( ) ) ; } else if ( value instanceof Boolean ) { if ( ( ( Boolean ) value ) . booleanValue ( ) ) { argout = Short . valueOf ( ( short ) 1 ) ; } else { argout = Short . valueOf ( ( short ) 0 ) ; } } else if ( value instanceof Double ) { argout = Short . valueOf ( ( ( Double ) value ) . shortValue ( ) ) ; } else if ( value instanceof DevState ) { argout = Short . valueOf ( Integer . valueOf ( ( ( DevState ) value ) . value ( ) ) . shortValue ( ) ) ; } else { Except . throw_exception ( "TANGO_WRONG_DATA_ERROR" , "output type " + value . getClass ( ) + " not supported" , "CommandHelper.extractToShort(Object value,deviceDataArgin)" ) ; } return argout ; }
Convert the value according the type of DeviceData.

@param deviceDataArgout
the DeviceData attribute to read
@return Short, the result in Short format
@throws DevFailed