Documentation / Manuel développeur
Modules disponibles
Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,  ![]()  | 
  
    Uranie / Launcher
    v4.10.0
    
   | 
 
A virtual class for the FMI/FMU encapsulation. More...
#include <TCodeFMU.h>


Public Types | |
| enum | ELogLevel_t {  log_level_nothing = 0, log_level_fatal, log_level_error, log_level_warning, log_level_info, log_level_verbose, log_level_debug, log_level_all }  | 
| The list of log level.  More... | |
Public Member Functions | |
| TCodeFMU () | |
| Default constructor.  More... | |
| TCodeFMU (const TString &name, const TString &title) | |
| constructor with a name and a title  More... | |
| TCodeFMU (URANIE::DataServer::TDataServer *tds, TString sFMUfile, Option_t *option="") | |
| Constructor from TDataServer and Command as string.  More... | |
| TCodeFMU (URANIE::Launcher::TCode &mycode) | |
| Copy constructor.  More... | |
| virtual | ~TCodeFMU () | 
Encapsulates a code  | |
| virtual void | init (Option_t *option="") | 
| Init phase of the code.  More... | |
| virtual void | initRun (forkcode *fjob, Option_t *option="") | 
| virtual void | start (forkcode *fjob, Option_t *option="") | 
| Run the code.  More... | |
| virtual void | terminate (Option_t *option="") | 
| Terminate phase of the code.  More... | |
| void | initIFirst (Option_t *option="") | 
Setting and Getting attributs  | |
| void | setFMUFile (TString new_var, Option_t *option="") | 
| Set the value of _sFMUFile.  More... | |
| TString | getFMUFile () | 
| Get the value of the _sFMUFile attribute.  More... | |
| Double_t | getStartSimulation () | 
| void | setStartSimulation (Double_t dval) | 
| Double_t | getStoptSimulation () | 
| void | setStopSimulation (Double_t dval) | 
| Double_t | getStepSimulation () | 
| void | setStepSimulation (Double_t dval) | 
| Double_t | getToleranceSimulation () | 
| void | setToleranceSimulation (Double_t dval) | 
| void | setStartStopSimulation (Double_t dstart, Double_t dstop) | 
methods associated to the FMI Library  | |
| void | do_exit (int code) | 
| do_exit  More... | |
Printing Log  | |
| void | setLog () | 
| Force the log.  More... | |
| void | unsetLog () | 
| Force to desable the log.  More... | |
| void | changeLog () | 
| Swith the status of the log.  More... | |
| Bool_t | getLog () | 
| Get the status of the log.  More... | |
| void | setLogLevel (ELogLevel_t theLogLevel=log_level_info) | 
| Set the Log Level for the FMI Library.  More... | |
| ELogLevel_t | getLogLevel () | 
| Get the Log Level in the FMI Library.  More... | |
| virtual void | printLog (Option_t *option="") | 
| Print the log of the object/class.  More... | |
  Public Member Functions inherited from URANIE::Launcher::TCode | |
