openETCS
case study for the European Train Control System developed for the authors dissertation
|
simulative brake system class for a service brake More...
#include <Simulation.h>
Signals | |
void | Error (const ::QString &ErrorMessage) |
signal for sending an error |
Public Member Functions | |
CServiceBrake (::oETCS::DF::PS::SIM::COdometer *const pOdometer,::oETCS::DF::PS::SIM::CEmergencyBrake *const pEmergencyBrake=nullptr, const double &dIntensity=0.0, const double &dMass=10000, const double &dAdhesion=1.0) throw () | |
general constructor | |
virtual double | GetIntensity () |
gets the activation intensity | |
void | SetAdhesion (const double &dAdhesion) throw () |
sets the virtual adhesion | |
virtual void | SetIntensity (const double &dIntensity) |
sets the activation intensity | |
void | SetMass (const double &dMass) throw () |
sets the virtual mass | |
virtual | ~CServiceBrake () throw () |
destructor |
Private Member Functions | |
void | OdometerThread () throw () |
thread for setting the velocity depending on the brake intensity |
Private Attributes | |
bool | m_bCalculate |
flag for the execution of the m_pPhysicalCalculation thread | |
double | m_dAdhesion |
adhesion factor {0...1) of the train used for braking curve calculation | |
double | m_dIntensity |
intesity of the applied service brake in [%] | |
double | m_dMass |
virtual mass in [kg] of the train used for braking curve calculation | |
::std::recursive_mutex | m_Mutex |
muteable exclusion for internal states | |
::oETCS::DF::PS::SIM::CEmergencyBrake *const | m_pEmergencyBrake |
optional pointer to a emegency brake taken into account for brake curve calculation | |
::oETCS::DF::PS::SIM::COdometer *const | m_pOdometer |
pointer to the odometer in which the velocity is modified | |
::std::thread * | m_pPhysicalCalculation |
pointer to the thread object for the physical model calculation manipulating m_pOdometer |
simulative brake system class for a service brake
Definition at line 155 of file Simulation.h.
|
explicit |
general constructor
[in] | pOdometer | pointer to the odometer device to be manipulated |
[in] | pEmergencyBrake | optional pointer to a emergency brake instance |
[in] | dIntensity | optional initial brake intensity in [%] |
[in] | dMass | optional initial train mass [kg] |
in[ | dAdsesion: optional initial adhesion factor (0...1) |
Definition at line 175 of file Simulation.cpp.
References m_pOdometer, and OdometerThread().
|
virtual |
destructor
Reimplemented from oETCS::DF::PS::CServiceBrake.
Definition at line 216 of file Simulation.cpp.
References m_bCalculate, and m_pPhysicalCalculation.
|
signalinherited |
signal for sending an error
This signal should be emitted in the case that an error in the HW ocurres.
[in] | ErrorMessage | textual description of the error |
Definition at line 958 of file PlatformSpecificClientsMOC.cpp.
|
virtual |
gets the activation intensity
Reimplemented from oETCS::DF::PS::CServiceBrake.
Definition at line 241 of file Simulation.cpp.
References m_dIntensity, and m_Mutex.
Referenced by GetServiceIntensity().
|
private |
thread for setting the velocity depending on the brake intensity
Definition at line 365 of file Simulation.cpp.
References __DATA_FLOW_SAMPLE_TIME__, oETCS::DF::PS::SIM::CEmergencyBrake::GetActivation(), oETCS::DF::PS::SIM::COdometer::GetVelocity(), m_bCalculate, m_dAdhesion, m_dIntensity, m_dMass, m_Mutex, m_pEmergencyBrake, m_pOdometer, and oETCS::DF::PS::SIM::COdometer::SetVelocity().
Referenced by CServiceBrake().
void oETCS::DF::PS::SIM::CServiceBrake::SetAdhesion | ( | const double & | dAdhesion | ) | throw () |
sets the virtual adhesion
[in] | dAdhesion | new virtual adhesion factor (0...1) |
Definition at line 330 of file Simulation.cpp.
Referenced by SetAdhesion().
|
virtual |
sets the activation intensity
[in] | bIntensity | the new activation intensity in [%] |
Reimplemented from oETCS::DF::PS::CServiceBrake.
Definition at line 266 of file Simulation.cpp.
References m_dIntensity, and m_Mutex.
Referenced by SetServiceIntensity().
void oETCS::DF::PS::SIM::CServiceBrake::SetMass | ( | const double & | dMass | ) | throw () |
sets the virtual mass
[in] | dMass | new mass in [kg] |
Definition at line 301 of file Simulation.cpp.
Referenced by SetMass().
|
private |
flag for the execution of the m_pPhysicalCalculation thread
Definition at line 227 of file Simulation.h.
Referenced by OdometerThread(), and ~CServiceBrake().
|
private |
adhesion factor {0...1) of the train used for braking curve calculation
Definition at line 248 of file Simulation.h.
Referenced by OdometerThread().
|
private |
intesity of the applied service brake in [%]
Definition at line 234 of file Simulation.h.
Referenced by GetIntensity(), OdometerThread(), and SetIntensity().
|
private |
virtual mass in [kg] of the train used for braking curve calculation
Definition at line 241 of file Simulation.h.
Referenced by OdometerThread().
|
private |
muteable exclusion for internal states
Definition at line 276 of file Simulation.h.
Referenced by GetIntensity(), OdometerThread(), and SetIntensity().
|
private |
optional pointer to a emegency brake taken into account for brake curve calculation
Definition at line 262 of file Simulation.h.
Referenced by OdometerThread().
|
private |
pointer to the odometer in which the velocity is modified
Definition at line 255 of file Simulation.h.
Referenced by OdometerThread().
|
private |
pointer to the thread object for the physical model calculation manipulating m_pOdometer
Definition at line 269 of file Simulation.h.
Referenced by ~CServiceBrake().
Copyright (C) 2010-2012 Johannes Feuser (feuser@uni-bremen.de)
The openETCS library is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or any later version.
The openETCS library is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with the openETCS library. If not, see
"http://www.gnu.org/licenses/.