LCOV - code coverage report
Current view: top level - models/flight_control - FGFCSComponent.h (source / functions) Hit Total Coverage
Test: JSBSim-Coverage-Statistics Lines: 2 4 50.0 %
Date: 2010-08-24 Functions: 1 3 33.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       2                 :            : 
       3                 :            :  Header:       FGFCSComponent.h
       4                 :            :  Author:       Jon S. Berndt
       5                 :            :  Date started: 05/01/2000
       6                 :            : 
       7                 :            :  ------------- Copyright (C)  -------------
       8                 :            : 
       9                 :            :  This program is free software; you can redistribute it and/or modify it under
      10                 :            :  the terms of the GNU Lesser General Public License as published by the Free Software
      11                 :            :  Foundation; either version 2 of the License, or (at your option) any later
      12                 :            :  version.
      13                 :            : 
      14                 :            :  This program is distributed in the hope that it will be useful, but WITHOUT
      15                 :            :  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      16                 :            :  FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      17                 :            :  details.
      18                 :            : 
      19                 :            :  You should have received a copy of the GNU Lesser General Public License along with
      20                 :            :  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
      21                 :            :  Place - Suite 330, Boston, MA  02111-1307, USA.
      22                 :            : 
      23                 :            :  Further information about the GNU Lesser General Public License can also be found on
      24                 :            :  the world wide web at http://www.gnu.org.
      25                 :            : 
      26                 :            : HISTORY
      27                 :            : --------------------------------------------------------------------------------
      28                 :            : 
      29                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      30                 :            : SENTRY
      31                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
      32                 :            : 
      33                 :            : #ifndef FGFCSCOMPONENT_H
      34                 :            : #define FGFCSCOMPONENT_H
      35                 :            : 
      36                 :            : /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      37                 :            : INCLUDES
      38                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
      39                 :            : 
      40                 :            : #include "FGJSBBase.h"
      41                 :            : #include <string>
      42                 :            : #include <vector>
      43                 :            : 
      44                 :            : /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      45                 :            : DEFINITIONS
      46                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
      47                 :            : 
      48                 :            : #define ID_FCSCOMPONENT "$Id: FGFCSComponent.h,v 1.17 2010/08/21 22:56:11 jberndt Exp $"
      49                 :            : 
      50                 :            : /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      51                 :            : FORWARD DECLARATIONS
      52                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
      53                 :            : 
      54                 :            : namespace JSBSim {
      55                 :            : 
      56                 :            : class FGFCS;
      57                 :            : class FGPropertyManager;
      58                 :            : class Element;
      59                 :            : 
      60                 :            : /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      61                 :            : CLASS DOCUMENTATION
      62                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
      63                 :            : 
      64                 :            : /** Base class for JSBSim Flight Control System Components.
      65                 :            :     The Flight Control System (FCS) for JSBSim consists of the FCS container
      66                 :            :     class (see FGFCS), the FGFCSComponent base class, and the
      67                 :            :     component classes from which can be constructed a string, or channel. See:
      68                 :            : 
      69                 :            :     - FGSwitch
      70                 :            :     - FGGain
      71                 :            :     - FGKinemat
      72                 :            :     - FGFilter
      73                 :            :     - FGDeadBand
      74                 :            :     - FGSummer
      75                 :            :     - FGSensor
      76                 :            :     - FGFCSFunction
      77                 :            :     - FGPID
      78                 :            :     - FGAccelerometer
      79                 :            :     - FGGyro
      80                 :            :     - FGActuator
      81                 :            : 
      82                 :            :     @author Jon S. Berndt
      83                 :            :     @version $Id: FGFCSComponent.h,v 1.17 2010/08/21 22:56:11 jberndt Exp $
      84                 :            :     @see Documentation for the FGFCS class, and for the configuration file class
      85                 :            : */
      86                 :            : 
      87                 :            : /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      88                 :            : CLASS DECLARATION
      89                 :            : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
      90                 :            : 
      91                 :            : class FGFCSComponent : public FGJSBBase
      92                 :            : {
      93                 :            : public:
      94                 :            :   /// Constructor
      95                 :            :   FGFCSComponent(FGFCS* fcs, Element* el);
      96                 :            :   /// Destructor
      97                 :            :   virtual ~FGFCSComponent();
      98                 :            : 
      99                 :            :   virtual bool Run(void);
     100                 :            :   virtual void SetOutput(void);
     101                 :            :   void LateBind(void);
     102                 :    3208830 :   double GetOutput (void) const {return Output;}
     103                 :         43 :   std::string GetName(void) const {return Name;}
     104                 :          0 :   std::string GetType(void) const { return Type; }
     105                 :          0 :   virtual double GetOutputPct(void) const { return 0; }
     106                 :            : 
     107                 :            : protected:
     108                 :            :   FGFCS* fcs;
     109                 :            :   FGPropertyManager* PropertyManager;
     110                 :            :   FGPropertyManager* treenode;
     111                 :            :   std::vector <FGPropertyManager*> OutputNodes;
     112                 :            :   FGPropertyManager* ClipMinPropertyNode;
     113                 :            :   FGPropertyManager* ClipMaxPropertyNode;
     114                 :            :   std::vector <FGPropertyManager*> InputNodes;
     115                 :            :   std::vector <std::string> InputNames;
     116                 :            :   std::vector <float> InputSigns;
     117                 :            :   std::vector <double> output_array;
     118                 :            :   std::string Type;
     119                 :            :   std::string Name;
     120                 :            :   double Input;
     121                 :            :   double Output;
     122                 :            :   double clipmax, clipmin;
     123                 :            :   int delay;
     124                 :            :   int index;
     125                 :            :   float clipMinSign, clipMaxSign;
     126                 :            :   double dt;
     127                 :            :   bool IsOutput;
     128                 :            :   bool clip;
     129                 :            : 
     130                 :            :   void Delay(void);
     131                 :            :   void Clip(void);
     132                 :            :   virtual void bind();
     133                 :            :   virtual void Debug(int from);
     134                 :            : };
     135                 :            : 
     136                 :            : } //namespace JSBSim
     137                 :            : 
     138                 :            : #include "../FGFCS.h"
     139                 :            : 
     140                 :            : #endif
     141                 :            : 

Generated by: LCOV version 1.9