libFAUDES

Sections

Index

faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > Class Template Reference
[Multitasking PlugIn]

#include <mtc_generator.h>

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

List of all members.


Detailed Description

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

Allows to create colored marking generators (CMGs) as the common five tupel consisting of alphabet, stateset, transition relation, initial states, marked states, and attributes for state and event properties.

Thus, it is possible to set a control status for events and to add or delete colored markings to single states. Doing so, multitasking generators can be computed and their behaviour be analysed.Methods for examining the color status are included as well as those for making a CMG accessible or strongly coaccessible. Furthermore, input and output methods for mtcGenerators are included.

Public Member Functions

Constructor, Destructor and Copy-Methods
 TmtcGenerator (void)
 Creates an emtpy mtcGenerator.
 TmtcGenerator (const TmtcGenerator &rOtherGen)
 Creates an mtcgenerator from another mtcgenerator - copy constructor:.
 TmtcGenerator (const vGenerator &rOtherGen)
 Creates an mtcgenerator from another generator - copy constructor.
 TmtcGenerator (const char *pFileName)
 Constructs an mtcGenerator from file.
 ~TmtcGenerator (void)
 Destructor for mtcGenerator.
virtual void Copy (TmtcGenerator &rGen) const
 Copy to other mtcgenerator.
virtual void Copy (vGenerator &rGen) const
 Copy to other generator.
Color Symbol Table
SymbolTableGlobalColorSymbolTablep (void)
 Get Pointer to global ColorSymbolTable.
SymbolTableColorSymbolTablep (void) const
 Get Pointer to ColorSymbolTable currently used by this mtcGenerator.
void ColorSymbolTable (SymbolTable *pSymTab)
 Set ColorSymbolTable to be used by this mtcGenerator.
void ColorSymbolTable (const TmtcGenerator &rOtherGen)
 Set ColorSymbolTable as given by rOtherGen.
Handling Colored States
Idx InsColoredState (const std::string &rStateName, const std::string &rColorName)
 Create a new named state and set the color rColorName.
Idx InsColoredState (const std::string &rStateName, Idx colorIndex)
 Create a new named state and set the color colorIndex.
Idx InsColoredState (const std::string &rStateName, const ColorSet &rColors)
 Create a new named state and set the colors from rColors.
Idx InsColoredState (const ColorSet &rColors)
 Create a new unnamed state and set the colors from rColors.
Idx InsColor (Idx stateIndex, const std::string &rColorName)
 Insert a color by name into an existing state.
void InsColor (Idx stateIndex, Idx colorIndex)
 Insert a color by index into an existing state.
void InsColors (Idx stateIndex, const ColorSet &rColors)
 Insert multiple colors from a color set into an existing state.
void DelColor (Idx stateIndex, const std::string &rColorName)
 Remove color by name from an existing state specified by index.
void DelColor (Idx stateIndex, Idx colorIndex)
 Remove color by index form an existing state specified by index.
void DelColor (const std::string &rColorName)
 Remove color by name from all states.
void DelColor (Idx colorIndex)
 Remove color by index from all states.
void ClrStateColors (Idx stateIndex)
 Remove all colors from a particular state.
void ClrStateAttributes ()
 Clear all the generator's state attributes.
Analyse Colored States and State Colors
void Colors (ColorSet &rColors) const
 Insert all colors used in the generator to a given ColorSet.
ColorSet Colors (void) const
 Returns a color set containing all the generator's colors.
ColorSet Colors (Idx stateIndex) const
 Return a color set which contains all colors of one state.
void StateColors (Idx stateIndex, ColorSet &rColors) const
 Get color set of a given state of the generator.
ColorSet StateColors (Idx stateIndex) const
 Get color set of a given state of the generator.
StateSet ColoredStates (Idx colorIndex) const
 Returns a state set containing all states that are colored with the color given by index.
StateSet ColoredStates (const std::string &rColorName) const
 Returns a state set containing all states that are colored with the color given by name.
