DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <map>
#include <list>
#include <cmath>
#include <utils/Random.hh>
#include <utils/Verbose.hh>
#include <utils/Log.hh>
#include <utils/CmdInterface.hh>
#include <automata/ObservableComponent.hh>
Go to the source code of this file.
Functions | |
vector< string > | fileExtensions (numberOfFileExtensions) |
vector< string > | options (numberOfOptions) |
vector< bool > | isSet (numberOfOptions, false) |
void | initialiseOptions () |
int | main (int argc, char **argv) |
Variables | |
unsigned | numberOfOptions = 3 |
unsigned | numberOfFileExtensions = 1 |
string | description ="Usage: dd-fault-generate\n\t --help |\n\t [--seed randomSeed] [--faultMax nbFaultMax] [file1.des_comp ...] \n\n\t Generate randomly a set of fault events out of the models. If no model file is\n\t provided as argument, read the input standard. The set of chosen faults\n\t is printed on the standard output." |
This file is the main file of the command dd-fault-generate
Usage: dd-fault-generate --help | [--seed randomSeed] [--faultMax nbFaultMax] [file1.des_comp ...] Generate randomly a set of fault events out of the models. If no model file is provided as argument, read the input standard. The set of chosen faults is printed on the standard output.
Definition in file FaultGenerate.cc.
enum FileExtension |
Enumerator | |
---|---|
DESCOMP | |
DESCOMP | |
RULES | |
DESCOMP | |
DESCOMP | |
RULES | |
XML | |
ABSTRACTION | |
DIAGNOSER | |
DESCOMP | |
ARCHV | |
DESCOMP | |
RULES | |
XML | |
DESCOMP | |
RULES | |
XML | |
RULES |
Definition at line 42 of file FaultGenerate.cc.
enum Option |
Definition at line 41 of file FaultGenerate.cc.
vector<string> fileExtensions | ( | numberOfFileExtensions | ) |
Referenced by initialiseOptions(), and main().
void initialiseOptions | ( | ) |
Definition at line 55 of file FaultGenerate.cc.
References DESCOMP, FAULTMAX, fileExtensions(), HELP, options(), and SEED.
Referenced by main().
vector<bool> isSet | ( | numberOfOptions | , |
false | |||
) |
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Main function of the program des_generate
Basically, this function analyses the parameters to initiate the generation Then it calls the generator of shared events, then the generator of behaviours Write the results in output files.
argc | the number of parameters |
argv | the list of parameters |
Definition at line 77 of file FaultGenerate.cc.
References DESCOMP, description, Diades::Automata::Component::eventBegin(), Diades::Automata::Component::eventEnd(), FAULTMAX, fileExtensions(), Diades::Utils::generateRandomValue(), Diades::Utils::getFileExtension(), HELP, Diades::Automata::Component::importDesCompModel(), initialiseOptions(), initialiseRandomGenerator(), Diades::Utils::initialiseSeed(), isSet(), Diades::Automata::ObservableMask::isUnobservable(), Diades::Automata::ObservableComponent::mask(), options(), printError(), printUsage(), SEED, and Diades::Utils::selectNValues().
vector<string> options | ( | numberOfOptions | ) |
Referenced by initialiseOptions(), and main().
string description ="Usage: dd-fault-generate\n\t --help |\n\t [--seed randomSeed] [--faultMax nbFaultMax] [file1.des_comp ...] \n\n\t Generate randomly a set of fault events out of the models. If no model file is\n\t provided as argument, read the input standard. The set of chosen faults\n\t is printed on the standard output." |
Definition at line 52 of file FaultGenerate.cc.
Referenced by main().
unsigned numberOfFileExtensions = 1 |
Definition at line 45 of file FaultGenerate.cc.
unsigned numberOfOptions = 3 |
Definition at line 44 of file FaultGenerate.cc.