sensor.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023  *
00024  */
00025 
00026 
00033 #ifndef ACADO_TOOLKIT_SENSOR_HPP
00034 #define ACADO_TOOLKIT_SENSOR_HPP
00035 
00036 
00037 #include <acado/utils/acado_utils.hpp>
00038 #include <acado/transfer_device/transfer_device.hpp>
00039 
00040 
00041 BEGIN_NAMESPACE_ACADO
00042 
00043 
00054 class Sensor : public TransferDevice
00055 {
00056     //
00057     // PUBLIC MEMBER FUNCTIONS:
00058     //
00059     public:
00060 
00063         Sensor( );
00064 
00070         Sensor( uint _nY,
00071                                 double _samplingTime = DEFAULT_SAMPLING_TIME
00072                                 );
00073 
00078         Sensor( const Sensor& rhs
00079                                 );
00080 
00083         virtual ~Sensor( );
00084 
00089         Sensor& operator=(      const Sensor& rhs
00090                                                         );
00091 
00092 
00102                 returnValue setOutputNoise(     const Noise& _noise,
00103                                                                         double _noiseSamplingTime
00104                                                                         );
00105 
00116                 returnValue setOutputNoise(     uint idx,
00117                                                                         const Noise& _noise,
00118                                                                         double _noiseSamplingTime
00119                                                                         );
00120 
00121 
00130                 returnValue setOutputDeadTimes( const DVector& _deadTimes
00131                                                                                 );
00132 
00141                 returnValue setOutputDeadTimes( double _deadTime
00142                                                                                 );
00143 
00153                 returnValue setOutputDeadTime(  uint idx,
00154                                                                                 double _deadTime
00155                                                                                 );
00156 
00157 
00166                 virtual returnValue init(       double _startTime = 0.0,
00167                                                                         const DVector& _startValue = emptyConstVector
00168                                                                         );
00169 
00170 
00181                 virtual returnValue step(       VariablesGrid& _y
00182                                                                         );
00183 
00184 
00189                 inline uint getNY( ) const;
00190 
00191 
00198                 inline Noise* getOutputNoise(   uint idx
00199                                                                                 ) const;
00200 
00201 
00208                 inline double getOutputDeadTime(        uint idx
00209                                                                                         ) const;
00210 
00215                 inline DVector getOutputDeadTimes( ) const;
00216 
00217 
00218 
00219     //
00220     // PROTECTED MEMBER FUNCTIONS:
00221     //
00222     protected:
00223 
00231                 returnValue delaySensorOutput(  VariablesGrid& _y
00232                                                                                 );
00233 
00242                 returnValue getDelayedOutputGrid(       const VariablesGrid& _y,
00243                                                                                         VariablesGrid& _yDelayed
00244                                                                                         ) const;
00245 
00253                 returnValue addSensorNoise(     VariablesGrid& _y
00254                                                                         ) const;
00255 
00256 
00257 
00258         //
00259         // DATA MEMBERS:
00260         //
00261         protected:
00262 
00263 };
00264 
00265 
00266 CLOSE_NAMESPACE_ACADO
00267 
00268 
00269 
00270 #include <acado/transfer_device/sensor.ipp>
00271 
00272 
00273 #endif  // ACADO_TOOLKIT_SENSOR_HPP
00274 
00275 /*
00276  *      end of file
00277  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:38:55