MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
connection.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: connection.h,v $ $Revision: 1.25 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtRtiConnection_H_
13 #define DtRtiConnection_H_
14 
15 #include <vlutil/vlInetAddr.h>
16 #include "rtiMsgFact.h"
17 
18 class DtRtiMsg;
19 class DtMsgSocket;
20 
22 {
35 };
36 
39 {
40 public:
41 
44 
46  virtual ~DtRtiConnection();
47 
51  virtual void setMsgFactory(DtRtiMsgFactory* fact);
52  virtual DtRtiMsgFactory *rtiMsgFactory();
53 
54 
57  virtual DtRtiMsg* netRead(DtNetReadStatus *retCode = NULL);
58 
60  virtual int send(const DtRtiMsg& msg,
61  const MAKRti::DtInetAddr& addr = MAKRti::DtInetAddr());
62 
65  virtual bool flush();
66 
68  virtual int isOk();
69 
72  virtual void setCheckVersion(bool enableCheckVersion);
73  virtual bool checkVersion() const;
74 
76  virtual void disableCheckSize();
77 
79  virtual void enableCheckSize();
80 
82  virtual void setFedExName(const MAKRti::DtString& newFedExName);
83  virtual const MAKRti::DtString& fedExName() const;
84 
86  virtual void setFedExHandle(int handle);
87  virtual int fedExHandle() const;
88 
90  virtual void setFederateHandle(DtFederationHandle handle);
91  virtual DtFederationHandle federateHandle() const;
92 
94  virtual void setConnId(unsigned long connId);
95  virtual unsigned long connId() const;
96 
98  virtual DtMsgSocket* socket();
99 
100 protected:
101 
102  void init(DtMsgSocket *s);
103 
104 private:
106  DtRtiConnection(const DtRtiConnection& orig);
107 
109  DtRtiConnection& operator=(DtRtiConnection const& orig);
110 
111 protected:
112 
113  MAKRti::DtString myFedExName;
118  unsigned long myReceivedMsgCount;
121  unsigned int myWaitEventIndex;
122  unsigned long myConnId;
123 };
124 
126 {
127  return myMsgFact;
128 }
129 
131 {
132  return mySocket;
133 }
134 
135 inline void DtRtiConnection::setFedExName(const MAKRti::DtString& newFedExName)
136 {
137  myFedExName = newFedExName;
138 }
139 
140 inline const MAKRti::DtString& DtRtiConnection::fedExName() const
141 {
142  return myFedExName;
143 }
144 
145 inline void DtRtiConnection::setFedExHandle(int handle)
146 {
147  myFedExHandle = handle;
148 }
149 
151 {
152  return myFedExHandle;
153 }
154 
156 {
157  myFedHandle = handle;
158 }
159 
161 {
162  return myFedHandle;
163 }
164 
165 inline void DtRtiConnection::setConnId(unsigned long connId)
166 {
167  myConnId = connId;
168 }
169 
170 inline unsigned long DtRtiConnection::connId() const
171 {
172  return myConnId;
173 }
174 
175 #endif
176 
177 

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)