libFAUDES

Sections

Index

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

#include <tp_tgenerator.h>

Inherits faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Inherited by faudes::Executor [private].

List of all members.


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 tGenerator is derived from the cGenerator 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 tGenerator assumes the AttributeCFlags interface. A convenience definition faudes::tGenerator 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 tGenerator 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>

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.
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).
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.

Constructor & Destructor Documentation

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

Constructor.

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 

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 

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 f ile
Exceptions:
Exception 
  • file format errors (id 1, 50, 51, 52)


Member Function Documentation

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

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 >.

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 >.

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

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

Copy to other tGenerator.

Parameters:
rGen generator which will become the copy

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

Copy to other generator (ignore attributes).

Parameters:
rGen generator which will become the copy

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

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

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

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>
Idx faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClocksSize ( void   )  const [inline]

Number of clocks in mClocks.

Returns:
Number of clocks in mClocks

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

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.

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

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

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)

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)

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

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

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

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

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

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

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

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

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

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

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

Clear all invariants.

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 >.

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 >.

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 >.

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

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.

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

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.

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

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.

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.

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

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.

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.

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.

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.

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

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.

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 >.

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.


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

libFAUDES 2.13a c++ source docu by doxygen 1.5.6