DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Member Functions | Private Attributes | List of all members
Diades::Automata::ParametrizedSynchronisation Class Reference

#include <SynchronisationRules.hh>

Public Member Functions

 ParametrizedSynchronisation (const ComponentVector &components)
 
 ParametrizedSynchronisation ()
 
void init (const ComponentVector &components)
 
void synchronise (Event e)
 
void synchronise (const vector< Event > &e)
 
void synchronise (const vector< Event > &e, bool relaxation)
 
void close ()
 
void open ()
 
bool isLocked () const
 
void clear ()
 
- Public Member Functions inherited from Diades::Automata::SynchronisationRules
 SynchronisationRules (const ComponentVector &components)
 
 SynchronisationRules ()
 
void setComponentVector (const ComponentVector &components)
 
SynchronisationIterator beginOfSynchronisedEvents () const
 
SynchronisationIterator endOfSynchronisedEvents () const
 
size_type numberOfComponents () const
 
size_type size () const
 
ComponentIterator beginOfComponents () const
 
ComponentIterator endOfComponents () const
 
const ComponentgetComponent (size_type index) const
 
ComponentIterator findComponent (const string &name) const
 
ComponentIterator findComponent (const Component &component) const
 
bool operator== (const SynchronisationRules &rules) const
 
void getSynchronisationEvents (const Component &component, Event event, list< SynchronisationEvent::ConstPointer > &events) const
 
bool valid () const
 

Private Attributes

bool _locked
 
set< set< Event > > _isSynchronized
 

Additional Inherited Members

- Public Types inherited from Diades::Automata::SynchronisationRules
typedef Diades::Utils::Exception< SynchronisationRulesException
 
typedef vector< const Component * > ComponentVector
 
typedef ComponentVector::size_type size_type
 
typedef list< SynchronisationEvent >::const_iterator SynchronisationIterator
 
typedef _ComponentIterator ComponentIterator
 
- Static Public Member Functions inherited from Diades::Automata::SynchronisationRules
static string typeName ()
 
- Protected Attributes inherited from Diades::Automata::SynchronisationRules
ComponentVector _components
 
list< SynchronisationEvent_synchros
 

Detailed Description

This class allows to setup a customised set of synchronisation rules by successively adding set of events to synchronise. Once the set of events to synchronise is declared, it is required to close the rules. Closing the rules consists in adding the SynchronisationEvent objects that will correspond to the events that are not synchronised (but that are asynchronous and thus must be triggered). In case new events should be synchronised, it is possible to open again but a closure is necessary before sending this SynchronisationRules to a ComposableModel.

Definition at line 528 of file SynchronisationRules.hh.

Constructor & Destructor Documentation

◆ ParametrizedSynchronisation() [1/2]

Diades::Automata::ParametrizedSynchronisation::ParametrizedSynchronisation ( const ComponentVector components)
Parameters
componentsthe set of components If no synchronise operation is performed and just a close operation, then generate the free product of components

◆ ParametrizedSynchronisation() [2/2]

Diades::Automata::ParametrizedSynchronisation::ParametrizedSynchronisation ( )
inline

Default constructor

Definition at line 543 of file SynchronisationRules.hh.

Member Function Documentation

◆ clear()

void Diades::Automata::ParametrizedSynchronisation::clear ( )

clear the rules

◆ close()

void Diades::Automata::ParametrizedSynchronisation::close ( )

closure. Complement the SynchronisationRules but adding SynchronisationEvents representing the fact that the synchronisation is asynchronous. That is if e1 is not synchronised with anything (by the use of the synchronise operator) then close() will add the SynchronisationEvent (empty,empty,e1,....empty) to th set of rules

◆ init()

void Diades::Automata::ParametrizedSynchronisation::init ( const ComponentVector components)
Parameters
componentsthe set of components If no synchronise operation is performed and just a close operation, then generate the free product of components

◆ isLocked()

bool Diades::Automata::ParametrizedSynchronisation::isLocked ( ) const
inline
Returns
true if the rules are locked (close() has been called). To unlock, call open again.

Definition at line 597 of file SynchronisationRules.hh.

◆ open()

void Diades::Automata::ParametrizedSynchronisation::open ( )

when close() is called, it is then not possible to use the synchronise method again until the method open() is called

Referenced by main().

◆ synchronise() [1/3]

void Diades::Automata::ParametrizedSynchronisation::synchronise ( Event  e)
Parameters
eEvent Add the synchronisation of the transition labelled with event e in the set of synchronised rules

◆ synchronise() [2/3]

void Diades::Automata::ParametrizedSynchronisation::synchronise ( const vector< Event > &  e)
Parameters
eset of Event Add the synchronisation of the transitions labelled with the set of event e in the set of synchronised rules for instance if e = (e1,e2) then a transition labelled with e1 will be synchronised with a transition labelled with e2. vector e must be compatible with the component vector if e = [e1,e2] and e1 belongs to component c1 and e2 belongs to component c2 then c1 must be before c2 in the associated current component vector.

◆ synchronise() [3/3]

void Diades::Automata::ParametrizedSynchronisation::synchronise ( const vector< Event > &  e,
bool  relaxation 
)
Parameters
eset of Event
relaxationRelaxation mode Add the synchronisation of the transitions labelled with the set of event e in the set of synchronised rules for instance if e = (e1,e2) then a transition labelled with e1 will be synchronised with a transition labelled with e2. If relaxation mode is set to true, the synchronisation will be relaxed in the sense that transitions (e1,empty) and (empty,e2) will also be triggered (see KanJohn et al, Synthesis of a Distributed and Accurate Diagnoser, DX2010) vector e must be compatible with the component vector if e = [e1,e2] and e1 belongs to component c1 and e2 belongs to component c2 then c1 must be before c2 in the associated current component vector.

Member Data Documentation

◆ _isSynchronized

set< set<Event> > Diades::Automata::ParametrizedSynchronisation::_isSynchronized
private

Definition at line 531 of file SynchronisationRules.hh.

◆ _locked

bool Diades::Automata::ParametrizedSynchronisation::_locked
private

Definition at line 530 of file SynchronisationRules.hh.


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