StateSet ColoredStates () const
 Returns a state set containing all colored states of the mtcGenerator.
StateSet UncoloredStates () const
 Returns a state set containing all states that are not colored.
bool ExistsColor (Idx colorIndex) const
 Check if color exists in generator.
bool ExistsColor (const std::string &rColorName) const
 Check if color exists in generator.
bool ExistsColor (Idx stateIndex, Idx colorIndex) const
 Check if color exists in a given state of the mtcGenerator.
bool IsColored () const
 Check if there is at least one colored state in the mtcGenerator.
bool IsColored (Idx stateIndex) const
 Check if the given state is colored or not.
Symbol Table
void DelColorName (Idx colorIndex)
 Finally deletes a color name and its index from the currently used symbol table.
void CheckSymbolTable (Idx colorIndex)
 Delete the given color from the symbol table if it is not used anymore in the generator by calling DelColorName.
void CheckSymbolTable (ColorSet &rColors)
 Delete all colors from the given color set from the color symbol table by calling DelColorName if they are not used anymore.
std::string ColorName (Idx colorIndex) const
 Look up the color name for a given color index.
Idx ColorIndex (const std::string &rColorName) const
 Look up the color index for a given color name.
Output Methods
void DotWrite (const std::string &rFileName)
 Writes generator to dot input format.
std::string CStr (Idx index) const
 Return pretty printable color name for index.
Reachability
bool Accessible (void)
 Make colored generator accessible.
bool IsAccessible (void) const
 Check if the colored mtcGenerator is accessible.
StateSet StronglyCoacSet (void) const
 Generate a state set with all strongly coaccessible states.
bool StronglyCoac (void)
 Make generator strongly coaccessible.
bool IsStronglyCoac (void) const
 Check if mtcGenerator is strongly coaccessible.
StateSet StronglyTrimSet (void) const
 Generate a state set with all the strongly trim generator's states.
bool StronglyTrim (void)
 Make generator strongly trim.
bool IsStronglyTrim (void) const
 Check if the mtcGenerator is strongly trim.
Further Methods
StateAttr * Attributep (Idx stateIndex)
 Get a state's attribute.
void NewColorSymbolTable ()
 Insert a new local color symbol table.
std::map< Idx, ColorSetStateColorMap (void) const
 Return a color map with state indices and their corresponding colors.

Protected Attributes

SymbolTablempColorSymbolTable
 Pointer to currently used symbol table.


Constructor & Destructor Documentation

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

Creates an emtpy mtcGenerator.

doxygen group

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

Creates an mtcgenerator from another mtcgenerator - copy constructor:.

If the other mtcGenerator uses a local color symbol table, the new generator also creates a local symbol table. This new one is empty! If you use a local symbol table, you should implement a copy mechanism for the entries of the original generator's symbol table.

Parameters:
rOtherGen Other mtcgenerator to copy

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

Creates an mtcgenerator from another generator - copy constructor.

Parameters:
rOtherGen Other generator to copy

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator ( const char *  pFileName  )  [inline]

Constructs an mtcGenerator from file.

Define FAUDES_CHECKED for consistency checks

Parameters:
pFileName Filename
Exceptions:
Exception 
  • Opening/reading failed (ids 1, 50, 51)

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

Destructor for mtcGenerator.


Member Function Documentation

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

Copy to other mtcgenerator.

Parameters:
rGen mtcGenerator which will become the copy

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

Copy to other generator.

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::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::GlobalColorSymbolTablep ( void   )  [inline]

Get Pointer to global ColorSymbolTable.

doxygen group This is a static member of ColorSet and used as default for all derived classes and instantiated objects.

Returns:
Pointer to global ColorSymbolTable

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

Get Pointer to ColorSymbolTable currently used by this mtcGenerator.

Returns:
Pointer to ColorSymbolTable

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorSymbolTable ( SymbolTable pSymTab  )  [inline]

Set ColorSymbolTable to be used by this mtcGenerator.

Parameters:
pSymTab Pointer to SymbolTable

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

