openETCS
case study for the European Train Control System developed for the authors dissertation
Macros | Functions | Variables
WrapperFunctions.h File Reference
#include <QtCore>
#include <QtDBus>
#include <QMutex>
#include "oETCS/DF/OdometerAdaptor.h"
#include "oETCS/DF/EmergencyBrakeAdaptor.h"
#include "oETCS/DF/ServiceBrakeAdaptor.h"
#include "oETCS/DF/BaliseDeviceInAdaptor.h"
#include "oETCS/DF/BaliseDeviceOutAdaptor.h"
#include "oETCS/DF/PS/SIM/DMIInterface.h"
#include "Simulation.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __EVC_DBUS__   "tcp:host=192.168.56.1,port=2222"
 C wrapper functions for the simulative PSM classes.

Functions

int DMIHasInput ()
 gets the DMI input status
void EvaluateDMIInputs (int *pDMIType)
 gets the type of the first DMI input
void GetDMIOutput (const char *const pName, char **const ppValue)
 gets a certain DMI output value
int GetEmergencyActivation ()
 gets the activation state
double GetPosition ()
 gets the current position from the odometer object
double GetServiceIntensity ()
 gets the activation intensity
double GetVelocity ()
 gets the current speed from the odometer object
int InitDMI ()
 initialises the module global DMI proxy
void InitPSM ()
 PSM D-Bus adaptor initialisations.
static void QAppThread (bool *pInitialised)
 thread function for the QCoreApplication instance
void ResetPosition (double dPosition)
 (re)sets the position of the odometer object
void SetAdhesion (double dAdhesion)
 sets the virtual adhesion
void SetDMIBooleanValue (const char *const pInputName, int iValue)
 sets a boolean input value in the DMI
void SetDMIDoubleValue (const char *const pInputName, double dValue)
 sets a double input value in the DMI
void SetDMIIntegerValue (const char *const pInputName, int iValue)
 sets an integer input value in the DMI
void SetDMIStringValue (const char *const pInputName, const char *const pValue)
 sets a string input value in the DMI
void SetEmergencyActivation (int iActication)
 sets the activation state
void SetMass (double dMass)
 sets the virtual mass
void SetNewInputTelegram (char *pTelegram, int iBits)
 sets a telegram as received for the PIM
void SetNewInputTelegramBinary (const int *const pTelegram, int iBits)
 sets a telegram as received for the PIM in a binary format
void SetServiceIntensity (double dIntensity)
 sets the activation intensity
void SetVelocity (double dVelocity)
 sets the speed in the odomoeter object

Variables

const int G_SIZE_TELEGRAM_LEVEL_0_TO_1
 global size of global telegram for ETCS Application Level switchtes from 0 to 1
const int G_SIZE_TELEGRAM_STOP_IN_SR
 global size of global telegram for ETCS Application Level switchtes from 0 to 1
const int G_TELEGRAM_LEVEL_0_TO_1 []
 global telegram for ETCS Application Level switchtes from 0 to 1
const int G_TELEGRAM_LEVEL_STOP_IN_SR []
 global telegram for ETCS Application Level switchtes from 0 to 1

Macro Definition Documentation

#define __EVC_DBUS__   "tcp:host=192.168.56.1,port=2222"

C wrapper functions for the simulative PSM classes.

Author
Johannes Feuser feuse.nosp@m.r@un.nosp@m.i-bre.nosp@m.men..nosp@m.de

Definition at line 49 of file WrapperFunctions.h.

Function Documentation

int DMIHasInput ( )

gets the DMI input status

Returns
!=0, if a any (new) input field was found

Definition at line 290 of file WrapperFunctions.cpp.

References InitDMI(), and m_pDMI.

Here is the call graph for this function:

void EvaluateDMIInputs ( int *  pDMIType)

gets the type of the first DMI input

Parameters
[out]pDMITypepointer to the integer with the current DMI type value

