openETCS
case study for the European Train Control System developed for the authors dissertation
|
data flow class for executing data flows and embedded control flows More...
#include <EVCStateMachine.h>
Public Member Functions | |
CDataFlow (CEVCState *const pState, const std::string &ApplicationLevel, const ::std::vector< oETCS::DF::CFunctionBlock * > &FunctionBlocks, const ::std::vector< oETCS::DF::CAbstractFlow * > &Flows, oETCS::DF::CDMISubject *const pDMI, CEVCState *const pFaultState=0) throw () | |
general constructor | |
void | Execute () throw (::oETCS::DF::Error::CException) |
executes all includes CFunctionBlock order (by their order) for one sample point | |
::std::vector < oETCS::DF::CFunctionBlock * > | GetFunctionBlocks () const throw () |
gets all function block objects | |
bool | IsActiveFlow (const oETCS::DF::CAbstractFlow *const pFlow) const throw () |
returns true, if a CFlow object is active in a data flow | |
bool | IsActiveFunctionBlock (const oETCS::DF::CFunctionBlock *const pFunctionBlock) const throw () |
returns true, if a CFunctionBlock objects is active in a data flow | |
virtual | ~CDataFlow () throw () |
destructor |
Public Attributes | |
oETCS::DF::CDMISubject *const | m_pDMI |
pointer to DMI widget of data flow |
Private Attributes | |
::std::vector < oETCS::DF::CAbstractFlow * > | m_Flows |
vector with pointer to all flows/connections used in a data flow | |
const ::std::vector < oETCS::DF::CFunctionBlock * > | m_FunctionBlocks |
vector of pointers to all function blocks used in this data flow in their execution order | |
CEVCState * | m_pFaultState |
optinal pointer to a EVC state object to which is switched in case of a fault | |
CEVCState *const | m_pParent |
pointer to the parent EVC state object |
data flow class for executing data flows and embedded control flows
Is a nested class to gain direct access to its parent class.
Definition at line 87 of file EVCStateMachine.h.
|
explicit |
general constructor
Parameterises the data flow with all constant members. The data flow object takes over the posession of the passed DMI object.
[in] | pState | pointer to the parent EVC state object |
[in] | ApplicationLevel | literal name of the application level in which this state object is executed |
[in] | FunctionBlocks | vector with pointers to all function block objects |
[in] | Flows | vector with pointers to all concrete CFlow/function block connection objects |
[in] | pDMI | pointer to the DMI object of the data flow |
[in] | pFaultState | optional pointer to the target state in case of a fault |
Definition at line 39 of file EVCStateMachine.cpp.
|
virtual |
void oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::Execute | ( | ) | throw (::oETCS::DF::Error::CException) |
executes all includes CFunctionBlock order (by their order) for one sample point
Definition at line 152 of file EVCStateMachine.cpp.
References oETCS::DF::CEnteredTrigger::m_bEnteredState, oETCS::DF::CEVCStateMachine::CEVCState::m_bStateLevelSwitch, m_FunctionBlocks, oETCS::DF::CEVCStateMachine::m_pCurrentState, m_pFaultState, m_pParent, and oETCS::DF::CEVCStateMachine::CEVCState::m_pParent.
std::vector< oETCS::DF::CFunctionBlock * > oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::GetFunctionBlocks | ( | ) | const throw () |
gets all function block objects
Definition at line 68 of file EVCStateMachine.cpp.
References m_FunctionBlocks.
bool oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::IsActiveFlow | ( | const oETCS::DF::CAbstractFlow *const | pFlow | ) | const throw () |
returns true, if a CFlow object is active in a data flow
[in] | pFlow | pointer to a concerete flow object |
Definition at line 113 of file EVCStateMachine.cpp.
References oETCS::DF::CControlFlow::IsActiveFlow(), oETCS::DF::CEVCStateMachine::m_Flows, and oETCS::DF::CEVCStateMachine::m_FunctionBlocks.
bool oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::IsActiveFunctionBlock | ( | const oETCS::DF::CFunctionBlock *const | pFunctionBlock | ) | const throw () |
returns true, if a CFunctionBlock objects is active in a data flow
[in] | pFunctionBlock | pointer to a function block object to be testetd |
Definition at line 80 of file EVCStateMachine.cpp.
References oETCS::DF::CEVCStateMachine::CEVCState::IsActiveFunctionBlock(), and oETCS::DF::CEVCStateMachine::m_FunctionBlocks.
|
private |
vector with pointer to all flows/connections used in a data flow
Definition at line 169 of file EVCStateMachine.h.
|
private |
vector of pointers to all function blocks used in this data flow in their execution order
Definition at line 162 of file EVCStateMachine.h.
Referenced by Execute(), and GetFunctionBlocks().
oETCS::DF::CDMISubject* const oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::m_pDMI |
pointer to DMI widget of data flow
Definition at line 153 of file EVCStateMachine.h.
Referenced by ~CDataFlow().
|
private |
optinal pointer to a EVC state object to which is switched in case of a fault
Definition at line 183 of file EVCStateMachine.h.
Referenced by Execute().
|
private |
pointer to the parent EVC state object
Definition at line 176 of file EVCStateMachine.h.
Referenced by Execute().
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/.