DPsim
Loading...
Searching...
No Matches
DPsim::CommandLineArgs Class Reference

Classes

struct  Argument
 

Public Member Functions

 CommandLineArgs (int argc, char *argv[], String name="dpsim", Real dt=0.001, Real d=1, Real sf=50, Int s=-1, CPS::Logger::Level ll=CPS::Logger::Level::info, CPS::Logger::Level clill=CPS::Logger::Level::off, Bool ss=false, Bool b=false, Bool si=false, CPS::Domain sd=CPS::Domain::DP, Solver::Type st=Solver::Type::MNA, DirectLinearSolverImpl mi=DirectLinearSolverImpl::KLU, String spn="plugin.so", String params="default.json")
 
 CommandLineArgs (String name="dpsim", Real dt=0.001, Real d=1, Real sf=50, Int s=-1, CPS::Logger::Level ll=CPS::Logger::Level::info, CPS::Logger::Level clill=CPS::Logger::Level::off, Bool ss=false, Bool b=false, Bool si=false, CPS::Domain sd=CPS::Domain::DP, Solver::Type st=Solver::Type::MNA, DirectLinearSolverImpl mi=DirectLinearSolverImpl::KLU, String spn="plugin.so")
 
void parseArguments (int argc, char *argv[])
 
void showUsage ()
 
std::list< fs::path > positionalPaths () const
 
Int getOptionInt (String optionName)
 
Real getOptionReal (String optionName)
 
Bool getOptionBool (String optionName)
 
String getOptionString (String optionName)
 

Public Attributes

double timeStep
 
double duration
 
double sysFreq
 
int scenario
 
CPS::Logger::Level logLevel
 
CPS::Logger::Level cliLogLevel
 
String name
 
String params
 
bool startSynch
 
bool blocking
 
bool steadyInit
 
struct { 
 
   CPS::Domain   domain 
 
   Solver::Type   type 
 
solver 
 
DPsim::DirectLinearSolverImpl directImpl
 
String solverPluginName
 
DPsim::Timer::StartClock::time_point startTime
 
std::list< String > positional
 
std::map< String, String > options
 

Protected Attributes

String mProgramName
 
std::vector< ArgumentmArguments
 

Detailed Description

Definition at line 37 of file Utils.h.

Constructor & Destructor Documentation

◆ CommandLineArgs() [1/2]

CommandLineArgs::CommandLineArgs ( int argc,
char * argv[],
String name = "dpsim",
Real dt = 0.001,
Real d = 1,
Real sf = 50,
Int s = -1,
CPS::Logger::Level ll = CPS::Logger::Level::info,
CPS::Logger::Level clill = CPS::Logger::Level::off,
Bool ss = false,
Bool b = false,
Bool si = false,
CPS::Domain sd = CPS::Domain::DP,
Solver::Type st = Solver::Type::MNA,
DirectLinearSolverImpl mi = DirectLinearSolverImpl::KLU,
String spn = "plugin.so",
String params = "default.json" )

Definition at line 25 of file Utils.cpp.

◆ CommandLineArgs() [2/2]

CommandLineArgs::CommandLineArgs ( String name = "dpsim",
Real dt = 0.001,
Real d = 1,
Real sf = 50,
Int s = -1,
CPS::Logger::Level ll = CPS::Logger::Level::info,
CPS::Logger::Level clill = CPS::Logger::Level::off,
Bool ss = false,
Bool b = false,
Bool si = false,
CPS::Domain sd = CPS::Domain::DP,
Solver::Type st = Solver::Type::MNA,
DirectLinearSolverImpl mi = DirectLinearSolverImpl::KLU,
String spn = "plugin.so" )

Definition at line 67 of file Utils.cpp.

Member Function Documentation

◆ getOptionBool()

Bool DPsim::CommandLineArgs::getOptionBool ( String optionName)
inline

Definition at line 123 of file Utils.h.

◆ getOptionInt()

Int DPsim::CommandLineArgs::getOptionInt ( String optionName)
inline

Definition at line 105 of file Utils.h.

◆ getOptionReal()

Real DPsim::CommandLineArgs::getOptionReal ( String optionName)
inline

Definition at line 114 of file Utils.h.

◆ getOptionString()

String DPsim::CommandLineArgs::getOptionString ( String optionName)
inline

Definition at line 133 of file Utils.h.

◆ parseArguments()

void CommandLineArgs::parseArguments ( int argc,
char * argv[] )

Definition at line 104 of file Utils.cpp.

◆ positionalPaths()

std::list< fs::path > CommandLineArgs::positionalPaths ( ) const

Definition at line 309 of file Utils.cpp.

◆ showUsage()

void CommandLineArgs::showUsage ( )

Definition at line 286 of file Utils.cpp.

Member Data Documentation

◆ blocking

bool DPsim::CommandLineArgs::blocking

Definition at line 88 of file Utils.h.

◆ cliLogLevel

CPS::Logger::Level DPsim::CommandLineArgs::cliLogLevel

Definition at line 83 of file Utils.h.

◆ directImpl

DPsim::DirectLinearSolverImpl DPsim::CommandLineArgs::directImpl

Definition at line 95 of file Utils.h.

◆ domain

CPS::Domain DPsim::CommandLineArgs::domain

Definition at line 92 of file Utils.h.

◆ duration

double DPsim::CommandLineArgs::duration

Definition at line 78 of file Utils.h.

◆ logLevel

CPS::Logger::Level DPsim::CommandLineArgs::logLevel

Definition at line 82 of file Utils.h.

◆ mArguments

std::vector<Argument> DPsim::CommandLineArgs::mArguments
protected

Definition at line 50 of file Utils.h.

◆ mProgramName

String DPsim::CommandLineArgs::mProgramName
protected

Definition at line 49 of file Utils.h.

◆ name

String DPsim::CommandLineArgs::name

Definition at line 84 of file Utils.h.

◆ options

std::map<String, String> DPsim::CommandLineArgs::options

Definition at line 103 of file Utils.h.

◆ params

String DPsim::CommandLineArgs::params

Definition at line 85 of file Utils.h.

◆ positional

std::list<String> DPsim::CommandLineArgs::positional

Definition at line 100 of file Utils.h.

◆ scenario

int DPsim::CommandLineArgs::scenario

Definition at line 80 of file Utils.h.

◆ solverPluginName

String DPsim::CommandLineArgs::solverPluginName

Definition at line 96 of file Utils.h.

◆ startSynch

bool DPsim::CommandLineArgs::startSynch

Definition at line 87 of file Utils.h.

◆ startTime

DPsim::Timer::StartClock::time_point DPsim::CommandLineArgs::startTime

Definition at line 98 of file Utils.h.

◆ steadyInit

bool DPsim::CommandLineArgs::steadyInit

Definition at line 89 of file Utils.h.

◆ sysFreq

double DPsim::CommandLineArgs::sysFreq

Definition at line 79 of file Utils.h.

◆ timeStep

double DPsim::CommandLineArgs::timeStep

Definition at line 77 of file Utils.h.

◆ type

Solver::Type DPsim::CommandLineArgs::type

Definition at line 93 of file Utils.h.


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