MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
rtai_out_elem.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/rtai_out_elem.h,v 1.31 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 /* socket driver */
33 
34 #ifndef RTAI_OUT_ELEM_H
35 #define RTAI_OUT_ELEM_H
36 
37 /* include del programma */
38 
39 #include <streamoutelem.h>
40 
41 /* RTMBDynOutElem - begin */
42 
43 class RTMBDynOutElem : public StreamOutElem, virtual public Elem {
44 protected:
45  /* FIXME: store restart info as well */
46  std::string host;
47  unsigned long node;
48  bool create;
49  int port;
51 
53 
54  void *mbx;
55  int (*f_send)(unsigned long node, int port, void *v_mbx,
56  void *msg, int msg_size);
57 
58 public:
59  RTMBDynOutElem(unsigned int uL, const std::string& m,
60  const std::string& host, unsigned long n, bool c,
62  virtual ~RTMBDynOutElem(void);
63 
64  virtual std::ostream& Restart(std::ostream& out) const;
65 
66  virtual void AfterConvergence(const VectorHandler& X,
67  const VectorHandler& XP);
68 
69  /* Inverse Dynamics: */
70  virtual void AfterConvergence(const VectorHandler& X,
71  const VectorHandler& XP,
72  const VectorHandler& XPP);
73 };
74 
75 #endif /* RTAI_OUT_ELEM_H */
76 
RTMBDynOutElem(unsigned int uL, const std::string &m, const std::string &host, unsigned long n, bool c, StreamContent *pSC, bool bNonBlocking)
virtual ~RTMBDynOutElem(void)
int(* f_send)(unsigned long node, int port, void *v_mbx, void *msg, int msg_size)
Definition: rtai_out_elem.h:55
std::string host
Definition: rtai_out_elem.h:46
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
virtual std::ostream & Restart(std::ostream &out) const
static std::stack< cleanup * > c
Definition: cleanup.cc:59
Definition: elem.h:75
StreamContent * pSC
Definition: rtai_out_elem.h:52
struct mbrtai_msg_t msg
unsigned long node
Definition: rtai_out_elem.h:47