MAK RTIspy API Documentation for HLA 1516
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
libsrc
RTI
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
21
enum
DtNetReadStatus
22
{
23
DtNET_READ_SUCCESS
= 0,
24
DtNET_READ_NO_PACKETS
,
25
DtNET_READ_BAD_PACKET
,
26
DtNET_READ_SERVER_MSG
,
27
DtNET_READ_SIZE_MISMATCH
,
28
DtNET_READ_VERSION_MISMATCH
,
29
DtNET_READ_VERSION_UNKNOWN
,
30
DtNET_READ_FILTERED_PACKET
,
31
DtNET_QUEUED_PACKET
,
32
DtNET_INVALID_VERSION
,
33
DtNET_BUFFER_TOO_SMALL
,
34
DtNET_UNKNOWN_ERROR
35
};
36
38
class
DT_DLL_LRC
DtRtiConnection
39
{
40
public
:
41
43
DtRtiConnection
(
DtMsgSocket
*skt);
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
;
114
int
myFedExHandle
;
115
DtFederationHandle
myFedHandle
;
116
DtMsgSocket
*
mySocket
;
117
DtRtiMsgFactory
*
myMsgFact
;
118
unsigned
long
myReceivedMsgCount
;
119
bool
myCheckSize
;
120
bool
myCheckVersion
;
121
unsigned
int
myWaitEventIndex
;
122
unsigned
long
myConnId
;
123
};
124
125
inline
DtRtiMsgFactory
*
DtRtiConnection::rtiMsgFactory
()
126
{
127
return
myMsgFact
;
128
}
129
130
inline
DtMsgSocket
*
DtRtiConnection::socket
()
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
150
inline
int
DtRtiConnection::fedExHandle
()
const
151
{
152
return
myFedExHandle
;
153
}
154
155
inline
void
DtRtiConnection::setFederateHandle
(
DtFederationHandle
handle)
156
{
157
myFedHandle
= handle;
158
}
159
160
inline
DtFederationHandle
DtRtiConnection::federateHandle
()
const
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 Fri Sep 27 00:57:56 EDT 2019 from SVN revision 201708
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (
www.mak.com
)