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  int getSignalSize() const { return 1; }
35  void updateSignal();
36  void initializeUsingXML(xercesc::DOMElement *element);
37  void init(InitStage stage);
38  void setHLine(HLine * line_) {line=line_; }
39  protected:
40  HLine * line;
41  std::string lineString;
42  };
43 
45  public:
46  PressureSensor(const std::string &name="") : MBSimControl::Sensor(name), node(NULL), nodeString("") {}
47  std::string getType() const { return "PressureSensor"; }
48  int getSignalSize() const { return 1; }
49  void updateSignal();
50  void initializeUsingXML(xercesc::DOMElement *element);
51  void init(InitStage stage);
52  void setHNode(HNode * node_) {node=node_; }
53  protected:
54  HNode * node;
55  std::string nodeString;
56  };
57 
59  public:
60  TemperatureSensor(const std::string &name="") : MBSimControl::Sensor(name) {}
61  std::string getType() const { return "TemperatureSensor"; }
62  int getSignalSize() const { return 1; }
63  void init(InitStage stage);
64  };
65 
67  public:
68  KinematicViscositySensor(const std::string &name="") : MBSimControl::Sensor(name) {}
69  std::string getType() const { return "KinematicViscositySensor"; }
70  int getSignalSize() const { return 1; }
71  void init(InitStage stage);
72  };
73 
74 }
75 
76 #endif /* ----- #ifndef _HYDRAULIC_SENSOR_H_ ----- */
77 
Definition: hydraulic_sensor.h:58
Definition: hline.h:37
Definition: hydraulic_sensor.h:66
Definition: hydraulic_sensor.h:30
Definition: hnode.h:56
Definition: hydraulic_sensor.h:44

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML