DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <Event.hh>
Public Types | |
typedef Diades::Utils::Exception< Event > | Exception |
typedef unsigned | Id |
typedef string | Label |
typedef EventData * | EventDataPointer |
Public Member Functions | |
Event () | |
Event (const Event &e) | |
bool | isValid () const |
const Label & | label () const |
const Label & | nickname () const |
void | setNickname (const Label &nick) |
Id | id () const |
Event & | operator= (const Event &e) |
bool | operator< (const Event &e) const |
bool | operator== (const Event &e) const |
bool | operator!= (const Event &e) const |
bool | operator> (const Event &e) const |
int | memoryUsage () const |
int | dataMemoryUsage () const |
ostream & | save (ostream &os) const |
istream & | load (istream &is) |
Static Public Member Functions | |
static string | typeName () |
static Event | nullEvent () |
static const Event::Label & | nullEventLabel () |
static Event | getEvent (const Label &evtLabel) |
static Event | getEvent (const Id &evtId) |
static void | allocateEvents (size_t capacity) |
static void | destroyEvents () |
Private Member Functions | |
Event (EventDataPointer data) | |
Private Attributes | |
EventDataPointer | _ptr |
Friends | |
class | EventFactory |
ostream & | operator<< (ostream &os, const Event &e) |
istream & | operator>> (istream &is, Event &e) |
Event associated to a transition An Event is a structure which indicates a "id" (EventId) and a "label" (EventLabel) The default Event has a label 'nullEventLabel'. This structure can be used in a set (operator < ) provided and in a hash table (hash<Event> is defined)
typedef EventData* Diades::Automata::Event::EventDataPointer |
typedef Diades::Utils::Exception<Event> Diades::Automata::Event::Exception |
|
inlineprivate |
Private contructor (only used by the EventFactory)
data | an EventData |
|
inline |
|
inline |
|
static |
allocate memory to store future events
capacity | the storage capacity If more events are allocated there is a dynamic resize |
|
inline |
Definition at line 283 of file Event.hh.
References Diades::Automata::EventData::_id, Diades::Automata::EventData::_label, and Diades::Automata::EventData::_nickname.
|
static |
Destroy any used events (all references become invalid, do not use it)
Referenced by main().
evtLabel | the label of the event |
Referenced by generateSharedEvents(), main(), MealyEncoding(), MealyEncodingV1(), and MooreEncoding().
evtId | the id of the event |
|
inline |
Definition at line 207 of file Event.hh.
References Diades::Automata::EventData::_id, and require.
Referenced by Diades::Automata::Component::beginOfSourceStateOfEvent(), Diades::Automata::ObservableComponent::beginOfSourceStateOfObservableEvent(), Diades::Automata::Component::beginOfTargetStateOfEvent(), Diades::Automata::ObservableComponent::beginOfTargetStateOfObservableEvent(), Diades::Automata::Component::endOfSourceStateOfEvent(), Diades::Automata::ObservableComponent::endOfSourceStateOfObservableEvent(), Diades::Automata::Component::endOfTargetStateOfEvent(), Diades::Automata::ObservableComponent::endOfTargetStateOfObservableEvent(), Diades::Automata::Component::eventTransitionBegin(), Diades::Automata::Component::eventTransitionEnd(), Diades::Automata::ComposableModel::inputEventTransitionBegin(), Diades::Automata::Component::inputEventTransitionBegin(), Diades::Automata::ComposableModel::inputEventTransitionEnd(), Diades::Automata::Component::inputEventTransitionEnd(), Diades::Automata::ObservableComponent::inputObservableTransitionBegin(), Diades::Automata::ObservableComponent::inputObservableTransitionEnd(), Diades::Automata::ObservableMask::isDetectable(), Diades::Automata::ObservableMask::isIdentifiable(), Diades::Automata::ObservableComponent::observableTransitionBegin(), Diades::Automata::ObservableComponent::observableTransitionEnd(), std::hash< Diades::Automata::Event >::operator()(), operator<(), operator==(), Diades::Automata::ComposableModel::outputEventTransitionBegin(), Diades::Automata::Component::outputEventTransitionBegin(), Diades::Automata::ComposableModel::outputEventTransitionEnd(), Diades::Automata::Component::outputEventTransitionEnd(), Diades::Automata::ObservableComponent::outputObservableTransitionBegin(), Diades::Automata::ObservableComponent::outputObservableTransitionEnd(), Diades::Automata::ObservableComponent::unobservableTransitionBegin(), and Diades::Automata::ObservableComponent::unobservableTransitionEnd().
|
inline |
Definition at line 172 of file Event.hh.
Referenced by Diades::Automata::Component::containsEvent(), Diades::Automata::ObservableComponent::containsObservableEvent(), generateSharedEvents(), Diades::Automata::ComposableModel::inputEventTransitionBegin(), Diades::Automata::ComposableModel::inputEventTransitionEnd(), std::hash< Diades::Automata::Event >::operator()(), operator<(), operator==(), Diades::Automata::ComposableModel::outputEventTransitionBegin(), Diades::Automata::Component::outputEventTransitionBegin(), Diades::Automata::ComposableModel::outputEventTransitionEnd(), and Diades::Automata::SynchronisationEvent::synchronisedEvent().
const Label& Diades::Automata::Event::label | ( | ) | const |
Referenced by Diades::Automata::FaultDiagnosis::componentDiagnose(), Diades::Automata::FaultDiagnosis::globalModelDiagnose(), main(), and Diades::Automata::tinyXmlText().
istream& Diades::Automata::Event::load | ( | istream & | is | ) |
Load an event from a stream (dual of save)
is | input stream |
|
inline |
|
inline |
Definition at line 190 of file Event.hh.
References Diades::Automata::EventData::_nickname, and require.
Referenced by exportBackwardToDot(), exportToDesComp(), exportToDot(), and main().
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
os | output stream |
Definition at line 311 of file Event.hh.
References boost::serialization::load(), and require.
|
inline |
Definition at line 197 of file Event.hh.
References Diades::Automata::EventData::_nickname.
Referenced by generateSharedEvents(), and main().
|
inlinestatic |
|
friend |
|
friend |
|
friend |
is | output stream |
e | an Event |
|
private |
Definition at line 117 of file Event.hh.
Referenced by operator=().