MBDyn-1.7.3
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
rtaisolver.h
Go to the documentation of this file.
1
/* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/rtaisolver.h,v 1.13 2017/01/12 14:46:10 masarati Exp $ */
2
/*
3
* MBDyn (C) is a multibody analysis code.
4
* http://www.mbdyn.org
5
*
6
* Copyright (C) 1996-2017
7
*
8
* Pierangelo Masarati <masarati@aero.polimi.it>
9
* Paolo Mantegazza <mantegazza@aero.polimi.it>
10
*
11
* Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12
* via La Masa, 34 - 20156 Milano, Italy
13
* http://www.aero.polimi.it
14
*
15
* Changing this copyright notice is forbidden.
16
*
17
* This program is free software; you can redistribute it and/or modify
18
* it under the terms of the GNU General Public License as published by
19
* the Free Software Foundation (version 2 of the License).
20
*
21
*
22
* This program is distributed in the hope that it will be useful,
23
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
* GNU General Public License for more details.
26
*
27
* You should have received a copy of the GNU General Public License
28
* along with this program; if not, write to the Free Software
29
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30
*/
31
32
#ifndef RTAISOLVER_H
33
#define RTAISOLVER_H
34
35
#include "
rtsolver.h
"
36
37
/* RTAISolver - begin */
38
39
class
RTAISolver
:
public
RTSolverBase
{
40
private
:
41
bool
bRTHard
;
42
bool
bRTlog
;
43
const
std::string
LogProcName
;
44
45
long
long
lRTPeriod
;
46
47
/* if eRTMode == MBRTAI_SEMAPHORE */
48
void
*
RTSemPtr_in
;
49
void
*
RTSemPtr_out
;
50
51
void
*
mbxlog
;
52
int
RTStpFlag
;
53
int
t_tot
;
54
long
long
t0
,
t1
;
55
int
or_counter
;
56
57
public
:
58
RTAISolver
(
Solver
*
pS
,
59
RTMode
eRTMode
,
60
long
long
lRTPeriod
,
61
unsigned
long
RTStackSize
,
62
bool
bRTAllowNonRoot
,
63
int
RTCpuMap
,
64
bool
bRTHard
,
65
bool
bRTlog
,
66
const
std::string&
LogProcName
);
67
~RTAISolver
(
void
);
68
69
// write contribution to restart file
70
std::ostream&
Restart
(std::ostream& out)
const
;
71
// very first setup, to be always performed
72
void
Setup
(
void
);
73
// initialization to be performed only if real-time is requested
74
void
Init
(
void
);
75
// check whether stop is commanded by real-time
76
bool
IsStopCommanded
(
void
);
77
// to be performed when stop is commanded by someone else
78
void
StopCommanded
(
void
);
79
// write real-time related message when stop commanded by someone else
80
void
Log
(
void
);
81
// wait for period to expire
82
void
Wait
(
void
);
83
};
84
85
/* RTAISolver - end */
86
87
extern
RTSolverBase
*
88
ReadRTAISolver
(
Solver
*pS,
MBDynParser
& HP);
89
90
#endif // RTAISOLVER_H
91
RTAISolver::RTSemPtr_in
void * RTSemPtr_in
Definition:
rtaisolver.h:48
RTAISolver::~RTAISolver
~RTAISolver(void)
Definition:
rtaisolver.cc:78
rtsolver.h
RTSolverBase::RTStackSize
unsigned long RTStackSize
Definition:
rtsolver.h:59
RTAISolver::Init
void Init(void)
Definition:
rtaisolver.cc:148
RTAISolver::Wait
void Wait(void)
Definition:
rtaisolver.cc:337
RTSolverBase::RTMode
RTMode
Definition:
rtsolver.h:41
MBDynParser
Definition:
mbpar.h:129
RTAISolver::mbxlog
void * mbxlog
Definition:
rtaisolver.h:51
RTAISolver::lRTPeriod
long long lRTPeriod
Definition:
rtaisolver.h:45
RTAISolver::StopCommanded
void StopCommanded(void)
Definition:
rtaisolver.cc:320
RTAISolver::Setup
void Setup(void)
Definition:
rtaisolver.cc:129
RTAISolver::t0
long long t0
Definition:
rtaisolver.h:54
RTSolverBase
Definition:
rtsolver.h:39
RTSolverBase::eRTMode
RTMode eRTMode
Definition:
rtsolver.h:54
RTAISolver::RTAISolver
RTAISolver(Solver *pS, RTMode eRTMode, long long lRTPeriod, unsigned long RTStackSize, bool bRTAllowNonRoot, int RTCpuMap, bool bRTHard, bool bRTlog, const std::string &LogProcName)
Definition:
rtaisolver.cc:50
ReadRTAISolver
RTSolverBase * ReadRTAISolver(Solver *pS, MBDynParser &HP)
Definition:
rtaisolver.cc:377
RTAISolver::bRTHard
bool bRTHard
Definition:
rtaisolver.h:41
RTAISolver::LogProcName
const std::string LogProcName
Definition:
rtaisolver.h:43
RTAISolver::t_tot
int t_tot
Definition:
rtaisolver.h:53
Solver
Definition:
solver.h:78
RTAISolver::Restart
std::ostream & Restart(std::ostream &out) const
Definition:
rtaisolver.cc:88
RTAISolver::RTSemPtr_out
void * RTSemPtr_out
Definition:
rtaisolver.h:49
RTAISolver::or_counter
int or_counter
Definition:
rtaisolver.h:55
RTSolverBase::RTCpuMap
int RTCpuMap
Definition:
rtsolver.h:61
RTSolverBase::pS
Solver * pS
Definition:
rtsolver.h:52
RTAISolver
Definition:
rtaisolver.h:39
RTAISolver::IsStopCommanded
bool IsStopCommanded(void)
Definition:
rtaisolver.cc:309
RTAISolver::RTStpFlag
int RTStpFlag
Definition:
rtaisolver.h:52
RTAISolver::bRTlog
bool bRTlog
Definition:
rtaisolver.h:42
RTAISolver::Log
void Log(void)
Definition:
rtaisolver.cc:329
RTSolverBase::bRTAllowNonRoot
bool bRTAllowNonRoot
Definition:
rtsolver.h:60
RTAISolver::t1
long long t1
Definition:
rtaisolver.h:54
mbdyn
base
rtaisolver.h
Generated on Fri Apr 13 2018 10:19:36 for MBDyn-1.7.3 by
1.8.7