openETCS
case study for the European Train Control System developed for the authors dissertation
Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
oETCS::DF::PS::SIM::CServiceBrake Class Reference

simulative brake system class for a service brake More...

#include <Simulation.h>

Inheritance diagram for oETCS::DF::PS::SIM::CServiceBrake:
Inheritance graph
Collaboration diagram for oETCS::DF::PS::SIM::CServiceBrake:
Collaboration graph

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

Detailed Description

simulative brake system class for a service brake

Definition at line 155 of file Simulation.h.

Constructor & Destructor Documentation

oETCS::DF::PS::SIM::CServiceBrake::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 ()
explicit

general constructor

Parameters
[in]pOdometerpointer to the odometer device to be manipulated
[in]pEmergencyBrakeoptional pointer to a emergency brake instance
[in]dIntensityoptional initial brake intensity in [%]
[in]dMassoptional 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().

Here is the call graph for this function:

oETCS::DF::PS::SIM::CServiceBrake::~CServiceBrake ( ) throw ()
virtual

destructor

Reimplemented from oETCS::DF::PS::CServiceBrake.

Definition at line 216 of file Simulation.cpp.

References m_bCalculate, and m_pPhysicalCalculation.

Member Function Documentation

void oETCS::DF::CServiceBrake::Error ( const ::QString &  ErrorMessage)
signalinherited

signal for sending an error

This signal should be emitted in the case that an error in the HW ocurres.

Parameters
[in]ErrorMessagetextual description of the error

Definition at line 958 of file PlatformSpecificClientsMOC.cpp.

double oETCS::DF::PS::SIM::CServiceBrake::GetIntensity ( )
virtual

gets the activation intensity

Returns
activation intensity of the service brake in [%]

Reimplemented from oETCS::DF::PS::CServiceBrake.

Definition at line 241 of file Simulation.cpp.

References m_dIntensity, and m_Mutex.

Referenced by GetServiceIntensity().

Here is the caller graph for this function:

void oETCS::DF::PS::SIM::CServiceBrake::OdometerThread ( ) throw ()
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void oETCS::DF::PS::SIM::CServiceBrake::SetAdhesion ( const double &  dAdhesion) throw ()

sets the virtual adhesion

Parameters
[in]dAdhesionnew virtual adhesion factor (0...1)

Definition at line 330 of file Simulation.cpp.

Referenced by SetAdhesion().

Here is the caller graph for this function:

void oETCS::DF::PS::SIM::CServiceBrake::SetIntensity ( const double &  dIntensity)
virtual

sets the activation intensity

Parameters
[in]bIntensitythe 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().

Here is the caller graph for this function:

void oETCS::DF::PS::SIM::CServiceBrake::SetMass ( const double &  dMass) throw ()

sets the virtual mass

Parameters
[in]dMassnew mass in [kg]

Definition at line 301 of file Simulation.cpp.

Referenced by SetMass().

Here is the caller graph for this function:

Member Data Documentation

bool oETCS::DF::PS::SIM::CServiceBrake::m_bCalculate
private

flag for the execution of the m_pPhysicalCalculation thread

Definition at line 227 of file Simulation.h.

Referenced by OdometerThread(), and ~CServiceBrake().

double oETCS::DF::PS::SIM::CServiceBrake::m_dAdhesion
private

adhesion factor {0...1) of the train used for braking curve calculation

Definition at line 248 of file Simulation.h.

Referenced by OdometerThread().

double oETCS::DF::PS::SIM::CServiceBrake::m_dIntensity
private

intesity of the applied service brake in [%]

Definition at line 234 of file Simulation.h.

Referenced by GetIntensity(), OdometerThread(), and SetIntensity().

double oETCS::DF::PS::SIM::CServiceBrake::m_dMass
private

virtual mass in [kg] of the train used for braking curve calculation

Definition at line 241 of file Simulation.h.

Referenced by OdometerThread().

::std::recursive_mutex oETCS::DF::PS::SIM::CServiceBrake::m_Mutex
private

muteable exclusion for internal states

Definition at line 276 of file Simulation.h.

Referenced by GetIntensity(), OdometerThread(), and SetIntensity().

::oETCS::DF::PS::SIM::CEmergencyBrake* const oETCS::DF::PS::SIM::CServiceBrake::m_pEmergencyBrake
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().

::oETCS::DF::PS::SIM::COdometer* const oETCS::DF::PS::SIM::CServiceBrake::m_pOdometer
private

pointer to the odometer in which the velocity is modified

Definition at line 255 of file Simulation.h.

Referenced by OdometerThread().

::std::thread* oETCS::DF::PS::SIM::CServiceBrake::m_pPhysicalCalculation
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().


The documentation for this class was generated from the following files:

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/.