Set ColorSymbolTable as given by rOtherGen.

Parameters:
rOtherGen Other generator

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState ( const std::string &  rStateName,
const std::string &  rColorName 
) [inline]

Create a new named state and set the color rColorName.

doxygen group Define FAUDES_CHECKED for consistency checks

Parameters:
rStateName Name of the state to add
rColorName Name of the state color
Returns:
Index of new unique state
Exceptions:
Exception 
  • Name already exists (id 104)
  • Index not member of set (id 200)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState ( const std::string &  rStateName,
Idx  colorIndex 
) [inline]

Create a new named state and set the color colorIndex.

Define FAUDES_CHECKED for consistency checks

Parameters:
rStateName Name of the state to add
colorIndex Index of the state color, must already exist in symbol table
Returns:
Index of new unique state
Exceptions:
Exception 
  • Color index not known to symbol table (id 200)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState ( const std::string &  rStateName,
const ColorSet rColors 
) [inline]

Create a new named state and set the colors from rColors.

Parameters:
rStateName Name of the state to add
rColors Color set
Returns:
Index of new unique state

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState ( const ColorSet rColors  )  [inline]

Create a new unnamed state and set the colors from rColors.

Parameters:
rColors Color set
Returns:
Index of new unique state

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColor ( Idx  stateIndex,
const std::string &  rColorName 
) [inline]

Insert a color by name into an existing state.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex Index of state to be set as colored state
rColorName Name of state color to be added
Returns:
Index of inserted color
Exceptions:
Exception 
  • Index not member of set (id 200)
  • Name already exists / invalid name (id 104)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColor ( Idx  stateIndex,
Idx  colorIndex 
) [inline]

Insert a color by index into an existing state.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex Index of state to be set as colored state
colorIndex Index of color to be added to state, must already exist in symbol table
Exceptions:
Exception 
  • State index not member of set (id 200)
  • Color index not known to symbol table (id 200)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColors ( Idx  stateIndex,
const ColorSet rColors 
) [inline]

Insert multiple colors from a color set into an existing state.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex Index of state to be set as colored state
rColors Reference to color set with colors to set for state, colors must already exist in symbol table
Exceptions:
Exception 
  • State index not member of set (id 200)
  • Symbol table mismach (id 200)
  • Symbol table mismatch (id 88)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor ( Idx  stateIndex,
const std::string &  rColorName 
) [inline]

Remove color by name from an existing state specified by index.

Define FAUDES_CHECKED for consistency checks.

Parameters:
stateIndex State index
rColorName Name of the state color
Exceptions:
Exception 
  • Index not member of set (id 200)
  • Name not found in NameSet (id 202)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor ( Idx  stateIndex,
Idx  colorIndex 
) [inline]

Remove color by index form an existing state specified by index.

Define FAUDES_CHECKED for consistency checks.

Parameters:
stateIndex State index
colorIndex Index of the state color
Exceptions:
Exception 
  • Index not member of set (id 200)
  • Color index not found in generator (id 205)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor ( const std::string &  rColorName  )  [inline]

Remove color by name from all states.

Parameters:
rColorName Name of state color

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor ( Idx  colorIndex  )  [inline]

Remove color by index from all states.

Parameters:
colorIndex Index of state color

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrStateColors ( Idx  stateIndex  )  [inline]

Remove all colors from a particular state.

If symbol table is local, unused colors are deleted from it, global symbol table stays untouched.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex State where colors should be removed
Exceptions:
Exception 
  • Index not member of set (id 200)

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

Clear all the generator's state attributes.

If symbol table is local, it is cleared, global symbol table stays untouched.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors ( ColorSet rColors  )  const [inline]

Insert all colors used in the generator to a given ColorSet.

doxygen group

Parameters:
rColors Color set in which all colors of the generator will be inserted
Exceptions:
Exception 
  • Symbol table mismatch (id 88)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
ColorSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors ( void   )  const [inline]

