public AttributeConfig[] get_attribute_config(final String[] names) throws DevFailed {
	Util.out4.println("DeviceImpl.get_attribute_config arrived");

	int nb_attr = names.length;
	boolean all_attr = false;

	//
	// Record operation request in black box
	//

	blackbox.insert_op(Op_Get_Attr_Config);

	//
	// Return exception if the device does not have any attribute
	//

	final int nb_dev_attr = dev_attr.get_attr_nb();
	if (nb_dev_attr == 0) {
	    Except.throw_exception("API_AttrNotFound", "The device does not have any attribute",
		    "DeviceImpl.get_attribute_config");
	}

	//
	// Check if the caller want to get config for all attribute
	//

	if (nb_attr == 1 && names[0].equals(Tango_AllAttr)) {
	    nb_attr = nb_dev_attr;
	    all_attr = true;
	}

	//
	// Allocate memory for the AttributeConfig objects
	//

	AttributeConfig[] back = null;
	// noinspection ErrorNotRethrown
	try {
	    back = new AttributeConfig[nb_attr];
	    for (int i = 0; i < nb_attr; i++) {
		back[i] = new AttributeConfig();
	    }
	} catch (final OutOfMemoryError ex) {
	    Util.out3.println("Bad allocation while in DeviceImpl.get_attribute_config");
	    Except.throw_exception("API_MemoryAllocation", "Can't allocate memory in server",
		    "DeviceImpl.get_attribute_config");
	}

	//
	// Fill in these objects
	//

	for (int i = 0; i < nb_attr; i++) {
	    if (all_attr == true) {
		final Attribute attr = dev_attr.get_attr_by_ind(i);
		attr.get_properties(back[i]);
	    } else {
		final Attribute attr = dev_attr.get_attr_by_name(names[i]);
		attr.get_properties(back[i]);
	    }
	}

	//
	// Return to caller
	//

	Util.out4.println("Leaving DeviceImpl.get_attribute_config");

	return back;
    }
public AttributeConfig [ ] get_attribute_config ( final String [ ] names ) throws DevFailed { Util . out4 . println ( "DeviceImpl.get_attribute_config arrived" ) ; int nb_attr = names . length ; boolean all_attr = false ; blackbox . insert_op ( Op_Get_Attr_Config ) ; final int nb_dev_attr = dev_attr . get_attr_nb ( ) ; if ( nb_dev_attr == 0 ) { Except . throw_exception ( "API_AttrNotFound" , "The device does not have any attribute" , "DeviceImpl.get_attribute_config" ) ; } if ( nb_attr == 1 && names [ 0 ] . equals ( Tango_AllAttr ) ) { nb_attr = nb_dev_attr ; all_attr = true ; } AttributeConfig [ ] back = null ; try { back = new AttributeConfig [ nb_attr ] ; for ( int i = 0 ; i < nb_attr ; i ++ ) { back [ i ] = new AttributeConfig ( ) ; } } catch ( final OutOfMemoryError ex ) { Util . out3 . println ( "Bad allocation while in DeviceImpl.get_attribute_config" ) ; Except . throw_exception ( "API_MemoryAllocation" , "Can't allocate memory in server" , "DeviceImpl.get_attribute_config" ) ; } for ( int i = 0 ; i < nb_attr ; i ++ ) { if ( all_attr == true ) { final Attribute attr = dev_attr . get_attr_by_ind ( i ) ; attr . get_properties ( back [ i ] ) ; } else { final Attribute attr = dev_attr . get_attr_by_name ( names [ i ] ) ; attr . get_properties ( back [ i ] ) ; } } Util . out4 . println ( "Leaving DeviceImpl.get_attribute_config" ) ; return back ; }
Get attribute(s) configuration.

Invoked when the client request the get_attribute_config CORBA operation.
It retrieves attribute(s) configuration and initialise a AttributeConfig
object for each of the wanted attribute.

@param names
The attribute name list
@return An array of AttributeConfig object. One AttributeConfig object is
initialised for each wanted attribute
@exception DevFailed
Thrown if one of the attribute does not exist. Click <a
href
="../../tango_basic/idl_html/Tango.html#DevFailed">here
</a> to read <b>DevFailed</b> exception specification