DiaDes  0.1
DIAgnosis of Discrete-Event System
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination > Class Template Reference

#include <StateCreation.hh>

Classes

class  GetStateProperty
 

Public Types

using StateMachine = _StateMachine
 
using StatePropertyId = typename StateMachine::StatePropertyId
 
using StateProperty = _StateProperty
 
using SManager = StatePropertyManager< StateProperty, StatePropertyId >
 
using State = typename StateMachine::State
 

Public Member Functions

 ManagedSynchronisedStateCreation (const std::vector< typename Ptr< StateMachine >::ConstP > &machines, const std::vector< typename Ptr< SManager >::ConstP > &managers, SManager &syncManager)
 
void setStateMachine (StateMachine &target)
 
virtual std::pair< State, bool > newState (const std::vector< State > &states)
 

Protected Attributes

Ptr< std::vector< typename Ptr< StateMachine >::ConstP > >::ConstP _machines
 
Ptr< std::vector< typename Ptr< SManager >::ConstP > >::ConstP _managers
 
Ptr< SManager >::P _syncManager
 
Ptr< StateMachine >::P _target
 
Ptr< std::vector< State > >::ConstP _pstates
 

Detailed Description

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
class Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >

This class is a utility class for some operation on StateMachines It associates a vector of source machines with a target machine. This is the state creator for the Synchronisation operation It is used with ComposableModel as a template parameter.

The template parameters are:

See also
StatePropertyManager

This class is initialised with a vector of StateMachines (i.e. the machines to synchronize) and a vector of StatePropertyManagers (i.e. each StatePropertyManager is associated with each machine). The operator newState is in charge of creating a newState in the target machine by looking at the StatePropertyIds of the local states in the vector 'states' checking the associated StateProperties by combining them with the help of StatePropertyCombination to get a global StateProperty, This global StateProperty is then assigned to a StatePropertyId with the help of the syncManager (StatePropertyManager of the target machine) before the effective creation of a State with the computed StatePropertyId in the target machine.

As a StatePropertyCombination, for instance we use DdAutConjunction to combine the StateProperty of a DdAutFsm.

See also
DdAutConjunction for more information in DdAutFile.hh

Definition at line 716 of file StateCreation.hh.

Member Typedef Documentation

◆ SManager

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
using Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::SManager = StatePropertyManager<StateProperty, StatePropertyId>

Definition at line 739 of file StateCreation.hh.

◆ State

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
using Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::State = typename StateMachine::State

Definition at line 745 of file StateCreation.hh.

◆ StateMachine

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
StateProperty It is a StateProperty associated with a StatePropertyId in a Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::StateMachine

through a StatePropertyManager<StateProperty, StatePropertyId>

Definition at line 723 of file StateCreation.hh.

◆ StateProperty

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
using Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::StateProperty = _StateProperty

Definition at line 734 of file StateCreation.hh.

◆ StatePropertyId

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
State a State of the StateMachine Each State is associated with a Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::StatePropertyId

in a StateMachine and a StateProperty through a SManager

Definition at line 728 of file StateCreation.hh.

Constructor & Destructor Documentation

◆ ManagedSynchronisedStateCreation()

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::ManagedSynchronisedStateCreation ( const std::vector< typename Ptr< StateMachine >::ConstP > &  machines,
const std::vector< typename Ptr< SManager >::ConstP > &  managers,
SManager syncManager 
)
inline
Parameters
machinesa vector of StateMachine pointers (gather the vector of local StateMachine to be synchronised)
managersthe vector of local StatePropertyManager whose StateProperty must be combined. The order is important, the manager *managers[i] is associated with the StateMachine *machines[i].
syncManagerthe StateManager that manages the StateProperty for the the target machine
Postcondition
for the sake of flexibility the target machine where the synchronisation is operated is not yet initialised so the called of newState() is not operating yet. Please use setStateMachine to set the target machine

Definition at line 804 of file StateCreation.hh.

Member Function Documentation

◆ newState()

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
_pstates pointer over the local states given to a call of Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::newState ( const std::vector< State > &  states)
inlinevirtual

Creation of a new state in the target machine associated with the vector of states.

Parameters
statesthe vector of states associated with the input machines
Returns
the created State (bool is true), false if the state already created Update the syncManager by creating an adapted StateProperty

It is a conveniemce variable set at every call of newState(states) to be used in GetStateProperty functor

Reimplemented in Diades::Automata::Experimental::ManagedSynchronisedAcceptingStateCreation< S, I, NS, NI, _StateProperty, StatePropertyCombination >.

Definition at line 872 of file StateCreation.hh.

◆ setStateMachine()

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
void Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::setStateMachine ( StateMachine target)
inline

Set the target machine

Parameters
targetthe new target machine for the synchronisation. If there was a previous target, it is forgotten

Definition at line 820 of file StateCreation.hh.

Member Data Documentation

◆ _machines

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
Ptr<std::vector< typename Ptr<StateMachine>::ConstP> >::ConstP Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::_machines
protected

◆ _managers

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
Ptr<std::vector< typename Ptr<SManager>::ConstP> >::ConstP Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::_managers
protected

◆ _pstates

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
Ptr<std::vector<State> >::ConstP Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::_pstates
protected

◆ _syncManager

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
Ptr<SManager>::P Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::_syncManager
protected

Definition at line 771 of file StateCreation.hh.

◆ _target

template<typename _StateMachine, typename _StateProperty, typename StatePropertyCombination>
Ptr<StateMachine>::P Diades::Automata::Experimental::ManagedSynchronisedStateCreation< _StateMachine, _StateProperty, StatePropertyCombination >::_target
protected

Definition at line 778 of file StateCreation.hh.


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