Returns a color set containing all the generator's colors.

Returns:
Color set with generators colors

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
ColorSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors ( Idx  stateIndex  )  const [inline]

Return a color set which contains all colors of one state.

Returns:
Color set with state's colors
Exceptions:
Exception 
  • Index not member of set (id 200)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateColors ( Idx  stateIndex,
ColorSet rColors 
) const [inline]

Get color set of a given state of the generator.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex State index for which the color set should be delivered
rColors Color set to save result
Exceptions:
Exception 
  • Index not member of set (id 200)
  • Symbol table mismatch (id 88)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
ColorSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateColors ( Idx  stateIndex  )  const [inline]

Get color set of a given state of the generator.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex State index for which the color set should be delivered
Returns:
Color set with state's colors
Exceptions:
Exception 
  • Index not member of set (id 200)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates ( Idx  colorIndex  )  const [inline]

Returns a state set containing all states that are colored with the color given by index.

Parameters:
colorIndex Color whose corresponding states shall be returned
Returns:
State set containing appropriate states

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates ( const std::string &  rColorName  )  const [inline]

Returns a state set containing all states that are colored with the color given by name.

Parameters:
rColorName Color whose corresponding states shall be returned
Returns:
State set containing appropriate states

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates (  )  const [inline]

Returns a state set containing all colored states of the mtcGenerator.

Returns:
State set containing colored states

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::UncoloredStates (  )  const [inline]

Returns a state set containing all states that are not colored.

Returns:
State set containing uncolored states

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor ( Idx  colorIndex  )  const [inline]

Check if color exists in generator.

Parameters:
colorIndex Index which will be examined regarding existence in the generator
Returns:
true if color exists

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor ( const std::string &  rColorName  )  const [inline]

Check if color exists in generator.

Define FAUDES_CHECKED for consistency checks

Parameters:
rColorName Color name which will be examined regarding existence in the generator
Returns:
true if color exists
Exceptions:
Exception 
  • Color name not found in symbol table (id 202)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor ( Idx  stateIndex,
Idx  colorIndex 
) const [inline]

Check if color exists in a given state of the mtcGenerator.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex Index which determines the generator's state
colorIndex Color index to look for in given state
Returns:
true if color exists in state
Exceptions:
Exception 
  • Index not member of set (id 200)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsColored (  )  const [inline]

Check if there is at least one colored state in the mtcGenerator.

Returns:
True if there is at least one colored state

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsColored ( Idx  stateIndex  )  const [inline]

Check if the given state is colored or not.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex State to examine
Returns:
True if given state is colored
Exceptions:
Exception 
  • State index not member of set (id 200)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColorName ( Idx  colorIndex  )  [inline]

Finally deletes a color name and its index from the currently used symbol table.

doxygen group

Parameters:
colorIndex Index of color to delete from symbol table

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CheckSymbolTable ( Idx  colorIndex  )  [inline]

Delete the given color from the symbol table if it is not used anymore in the generator by calling DelColorName.

Parameters:
colorIndex Color which will be deleted from symbol table if not used anymore

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CheckSymbolTable ( ColorSet rColors  )  [inline]

Delete all colors from the given color set from the color symbol table by calling DelColorName if they are not used anymore.

rColors must use the same symbol table as the mtcGenerator!

Parameters:
rColors Color set with all colors that will be deleted from symbol table if not used anymore
Exceptions:
Exception 
  • Symbol table mismatch (id 88)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
std::string faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorName ( Idx  colorIndex  )  const [inline]

Look up the color name for a given color index.

Parameters:
colorIndex 
Returns:
Color name

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorIndex ( const std::string &  rColorName  )  const [inline]

Look up the color index for a given color name.

Parameters:
rColorName 
Returns:
Color index

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

Writes generator to dot input format.

doxygen group

The dot file format is specified by the graphiz package; see http://www.graphviz.org. The package includes the dot command line tool to generate a graphical representation of the generators graph. See also vGenerator::GraphWrite(). This functions sets the re-indexing to minimal indices.