| TCode () | |
| Default constructor.  More... | |
| TCode (const TString &name, const TString &title) | |
| constructor with a name and a title  More... | |
| TCode (URANIE::DataServer::TDataServer *tds, TString scmd) | |
| Constructor from TDataServer and Command as string.  More... | |
| TCode (URANIE::Launcher::TCode &mycode) | |
| Copy constructor.  More... | |
| virtual | ~TCode () | 
| Default destructor.  More... | |
| TInputFile * | getInputFile (TString sfile) | 
| Get the input file file from his name.  More... | |
| TInputFile * | getInputFile (Int_t nfile) | 
| Get the input file from his index.  More... | |
| TInputFile * | getLastInputFile () | 
| Get the last input file.  More... | |
| TOutputFile * | getOutputFile (Int_t nfile) | 
| Get the output file from his index.  More... | |
| TOutputFile * | getOutputFile (TString sfile) | 
| getOutputFile  More... | |
| void | setWorkingDirectory (TString sPathName="") | 
| Set the working directory.  More... | |
| TString | getWorkingDirectory () | 
| Get the working directory.  More... | |
| void | setReferenceDirectory (TString str) | 
| Set the reference directory where inputs no change are located.  More... | |
| TString | getReferenceDirectory () | 
| Get the reference directory where inputs no change are located.  More... | |
| void | setCommand (TString str) | 
| Set the code command.  More... | |
| TString | getCommand () | 
| Get the code command.  More... | |
| Int_t | getNOutputFiles () | 
| Get the number of output files.  More... | |
| Int_t | getNOutputAttributes () | 
| Get the number of output attributes.  More... | |
| Int_t | getNOutputAttributes (Int_t nfile) | 
| Get the number of output attributes in the output file given by his index.  More... | |
| Int_t | getNInputFiles () | 
| Get the number of input files.  More... | |
| Int_t | getNInputAttributes () | 
| Get the number of input attributes.  More... | |
| Int_t | getNInputAttributes (Int_t nfile) | 
| Get the number of input attributes in the input file given by his index.  More... | |
| URANIE::DataServer::TAttribute * | getInputAttribute (Int_t nfile, Int_t natt) | 
| Get an attribute of an input file.  More... | |
| URANIE::DataServer::TAttribute * | getAttribute (Int_t nfile, Int_t natt) | 
| Get an attribute of an output file.  More... | |
| TString | getInputVarNames () | 
| Get the names of the input variables separated by ":".  More... | |
| TString | getOutputVarNames () | 
| Get the names of the output variables separated by ":".  More... | |
| URANIE::DataServer::TDataServer * | getTDataServer () | 
| Get the pointer to the TDS.  More... | |
| void | setTDataServer (URANIE::DataServer::TDataServer *atds) | 
| Set the pointer to the TDS.  More... | |
| virtual void | runTest (Option_t *option="") | 
| Run a test for the code.  More... | |
| virtual void | initFileType (Option_t *option="") | 
| Init file typing.  More... | |
| virtual void | preTraitment (forkcode *fjob, Double_t *val, Int_t *index=NULL, Option_t *option="") | 
| Pre-traitment phase of the code.  More... | |
| virtual void | prepareEntries (forkcode *fjob, vector< URANIE::DataServer::UEntry *> *input) | 
| Pre-traitment phase of the code that deals with vectors/strings.  More... | |
| virtual void | preTraitment (forkcode *fjob, vector< URANIE::DataServer::UEntry *> *input, Option_t *option="") | 
| virtual void | run (forkcode *fjob, Option_t *option="") | 
| Run the code (bloquant)  More... | |
| virtual Bool_t | postTraitment (forkcode *fjob, Int_t &nout, Double_t *dvalout, Option_t *option="", TList *lstOut=NULL) | 
| Post-traitment phase of the code.  More... | |
| virtual Bool_t | postTraitment (forkcode *fjob, vector< URANIE::DataServer::UEntry *> *out, Option_t *option="") | 
| Post-traitment phase of the code that deals with vectors/strings.  More... | |
| void | createDirectory (TString sPathName, TString sDirectoryName="") | 
| create the directory sPathName+"/"+sDirectoryName  More... | |
| virtual void | copyFiles (Option_t *option="") | 
| copyFiles  More... | |
| void | resetCurrentSimulation () | 
| resetCurrentSimulation  More... | |
| virtual void | cleanOutputFiles (forkcode *fjob, Option_t *option="") | 
| Cleans the output files.  More... | |
| void | addInputFile (TInputFile *ifile) | 
| Add a TInputFile file.  More... | |
| void | addInputFile (TString str) | 
| Add an input file as a TString This input file does not contain input attributes. It is a mandatory input file for the code evaluation.  More... | |
| void | addOutputFile (TOutputFile *ifile) | 
| Add a TOutputFile file The TOutputFile file contains the output attributes of teh study.  More... | |
| void | setLog () | 
| Force the log.  More... | |
| void | unsetLog () | 
| Force to desable the log.  More... | |
| void | changeLog () | 
| Swith the status of the log.  More... | |
| Bool_t | getLog () | 
| Get the status of the log.  More... | |
Protected Attributes | |
protected attributes  | |
| TString | _sFMUFile | 
| The FMU filename.  More... | |
| TString | _sFMUWorkingDirectory | 
| the FMU import directory  More... | |
| ELogLevel_t | _logLevel | 
| The log Level for FMI Library.  More... | |
| Double_t | _dStart | 
| The start time for the simulation.  More... | |
| Double_t | _dStop | 
| The stop time for the simulation.  More... | |
| Double_t | _dStep | 
| The step time for the simulation.  More... | |
| Double_t | _dTolerance | 
| The tolerance for the simulation.  More... | |
| Bool_t | _bStart | 
| boolean to known if _dstart is defined by user  More... | |
| Bool_t | _bStop | 
| boolean to known if _dstop is defined by user  More... | |
| Bool_t | _bStep | 
| boolean to known if _dstep is defined by user  More... | |
| Bool_t | _bTolerance | 
| boolean to known if _dTolerance is defined by user  More... | |
| Bool_t | _binitIFirst | 
| boolean to known if passed into the initIFirst step  More... | |
| fmi_version_enu_t | _sVersion | 
| The FMU version.  More... | |
| fmi_import_context_t * | _context_FMI | 
| The FMU context.  More... | |
| fmi1_import_t * | _fmi1Import | 
| The FMU 1.0 Object.  More... | |
| fmi2_import_t * | _fmi2Import | 
| The FMU 2.0 Object.  More... | |
| TString | _sGenerationTool | 
| The FMU generation tool.  More... | |
| TString | _sGenerationDateTime | 
| The FMU generation date and time.  More... | |
| Double_t | _dFMUStart | 
| The start time for default experiment as specified in the XML file.  More... | |
| Double_t | _dFMUStop | 
| The stop time for default experiment as specified in the XML file.  More... | |
| Double_t | _dFMUStep | 
| The step time for default experiment as specified in the XML file.  More... | |
| Double_t | _dFMUTolerance | 
| The tolerance for default experiment as specified in the XML file.  More... | |
Private Member Functions | |
| void | treatOption (TString soption) | 
| treat the soption for the class  More... | |
Additional Inherited Members | |
  Public Attributes inherited from URANIE::Launcher::TCode | |
