     1	void DocDs::write_attr_hardware(vector<long> &attr_list)
     2	{
     3		cout << "In write_attr_hardware for " << attr_list.size();
     4		cout << " attribute(s)" << endl;
     5	
     6		for (long i=0 ; i < attr_list.size() ; i++)
     7		{
     8			WAttribute &att = dev_attr->get_w_attr_by_ind(attr_list[i]);
     9			string attr_name = att.get_name();
    10	
    11			cout << "Attribute name = " << attr_name;		
    12	
    13			//	Switch on attribute name
    14			//---------------------------------
    15			if (attr_name == "LongWrAttr")
    16			{
    17				//	Add your own code here
    18				att.get_write_value(attr_wr);
    19				cout << "Value to be written = " << attr_wr << endl;
    20			}
    21		}
    22	}
    23	
    24	void DocDs::read_attr_hardware(vector<long> &attr_list)
    25	{
    26		cout << "In read_attr_hardware for " << attr_list.size();
    27		cout << " attribute(s)" << endl;
    28		
    29		//	Add your own code here
    30		//---------------------------------
    31		
    32		string att_name;
    33		for (long i = 0;i < attr_list.size();i++)
    34		{
    35			att_name = dev_attr->get_attr_by_ind(attr_list[i]).get_name();
    36			
    37			if (att_name == "LongRdAttr")
    38			{
    39				attr_rd = 5;
    40			}
    41		}
    42	}
    43	
    44	void DocDs::read_attr(Tango::Attribute &attr)
    45	{
    46		string &attr_name = attr.get_name();
    47	
    48		cout << "In read_attr for attribute " << attr_name << endl;
    49	
    50		//	Switch on attribute name
    51		//---------------------------------
    52		if (attr_name == "LongRdAttr")
    53		{
    54			//	Add your own code here
    55	      		attr.set_value(&attr_rd);
    56		}
    57		if (attr_name == "LongWrAttr")
    58		{
    59			//	Add your own code here
    60			attr.set_value(&attr_wr);
    61		}
    62		if (attr_name == "StrAttr")
    63		{
    64			//	Add your own code here
    65	      		attr_str_array[0] = CORBA::string_dup("Rock");
    66	      		attr_str_array[1] = CORBA::string_dup("Samba");
    67	      
    68	      		attr.set_value(attr_str_array, 2);
    69		}
    70	}
