mbsimhydraulics
4.0.0
MBSim Hydraulics Module
Loading...
Searching...
No Matches
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
30
class
FlowSensor
:
public
MBSimControl::Sensor
{
31
public
:
32
FlowSensor
(
const
std::string &
name
=
""
) :
MBSimControl::Sensor
(
name
), lineString(
""
) {}
33
int
getSignalSize()
const override
{
return
1; }
34
void
updateSignal()
override
;
35
void
initializeUsingXML(xercesc::DOMElement *element)
override
;
36
void
init(
InitStage
stage,
const
MBSim::InitConfigSet &config)
override
;
37
void
setHLine(
HLine
* line_) {line=line_; }
38
protected
:
39
HLine
* line {
nullptr
};
40
std::string lineString;
41
};
42
43
class
PressureSensor
:
public
MBSimControl::Sensor
{
44
public
:
45
PressureSensor
(
const
std::string &
name
=
""
) :
MBSimControl::Sensor
(
name
), nodeString(
""
) {}
46
int
getSignalSize()
const override
{
return
1; }
47
void
updateSignal()
override
;
48
void
initializeUsingXML(xercesc::DOMElement *element)
override
;
49
void
init(
InitStage
stage,
const
MBSim::InitConfigSet &config)
override
;
50
void
setHNode(
HNode
* node_) {node=node_; }
51
protected
:
52
HNode
* node {
nullptr
};
53
std::string nodeString;
54
};
55
56
class
TemperatureSensor
:
public
MBSimControl::Sensor
{
57
public
:
58
TemperatureSensor
(
const
std::string &
name
=
""
) :
MBSimControl::Sensor
(
name
) {}
59
int
getSignalSize()
const override
{
return
1; }
60
void
init(
InitStage
stage,
const
MBSim::InitConfigSet &config)
override
;
61
};
62
63
class
KinematicViscositySensor
:
public
MBSimControl::Sensor
{
64
public
:
65
KinematicViscositySensor
(
const
std::string &
name
=
""
) :
MBSimControl::Sensor
(
name
) {}
66
int
getSignalSize()
const override
{
return
1; }
67
void
init(
InitStage
stage,
const
MBSim::InitConfigSet &config)
override
;
68
};
69
70
}
71
72
#endif
/* ----- #ifndef _HYDRAULIC_SENSOR_H_ ----- */
73
MBSim::Element::InitStage
InitStage
MBSim::Element::name
std::string name
MBSimControl::Sensor
MBSimHydraulics::FlowSensor
Definition
hydraulic_sensor.h:30
MBSimHydraulics::HLine
Definition
hline.h:40
MBSimHydraulics::HNode
Definition
hnode.h:57
MBSimHydraulics::KinematicViscositySensor
Definition
hydraulic_sensor.h:63
MBSimHydraulics::PressureSensor
Definition
hydraulic_sensor.h:43
MBSimHydraulics::TemperatureSensor
Definition
hydraulic_sensor.h:56
mbsim
modules
mbsimHydraulics
mbsimHydraulics
hydraulic_sensor.h
Generated with
Doxygen
using
Doxygen Awesome
on Sun Nov 22 2026