| protected TList * | _listOfInputFiles | 
| < vector of output files  More... | |
| TString | _sWorkingDirectory | 
| The Working directory.  More... | |
| TString | _sReferenceDirectory | 
| The Working directory.  More... | |
| TString | _sCommand | 
| The Command of the code.  More... | |
| Int_t | _nCurrentSimulation | 
| The Current number of simulation.  More... | |
| Int_t | _nOfInput | 
| The size of the vector listOfInput scanning input files.  More... | |
| Int_t | _nOfInputToSubstitute | 
| The size of the vector _nIndexOfInputToSubstitute.  More... | |
| Int_t * | _nIndexOfInputToSubstitute | 
| The vector of Index to Substitute.  More... | |
| Bool_t | _blog | 
| Boolean for edit the log.  More... | |
| URANIE::DataServer::TDataServer * | _tds | 
Detailed Description
A virtual class for the FMI/FMU encapsulation.
- step init ( 
- See also
 - test_simulate_fmi2_cs ) :
- Create the callback
 - Create the FMU pointer
 - Search the ReferenceValue in the FMU object for each input
 - Case of Log :
- Print all the input start values
 
 
 
 - step preTraitment :
- Set the input current values into the FMU object via setFMUReal() ..
 
 
- step run :
- Simulate the FMU Object via the loop (time_begin, time_step, _time_end) AND fmi2_import_do_step function
 
 
- step postTraitment :
- Catch the output values via the fmi2_import_get_real() function
 
 
- step terminate :
- Delete all the pointer (callbacks, FMU, ...)
 
 
- See also
 - https://fmi-standard.org/
 
