All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
hydraulic_sensor.h
1 /* Copyright (C) 2004-2009 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: markus.ms.schneider@gmail.com
18  */
19 
20 #ifndef _HYDRAULIC_SENSOR_H_
21 #define _HYDRAULIC_SENSOR_H_
22 
23 #include "mbsimControl/sensor.h"
24 
25 namespace MBSimHydraulics {
26 
27  class HNode;
28  class HLine;
29 
31  public:
32  FlowSensor(const std::string &name="") : MBSimControl::Sensor(name), line(NULL), lineString("") {}
33  std::string getType() const { return "FlowSensor"; }
34  fmatvec::VecV getSignal();
35  void initializeUsingXML(xercesc::DOMElement *element);
36  void init(InitStage stage);
37  void setHLine(HLine * line_) {line=line_; }
38  protected:
39  HLine * line;
40  std::string lineString;
41  };
42 
44  public:
45  PressureSensor(const std::string &name="") : MBSimControl::Sensor(name), node(NULL), nodeString("") {}
46  std::string getType() const { return "PressureSensor"; }
47  fmatvec::VecV getSignal();
48  void initializeUsingXML(xercesc::DOMElement *element);
49  void init(InitStage stage);
50  void setHNode(HNode * node_) {node=node_; }
51  protected:
52  HNode * node;
53  std::string nodeString;
54  };
55 
57  public:
58  TemperatureSensor(const std::string &name="") : MBSimControl::Sensor(name), T(1) {}
59  std::string getType() const { return "TemperatureSensor"; }
60  fmatvec::VecV getSignal() {return T; }
61  void init(InitStage stage);
62  private:
63  fmatvec::VecV T;
64  };
65 
67  public:
68  KinematicViscositySensor(const std::string &name="") : MBSimControl::Sensor(name), nu(1) {}
69  std::string getType() const { return "KinematicViscositySensor"; }
70  fmatvec::VecV getSignal() {return nu; }
71  void init(InitStage stage);
72  private:
73  fmatvec::VecV nu;
74  };
75 
76 }
77 
78 #endif /* ----- #ifndef _HYDRAULIC_SENSOR_H_ ----- */
79 
Definition: hydraulic_sensor.h:56
Definition: hline.h:41
Definition: hydraulic_sensor.h:66
Definition: hydraulic_sensor.h:30
Definition: hnode.h:62
Definition: hydraulic_sensor.h:43

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML