Institut de Robòtica i Informàtica Industrial

get

PURPOSE ^

Generic get for sensors

SYNOPSIS ^

function out=get(S,field,varargin)

DESCRIPTION ^

 Generic get for sensors

 Retrives information about a sensor.
 The possible fields to retive are:
     - noise: The noise of the sensor. We assume it constant.
     - allReadings: The set of readings associated with the sensor.
       The nature of these readings depend on the type of sensor.
     - reading: A particular reading (index given as a second paramter).

CROSS-REFERENCE INFORMATION ^

This function calls:
This function is called by:

SOURCE CODE ^

0001 function out=get(S,field,varargin)
0002 % Generic get for sensors
0003 %
0004 % Retrives information about a sensor.
0005 % The possible fields to retive are:
0006 %     - noise: The noise of the sensor. We assume it constant.
0007 %     - allReadings: The set of readings associated with the sensor.
0008 %       The nature of these readings depend on the type of sensor.
0009 %     - reading: A particular reading (index given as a second paramter).
0010 
0011   switch field
0012     case 'noise'
0013       out=S.noise;
0014     case 'allReadings'
0015       out=S.readings;
0016     case 'reading'
0017       out=S.readings{varargin{1}};
0018     otherwise
0019       error('Unknow field in Sensor get');
0020   end
0021


Institut de Robòtica i Informàtica Industrial

Generated on Fri 24-Jul-2009 12:32:50 by m2html © 2003