#include <tp_tgenerator.h>
Inheritance diagram for faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >:
<Generator> "tc simple machine" <Alphabet> "alpha" +C+ "beta" "mue" "lambda" +C+ </Alphabet> <States> "idle" "busy" <Invariant> "cBusy" "LT" 10 </Invariant> "down" </States> <TransRel> "idle" "alpha" "busy" <Timing> <Resets> "cBusy" </Resets> </Timing> "busy" "beta" "idle" <Timing> <Guard> "cBusy" "GT" 5 </Guard> </Timing> "busy" "mue" "down" "down" "lambda" "idle" </TransRel> <InitStates> "idle" </InitStates> <MarkedStates> "idle" </MarkedStates> <Clocks> "cBusy" </Clocks> </Generator>
Definition at line 102 of file tp_tgenerator.h.
Public Member Functions | |
TtGenerator (void) | |
Constructor. | |
TtGenerator (const TtGenerator &rOtherGen) | |
Copy constructor. | |
TtGenerator (const vGenerator &rOtherGen) | |
Copy constructor (no attributes). | |
TtGenerator (const std::string &rFileName) | |
Construct from file. | |
TtGenerator * | NewP (void) const |
Construct on heap. | |
TtGenerator | NewTGen (void) const |
Construct on stack. | |
virtual void | Copy (TtGenerator &rGen) const |
Copy to other tGenerator. | |
virtual void | Copy (vGenerator &rGen) const |
Copy to other generator (ignore attributes). | |
SymbolTable * | ClockSymbolTablep (void) const |
Get Pointer to mpClockSymbolTable. | |
void | ClockSymbolTablep (SymbolTable *pClockSymTab) |
Set ClockSymbolTable. | |
ClockSet | NewClockSet (void) const |
Return a NameSet with generator's ClockSymbolTable. | |
ClockSet * | NewClockSetp (void) const |
Construct a clock on heap. | |
Idx | ClocksSize (void) const |
Number of clocks in mClocks. | |
const ClockSet & | Clocks (void) const |
Get clockset as const reference. | |
ClockSet * | Clocksp (void) |
Get clockset as pointer. | |
void | InjectClocks (const ClockSet &newclocks) |
Overwrites mClocks with newclocks without consistency check. | |
std::string | ClockName (Idx index) const |
Looks up clock name for given index. | |
Idx | ClockIndex (const std::string &rName) const |
Looks up clock index for given name. | |
bool | InsClock (Idx index) |
Add an existing clock to mClcoks by index. | |
Idx | InsClock (const std::string &rName) |
Add named clock to generator. | |
void | InsClocks (const ClockSet &rClockSet) |
Add new named clocks to generator. | |
bool | DelClock (Idx index) |
Delete clock from generator by index. | |
bool | DelClock (const std::string &rName) |
Delete clock from generator by name. | |
void | DelClocks (const ClockSet &rClocks) |
Delete a set of clocks from generator. | |
bool | ExistsClock (Idx index) const |
Test existence of clock in mClocks. | |
bool | ExistsClock (const std::string &rName) const |
Test existence of clock in mClock. | |
ClockSet::Iterator | FindClock (Idx index) const |
Returns a niterator to clock index in mClock. | |
ClockSet::Iterator | FindClock (const std::string &rName) const |
Returns an iterator to clock index in mClock. | |
ClockSet | ActiveClocks (void) const |
Returns all clocks used by all TimeConstraints and Resets. | |
ClockSet | InactiveClocks (void) const |
Returns all clocks not used by any TimeConstraints or Reset. | |
void | InsActiveClocks (void) |
Update Clocks to include all active clocks. | |
void | DelInactiveClocks (void) |
Update Clocks not to include any inactive clocks. | |
ClockSet::Iterator | ClocksBegin (void) const |
Iterator to Begin() of mClocks. | |
ClockSet::Iterator | ClocksEnd (void) const |
Iterator to End() of mClocks. | |
void | ConsistentTimeConstraint (const TimeConstraint &rTimeConstr) const |
Throw exception if timeconstraint refers to clocks not in clockset or symboltable mismatch. | |
void | ConsistentClocks (const ClockSet &rClocks) const |
Throw exception if clocksset contains clocks not in generators clockset or symboltable mismatch. | |
const TimeConstraint & | Invariant (Idx idx) const |
Get invariant of state by index. | |
TimeConstraint * | Invariantp (Idx idx) |
Get invariant of state by index. | |
const TimeConstraint & | Invariant (const std::string &name) const |
Get invariant of state by name. | |
TimeConstraint * | Invariantp (const std::string &name) |
Get invariant of state by name. | |
void | Invariant (Idx index, const TimeConstraint &rConstraints) |
Set invariant of state by index. | |
void | Invariant (const std::string &name, const TimeConstraint &rConstraints) |
Set invariant of state by name. | |
void | InsInvariant (const std::string &name, const TimeConstraint &rConstraints) |
Ins invariant of state by name. | |
void | InsInvariant (Idx index, const TimeConstraint &rConstraints) |
Ins invariant of state by name. | |
void | ClrInvariant (Idx idx) |
Clear invariant of state by index. | |
void | ClrInvariant (const std::string &name) |
Clear invariant of state by name. | |
void | ClearInvariants (void) |
Clear all invariants. | |
bool | SetTransition (Idx x1, Idx ev, Idx x2) |
Add a transition to generator by indices. | |
bool | SetTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2) |
Add a transition to generator by names. | |
bool | SetTransition (const Transition &rTransition, const TransAttr &rAttr) |
Add a transition with attribute to generator. | |
bool | SetTransition (const Transition &rTrans, const TimeConstraint &rGuard=TimeConstraint(), const ClockSet &rResets=ClockSet()) |
Inserts new TimedTransition constructed from parameters. | |
bool | SetTransition (Idx x1, Idx ev, Idx x2, const TimeConstraint &rguard, const ClockSet &rResetClocks=ClockSet()) |
Inserts new TimedTransition constructed from parameters. | |
bool | SetTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2, const TimeConstraint &rGuard=TimeConstraint(), const ClockSet &rResets=ClockSet()) |
Inserts new TimedTransition constructed from parameters. | |
void | Guard (const Transition &rTrans, const TimeConstraint &rGuard) |
Sets Guard of a transition. | |
void | InsGuard (const Transition &rTrans, const TimeConstraint &rConstraints) |
adds constraints to Guard of a transition | |
const TimeConstraint & | Guard (const Transition &rTrans) const |
Gets Guard refernce of a transition. | |
TimeConstraint * | Guardp (const Transition &rTrans) |
Gets Guard pointer of ransition. | |
void | ClrGuard (const Transition &rTrans) |
Clears Guard of a transition. | |
void | Resets (const Transition &rTrans, const ClockSet &rResets) |
Sets Resets of a transition. | |
void | InsResets (const Transition &rTrans, const ClockSet &rMoreResets) |
adds Resets of a transition | |
const ClockSet & | Resets (const Transition &rTrans) const |
Gets Resets refernce of a transition. | |
ClockSet * | Resetsp (const Transition &rTrans) |
Gets Resets pointer of ransition. | |
void | ClrResets (const Transition &rTrans) |
Clears Resets of a transition. | |
std::string | CStr (Idx index) const |
Return pretty printable clock name for index. | |
virtual bool | Valid (void) |
Check if generator is valid. | |
virtual bool | UpdateAttributes (void) |
Updates internal attributes. |
|
Constructor.
Definition at line 789 of file tp_tgenerator.h. |
|
Copy constructor.
Definition at line 798 of file tp_tgenerator.h. |
|
Copy constructor (no attributes).
Definition at line 804 of file tp_tgenerator.h. |
|
Construct from file.
Definition at line 813 of file tp_tgenerator.h. |
|
Returns all clocks used by all TimeConstraints and Resets. Should be a subset of Clocks()
Definition at line 973 of file tp_tgenerator.h. |
|
Clear all invariants.
Definition at line 1143 of file tp_tgenerator.h. |
|
Looks up clock index for given name.
Definition at line 968 of file tp_tgenerator.h. |
|
Looks up clock name for given index.
Definition at line 963 of file tp_tgenerator.h. |
|
Get clockset as const reference.
Definition at line 875 of file tp_tgenerator.h. |
|
Iterator to Begin() of mClocks.
Definition at line 1012 of file tp_tgenerator.h. |
|
Iterator to End() of mClocks.
Definition at line 1017 of file tp_tgenerator.h. |
|
Get clockset as pointer.
Definition at line 880 of file tp_tgenerator.h. |
|
Number of clocks in mClocks.
Definition at line 870 of file tp_tgenerator.h. |
|
Set ClockSymbolTable.
Definition at line 842 of file tp_tgenerator.h. |
|
Get Pointer to mpClockSymbolTable.
Definition at line 837 of file tp_tgenerator.h. |
|
Clears Guard of a transition.
Definition at line 1270 of file tp_tgenerator.h. |
|
Clear invariant of state by name.
Definition at line 1137 of file tp_tgenerator.h. |
|
Clear invariant of state by index.
Definition at line 1131 of file tp_tgenerator.h. |
|
Clears Resets of a transition.
Definition at line 1340 of file tp_tgenerator.h. |
|
Throw exception if clocksset contains clocks not in generators clockset or symboltable mismatch.
Definition at line 1039 of file tp_tgenerator.h. |
|
Throw exception if timeconstraint refers to clocks not in clockset or symboltable mismatch.
Definition at line 1022 of file tp_tgenerator.h. |
|
Copy to other generator (ignore attributes).
Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >. Definition at line 828 of file tp_tgenerator.h. |
|
Copy to other tGenerator.
Definition at line 819 of file tp_tgenerator.h. |
|
Return pretty printable clock name for index. Primary meant for debugging messages
Reimplemented in faudes::Executor. Definition at line 1410 of file tp_tgenerator.h. |
|
Delete clock from generator by name. mpClockSymbolTable stays untouched. Also removes constraints and resets that refer to this clock
Definition at line 926 of file tp_tgenerator.h. |
|
Delete clock from generator by index. This also removes any constraints and resets that refer to that clock.
Definition at line 907 of file tp_tgenerator.h. |
|
Delete a set of clocks from generator.
Definition at line 932 of file tp_tgenerator.h. |
|
Update Clocks not to include any inactive clocks.
Definition at line 1005 of file tp_tgenerator.h. |
|
Test existence of clock in mClock.
Definition at line 947 of file tp_tgenerator.h. |
|
Test existence of clock in mClocks.
Definition at line 942 of file tp_tgenerator.h. |
|
Returns an iterator to clock index in mClock.
Definition at line 958 of file tp_tgenerator.h. |
|
Returns a niterator to clock index in mClock.
Definition at line 953 of file tp_tgenerator.h. |
|
Gets Guard refernce of a transition.
Definition at line 1215 of file tp_tgenerator.h. |
|
Sets Guard of a transition.
Definition at line 1241 of file tp_tgenerator.h. |
|
Gets Guard pointer of ransition.
Definition at line 1228 of file tp_tgenerator.h. |
|
Returns all clocks not used by any TimeConstraints or Reset.
Definition at line 990 of file tp_tgenerator.h. |
|
Overwrites mClocks with newclocks without consistency check.
Definition at line 885 of file tp_tgenerator.h. |
|
Update Clocks to include all active clocks.
Definition at line 998 of file tp_tgenerator.h. |
|
Add named clock to generator. An entry in the mpClockSymbolTable will be made if clock is new.
Definition at line 896 of file tp_tgenerator.h. |
|
Add an existing clock to mClcoks by index.
Definition at line 891 of file tp_tgenerator.h. |
|
Add new named clocks to generator.
Definition at line 901 of file tp_tgenerator.h. |
|
adds constraints to Guard of a transition
Definition at line 1255 of file tp_tgenerator.h. |
|
Ins invariant of state by name.
Definition at line 1108 of file tp_tgenerator.h. |
|
Ins invariant of state by name.
Definition at line 1124 of file tp_tgenerator.h. |
|
adds Resets of a transition
Definition at line 1324 of file tp_tgenerator.h. |
|
Set invariant of state by name.
Definition at line 1101 of file tp_tgenerator.h. |
|
Set invariant of state by index.
Definition at line 1086 of file tp_tgenerator.h. |
|
Get invariant of state by name.
Definition at line 1074 of file tp_tgenerator.h. |
|
Get invariant of state by index.
Definition at line 1054 of file tp_tgenerator.h. |
|
Get invariant of state by name.
Definition at line 1080 of file tp_tgenerator.h. |
|
Get invariant of state by index.
Definition at line 1064 of file tp_tgenerator.h. |
|
Return a NameSet with generator's ClockSymbolTable.
|
|
Construct a clock on heap.
|
|
Construct on heap.
Reimplemented from faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >. Definition at line 849 of file tp_tgenerator.h. |
|
Construct on stack.
Definition at line 861 of file tp_tgenerator.h. |
|
Gets Resets refernce of a transition.
Definition at line 1284 of file tp_tgenerator.h. |
|
Sets Resets of a transition.
Definition at line 1310 of file tp_tgenerator.h. |
|
Gets Resets pointer of ransition.
Definition at line 1297 of file tp_tgenerator.h. |
|
Inserts new TimedTransition constructed from parameters. Performs consistency checks for x1, x2, ev and all clocks in rguard and rResetClocks.
Definition at line 1192 of file tp_tgenerator.h. |
|
Inserts new TimedTransition constructed from parameters. Performs consistency checks for x1, x2, ev and all clocks in rguard and rResetClocks.
Definition at line 1186 of file tp_tgenerator.h. |
|
Inserts new TimedTransition constructed from parameters. Performs consistency checks for x1, x2, ev and all clocks in rguard and rResetClocks.
Definition at line 1166 of file tp_tgenerator.h. |
|
Add a transition with attribute to generator. States and event must already exist! Define FAUDES_CHECKED for consistency checks.
Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >. Definition at line 1161 of file tp_tgenerator.h. |
|
Add a transition to generator by names. Statename and eventname must already exist!
Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >. Definition at line 1150 of file tp_tgenerator.h. |
|
Add a transition to generator by indices. States and event must already exist! Define FAUDES_CHECKED for consistency checks.
Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >. Definition at line 1156 of file tp_tgenerator.h. |
|
Updates internal attributes. As a demo, we set state flag 0x20000000 for blocking states. Reimplement to your needs.
Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >. Definition at line 1387 of file tp_tgenerator.h. |
|
Check if generator is valid.
Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >. Definition at line 1354 of file tp_tgenerator.h. |