Definition at line 655 of file WrapperFunctions.cpp.

References InitDMI(), and m_pDMI.

Here is the call graph for this function:

void GetDMIOutput ( const char *const  pName,
char **const  ppValue 
)

gets a certain DMI output value

Parameters
[in]pNamepointer to name of the output field
[out]ppValuepointer of pointer to value of the output field, de- and allocated by this function

Definition at line 337 of file WrapperFunctions.cpp.

References InitDMI(), and m_pDMI.

Here is the call graph for this function:

int GetEmergencyActivation ( )

gets the activation state

Returns
activation flag of the emergency brake (!=0: true)

Definition at line 951 of file WrapperFunctions.cpp.

References oETCS::DF::PS::SIM::CEmergencyBrake::GetActivation(), and m_pEmergencyBrake.

Here is the call graph for this function:

double GetPosition ( )

gets the current position from the odometer object

Returns
current position [m]

Definition at line 879 of file WrapperFunctions.cpp.

References oETCS::DF::PS::SIM::COdometer::GetAbsolutePosition(), and m_pOdometer.

Here is the call graph for this function:

double GetServiceIntensity ( )

gets the activation intensity

Returns
activation intensity of the service brake in [%]

Definition at line 903 of file WrapperFunctions.cpp.

References oETCS::DF::PS::SIM::CServiceBrake::GetIntensity(), and m_pServiceBrake.

Here is the call graph for this function:

double GetVelocity ( )

gets the current speed from the odometer object

Returns
current speed [km/h]

Definition at line 843 of file WrapperFunctions.cpp.

References oETCS::DF::PS::SIM::COdometer::GetVelocity(), and m_pOdometer.

Here is the call graph for this function:

int InitDMI ( )

initialises the module global DMI proxy

Returns
!=0, if the DMI proxy was initialised sucessfully

Definition at line 232 of file WrapperFunctions.cpp.

References m_pDMI.

Referenced by DMIHasInput(), EvaluateDMIInputs(), GetDMIOutput(), SetDMIBooleanValue(), SetDMIDoubleValue(), SetDMIIntegerValue(), and SetDMIStringValue().

Here is the caller graph for this function:

void InitPSM ( )

PSM D-Bus adaptor initialisations.

Definition at line 198 of file WrapperFunctions.cpp.

References QAppThread().

Here is the call graph for this function:

static void QAppThread ( bool *  pInitialised)
static

thread function for the QCoreApplication instance

Parameters
[out]pInitialisedpointer to boolean to the set initialisation status

Definition at line 106 of file WrapperFunctions.cpp.

References m_pBaliseInDevice, m_pBaliseOutDevice, m_pDMI, m_pEmergencyBrake, m_pOdometer, and m_pServiceBrake.

Referenced by InitPSM().

Here is the caller graph for this function:

void ResetPosition ( double  dPosition)

(re)sets the position of the odometer object

Parameters
[in]dPositionnew position in [m]

Definition at line 867 of file WrapperFunctions.cpp.

References m_pOdometer, and oETCS::DF::PS::SIM::COdometer::ResetPosition().

Here is the call graph for this function:

void SetAdhesion ( double  dAdhesion)

sets the virtual adhesion

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

Definition at line 927 of file WrapperFunctions.cpp.

References m_pServiceBrake, and oETCS::DF::PS::SIM::CServiceBrake::SetAdhesion().

Here is the call graph for this function:

void SetDMIBooleanValue ( const char *const  pInputName,
int  iValue 
)

sets a boolean input value in the DMI

Parameters
[in]pInputNameliteral name of the input field
[in]iValueinput value

Definition at line 413 of file WrapperFunctions.cpp.

References InitDMI(), and m_pDMI.

Here is the call graph for this function:

void SetDMIDoubleValue ( const char *const  pInputName,
double  dValue 
)

sets a double input value in the DMI

Parameters
[in]pInputNameliteral name of the input field
[in]iValueinput value

Definition at line 505 of file WrapperFunctions.cpp.

References InitDMI(), and m_pDMI.

Here is the call graph for this function:

void SetDMIIntegerValue ( const char *const  pInputName,
int  iValue 
)

sets an integer input value in the DMI

Parameters
[in]pInputNameliteral name of the input field
[in]iValueinput value

Definition at line 464 of file WrapperFunctions.cpp.

References InitDMI(), and m_pDMI.

Here is the call graph for this function:

void SetDMIStringValue ( const char *const  pInputName,
const char *const  pValue 
)

sets a string input value in the DMI

Parameters
[in]pInputNameliteral name of the input field
[in]pValueinput value (C-string)

Definition at line 546 of file WrapperFunctions.cpp.

References InitDMI(), and m_pDMI.

Here is the call graph for this function:

void SetEmergencyActivation ( int  iActication)

sets the activation state

Parameters
[in]iActivatedthe new activation flag (!=0: true)

Definition at line 939 of file WrapperFunctions.cpp.

References m_pEmergencyBrake, and oETCS::DF::PS::SIM::CEmergencyBrake::SetActivation().

Here is the call graph for this function:

void SetMass ( double  dMass)

sets the virtual mass

Parameters
[in]dMassnew mass in [kg]

Definition at line 915 of file WrapperFunctions.cpp.

References m_pServiceBrake, and oETCS::DF::PS::SIM::CServiceBrake::SetMass().

Here is the call graph for this function:

void SetNewInputTelegram ( char *  pTelegram,
int  iBits 
)

sets a telegram as received for the PIM

Parameters
[in]pTelegrampointer to bytes of the telegram
[in]iBitsnumber bits included in the telegram

Definition at line 588 of file WrapperFunctions.cpp.

References m_pBaliseInDevice, and oETCS::DF::PS::SIM::CBaliseDeviceIn::SetNewInputTelegram().

Here is the call graph for this function:

void SetNewInputTelegramBinary ( const int *const  pTelegram,
int  iBits 
)

sets a telegram as received for the PIM in a binary format

Parameters
[in]pTelegrampointer to bits of the telegram
[in]iBitsnumber bits included in the telegram

Definition at line 622 of file WrapperFunctions.cpp.

References m_pBaliseInDevice, and oETCS::DF::PS::SIM::CBaliseDeviceIn::SetNewInputTelegram().

Here is the call graph for this function:

void SetServiceIntensity ( double  dIntensity)

sets the activation intensity

Parameters
[in]bIntensitythe new activation intensity in [%]

Definition at line 891 of file WrapperFunctions.cpp.

References m_pServiceBrake, and oETCS::DF::PS::SIM::CServiceBrake::SetIntensity().

Here is the call graph for this function:

void SetVelocity ( double  dVelocity)

sets the speed in the odomoeter object

Parameters
[in]dVelocitynew speed in [km/h]

Definition at line 855 of file WrapperFunctions.cpp.

References m_pOdometer, and oETCS::DF::PS::SIM::COdometer::SetVelocity().

Here is the call graph for this function:

Variable Documentation

const int G_SIZE_TELEGRAM_LEVEL_0_TO_1

global size of global telegram for ETCS Application Level switchtes from 0 to 1

Definition at line 83 of file WrapperFunctions.cpp.

const int G_SIZE_TELEGRAM_STOP_IN_SR

global size of global telegram for ETCS Application Level switchtes from 0 to 1

Definition at line 100 of file WrapperFunctions.cpp.

const int G_TELEGRAM_LEVEL_0_TO_1[]

global telegram for ETCS Application Level switchtes from 0 to 1

Definition at line 73 of file WrapperFunctions.cpp.

const int G_TELEGRAM_LEVEL_STOP_IN_SR[]

global telegram for ETCS Application Level switchtes from 0 to 1

Definition at line 90 of file WrapperFunctions.cpp.


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