MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
rtaisolver.cc File Reference
#include "mbconfig.h"
#include "mbdefs.h"
#include "solver.h"
#include "solver_impl.h"
#include "rtaisolver.h"
#include "mbrtai_utils.h"
Include dependency graph for rtaisolver.cc:

Go to the source code of this file.

Classes

struct  mbrtai_msg_t
 

Functions

RTSolverBaseReadRTAISolver (Solver *pS, MBDynParser &HP)
 

Variables

struct mbrtai_msg_t msg
 

Function Documentation

RTSolverBase* ReadRTAISolver ( Solver pS,
MBDynParser HP 
)

Definition at line 377 of file rtaisolver.cc.

References IncludeParser::GetFileName(), IncludeParser::GetLineData(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, ReadRTParams(), and SAFENEWWITHCONSTRUCTOR.

Referenced by ReadRTSolver().

378 {
379  RTSolverBase::RTMode eRTMode;
380  unsigned long lRTPeriod;
381  unsigned long RTStackSize;
382  bool bRTAllowNonRoot;
383  int RTCpuMap;
384  ReadRTParams(pS, HP, eRTMode, lRTPeriod, RTStackSize, bRTAllowNonRoot, RTCpuMap);
385 
386  bool bRTHard = false;
387  if (HP.IsKeyWord("hard" "real" "time")) {
388  bRTHard = true;
389  }
390 
391  bool bRTlog(false);
392  std::string LogProcName;
393  if (HP.IsKeyWord("real" "time" "log")) {
394  if (HP.IsKeyWord("file" "name")){
395  const char *m = HP.GetFileName();
396  if (m == 0) {
397  silent_cerr("RTAISolver: unable to get "
398  "log process name (\"file name\") "
399  "at line " << HP.GetLineData()
400  << std::endl);
402  }
403  LogProcName = m;
404 
405  } else {
406  // built-in log process
407  LogProcName = "logproc";
408  }
409 
410  bRTlog = true;
411  }
412 
413  RTSolverBase *pRTSolver(0);
415  RTAISolver(pS, eRTMode, lRTPeriod,
416  RTStackSize, bRTAllowNonRoot, RTCpuMap,
417  bRTHard, bRTlog, LogProcName));
418 
419  return pRTSolver;
420 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual const char * GetFileName(enum Delims Del=DEFAULTDELIM)
Definition: parsinc.cc:673
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
void ReadRTParams(Solver *pS, MBDynParser &HP, RTSolverBase::RTMode &eRTMode, unsigned long &lRTPeriod, unsigned long &RTStackSize, bool &bRTAllowNonRoot, int &RTCpuMap)
Definition: rtsolver.cc:89
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697

Here is the call graph for this function:

Variable Documentation