Parameters:
rFileName Name of file to save result

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

Return pretty printable color name for index.

Primary meant for debugging messages.

Parameters:
index 
Returns:
std::string Color name

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

Make colored generator accessible.

doxygen group States being not accessible are deleted.

Returns:
True if generator contains at least one initial state

Example: Computation of the accessible form of a nonaccessible mtcGenerator

Original mtcGenerator gen
2_mtc_functions_1c_nonAccStrCoac.png
State 5 cannot be reached
Result of gen.Accessible();
2_mtc_functions_1d_StronglyTrim.png
Resulting mtcGenerator is accessible i.e. every state is reachable

Reimplemented from faudes::vGenerator.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsAccessible ( void   )  const [inline]

Check if the colored mtcGenerator is accessible.

Returns:
True if generator is accessible

Reimplemented from faudes::vGenerator.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyCoacSet ( void   )  const [inline]

Generate a state set with all strongly coaccessible states.

Returns:
StateSet Coaccessible states

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

Make generator strongly coaccessible.

Forbidden states are deleted.

Returns:
True if generator is strongly coaccessible

Example: Computation of the strongly coaccessible form of an mtcGenerator

Original mtcGenerator gen
2_mtc_functions_1b_AccNonStrCoac.png
From state 3 states with other colored markings cannot be reached. So, this generator is weakly coaccessible w.r.t. its color set, but not strongly coaccessible w.r.t. it.
Result of gen.StronglyCoac();
2_mtc_functions_1d_StronglyTrim.png
Resulting mtcGenerator is strongly coaccessible w.r.t its new color set where the color of the primary state 3 is missing

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsStronglyCoac ( void   )  const [inline]

Check if mtcGenerator is strongly coaccessible.

Returns:
True if generator is strongly coaccessible

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyTrimSet ( void   )  const [inline]

Generate a state set with all the strongly trim generator's states.

Returns:
StateSet All states for which generator is strongly trim

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

Make generator strongly trim.

Therefore, the forbidden states are deleted.

Returns:
True if generator is strongly trim

Example: Computation of the strongly trim form of an mtcGenerator

Original mtcGenerator gen
2_mtc_functions_1a_nonAccNonStrCoac.png
State 5 is not accessible and from state 3 other states with other colored markings cannot be reached. So, this generator is not accessible and weakly coaccessible w.r.t. its color set.
Result of gen.StronglyTrim();
2_mtc_functions_1d_StronglyTrim.png
Resulting mtcGenerator is strongly trim, which means accessible and strongly coaccessible w.r.t its color set

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsStronglyTrim ( void   )  const [inline]

Check if the mtcGenerator is strongly trim.

Returns:
True if generator is strongly trim

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
StateAttr * faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Attributep ( Idx  stateIndex  )  [inline]

Get a state's attribute.

doxygen group A new attribute will be inserted if necessary. The method uses a local symbol table if there is one and mpColorSymbolTable points to it.

Define FAUDES_CHECKED for consistency checks

Parameters:
stateIndex State index
Returns:
Pointer to state attribute
Exceptions:
Exception 
  • Index not member of set (id 200)

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

Insert a new local color symbol table.

mpColorSymbolTable is reset. The color symbol table pointer in every state attribute's mColors is also reset to the new symbol table. If there already exist color entries in the current symbol table, they are copied to the new local one.

Define FAUDES_CHECKED for consistency checks

Exceptions:
Exception 
  • Could not insert index and symbol to symbol table (id 44)

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
std::map< Idx, ColorSet > faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateColorMap ( void   )  const [inline]

Return a color map with state indices and their corresponding colors.

Only states with asociated colors are part of this list.

Returns:
color map Standard library map where states and corresponding colors are saved


Member Data Documentation

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
SymbolTable* faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::mpColorSymbolTable [protected]

Pointer to currently used symbol table.


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

libFAUDES 2.13a c++ source docu by doxygen 1.5.6