FACT++  1.0
int main ( int  argc,
const char *  argv[] 
)

Definition at line 478 of file temperature.cc.

References Configuration::DoParse(), Configuration::Get(), Configuration::Has(), PrintHelp(), PrintUsage(), Configuration::SetPrintUsage(), Main::SetupConfiguration(), and SetupConfiguration().

479 {
480  Configuration conf(argv[0]);
481  conf.SetPrintUsage(PrintUsage);
483  SetupConfiguration(conf);
484 
485  if (!conf.DoParse(argc, argv, PrintHelp))
486  return 127;
487 
488  // No console access at all
489  if (!conf.Has("console"))
490  {
491  if (conf.Get<bool>("no-dim"))
492  return RunShell<LocalStream, StateMachine, ConnectionPowerSwitch>(conf);
493  else
494  return RunShell<LocalStream, StateMachineDim, ConnectionDimPowerSwitch>(conf);
495  }
496  // Cosole access w/ and w/o Dim
497  if (conf.Get<bool>("no-dim"))
498  {
499  if (conf.Get<int>("console")==0)
500  return RunShell<LocalShell, StateMachine, ConnectionPowerSwitch>(conf);
501  else
502  return RunShell<LocalConsole, StateMachine, ConnectionPowerSwitch>(conf);
503  }
504  else
505  {
506  if (conf.Get<int>("console")==0)
507  return RunShell<LocalShell, StateMachineDim, ConnectionDimPowerSwitch>(conf);
508  else
509  return RunShell<LocalConsole, StateMachineDim, ConnectionDimPowerSwitch>(conf);
510  }
511 
512  return 0;
513 }
void SetupConfiguration(Configuration &conf)
Definition: Main.h:25
void PrintUsage()
Definition: temperature.cc:441
void PrintHelp()
Definition: temperature.cc:456
void SetupConfiguration(Configuration &conf)
Definition: temperature.cc:416
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9

+ Here is the call graph for this function: