MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
rtposixsolver.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

RTSolverBaseReadRTPOSIXSolver (Solver *pS, MBDynParser &HP)
 

Function Documentation

RTSolverBase* ReadRTPOSIXSolver ( Solver pS,
MBDynParser HP 
)

Definition at line 174 of file rtposixsolver.cc.

References HighParser::GetYesNoOrBool(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, ReadRTParams(), and SAFENEWWITHCONSTRUCTOR.

Referenced by ReadRTSolver().

175 {
176 #ifdef USE_RT
177  RTSolverBase::RTMode eRTMode;
178  unsigned long lRTPeriod;
179  unsigned long RTStackSize;
180  bool bRTAllowNonRoot;
181  int RTCpuMap;
182  ReadRTParams(pS, HP, eRTMode, lRTPeriod, RTStackSize, bRTAllowNonRoot, RTCpuMap);
183 
184  bool bNoOutput = true;
185  if (HP.IsKeyWord("output")) {
186  bNoOutput = HP.GetYesNoOrBool(bNoOutput);
187  }
188 
189  RTSolverBase *pRTSolver(0);
190  SAFENEWWITHCONSTRUCTOR(pRTSolver, RTPOSIXSolver,
191  RTPOSIXSolver(pS, eRTMode, lRTPeriod,
192  RTStackSize, bRTAllowNonRoot, RTCpuMap,
193  bNoOutput));
194  return pRTSolver;
195 
196 #else // !USE_RT
197  silent_cerr("ReadRTPOSIXSolver: need to configure --with-rt "
198  "to use POSIX realtime" << std::endl);
200 
201  return 0;
202 #endif // USE_RT
203 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual bool GetYesNoOrBool(bool bDefval=false)
Definition: parser.cc:1038
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

Here is the call graph for this function: