function readvalues = readdevices(devdescr, prefix)

n = length(devdescr);

debug = 0;
if (debug) fprintf(1,'There is %d devices\n',n); end;


for i=1:n
  devicename = [prefix devdescr(i).name];
  if(debug) fprintf(1,'Reading %s',devicename); end;

  if (devdescr(i).isfesa)
    if(debug) fprintf(1,' of FESA type\n'); end;
    readvalues(i) = Jgetcontrolvalfesa(devicename,'Setting'); 
  else  
    if(debug) fprintf(1,' of GM type\n');end;
    readvalues(i) = Jgetcontrolval(devicename,'CCV'); 
  end
    
  if(debug) fprintf(1,'%s = %f\n',devicename,readvalues(i)); end;
end

