VR-Link API Documentation for HLA Evolved
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vlpi
NetStructs.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
6
7
#ifndef _NetStructs_H_
8
#define _NetStructs_H_
9
10
#include <
vlutil/vlTime.h
>
11
#include <
matrix/vlMath.h
>
12
#include <
matrix/vlTaitBryan.h
>
13
#include <
vlutil/vlNetTypes.h
>
14
#include <
vlutil/vlNetTimeStamp.h
>
15
#include "
oldTStamp.h
"
16
19
20
21
class
DT_DLL_VLPROTIND
DtEntityIdentifier
;
22
class
DT_DLL_VLPROTIND
DtBurstDescriptor
;
23
class
DT_DLL_VLPROTIND
DtEventId
;
24
class
DT_DLL_VLPROTIND
DtEntityType
;
25
class
DT_DLL_VLPROTIND
DtRadioEntityType
;
26
class
DT_DLL_VLPROTIND
DtSimulationAddress
;
27
28
typedef
DtSimulationAddress
DtFederateId
;
29
30
class
DT_DLL_VLPROTIND
DtNetFederateId
31
{
32
public
:
33
DtNetU16
site
;
34
DtNetU16
app
;
35
36
DtFederateId
operator=(
const
DtFederateId
&);
37
DtNetFederateId
& operator=(
const
DtNetFederateId
&);
38
};
39
40
41
class
DT_DLL_VLPROTIND
DtNetEntityMarking
42
{
43
public
:
44
DtNetU8
DtCharacterSet
;
45
#define DtMaxEntityMarkingLength 11
46
DtNetU8
DtText[
DtMaxEntityMarkingLength
];
47
};
48
49
class
DT_DLL_VLPROTIND
DtNetAggregateMarking
50
{
51
public
:
52
DtNetU8
DtCharacterSet
;
53
#define DtMaxAggregateMarkingLength 31
54
DtNetU8
DtText[
DtMaxAggregateMarkingLength
];
55
};
56
57
class
DT_DLL_VLPROTIND
DtNetEntityType
58
{
59
public
:
60
DtNetU8
DtEntityKind
;
61
DtNetU8
DtDomain
;
62
DtNetU16
DtCountry
;
63
DtNetU8
DtCategory
;
64
DtNetU8
DtSubCategory
;
65
DtNetU8
DtSpecific
;
66
DtNetU8
DtExtra
;
67
68
DtEntityType
operator=(
const
DtEntityType
&);
69
DtNetEntityType
& operator=(
const
DtNetEntityType
&);
70
};
71
72
class
DT_DLL_VLPROTIND
DtNetRadioEntityType
73
{
74
public
:
75
DtNetU8
kind
;
76
DtNetU8
domain
;
77
DtNetU16
country
;
78
DtNetU8
category
;
79
DtNetU8
nomenclatureVersion
;
80
DtNetU16
nomenclature
;
81
82
DtRadioEntityType
operator=(
const
DtRadioEntityType
&);
83
DtNetRadioEntityType
&operator=(
const
DtNetRadioEntityType
&);
84
};
85
86
class
DT_DLL_VLPROTIND
DtNetBurstDescriptor
87
{
88
public
:
89
DtNetEntityType
DtMunition
;
90
DtNetU16
DtWarhead
;
91
DtNetU16
DtFuze
;
92
DtNetU16
DtQuantity
;
93
DtNetU16
DtRate
;
94
95
DtBurstDescriptor
operator=(
const
DtBurstDescriptor
&);
96
DtNetBurstDescriptor
& operator=(
const
DtNetBurstDescriptor
&);
97
};
98
99
class
DT_DLL_VLPROTIND
DtNetSimulationAddress
100
{
101
public
:
102
DtNetU16
DtSite
;
103
DtNetU16
DtHost
;
104
105
DtSimulationAddress
operator=(
const
DtSimulationAddress
&);
106
DtNetSimulationAddress
& operator=(
const
DtNetSimulationAddress
&);
107
};
108
109
class
DT_DLL_VLPROTIND
DtNetEntityIdentifier
110
{
111
public
:
112
DtNetSimulationAddress
DtSimulator
;
113
DtNetU16
DtEntity
;
114
115
DtEntityIdentifier
operator=(
const
DtEntityIdentifier
&);
116
DtNetEntityIdentifier
& operator=(
const
DtNetEntityIdentifier
&);
117
};
118
119
120
123
class
DT_DLL_VLPROTIND
DtNet64Vector
124
{
125
public
:
126
DtNet64Vector
()
127
{rep[0] = rep[1] = rep[2] = 0.0;}
128
DtNet64Vector
(
const
DtVector
&vec)
129
{rep[0] = vec[0]; rep[1] = vec[1]; rep[2] = vec[2];}
130
DtVector
operator=(
const
DtVector
&vec)
131
{rep[0] = vec[0]; rep[1] = vec[1]; rep[2] = vec[2];
return
vec;}
132
operator
DtVector
()
const
{
return
DtVector
(rep[0], rep[1], rep[2]);}
133
DtNetFloat64
&
operator[]
(
int
i) {
return
rep[i];}
134
DtNetFloat64
operator[]
(
int
i)
const
{
return
rep[i];}
135
private
:
136
DtNetFloat64
rep[3];
137
};
138
141
class
DT_DLL_VLPROTIND
DtNet32Vector
142
{
143
public
:
144
DtNet32Vector
()
145
{rep[0] = rep[1] = rep[2] = (float)0.0;}
146
DtNet32Vector
(
const
DtVector
&vec)
147
{rep[0] = (float)vec[0]; rep[1] = (float)vec[1]; rep[2] = (float)vec[2];}
148
DtVector
operator=(
const
DtVector
&vec)
149
{rep[0] = (float)vec[0]; rep[1] = (float)vec[1]; rep[2] = (float)vec[2];
return
vec;}
150
operator
DtVector
()
const
151
{
return
DtVector
((
DtFloat32
) rep[0], (
DtFloat32
) rep[1], (
DtFloat32
) rep[2]);}
152
DtNetFloat32
&
operator[]
(
int
i) {
return
rep[i];}
153
DtNetFloat32
operator[]
(
int
i)
const
{
return
rep[i];}
154
private
:
155
DtNetFloat32
rep[3];
156
};
157
158
class
DT_DLL_VLPROTIND
DtNetEulerAngles
159
{
160
public
:
161
DtNetEulerAngles
() { psi = theta = phi = (float)0.0;}
162
DtNetEulerAngles
(
const
DtTaitBryan
&tait)
163
{psi = (
DtFloat32
)tait.
psi
(); theta = (
DtFloat32
)tait.
theta
(); phi = (
DtFloat32
)tait.
phi
();}
164
DtTaitBryan
operator=(
const
DtTaitBryan
&tait)
165
{psi = (
DtFloat32
)tait.
psi
(); theta = (
DtFloat32
)tait.
theta
(); phi = (
DtFloat32
)tait.
phi
();
return
tait;}
166
operator
DtTaitBryan
()
const
{
return
DtTaitBryan
(psi, theta, phi);}
167
DtNetFloat32
psi
;
/* Counter clockwise about z */
168
DtNetFloat32
theta
;
/* Counter clockwise about y */
169
DtNetFloat32
phi
;
/* Counter clockwise about x */
170
};
171
172
/***************************************************************
173
These structures don't need to be C++ classes even on little endian machines.
174
****************************************************************/
175
176
typedef
struct
DtNetArtParamRecordRPR1
177
{
178
DtNetU8
myChange
;
179
DtNetU8
padding
;
180
DtNetU16
myAttachedTo
;
181
DtNetU32
myArtOrAttached
;
182
DtNetU32
myClass
;
183
DtNetU32
myTypeMetric
;
184
DtNetFloat32
myValue
;
185
}
DtNetArtParamRecordRPR1
;
186
187
typedef
struct
DtNetArtParamRecord
188
{
189
DtNetU8
artOrAttached
;
190
DtNetU8
DtChange
;
191
DtNetU16
DtAttachedTo
;
192
DtNetU32
DtType
;
193
DtNet64Bits
DtValue
;
194
}
DtNetArtParamRecord
;
195
196
typedef
DtNetArtParamRecord
DtArticulatedParts
;
197
typedef
DtNetArtParamRecord
DtNetArtPartRecord
;
198
199
typedef
struct
DtNetAttachedPartRPR1
200
{
201
DtNetU8
myChange
;
202
DtNetU8
padding
;
203
DtNetU16
myAttachedTo
;
204
DtNetU32
myArtOrAttatched
;
205
DtNetU32
myStation
;
206
DtNetEntityType
myType
;
207
}
DtNetAttachedPartRPR1
;
208
209
typedef
struct
DtNetAttachedPart
210
{
211
212
DtNetU8
myArtOrAttached
;
213
DtNetU8
myChange
;
214
DtNetU16
myAttachedTo
;
215
DtNetU32
myStation
;
216
DtNetEntityType
myType
;
217
}
DtNetAttachedPart
;
218
219
typedef
struct
DtNetAngularVelocity
220
{
221
DtNetFloat32
wx
;
222
DtNetFloat32
wy
;
223
DtNetFloat32
wz
;
224
}
DtNetAngularVelocity
;
225
226
typedef
struct
DtNetLinearVelocity
227
{
228
DtNetFloat32
DtX
;
229
DtNetFloat32
DtY
;
230
DtNetFloat32
DtZ
;
231
}
DtNetLinearVelocity
;
232
233
typedef
struct
DtNetWorldCoordinates
234
{
235
DtNetFloat64
DtX
;
236
DtNetFloat64
DtY
;
237
DtNetFloat64
DtZ
;
238
}
DtNetWorldCoordinates
;
239
240
typedef
struct
DtNetEntityCoordinates
241
{
242
DtNetFloat32
DtX
;
243
DtNetFloat32
DtY
;
244
DtNetFloat32
DtZ
;
245
}
DtNetEntityCoordinates
;
246
247
typedef
struct
DtNetTopoUpCoord
248
{
249
DtNetFloat32
East
;
250
DtNetFloat32
North
;
251
DtNetFloat32
Up
;
252
}
DtNetTopoUpCoord
;
253
254
typedef
struct
255
{
256
DtNetInt32
hour
;
257
DtNetTimeStamp
hourFrac
;
258
}
DtNetClockTime
;
259
260
DT_DLL_VLPROTIND
DtTime
DtClockTime2AbsTime
(
const
DtNetClockTime
*clock);
261
DT_DLL_VLPROTIND
void
DtAbsTime2ClockTime
(
DtTime
absTime,
DtNetClockTime
*clock);
262
263
#endif
/* _NETSTRUCTS_H_ */
264
265
266
Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)