Member Enumeration Documentation
◆ ELogLevel_t
The list of log level.
Constructor & Destructor Documentation
◆ TCodeFMU() [1/4]
| URANIE::Launcher::TCodeFMU::TCodeFMU | ( | ) | 
Default constructor.
Referenced by ClassImp().
◆ TCodeFMU() [2/4]
| URANIE::Launcher::TCodeFMU::TCodeFMU | ( | const TString & | name, | 
| const TString & | title | ||
| ) | 
constructor with a name and a title
- Parameters
 - 
  
name title  
◆ TCodeFMU() [3/4]
| URANIE::Launcher::TCodeFMU::TCodeFMU | ( | URANIE::DataServer::TDataServer * | tds, | 
| TString | sFMUfile, | ||
| Option_t * | option = ""  | 
        ||
| ) | 
Constructor from TDataServer and Command as string.
- Parameters
 - 
  
tds sFMUfile  
◆ TCodeFMU() [4/4]
| URANIE::Launcher::TCodeFMU::TCodeFMU | ( | URANIE::Launcher::TCode & | mycode | ) | 
Copy constructor.
- Parameters
 - 
  
mycode  
◆ ~TCodeFMU()
      
  | 
  virtual | 
Empty Destructor
Referenced by ClassImp().
Member Function Documentation
◆ changeLog()
      
  | 
  inline | 
Swith the status of the log.
References URANIE::Launcher::TCode::_blog.
◆ do_exit()
      
  | 
  inline | 
do_exit
- Parameters
 - 
  
code  
◆ getFMUFile()
      
  | 
  inline | 
Get the value of the _sFMUFile attribute.
The FMU filename which contains the XML File and the library.
- Returns
 - the value of _sFMUFile
 
References _sFMUFile.
◆ getLog()
      
  | 
  inline | 
◆ getLogLevel()
      
  | 
  inline | 
◆ getStartSimulation()
      
  | 
  inline | 
References _dStart.
◆ getStepSimulation()
      
  | 
  inline | 
References _dStep.
◆ getStoptSimulation()
      
  | 
  inline | 
References _dStop.
◆ getToleranceSimulation()
      
  | 
  inline | 
References _dTolerance.
◆ init()
      
  | 
  virtual | 
Init phase of the code.
- Parameters
 - 
  
option  
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ initIFirst()
| void URANIE::Launcher::TCodeFMU::initIFirst | ( | Option_t * | option = "" | ) | 
◆ initRun()
      
  | 
  virtual | 
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ printLog()
      
  | 
  virtual | 
Print the log of the object/class.
- Parameters
 - 
  
option  
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ setFMUFile()
| void URANIE::Launcher::TCodeFMU::setFMUFile | ( | TString | new_var, | 
| Option_t * | option = ""  | 
        ||
| ) | 
Set the value of _sFMUFile.
The FMU filename which contains the XML File and the library.
- Parameters
 - 
  
new_var the new value of _sFMUFile  
Referenced by ClassImp().
◆ setLog()
      
  | 
  inline | 
Force the log.
References URANIE::Launcher::TCode::_blog.
◆ setLogLevel()
      
  | 
  inline | 
Set the Log Level for the FMI Library.
- See also
 - ELogLevel_t
 
- Parameters
 - 
  
theLogLevel  
References _logLevel.
◆ setStartSimulation()
      
  | 
  inline | 
References _bStart, and _dStart.
Referenced by setStartStopSimulation().
◆ setStartStopSimulation()
      
  | 
  inline | 
References setStartSimulation(), and setStopSimulation().
◆ setStepSimulation()
      
  | 
  inline | 
◆ setStopSimulation()
      
  | 
  inline | 
References _bStop, and _dStop.
Referenced by setStartStopSimulation().
◆ setToleranceSimulation()
      
  | 
  inline | 
References _bTolerance, and _dTolerance.
◆ start()
      
  | 
  virtual | 
Run the code.
- Parameters
 - 
  
option  
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ terminate()
      
  | 
  virtual | 
Terminate phase of the code.
- Parameters
 - 
  
option  
Reimplemented from URANIE::Launcher::TCode.
Referenced by ClassImp().
◆ treatOption()
      
  | 
  private | 
◆ unsetLog()
      
  | 
  inline | 
Force to desable the log.
References URANIE::Launcher::TCode::_blog.
Member Data Documentation
◆ _binitIFirst
      
  | 
  protected | 
boolean to known if passed into the initIFirst step
Referenced by ClassImp().
◆ _bStart
      
  | 
  protected | 
boolean to known if _dstart is defined by user
Referenced by ClassImp(), and setStartSimulation().
◆ _bStep
      
  | 
  protected | 
boolean to known if _dstep is defined by user
Referenced by ClassImp(), and setStepSimulation().
◆ _bStop
      
  | 
  protected | 
boolean to known if _dstop is defined by user
Referenced by ClassImp(), and setStopSimulation().
◆ _bTolerance
      
  | 
  protected | 
boolean to known if _dTolerance is defined by user
Referenced by ClassImp(), and setToleranceSimulation().
◆ _context_FMI
      
  | 
  protected | 
The FMU context.
◆ _dFMUStart
      
  | 
  protected | 
The start time for default experiment as specified in the XML file.
Referenced by ClassImp().
◆ _dFMUStep
      
  | 
  protected | 
The step time for default experiment as specified in the XML file.
Referenced by ClassImp().
◆ _dFMUStop
      
  | 
  protected | 
The stop time for default experiment as specified in the XML file.
Referenced by ClassImp().
◆ _dFMUTolerance
      
  | 
  protected | 
The tolerance for default experiment as specified in the XML file.
Referenced by ClassImp().
◆ _dStart
      
  | 
  protected | 
The start time for the simulation.
Referenced by ClassImp(), getStartSimulation(), and setStartSimulation().
◆ _dStep
      
  | 
  protected | 
The step time for the simulation.
Referenced by ClassImp(), getStepSimulation(), and setStepSimulation().
◆ _dStop
      
  | 
  protected | 
The stop time for the simulation.
Referenced by ClassImp(), getStoptSimulation(), and setStopSimulation().
◆ _dTolerance
      
  | 
  protected | 
The tolerance for the simulation.
Referenced by ClassImp(), getToleranceSimulation(), and setToleranceSimulation().
◆ _fmi1Import
      
  | 
  protected | 
The FMU 1.0 Object.
Referenced by ClassImp().
◆ _fmi2Import
      
  | 
  protected | 
The FMU 2.0 Object.
Referenced by ClassImp().
◆ _logLevel
      
  | 
  protected | 
The log Level for FMI Library.
Referenced by ClassImp(), getLogLevel(), and setLogLevel().
◆ _sFMUFile
      
  | 
  protected | 
The FMU filename.
Referenced by ClassImp(), and getFMUFile().
◆ _sFMUWorkingDirectory
      
  | 
  protected | 
the FMU import directory
Referenced by ClassImp().
◆ _sGenerationDateTime
      
  | 
  protected | 
The FMU generation date and time.
Referenced by ClassImp().
◆ _sGenerationTool
      
  | 
  protected | 
The FMU generation tool.
Referenced by ClassImp().
◆ _sVersion
      
  | 
  protected | 
The FMU version.
Referenced by ClassImp().
            
            
 Public Member Functions inherited from