public static void insert ( final Object value , final DeviceAttribute deviceAttributeWritten , final int dimX , final int dimY ) throws DevFailed { if ( value instanceof Short ) { AttributeHelper . insertFromShort ( ( Short ) value , deviceAttributeWritten ) ; } else if ( value instanceof String ) { AttributeHelper . insertFromString ( ( String ) value , deviceAttributeWritten ) ; } else if ( value instanceof Integer ) { AttributeHelper . insertFromInteger ( ( Integer ) value , deviceAttributeWritten ) ; } else if ( value instanceof Long ) { AttributeHelper . insertFromLong ( ( Long ) value , deviceAttributeWritten ) ; } else if ( value instanceof Float ) { AttributeHelper . insertFromFloat ( ( Float ) value , deviceAttributeWritten ) ; } else if ( value instanceof Boolean ) { AttributeHelper . insertFromBoolean ( ( Boolean ) value , deviceAttributeWritten ) ; } else if ( value instanceof Double ) { AttributeHelper . insertFromDouble ( ( Double ) value , deviceAttributeWritten ) ; } else if ( value instanceof DevState ) { AttributeHelper . insertFromDevState ( ( DevState ) value , deviceAttributeWritten ) ; } else if ( value instanceof WAttribute ) { AttributeHelper . insertFromWAttribute ( ( WAttribute ) value , deviceAttributeWritten ) ; } else if ( value instanceof Vector ) { AttributeHelper . insertFromArray ( ( ( Vector ) value ) . toArray ( ) , deviceAttributeWritten , dimX , dimY ) ; } else { Except . throw_exception ( "TANGO_WRONG_DATA_ERROR" , "input type " + value . getClass ( ) + " not supported" , "AttributeHelper.insert(Object value,deviceAttributeWritten)" ) ; } }
Insert data in DeviceAttribute from an Object