function P = getprops(prop,otype) % Retrieve several properties for the specified device and send back as a % structure. Created for the ECO sensor processing on the M0 CIMT mooring. % % Usage: p=getprops(cdir,log); % Inputs: prop=property structure, result of readProperties call % otype=log type such as 'plot' or 'data' % Outputs: Structure P containing: dev number, serial number, processing directory, log % directory, log file name %------------------------------------------------------------------------- % Requires: % readProperties.m % getProperty.m %------------------------------------------------------------06.08.2004 rpm % Sample output: % p = % dev: '1301' % serial: 'BBSB-024R' % pdir: '//tornado/ssdsdata/ecocimt/processing' % ldir: '//tornado/ssdsdata/ecocimt/logs' % ddir: '//tornado/ssdsdata/ecocimt/data' % log: 'eco_data_log.txt' % ecotype: 'ecobb' P.dev=getProperty(prop,'calibration.dev'); P.serial=getProperty(prop,'calibration.serial'); P.pdir=getProperty(prop,'process_path'); P.ldir=getProperty(prop,'log_path'); P.ddir=getProperty(prop,'output_path'); P.fdir=getProperty(prop,'plot_path'); P.ndir=getProperty(prop,'netCDF_path'); P.ecotype=getProperty(prop,'CIMT.eco'); P.otype=otype; P.mooring=getProperty(prop,'mooring'); P.project=getProperty(prop,'project'); P.datefile=getProperty(prop,'datefile'); P.longname=getProperty(prop,'ecodata.longname'); P.units=getProperty(prop,'ecodata.units'); P.fname=getProperty(prop,'ecodata.fname'); P.longitude=getProperty(prop,'CIMT.longitude'); P.latitude=getProperty(prop,'CIMT.latitude'); P.netcdffile=getProperty(prop,'netcdffile'); P.datafile=getProperty(prop,'datafile'); P.waterdepth=getProperty(prop,'CIMT.waterdepth'); P.waterdepth_units=getProperty(prop,'CIMT.waterdepth_units'); P.name=getProperty(prop,'ecodata.name'); P.raw_max=getProperty(prop,'ecodata.raw_max'); P.max=getProperty(prop,'ecodata.max'); P.min=getProperty(prop,'ecodata.min'); P.platform=getProperty(prop,'platform'); calibration.serialnumber =FLNTUS-518 %if strcmp(otype,'data') P.log=getProperty(prop,[otype,'_log']); %else %P.log=getProperty(prop,'plot_log'); %end %if return;