DiaDes  0.1
DIAgnosis of Discrete-Event System
Enumerations | Functions | Variables
ComponentInfo.cc File Reference

Main file of the component_info command. More...

#include <vector>
#include <string>
#include <diades/utils/Verbose.hh>
#include <diades/automata/ObservableComponent.hh>
#include "CmdInterface.hh"

Go to the source code of this file.

Enumerations

enum  Option {
  OUTPUT =0, VERBOSE =1, EVENTS =2, NOTEVENTS =3,
  HELP =4, STATEABSTRACTIONS = 5, EVENT = 0, HELP = 1,
  OUTPUT =0, HELP = 0, EVENTS = 1, EVENTNB = 2,
  STATES = 3, STATENB = 4, TRANSITIONS = 5, TRANSITIONNB = 6,
  OBSERVABLES = 7, OBSERVABLENB = 8, UNOBSERVABLES = 9, UNOBSERVABLENB =10,
  INITIALSTATES = 11, INITIALSTATENB = 12, NAME = 13, STATISTICS = 14,
  STATEMIN = 0, STATEMAX = 1, OBSMIN = 2, OBSMAX = 3,
  EVTMIN = 4, EVTMAX = 5, SEED = 6, DIRNAME = 7,
  LATEXFILENAME = 8, TOPOLOGYFILENAME = 9, OBSINTERACTIONMIN = 10, OBSINTERACTIONMAX = 11,
  NODEBEHAVIOUR = 12, HELP = 13, OUTPUTDEGREEMAX = 14, PETRINET = 15,
  STATISTICS =0, HELP =1, FAULTS = 2, NOFAILURES =0,
  FAILURES =1, OBSERVABLES =2, HDFILE =3, DOTFILE =4,
  CPPFILE =5, WITHSILENTCLOSURE =6, HELP =7, FAULTMAX =0,
  SEED =1, HELP =2, HELP =0, FAULTS = 0,
  ALGORITHMS = 1, HELP = 0, EVENTS = 1, TIMEDEVENTS = 2,
  OBSERVATIONS = 3, TIMEDOBSERVATIONS = 4, FAULTS = 5, OBSMIN = 0,
  OBSMAX = 1, TIMEMIN = 2, TIMEMAX = 3, NOEVT = 4,
  SEED = 5, XML = 6, GENERATEFAULTS = 7, HELP = 8,
  INTERACTIVE = 9, PTALOG = 10, NBSIM = 11, HELP =0,
  COMPONENTS =0, EVENTS =1, NUMBER =2, CONNECTIONWITHEVENT =3,
  HELP =4
}
 
enum  Extension { DESCOMP = 0, XML = 0 }
 

Functions

vector< string > fileExtensions (numberOfFileExtensions)
 
vector< string > options (numberOfOptions)
 
vector< bool > isSet (numberOfOptions, false)
 
string printStatistics (const ObservableComponent &component)
 
void initialiseOptions ()
 
int main (int argc, char **argv)
 

Variables

unsigned numberOfOptions = 15
 
unsigned numberOfFileExtensions = 1
 
string description = "Usage:\t component_info --help |\n\t\t\t file.des_comp \t (--events | --events_number\n\t\t\t\t\t | --states | --states_number\n\t\t\t\t\t | --transitions | --transitions_number\n\t\t\t\t\t | --observables | --observables_number \n\t\t\t\t\t | --unobservables | --unobservables_number\n\t\t\t\t\t | --initial_states | --initial_states_number)\n\t\t\t\t\t | --name | --statistics) \n\n\n Print on the standard output the information associated to the given option."
 

Detailed Description

Main file of the component_info command.

Author
Yannick Pencole yanni.nosp@m.ck@s.nosp@m.ocrat.nosp@m.e.la.nosp@m.as.fr
Date
Wed Jul 20 03:03:53 2011
Usage: component_info --help |

file.des_comp (--events | --events_number | --states | --states_number
| --transitions | --transitions_number
| --observables | --observables_number
| --unobservables | --unobservables_number
| --initial_states | --initial_states_number
| --name | --statistics)


Print on the standard output the information associated to the given option.

Definition in file ComponentInfo.cc.

Enumeration Type Documentation

◆ Extension

enum Extension
Enumerator
DESCOMP 
XML 

Definition at line 48 of file ComponentInfo.cc.

◆ Option

