DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <SynchronisationRules.hh>
Public Types | |
typedef Diades::Utils::Exception< SynchronisationRules > | Exception |
typedef vector< const Component * > | ComponentVector |
typedef ComponentVector::size_type | size_type |
typedef list< SynchronisationEvent >::const_iterator | SynchronisationIterator |
typedef _ComponentIterator | ComponentIterator |
Public Member Functions | |
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 Component & | getComponent (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 |
Static Public Member Functions | |
static string | typeName () |
Protected Attributes | |
ComponentVector | _components |
list< SynchronisationEvent > | _synchros |
Friends | |
ostream & | operator<< (ostream &os, const SynchronisationRules &rules) |
This class defines a synchronisation law between components. It is implemented as a list of SynchronisationEvent objects. Off course, the SynchronisationEvent objects must be consistent with each other (same components that are involved). When a composition is performed based on such SynchronisationRules, it means that only synchronised events from this list are triggered. It means, for instance, if an event from a component involved in the SynchronisationEvent objects is not present in at least one of the SynchronisationEvent, then the event cannot occur in the synchronisation, the component cannot trigger it.
The class SynchronisationRules is the most generic one and should never be used. Use the derived classes instead or define new ones.
Definition at line 333 of file SynchronisationRules.hh.
Definition at line 349 of file SynchronisationRules.hh.
typedef vector<const Component *> Diades::Automata::SynchronisationRules::ComponentVector |
Definition at line 340 of file SynchronisationRules.hh.
typedef Diades::Utils::Exception<SynchronisationRules> Diades::Automata::SynchronisationRules::Exception |
Definition at line 339 of file SynchronisationRules.hh.
typedef ComponentVector::size_type Diades::Automata::SynchronisationRules::size_type |
Definition at line 347 of file SynchronisationRules.hh.
typedef list<SynchronisationEvent>::const_iterator Diades::Automata::SynchronisationRules::SynchronisationIterator |
Definition at line 348 of file SynchronisationRules.hh.
Diades::Automata::SynchronisationRules::SynchronisationRules | ( | const ComponentVector & | components | ) |
Parametrized constructor
components |
|
inline |
Default constructor
Definition at line 362 of file SynchronisationRules.hh.
|
inline |
Definition at line 402 of file SynchronisationRules.hh.
|
inline |
Definition at line 374 of file SynchronisationRules.hh.
Referenced by exportLogIntoPtaLogFile(), and main().
|
inline |
Definition at line 409 of file SynchronisationRules.hh.
|
inline |
Definition at line 381 of file SynchronisationRules.hh.
Referenced by exportLogIntoPtaLogFile(), and main().
ComponentIterator Diades::Automata::SynchronisationRules::findComponent | ( | const string & | name | ) | const |
component |
ComponentIterator Diades::Automata::SynchronisationRules::findComponent | ( | const Component & | component | ) | const |
component |
|
inline |
index | an index between 0 and numberOfComponents()-1 |
Definition at line 420 of file SynchronisationRules.hh.
References Diades::Automata::_ComponentIterator::index(), and require.
void Diades::Automata::SynchronisationRules::getSynchronisationEvents | ( | const Component & | component, |
Event | event, | ||
list< SynchronisationEvent::ConstPointer > & | events | ||
) | const |
|
inline |
Definition at line 388 of file SynchronisationRules.hh.
|
inline |
equality operator (value)
Definition at line 446 of file SynchronisationRules.hh.
References _components, and _synchros.
void Diades::Automata::SynchronisationRules::setComponentVector | ( | const ComponentVector & | components | ) |
components | a ComponentVector |
|
inline |
Definition at line 395 of file SynchronisationRules.hh.
|
inlinestatic |
Definition at line 336 of file SynchronisationRules.hh.
|
inline |
Definition at line 464 of file SynchronisationRules.hh.
References Diades::Automata::operator<<().
|
friend |
Output stream operator
os | output stream |
rules | the SynchronisationRules |
components: comp1, comp2,comp3,..., compN; rules: <compi.evti, compj.evtj, compk.evtk> ... <compl.evtl, comps.evts, ...>;
|
protected |
Definition at line 344 of file SynchronisationRules.hh.
Referenced by operator==().
|
protected |
Definition at line 345 of file SynchronisationRules.hh.
Referenced by operator==().