     1	public void write_attr_hardware(Vector attr_list)
     2	{
     3		Util.out2.println("In write_attr_hardware for "+attr_list.size()+" attribute(s)");
     4		
     5		for (int i=0 ; i<attr_list.size() ; i++)
     6		{
     7			int ind = ((Integer)(attr_list.elementAt(i))).intValue();
     8			WAttribute att = dev_attr.get_w_attr_by_ind(ind);
     9			String attr_name = att.get_name();
    10	
    11			//	Switch on attribute name
    12			//---------------------------------
    13			if (attr_name.equals("LongWrAttr") == true)
    14			{
    15				//	Add your own code here
    16				attr_wr = att.get_lg_write_value();
    17				System.out.println("Value to be written = "+attr_wr);
    18			}
    19		}
    20	}
    21	
    22	
    23	public void read_attr_hardware(Vector attr_list)
    24	{
    25		Util.out2.println("In read_attr_hardware for "+attr_list.size()+" attribute(s)");
    26	
    27		//	Add you own code here
    28		//---------------------------------
    29			
    30		for (int i=0; i<attr_list.size() ; i++)
    31		{
    32			int ind = ((Integer)(attr_list.elementAt(i))).intValue();
    33			Attribute att = dev_attr.get_attr_by_ind(ind);
    34			String attr_name = attr_list.elementAt(i);
    35				
    36			if (attr_name.equals("LongRdAttr") == true)
    37			{
    38				attr_rd = 5;
    39			}
    40			else if (attr_name.equals("StrAttr") == true)
    41			{
    42				attr_str_array[0] = new String("Rock");
    43				attr_str_array[1] = new String("Samba");
    44			}
    45		}
    46	}
    47	
    48	
    49	public void read_attr(Attribute attr) throws DevFailed
    50	{
    51		String attr_name = attr.get_name();
    52		Util.out2.println("In read_attr for attribute "+attr_name);
    53	
    54		//	Switch on attribute name
    55		//---------------------------------
    56		if (attr_name.equals("LongWrAttr") == true)
    57		{
    58			//	Add your own code here
    59			attr.set_value(attr_wr);
    60		}
    61		if (attr_name.equals("LongRdAttr") == true)
    62		{
    63			//	Add your own code here
    64			attr.set_value(attr_rd);
    65		}
    66		if (attr_name.equals("StrAttr") == true)
    67		{
    68			//	Add your own code here
    69			attr.set_value(attr_str_array);
    70		}
    71	}
