25 #ifndef __OETCS_DF_EVCSTATEMACHINE_H__
26 #define __OETCS_DF_EVCSTATEMACHINE_H__
35 #include "Error/ExceptionTypes.h"
37 #include <condition_variable>
44 namespace oETCS {
namespace UT {
class CEVCStateMachine; } }
45 namespace oETCS {
namespace UT {
class CFunctionBlock; } }
46 namespace oETCS {
namespace DF {
class CFunctionBlock; } }
47 namespace oETCS {
namespace DF {
class CAbstractFlow; } }
48 namespace oETCS {
namespace DF {
class CEVCCondition; } }
49 namespace oETCS {
namespace DF {
class CEVCStateMachine; } }
50 namespace oETCS {
namespace DF {
class CDMIObserver; } }
51 namespace oETCS {
namespace DF {
class CDMISubject; } }
52 namespace oETCS {
namespace DF {
class CEVCTransition; } }
53 namespace oETCS {
namespace DF {
class CLevelCondition; } }
56 namespace oETCS {
namespace DF {
class CTransition; } }
57 namespace oETCS {
namespace DF {
class CLanguage; } }
58 namespace oETCS {
namespace DF {
class CStorage; } }
59 namespace oETCS {
namespace DF {
class CDMIInput; } }
60 namespace oETCS {
namespace DF {
class CDMIOutput; } }
103 explicit 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();
169 ::std::vector< oETCS::DF::CAbstractFlow* >
m_Flows;
223 void Start() throw(::oETCS::DF::Error::CException);
528 void Start(
CEVCState * const pStartState, const std::
string & ApplicationLevel) throw(::oETCS::DF::Error::CException);
535 void Stop() throw(::oETCS::DF::Error::CException);
629 friend class oETCS::DF::CLevelCondition;
632 #ifdef __HAS_UNIT_TEST__
636 #endif // #ifdef __HAS_UNIT_TEST__
701 unsigned int GetPriority()
const throw();
751 template<
class INPUT_TYPE_T>
760 explicit CInput()
throw();
769 explicit CInput(
const INPUT_TYPE_T& Value)
throw();
778 INPUT_TYPE_T& operator=(
const INPUT_TYPE_T& NewValue)
throw();
790 bool IsModified()
throw();
801 INPUT_TYPE_T operator()()
throw();
814 const INPUT_TYPE_T operator()()
const throw();
876 virtual
void Calculate() throw(::oETCS::DF::Error::CException) = 0;
901 template<class INPUT_TYPE_T>
914 template<
class INPUT_TYPE_T>
928 template<
class INPUT_TYPE_T>
942 m_ValueMutex.unlock();
953 template<
class INPUT_TYPE_T>
957 bool bModified(m_bModified);
968 m_ValueMutex.unlock();
980 template<
class INPUT_TYPE_T>
995 m_ValueMutex.unlock();
1007 template<
class INPUT_TYPE_T>
1016 m_ValueMutex.lock();
1022 m_ValueMutex.unlock();
1082 template<
class INPUT_TYPE_T,
class FLOW_TYPE_T = ::oETCS::DF::CFunctionBlock::CInput< INPUT_TYPE_T > >
1101 void operator=(
const INPUT_TYPE_T& Value)
throw();
1117 template<
class INPUT_TYPE_T,
class FLOW_TYPE_T>
1131 template<
class INPUT_TYPE_T,
class FLOW_TYPE_T>
1136 if (m_pStateMachine->GetActiveState() ==
nullptr || m_pStateMachine->GetActiveState()->IsActiveFlow(
this))
1142 #ifdef __DEBUG_OUTPUT__
1144 ::std::cerr << std::this_thread::get_id() <<
" " <<
"CFlow::operator=() ----> value " << Value <<
" set in flow " <<
this << ::std::endl;
1458 explicit CDMISubject(const ::std::vector< oETCS::DF::CDMIInput * >& Inputs, const ::std::vector< oETCS::DF::CDMIOutput * >& Outputs)
throw();
1510 virtual void Update()
throw() = 0;
1517 virtual void Detached()
throw() = 0;
1543 ::std::ostream& operator<<(::std::ostream & OutStream, const ::std::vector< double >& Vector)
throw();
1552 #endif // __ OETCS_DF_EVCSTATEMACHINE_H__