enum Option
Enumerator
OUTPUT 
VERBOSE 
EVENTS 
NOTEVENTS 
HELP 
STATEABSTRACTIONS 
EVENT 
HELP 
OUTPUT 
HELP 
EVENTS 
EVENTNB 
STATES 
STATENB 
TRANSITIONS 
TRANSITIONNB 
OBSERVABLES 
OBSERVABLENB 
UNOBSERVABLES 
UNOBSERVABLENB 
INITIALSTATES 
INITIALSTATENB 
NAME 
STATISTICS 
STATEMIN 
STATEMAX 
OBSMIN 
OBSMAX 
EVTMIN 
EVTMAX 
SEED 
DIRNAME 
LATEXFILENAME 
TOPOLOGYFILENAME 
OBSINTERACTIONMIN 
OBSINTERACTIONMAX 
NODEBEHAVIOUR 
HELP 
OUTPUTDEGREEMAX 
PETRINET 
STATISTICS 
HELP 
FAULTS 
NOFAILURES 
FAILURES 
OBSERVABLES 
HDFILE 
DOTFILE 
CPPFILE 
WITHSILENTCLOSURE 
HELP 
FAULTMAX 
SEED 
HELP 
HELP 
FAULTS 
ALGORITHMS 
HELP 
EVENTS 
TIMEDEVENTS 
OBSERVATIONS 
TIMEDOBSERVATIONS 
FAULTS 
OBSMIN 
OBSMAX 
TIMEMIN 
TIMEMAX 
NOEVT 
SEED 
XML 
GENERATEFAULTS 
HELP 
INTERACTIVE 
PTALOG 
NBSIM 
HELP 
COMPONENTS 
EVENTS 
NUMBER 
CONNECTIONWITHEVENT 
HELP 

Definition at line 42 of file ComponentInfo.cc.

Function Documentation

◆ fileExtensions()

vector<string> fileExtensions ( numberOfFileExtensions  )

Referenced by initialiseOptions(), and main().

◆ initialiseOptions()

void initialiseOptions ( )

◆ isSet()

vector<bool> isSet ( numberOfOptions  ,
false   
)

◆ main()

int main ( int  argc,
char **  argv 
)

Main function of the program component_info

Basically, this function analyses the parameters, loads the model and prints the required pieces of information.

Parameters
argcthe number of parameters
argvthe list of parameters
Returns
0 if success

Definition at line 92 of file ComponentInfo.cc.

References DESCOMP, description, Diades::Utils::LoggerFactory::destroy(), Diades::Automata::Event::destroyEvents(), Diades::Automata::Component::eventBegin(), Diades::Automata::Component::eventEnd(), EVENTNB, EVENTS, fileExtensions(), Diades::CmdInterface::fileSuffixOk(), Diades::Automata::Component::getEvent(), Diades::Automata::Component::getLabel(), HELP, Diades::Automata::Component::importDesCompModel(), initialiseOptions(), Diades::Automata::Component::initialStateBegin(), Diades::Automata::Component::initialStateEnd(), INITIALSTATENB, INITIALSTATES, Diades::Automata::ObservableMask::isUnobservable(), Diades::Automata::ObservableComponent::mask(), NAME, Diades::Automata::Component::name(), Diades::Automata::Component::numberOfEvents(), Diades::Automata::Component::numberOfInitialStates(), Diades::Automata::ObservableMask::numberOfObservableEvents(), Diades::Automata::Component::numberOfStates(), Diades::Automata::Component::numberOfTransitions(), Diades::Automata::ObservableComponent::observableBegin(), Diades::Automata::ObservableComponent::observableEnd(), OBSERVABLENB, OBSERVABLES, options(), Diades::CmdInterface::printCommandLineError(), printStatistics(), printUsage(), setVerboseLevel(), Diades::Automata::Component::stateBegin(), Diades::Automata::Component::stateEnd(), STATENB, STATES, STATISTICS, Diades::Automata::Component::transitionBegin(), Diades::Automata::Component::transitionEnd(), TRANSITIONNB, TRANSITIONS, UNOBSERVABLENB, UNOBSERVABLES, and Diades::Utils::VbOutput.

◆ options()

vector<string> options ( numberOfOptions  )

Referenced by initialiseOptions(), and main().

◆ printStatistics()

string printStatistics ( const ObservableComponent component)

Variable Documentation

◆ description

string description = "Usage:\t component_info --help |\n\t\t\t file.des_comp \t (--events | --events_number\n\t\t\t\t\t | --states | --states_number\n\t\t\t\t\t | --transitions | --transitions_number\n\t\t\t\t\t | --observables | --observables_number \n\t\t\t\t\t | --unobservables | --unobservables_number\n\t\t\t\t\t | --initial_states | --initial_states_number)\n\t\t\t\t\t | --name | --statistics) \n\n\n Print on the standard output the information associated to the given option."

Definition at line 58 of file ComponentInfo.cc.

Referenced by main().

◆ numberOfFileExtensions

unsigned numberOfFileExtensions = 1

Definition at line 51 of file ComponentInfo.cc.

◆ numberOfOptions

unsigned numberOfOptions = 15

Definition at line 50 of file ComponentInfo.cc.