openETCS
case study for the European Train Control System developed for the authors dissertation
Public Member Functions | Public Attributes | Private Attributes | List of all members
oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow Class Reference

data flow class for executing data flows and embedded control flows More...

#include <EVCStateMachine.h>

Collaboration diagram for oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow:
Collaboration graph

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
CEVCStatem_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

Detailed Description

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.

Constructor & Destructor Documentation

oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::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 ()
explicit

general constructor

Parameterises the data flow with all constant members. The data flow object takes over the posession of the passed DMI object.

Parameters
[in]pStatepointer to the parent EVC state object
[in]ApplicationLevelliteral name of the application level in which this state object is executed
[in]FunctionBlocksvector with pointers to all function block objects
[in]Flowsvector with pointers to all concrete CFlow/function block connection objects
[in]pDMIpointer to the DMI object of the data flow
[in]pFaultStateoptional pointer to the target state in case of a fault

Definition at line 39 of file EVCStateMachine.cpp.

oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::~CDataFlow ( ) throw ()
virtual

destructor

Definition at line 56 of file EVCStateMachine.cpp.

References m_pDMI.

Member Function Documentation

void oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::Execute ( ) throw (::oETCS::DF::Error::CException)
std::vector< oETCS::DF::CFunctionBlock * > oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::GetFunctionBlocks ( ) const throw ()

gets all function block objects

Returns
vector with pointers 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

Parameters
[in]pFlowpointer to a concerete flow object
Returns
active flow flag

Definition at line 113 of file EVCStateMachine.cpp.

References oETCS::DF::CControlFlow::IsActiveFlow(), oETCS::DF::CEVCStateMachine::m_Flows, and oETCS::DF::CEVCStateMachine::m_FunctionBlocks.

Here is the call graph for this function:

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

Parameters
[in]pFunctionBlockpointer to a function block object to be testetd
Returns
active state flag

Definition at line 80 of file EVCStateMachine.cpp.

References oETCS::DF::CEVCStateMachine::CEVCState::IsActiveFunctionBlock(), and oETCS::DF::CEVCStateMachine::m_FunctionBlocks.

Here is the call graph for this function:

Member Data Documentation

::std::vector< oETCS::DF::CAbstractFlow* > oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::m_Flows
private

vector with pointer to all flows/connections used in a data flow

Definition at line 169 of file EVCStateMachine.h.

const ::std::vector< oETCS::DF::CFunctionBlock* > oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::m_FunctionBlocks
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().

CEVCState* oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::m_pFaultState
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().

CEVCState* const oETCS::DF::CEVCStateMachine::CEVCState::CDataFlow::m_pParent
private

pointer to the parent EVC state object

Definition at line 176 of file EVCStateMachine.h.

Referenced by Execute().


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