faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > Class Template Reference
[Timed Automata PlugIn]

Generator with timing extensions. More...

#include <tp_tgenerator.h>

List of all members.

Public Member Functions

 TtGenerator (void)
 Constructor.
 TtGenerator (const TtGenerator &rOtherGen)
 Copy constructor.
 TtGenerator (const vGenerator &rOtherGen)
 Copy constructor (no attributes).
virtual TtGeneratoroperator= (const TtGenerator &rOtherGen)
 Assignment operator (uses copy) Note: you must reimplement this operator in derived classes in order to handle internal pointers correctly.
virtual TtGeneratoroperator= (const vGenerator &rOtherGen)
 Assignment operator (uses copy).
 TtGenerator (const std::string &rFileName)
 Construct from file.
TtGeneratorNew (void) const
 Construct on heap.
TtGeneratorCopy (void) const
 Construct copy on heap.
virtual const TypeCast (const Type *pOther) const
 Type test.
TtGenerator NewTGen (void) const
 Construct on stack.
SymbolTableClockSymbolTablep (void) const
 Get Pointer to mpClockSymbolTable.
void ClockSymbolTablep (SymbolTable *pClockSymTab)
 Set ClockSymbolTable.
ClockSet NewClockSet (void) const
 Return a NameSet with generator's ClockSymbolTable.
ClockSetNewClockSetp (void) const
 Construct a clock on heap.
Idx ClocksSize (void) const
 Number of clocks in mClocks.
const ClockSetClocks (void) const
 Get clockset as const reference.
ClockSetClocksp (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 TimeConstraintInvariant (Idx idx) const
 Get invariant of state by index.
TimeConstraintInvariantp (Idx idx)
 Get invariant of state by index.
const TimeConstraintInvariant (const std::string &name) const
 Get invariant of state by name.
TimeConstraintInvariantp (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 TimeConstraintGuard (const Transition &rTrans) const
 Gets Guard refernce of a transition.
TimeConstraintGuardp (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 ClockSetResets (const Transition &rTrans) const
 Gets Resets refernce of a transition.
ClockSetResetsp (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.

Detailed Description

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
class faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >

Generator with timing extensions.

Alur's Timed Automata

The TtGenerator implements a timed automaton as introduced by Alur et al. Thus, a TtGenerator is equipped with a number of clock variables to express conditions on timing, so called time constraints. Each state has a TimeConstraint called the invariant, which must be satisfied while the generator resides in the respective state. Similarly, each transition has a timeconstraint called the guard, which must be satisfied at the moment in which the transition is executed. Transitions may also reset clock variables.

Implementation

The TimedGenerator is derived from the System and requires adequate attribute parameters that implement the timing constraints. Suitable attribute classes are provided by AttributeTimedState, AttributeTimedTrans and AttributeTimedGlobal which may be used either directly or as base classes for further derivatives. For the event attribute, the TimedGenerator assumes the AttributeCFlags interface. A convenience definition faudes::TimedGenerator is used for a minimal version with the above mentioned attribute parameters.

File IO

The TtGenerator calsses use the TaGenerator file IO, i.e. the file format is the same up to timing related requirements from the attribute parameters. The below example is from the basic version TimedGenerator and represents a simplemachine with a busy cycle of at least 5 and at most 10 time units.

 <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 101 of file tp_tgenerator.h.


Constructor & Destructor Documentation

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TtGenerator ( void   )  [inline]

Constructor.

Definition at line 818 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TtGenerator ( const TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen  )  [inline]

Copy constructor.

Parameters:
rOtherGen 

Definition at line 827 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TtGenerator ( const vGenerator rOtherGen  )  [inline]

Copy constructor (no attributes).

Parameters:
rOtherGen 

Definition at line 833 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TtGenerator ( const std::string &  rFileName  )  [inline]

Construct from file.

Parameters:
rFileName Name of file
Exceptions:
Exception 
  • file format errors (id 1, 50, 51, 52)

Definition at line 842 of file tp_tgenerator.h.


Member Function Documentation

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ActiveClocks ( void   )  const [inline]

Returns all clocks used by all TimeConstraints and Resets.

Should be a subset of Clocks()

Returns:
ClockSet containing all clocks

Definition at line 994 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual const Type* faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Cast ( const Type pOther  )  const [inline, virtual]

Type test.

Uses C++ dynamic cast to test whether the specified object casts to a TimedGenerator.

Returns:
TtGenerator reference if dynamic cast succeeds, else NULL

Reimplemented from faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 177 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClearInvariants ( void   )  [inline]

Clear all invariants.

Definition at line 1164 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClockIndex ( const std::string &  rName  )  const [inline]

Looks up clock index for given name.

Parameters:
rName Clock name
Returns:
Clock index or 0 for nonexistent

Definition at line 989 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
std::string faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClockName ( Idx  index  )  const [inline]

Looks up clock name for given index.

Parameters:
index Clock index
Returns:
Clock name

Definition at line 984 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const ClockSet & faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Clocks ( void   )  const [inline]

Get clockset as const reference.

Returns:
mClocks

Definition at line 896 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet::Iterator faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClocksBegin ( void   )  const [inline]

Iterator to Begin() of mClocks.

Returns:
iterator to begin of mClocks

Definition at line 1033 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet::Iterator faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClocksEnd ( void   )  const [inline]

Iterator to End() of mClocks.

Returns:
iterator to end of mClocks

Definition at line 1038 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet * faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Clocksp ( void   )  [inline]

Get clockset as pointer.

Returns:
mClocks

Definition at line 901 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClocksSize ( void   )  const [inline]

Number of clocks in mClocks.

Returns:
Number of clocks in mClocks

Definition at line 891 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClockSymbolTablep ( SymbolTable pClockSymTab  )  [inline]

Set ClockSymbolTable.

Parameters:
pClockSymTab Pointer SymbolTable

Definition at line 854 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
SymbolTable * faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClockSymbolTablep ( void   )  const [inline]

Get Pointer to mpClockSymbolTable.

Returns:
Pointer mpClockSymbolTable

Definition at line 849 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrGuard ( const Transition rTrans  )  [inline]

Clears Guard of a transition.

Parameters:
rTrans transition to manupilate

Definition at line 1291 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrInvariant ( const std::string &  name  )  [inline]

Clear invariant of state by name.

Parameters:
name State name

Definition at line 1158 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrInvariant ( Idx  idx  )  [inline]

Clear invariant of state by index.

Parameters:
idx State index

Definition at line 1152 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrResets ( const Transition rTrans  )  [inline]

Clears Resets of a transition.

Parameters:
rTrans transition to manupilate

Definition at line 1361 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ConsistentClocks ( const ClockSet rClocks  )  const [inline]

Throw exception if clocksset contains clocks not in generators clockset or symboltable mismatch.

Exceptions:
Exception 
  • invalid cock (id 200)

Definition at line 1060 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ConsistentTimeConstraint ( const TimeConstraint rTimeConstr  )  const [inline]

Throw exception if timeconstraint refers to clocks not in clockset or symboltable mismatch.

Exceptions:
Exception 
  • invalid cock (id 200)

Definition at line 1043 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > * faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Copy ( void   )  const [inline, virtual]

Construct copy on heap.

Constructs a TtGenerator on heap with the same attribute types and the same event- and clock-symboltable.

Returns:
new Generator

Reimplemented from faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 874 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
std::string faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CStr ( Idx  index  )  const [inline]

Return pretty printable clock name for index.

Primary meant for debugging messages

Parameters:
index Event index
Returns:
std::string

Reimplemented in faudes::Executor.

Definition at line 1431 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelClock ( const std::string &  rName  )  [inline]

Delete clock from generator by name.

mpClockSymbolTable stays untouched. Also removes constraints and resets that refer to this clock

Parameters:
rName Name of clock
Returns:
True if clock did exist

Definition at line 947 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelClock ( Idx  index  )  [inline]

Delete clock from generator by index.

This also removes any constraints and resets that refer to that clock.

Parameters:
index Index of clock
Returns:
True if clock did exist

Definition at line 928 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelClocks ( const ClockSet rClocks  )  [inline]

Delete a set of clocks from generator.

Parameters:
rClocks ClockSet containing clocks to remove

Definition at line 953 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelInactiveClocks ( void   )  [inline]

Update Clocks not to include any inactive clocks.

Definition at line 1026 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsClock ( const std::string &  rName  )  const [inline]

Test existence of clock in mClock.

Parameters:
rName Clock name
Returns:
True if clock exists

Definition at line 968 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsClock ( Idx  index  )  const [inline]

Test existence of clock in mClocks.

Parameters:
index Clock index
Returns:
true / false

Definition at line 963 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet::Iterator faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::FindClock ( const std::string &  rName  )  const [inline]

Returns an iterator to clock index in mClock.

Parameters:
rName Clock name of index to find
Returns:
ClockSet::Iterator to clock index

Definition at line 979 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet::Iterator faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::FindClock ( Idx  index  )  const [inline]

Returns a niterator to clock index in mClock.

Parameters:
index Index to find
Returns:
ClockSet::Iterator to clock index

Definition at line 974 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const TimeConstraint & faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Guard ( const Transition rTrans  )  const [inline]

Gets Guard refernce of a transition.

Parameters:
rTrans transition to inspect
Returns:
Guard of transition.

Definition at line 1236 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Guard ( const Transition rTrans,
const TimeConstraint rGuard 
) [inline]

Sets Guard of a transition.

Parameters:
rTrans transition to manupilate
rGuard new Guard of transition.

Definition at line 1262 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TimeConstraint * faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Guardp ( const Transition rTrans  )  [inline]

Gets Guard pointer of ransition.

Parameters:
rTrans transition to inspect
Returns:
Guard of transition.

Definition at line 1249 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InactiveClocks ( void   )  const [inline]

Returns all clocks not used by any TimeConstraints or Reset.

Returns:
ClockSet containing all unused clocks

Definition at line 1011 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InjectClocks ( const ClockSet newclocks  )  [inline]

Overwrites mClocks with newclocks without consistency check.

Parameters:
newclocks New clocks that are written to mClocks

Definition at line 906 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsActiveClocks ( void   )  [inline]

Update Clocks to include all active clocks.

Definition at line 1019 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Idx faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsClock ( const std::string &  rName  )  [inline]

Add named clock to generator.

An entry in the mpClockSymbolTable will be made if clock is new.

Parameters:
rName Name of the clock to add
Returns:
New unique index

Definition at line 917 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsClock ( Idx  index  )  [inline]

Add an existing clock to mClcoks by index.

Parameters:
index Clock index
Returns:
True if clock was new to clockset

Definition at line 912 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsClocks ( const ClockSet rClockSet  )  [inline]

Add new named clocks to generator.

Parameters:
rClockSet ClockSet

Definition at line 922 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsGuard ( const Transition rTrans,
const TimeConstraint rConstraints 
) [inline]

adds constraints to Guard of a transition

Parameters:
rTrans transition to manupilate
rConstraints new constraints for Guard

Definition at line 1276 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsInvariant ( Idx  index,
const TimeConstraint rConstraints 
) [inline]

Ins invariant of state by name.

Parameters:
index State index
rConstraints New constraints

Definition at line 1129 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsInvariant ( const std::string &  name,
const TimeConstraint rConstraints 
) [inline]

Ins invariant of state by name.

Parameters:
name State name
rConstraints New constraints

Definition at line 1145 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsResets ( const Transition rTrans,
const ClockSet rMoreResets 
) [inline]

adds Resets of a transition

Parameters:
rTrans transition to manupilate
rMoreResets new Resets of transition.

Definition at line 1345 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariant ( const std::string &  name,
const TimeConstraint rConstraints 
) [inline]

Set invariant of state by name.

Parameters:
name State name
rConstraints New constraints

Definition at line 1122 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariant ( Idx  index,
const TimeConstraint rConstraints 
) [inline]

Set invariant of state by index.

Parameters:
index State index
rConstraints New constraints

Definition at line 1107 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const TimeConstraint & faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariant ( const std::string &  name  )  const [inline]

Get invariant of state by name.

Parameters:
name State name
Returns:
Const ref to invariant

Definition at line 1095 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const TimeConstraint & faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariant ( Idx  idx  )  const [inline]

Get invariant of state by index.

Parameters:
idx State index
Returns:
Const ref to invariant

Definition at line 1075 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TimeConstraint * faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariantp ( const std::string &  name  )  [inline]

Get invariant of state by name.

Parameters:
name State index
Returns:
Pointer to invariant

Definition at line 1101 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TimeConstraint * faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariantp ( Idx  idx  )  [inline]

Get invariant of state by index.

Parameters:
idx State index
Returns:
Pointer to invariant

Definition at line 1085 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > * faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::New ( void   )  const [inline, virtual]

Construct on heap.

Constructs a TtGenerator on heap with the same attribute types and the same event- and clock-symboltable.

Returns:
new Generator

Reimplemented from faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 861 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewClockSet ( void   )  const

Return a NameSet with generator's ClockSymbolTable.

Returns:
New empty ClockSet on stack
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet* faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewClockSetp ( void   )  const

Construct a clock on heap.

Returns:
Pointer to new empty ClockSet on heap
template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewTGen ( void   )  const [inline]

Construct on stack.

Constructs a TtGenerator on stack with the same attribute types and the same event- and clock-symboltable.

Returns:
new Generator

Definition at line 882 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual TtGenerator& faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::operator= ( const vGenerator rOtherGen  )  [inline, virtual]

Assignment operator (uses copy).

Parameters:
rOtherGen Other generator

Reimplemented from faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 138 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual TtGenerator& faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::operator= ( const TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen  )  [inline, virtual]

Assignment operator (uses copy) Note: you must reimplement this operator in derived classes in order to handle internal pointers correctly.

Parameters:
rOtherGen Other generator

Definition at line 130 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const ClockSet & faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Resets ( const Transition rTrans  )  const [inline]

Gets Resets refernce of a transition.

Parameters:
rTrans transition to inspect
Returns:
Resets of transition.

Definition at line 1305 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Resets ( const Transition rTrans,
const ClockSet rResets 
) [inline]

Sets Resets of a transition.

Parameters:
rTrans transition to manupilate
rResets new Resets of transition.

Definition at line 1331 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
ClockSet * faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Resetsp ( const Transition rTrans  )  [inline]

Gets Resets pointer of ransition.

Parameters:
rTrans transition to inspect
Returns:
Resets of transition.

Definition at line 1318 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2,
const TimeConstraint rGuard = TimeConstraint(),
const ClockSet rResets = ClockSet() 
) [inline]

Inserts new TimedTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and all clocks in rguard and rResetClocks.

Parameters:
rX1 Start state of new TimedTransition.
rEv Event of new TimedTransition.
rX2 Goal state of new TimedTransition.
rGuard Guard of new TimedTransition.
rResets Reset clocks of new TimedTransition.
Returns:
True, if the transition was new the generator

Definition at line 1213 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( Idx  x1,
Idx  ev,
Idx  x2,
const TimeConstraint rguard,
const ClockSet rResetClocks = ClockSet() 
) [inline]

Inserts new TimedTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and all clocks in rguard and rResetClocks.

Parameters:
x1 Start state of new TimedTransition.
ev Event of new TimedTransition.
x2 Goal state of new TimedTransition.
rguard Guard of new TimedTransition.
rResetClocks Reset clocks of new TimedTransition.

Definition at line 1207 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const Transition rTrans,
const TimeConstraint rGuard = TimeConstraint(),
const ClockSet rResets = ClockSet() 
) [inline]

Inserts new TimedTransition constructed from parameters.

Performs consistency checks for x1, x2, ev and all clocks in rguard and rResetClocks.

Parameters:
rTrans new transition
rGuard Guard of new TimedTransition.
rResets Reset clocks of new TimedTransition.
Returns:
True, if the transition was new the generator

Definition at line 1187 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const Transition rTransition,
const TransAttr &  rAttr 
) [inline]

Add a transition with attribute to generator.

States and event must already exist!

Define FAUDES_CHECKED for consistency checks.

Parameters:
rTransition transition
rAttr attribute
Returns:
True, if the transition was new the generator

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 1182 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( const std::string &  rX1,
const std::string &  rEv,
const std::string &  rX2 
) [inline]

Add a transition to generator by names.

Statename and eventname must already exist!

Parameters:
rX1 Predecessor state name
rEv Event name
rX2 Successor state name
Returns:
True, if the transition was new the generator
Exceptions:
Exception 
  • state or event not in generator (id 95)
  • state name not known (id 90)
  • event name not known (id 66)

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 1171 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetTransition ( Idx  x1,
Idx  ev,
Idx  x2 
) [inline]

Add a transition to generator by indices.

States and event must already exist!

Define FAUDES_CHECKED for consistency checks.

Parameters:
x1 Predecessor state index
ev Event index
x2 Successor state index
Returns:
True, if the transition was new the generator
Exceptions:
Exception 
  • state or event not in generator (id 95)

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 1177 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::UpdateAttributes ( void   )  [inline, virtual]

Updates internal attributes.

As a demo, we set state flag 0x20000000 for blocking states. Reimplement to your needs.

Returns:
true if value changed

Reimplemented from faudes::vGenerator.

Definition at line 1408 of file tp_tgenerator.h.

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Valid ( void   )  [inline, virtual]

Check if generator is valid.

Returns:
Success

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 1375 of file tp_tgenerator.h.


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

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen