C# Class CyPhyMasterInterpreter.AnalysisModelProcessor

Provides the following functionalities: expand a context [design space -> configurations], run interpreters, post jobs to job manager.
Afficher le fichier Open project: metamorph-inc/meta-core Class Usage Examples

Protected Properties

Свойство Type Description
OriginalCurrentFCOName string

Méthodes publiques

Méthode Description
DeleteTemporaryObjects ( ) : void

Deletes all temporary objects in the right order.

Expand ( ISIS.GME.Dsml.CyPhyML.Interfaces configuration ) : void

Expands the current context and sets the expanded object.

GetAnalysisModelProcessor ( IMgaModel context ) : AnalysisModelProcessor

Factory method to get a new analysis model processor instance based on a given context.

GetExpandedObject ( ) : MgaModel

Gets the expanded version of the invoked object.

GetInvokedObject ( ) : MgaModel

Gets the object from which the analysis model processor was instantiated.

GetResultsDirectory ( ) : string

Gets the results directory. Project directory/results/ All interpreters will get a subdirectory inside this one.

GetWorkflow ( ) : Queue

Gets the set of Interpreters form the workflow.

PostToJobManager ( JobManagerDispatch manager ) : bool

Posts the generated analysis packages to the JobManager for execution.

RunCAExporter ( IEnumerable cwcs ) : IEnumerable

Runs the Component Assembly exporter. Exports CWC configurations into Component Assemblies.

RunInterpreters ( bool passTraceability, bool verboseConsole ) : void

Runs all interpreters on the expanded context.

SaveDesign ( AVM projectManifest ) : bool

Exports the design into design interchange format AVM Design Model and indexes the file in the project manifest.

SaveDesignSpace ( AVM projectManifest ) : bool

Exports the design space into design interchange format AVM Design Model and indexes the file in the project manifest.

SaveTestBench ( AVM projectManifest ) : bool

Saves the test bench descriptor file to the test bench directory and indexes the newly generated file in the project manifest.

SaveTestBenchManifest ( AVM projectManifest, string configurationName, DateTime analysisStartTime ) : bool

Saves the test bench manifest file to interpreter's output directory and indexes the newly generated file in the project manifest.

ShowInterpreterConfigs ( CyPhyGUIs.IInterpreterConfiguration>.Dictionary interpreterConfigurations, bool firstTimeOnly = true, bool interactive = true ) : void

Shows all configuration dialog boxes for all interpreters that have to be configured. InterpretersToConfiguration

UpdateTestBenchManifestExecutionSteps ( AVM manifest ) : bool

Updates the execution steps in the test bench manifest file based on the Tasks and Execution tasks in the workflow.

Méthodes protégées

Méthode Description
AddToTraceabilityAndTemporary ( IMgaObject copied, IMgaObject original, bool recursive = true ) : void

Adds an object ID pair to the traceability map and adds the copied object to the temporary object list keeping track of the object to be deleted.

EnsureOutputDirectory ( ) : void

Ensures that output directory is not null and creates it if it does not exist already.

ExecuteInTransaction ( Action doWork, bool flushUndoQueue = true, bool abort = false ) : void

Helper function to execute an action within a transaction.

GetTemporaryFolderName ( IMgaObject originalObject ) : string

Gets the temporary folder name for a given object in GME.

GetTemporaryObjectName ( IMgaObject originalObject, IMgaObject configuration ) : string

Gets the temporary object name for a given object (context and configuration pair) in GME.

OnInterpreterProgress ( InterpreterProgressEventArgs eventArgs ) : void

Called when run interpreters make progress, like get configuration, initialize, etc.

ThrowIfNotExpanded ( ) : void

Checks if the original model is expanded or not.

Private Methods

Méthode Description
AddToTraceability ( IMgaObject copied, IMgaObject original, bool recursive = true ) : void

Adds an object ID pair to the traceability map.

CreateOutputDirectory ( ) : string

Create the output directory if it does not exist yet.

GetRandomSubDirectory ( string outputDir ) : string

Gets a randomly named subdirectory inside a given output directory.

The new directory will not start with a number.

Method Details

AddToTraceabilityAndTemporary() protected méthode

Adds an object ID pair to the traceability map and adds the copied object to the temporary object list keeping track of the object to be deleted.
protected AddToTraceabilityAndTemporary ( IMgaObject copied, IMgaObject original, bool recursive = true ) : void
copied IMgaObject Copy of the original object
original IMgaObject Original object
recursive bool Adds traceability recursively, but it does not add to the temporary objects recursively.
Résultat void

DeleteTemporaryObjects() public méthode

Deletes all temporary objects in the right order.
public DeleteTemporaryObjects ( ) : void
Résultat void

EnsureOutputDirectory() protected méthode

Ensures that output directory is not null and creates it if it does not exist already.
protected EnsureOutputDirectory ( ) : void
Résultat void

ExecuteInTransaction() protected méthode

Helper function to execute an action within a transaction.
protected ExecuteInTransaction ( Action doWork, bool flushUndoQueue = true, bool abort = false ) : void
doWork Action Work that has to be done within a transaction.
flushUndoQueue bool Flushes undo queue to keep the memory usage down.
abort bool Aborts the transaction.
Résultat void

Expand() public abstract méthode

Expands the current context and sets the expanded object.
public abstract Expand ( ISIS.GME.Dsml.CyPhyML.Interfaces configuration ) : void
configuration ISIS.GME.Dsml.CyPhyML.Interfaces Top level system under test will be redirected to this object.
Résultat void

GetAnalysisModelProcessor() public static méthode

Factory method to get a new analysis model processor instance based on a given context.
If context is null. If context is not supported.
public static GetAnalysisModelProcessor ( IMgaModel context ) : AnalysisModelProcessor
context IMgaModel Model context
Résultat AnalysisModelProcessor

GetExpandedObject() public abstract méthode

Gets the expanded version of the invoked object.
public abstract GetExpandedObject ( ) : MgaModel
Résultat MgaModel

GetInvokedObject() public abstract méthode

Gets the object from which the analysis model processor was instantiated.
public abstract GetInvokedObject ( ) : MgaModel
Résultat MgaModel

GetResultsDirectory() public méthode

Gets the results directory. Project directory/results/ All interpreters will get a subdirectory inside this one.
public GetResultsDirectory ( ) : string
Résultat string

GetTemporaryFolderName() protected static méthode

Gets the temporary folder name for a given object in GME.
protected static GetTemporaryFolderName ( IMgaObject originalObject ) : string
originalObject IMgaObject Object to get the temporary folder name.
Résultat string

GetTemporaryObjectName() protected static méthode

Gets the temporary object name for a given object (context and configuration pair) in GME.
protected static GetTemporaryObjectName ( IMgaObject originalObject, IMgaObject configuration ) : string
originalObject IMgaObject Object to get the temporary object name.
configuration IMgaObject Configuration generated from design space.
Résultat string

GetWorkflow() public abstract méthode

Gets the set of Interpreters form the workflow.
public abstract GetWorkflow ( ) : Queue
Résultat Queue

OnInterpreterProgress() protected méthode

Called when run interpreters make progress, like get configuration, initialize, etc.
protected OnInterpreterProgress ( InterpreterProgressEventArgs eventArgs ) : void
eventArgs InterpreterProgressEventArgs Interpreter event arguments.
Résultat void

PostToJobManager() public abstract méthode

Posts the generated analysis packages to the JobManager for execution.
public abstract PostToJobManager ( JobManagerDispatch manager ) : bool
manager JobManagerDispatch JobManager instance to post the job to.
Résultat bool

RunCAExporter() public méthode

Runs the Component Assembly exporter. Exports CWC configurations into Component Assemblies.
public RunCAExporter ( IEnumerable cwcs ) : IEnumerable
cwcs IEnumerable Set of CWCs to export.
Résultat IEnumerable

RunInterpreters() public méthode

Runs all interpreters on the expanded context.
public RunInterpreters ( bool passTraceability, bool verboseConsole ) : void
passTraceability bool If true passes traceability information for the interpreters.
verboseConsole bool Passes value to the interpreter if they can write verbose (debug) messages to the console or not.
Résultat void

SaveDesign() public méthode

Exports the design into design interchange format AVM Design Model and indexes the file in the project manifest.
public SaveDesign ( AVM projectManifest ) : bool
projectManifest AVM Given project manifest object.
Résultat bool

SaveDesignSpace() public méthode

Exports the design space into design interchange format AVM Design Model and indexes the file in the project manifest.
public SaveDesignSpace ( AVM projectManifest ) : bool
projectManifest AVM Given project manifest object.
Résultat bool

SaveTestBench() public abstract méthode

Saves the test bench descriptor file to the test bench directory and indexes the newly generated file in the project manifest.
public abstract SaveTestBench ( AVM projectManifest ) : bool
projectManifest AVM Manifest object of the project.
Résultat bool

SaveTestBenchManifest() public abstract méthode

Saves the test bench manifest file to interpreter's output directory and indexes the newly generated file in the project manifest.
public abstract SaveTestBenchManifest ( AVM projectManifest, string configurationName, DateTime analysisStartTime ) : bool
projectManifest AVM Manifest object of the project.
configurationName string
analysisStartTime DateTime
Résultat bool

ShowInterpreterConfigs() public méthode

Shows all configuration dialog boxes for all interpreters that have to be configured. InterpretersToConfiguration
public ShowInterpreterConfigs ( CyPhyGUIs.IInterpreterConfiguration>.Dictionary interpreterConfigurations, bool firstTimeOnly = true, bool interactive = true ) : void
interpreterConfigurations CyPhyGUIs.IInterpreterConfiguration>.Dictionary Map that stores the configurations.
firstTimeOnly bool If true shows the configurations at the first time only, otherwise it shows always.
interactive bool
Résultat void

ThrowIfNotExpanded() protected méthode

Checks if the original model is expanded or not.
If Expand was not called before.
protected ThrowIfNotExpanded ( ) : void
Résultat void

UpdateTestBenchManifestExecutionSteps() public abstract méthode

Updates the execution steps in the test bench manifest file based on the Tasks and Execution tasks in the workflow.
public abstract UpdateTestBenchManifestExecutionSteps ( AVM manifest ) : bool
manifest AVM
Résultat bool

Property Details

OriginalCurrentFCOName protected_oe property

protected string OriginalCurrentFCOName
Résultat string