VR-Link API Documentation for HLA 1516
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
#pragma once
7
8
#include <
vlutil/vlTime.h
>
9
#include <
matrix/vlMath.h
>
10
#include <
matrix/vlTaitBryan.h
>
11
#include <
vlutil/vlNetTypes.h
>
12
#include <
vlutil/vlNetTimeStamp.h
>
13
#include "
oldTStamp.h
"
14
17
18
19
class
DT_DLL_VLPROTIND
DtEntityIdentifier
;
20
class
DT_DLL_VLPROTIND
DtBurstDescriptor
;
21
class
DT_DLL_VLPROTIND
DtEventId
;
22
class
DT_DLL_VLPROTIND
DtEntityType
;
23
class
DT_DLL_VLPROTIND
DtRadioEntityType
;
24
class
DT_DLL_VLPROTIND
DtSimulationAddress
;
25
26
typedef
DtSimulationAddress
DtFederateId
;
27
28
class
DT_DLL_VLPROTIND
DtNetFederateId
29
{
30
public
:
31
DtNetU16
site
;
32
DtNetU16
app
;
33
34
DtFederateId
operator=(
const
DtFederateId
&);
35
DtNetFederateId
& operator=(
const
DtNetFederateId
&);
36
};
37
38
39
class
DT_DLL_VLPROTIND
DtNetEntityMarking
40
{
41
public
:
42
DtNetU8
DtCharacterSet
;
43
#define DtMaxEntityMarkingLength 11
44
DtNetU8
DtText[
DtMaxEntityMarkingLength
];
45
};
46
47
class
DT_DLL_VLPROTIND
DtNetAggregateMarking
48
{
49
public
:
50
DtNetU8
DtCharacterSet
;
51
#define DtMaxAggregateMarkingLength 31
52
DtNetU8
DtText[
DtMaxAggregateMarkingLength
];
53
};
54
55
class
DT_DLL_VLPROTIND
DtNetEntityType
56
{
57
public
:
58
DtNetU8
DtEntityKind
;
59
DtNetU8
DtDomain
;
60
DtNetU16
DtCountry
;
61
DtNetU8
DtCategory
;
62
DtNetU8
DtSubCategory
;
63
DtNetU8
DtSpecific
;
64
DtNetU8
DtExtra
;
65
66
DtEntityType
operator=(
const
DtEntityType
&);
67
DtNetEntityType
& operator=(
const
DtNetEntityType
&);
68
};
69
70
class
DT_DLL_VLPROTIND
DtNetRadioEntityType
71
{
72
public
:
73
DtNetU8
kind
;
74
DtNetU8
domain
;
75
DtNetU16
country
;
76
DtNetU8
category
;
77
DtNetU8
nomenclatureVersion
;
78
DtNetU16
nomenclature
;
79
80
DtRadioEntityType
operator=(
const
DtRadioEntityType
&);
81
DtNetRadioEntityType
&operator=(
const
DtNetRadioEntityType
&);
82
};
83
84
class
DT_DLL_VLPROTIND
DtNetBurstDescriptor
85
{
86
public
:
87
DtNetEntityType
DtMunition
;
88
DtNetU16
DtWarhead
;
89
DtNetU16
DtFuze
;
90
DtNetU16
DtQuantity
;
91
DtNetU16
DtRate
;
92
93
DtBurstDescriptor
operator=(
const
DtBurstDescriptor
&);
94
DtNetBurstDescriptor
& operator=(
const
DtNetBurstDescriptor
&);
95
};
96
97
class
DT_DLL_VLPROTIND
DtNetSimulationAddress
98
{
99
public
:
100
DtNetU16
DtSite
;
101
DtNetU16
DtHost
;
102
103
DtSimulationAddress
operator=(
const
DtSimulationAddress
&);
104
DtNetSimulationAddress
& operator=(
const
DtNetSimulationAddress
&);
105
bool
operator==
(
const
DtNetSimulationAddress
& rhs)
const
106
{
107
return
(DtSite == rhs.
DtSite
)
108
&& (DtHost == rhs.
DtHost
);
109
}
110
bool
operator!=
(
const
DtNetSimulationAddress
& rhs)
const
111
{
112
return
!
operator==
(rhs);
113
}
114
};
115
116
class
DT_DLL_VLPROTIND
DtNetEntityIdentifier
117
{
118
public
:
119
DtNetSimulationAddress
DtSimulator
;
120
DtNetU16
DtEntity
;
121
122
DtEntityIdentifier
operator=(
const
DtEntityIdentifier
&);
123
DtNetEntityIdentifier
& operator=(
const
DtNetEntityIdentifier
&);
124
bool
operator==
(
const
DtNetEntityIdentifier
& rhs)
const
125
{
126
return
(DtSimulator == rhs.
DtSimulator
)
127
&& (DtEntity == rhs.
DtEntity
);
128
}
129
bool
operator!=
(
const
DtNetEntityIdentifier
& rhs)
const
130
{
131
return
!
operator==
(rhs);
132
}
133
};
134
135
136
class
DT_DLL_VLPROTIND
DtNetObjectType
137
{
138
public
:
139
DtNetU8
myDomain
;
140
DtNetU8
myKind
;
141
DtNetU8
myCategory
;
142
DtNetU8
mySubcategory
;
143
144
DtNetObjectType
& operator=(
const
DtNetObjectType
&);
145
bool
operator==
(
const
DtNetObjectType
& rhs)
const
146
{
147
return
(myDomain == rhs.
myDomain
)
148
&& (myKind == rhs.
myKind
)
149
&& (myCategory == rhs.
myCategory
)
150
&& (mySubcategory == rhs.
mySubcategory
);
151
}
152
bool
operator!=
(
const
DtNetObjectType
& rhs)
const
153
{
154
return
!
operator==
(rhs);
155
}
156
};
157
160
class
DT_DLL_VLPROTIND
DtNet64Vector
161
{
162
public
:
163
DtNet64Vector
()
164
{rep[0] = rep[1] = rep[2] = 0.0;}
165
DtNet64Vector
(
const
DtVector
&vec)
166
{rep[0] = vec[0]; rep[1] = vec[1]; rep[2] = vec[2];}
167
DtVector
operator=(
const
DtVector
&vec)
168
{rep[0] = vec[0]; rep[1] = vec[1]; rep[2] = vec[2];
return
vec;}
169
operator
DtVector
()
const
{
return
DtVector
(rep[0], rep[1], rep[2]);}
170
DtNetFloat64
&
operator[]
(
int
i) {
return
rep[i];}
171
DtNetFloat64
operator[]
(
int
i)
const
{
return
rep[i];}
172
private
:
173
DtNetFloat64
rep[3];
174
};
175
178
class
DT_DLL_VLPROTIND
DtNet32Vector
179
{
180
public
:
181
DtNet32Vector
()
182
{rep[0] = rep[1] = rep[2] = (
float
)0.0;}
183
DtNet32Vector
(
const
DtVector
&vec)
184
{rep[0] = (
float
)vec[0]; rep[1] = (
float
)vec[1]; rep[2] = (
float
)vec[2];}
185
DtVector
operator=(
const
DtVector
&vec)
186
{rep[0] = (
float
)vec[0]; rep[1] = (
float
)vec[1]; rep[2] = (
float
)vec[2];
return
vec;}
187
operator
DtVector
()
const
188
{
return
DtVector
((
DtFloat32
) rep[0], (
DtFloat32
) rep[1], (
DtFloat32
) rep[2]);}
189
DtNetFloat32
&
operator[]
(
int
i) {
return
rep[i];}
190
DtNetFloat32
operator[]
(
int
i)
const
{
return
rep[i];}
191
private
:
192
DtNetFloat32
rep[3];
193
};
194
195
class
DT_DLL_VLPROTIND
DtNetEulerAngles
196
{
197
public
:
198
DtNetEulerAngles
() { psi = theta = phi = (
float
)0.0;}
199
DtNetEulerAngles
(
const
DtTaitBryan
&tait)
200
{psi = (
DtFloat32
)tait.
psi
(); theta = (
DtFloat32
)tait.
theta
(); phi = (
DtFloat32
)tait.
phi
();}
201
DtTaitBryan
operator=(
const
DtTaitBryan
&tait)
202
{psi = (
DtFloat32
)tait.
psi
(); theta = (
DtFloat32
)tait.
theta
(); phi = (
DtFloat32
)tait.
phi
();
return
tait;}
203
operator
DtTaitBryan
()
const
{
return
DtTaitBryan
(psi, theta, phi);}
204
DtNetFloat32
psi
;
/* Counter clockwise about z */
205
DtNetFloat32
theta
;
/* Counter clockwise about y */
206
DtNetFloat32
phi
;
/* Counter clockwise about x */
207
};
208
209
/***************************************************************
210
These structures don't need to be C++ classes even on little endian machines.
211
****************************************************************/
212
213
typedef
struct
DtNetArtParamRecordRPR1
214
{
215
DtNetU8
myChange
;
216
DtNetU8
padding
;
217
DtNetU16
myAttachedTo
;
218
DtNetU32
myArtOrAttached
;
219
DtNetU32
myClass
;
220
DtNetU32
myTypeMetric
;
221
DtNetFloat32
myValue
;
222
}
DtNetArtParamRecordRPR1
;
223
224
typedef
struct
DtNetArtParamRecord
225
{
226
DtNetU8
artOrAttached
;
227
DtNetU8
DtChange
;
228
DtNetU16
DtAttachedTo
;
229
DtNetU32
DtType
;
230
DtNet64Bits
DtValue
;
231
}
DtNetArtParamRecord
;
232
233
typedef
DtNetArtParamRecord
DtArticulatedParts
;
234
typedef
DtNetArtParamRecord
DtNetArtPartRecord
;
235
236
typedef
struct
DtNetEntityAssociationRecord
237
{
238
DtNetU8
myArtOrAttached
;
239
DtNetU8
myChange
;
240
DtNetU8
myAssociationStatus
;
241
DtNetU8
myAssociationType
;
242
DtNetEntityIdentifier
myEntityId
;
243
DtNetU16
myOwnStationLocation
;
244
DtNetU8
myPhysicalConnectionType
;
245
DtNetU8
myGroupMemberType
;
246
DtNetU16
myGroupNumber
;
247
}
DtNetEntityAssociationRecord
;
248
249
typedef
struct
DtNetEntityTypeRecord
250
{
251
DtNetU8
myArtOrAttached
;
252
DtNetU8
myChange
;
253
DtNetEntityType
myEntityType
;
254
DtNetU16
padding16
;
255
DtNetU32
padding32
;
256
}
DtNetEntityTypeRecord
;
257
258
typedef
struct
DtNetSeparationRecord
259
{
260
DtNetU8
myArtOrAttached
;
261
DtNetU8
mySeparationReason
;
262
DtNetU8
myPreEntityIndicator
;
263
DtNetU8
padding8
;
264
DtNetEntityIdentifier
myParentEntityId
;
265
DtNetU16
padding16
;
266
DtNetU16
myStationName
;
267
DtNetU16
myStationNumber
;
268
}
DtNetSeparationRecord
;
269
270
typedef
struct
DtNetAttachedPartRPR1
271
{
272
DtNetU8
myChange
;
273
DtNetU8
padding
;
274
DtNetU16
myAttachedTo
;
275
DtNetU32
myArtOrAttatched
;
276
DtNetU32
myStation
;
277
DtNetEntityType
myType
;
278
}
DtNetAttachedPartRPR1
;
279
280
typedef
struct
DtNetAttachedPart
281
{
282
283
DtNetU8
myArtOrAttached
;
284
DtNetU8
myChange
;
285
DtNetU16
myAttachedTo
;
286
DtNetU32
myStation
;
287
DtNetEntityType
myType
;
288
}
DtNetAttachedPart
;
289
290
typedef
struct
DtNetVPRecord
291
{
292
DtNetU8
myVPType
;
293
DtNetU8
myUnused1
;
294
DtNetU16
myUnused2
;
295
DtNetU32
myUnused3
;
296
DtNetU32
myUnused4
;
297
DtNetU32
myUnused5
;
298
}
DtNetVPRecord
;
299
300
typedef
struct
DtNetAngularVelocity
301
{
302
DtNetFloat32
wx
;
303
DtNetFloat32
wy
;
304
DtNetFloat32
wz
;
305
}
DtNetAngularVelocity
;
306
307
typedef
struct
DtNetLinearVelocity
308
{
309
bool
operator==
(
const
DtNetLinearVelocity
& rhs)
const
310
{
311
return
(
DtX
== rhs.
DtX
)
312
&& (
DtY
== rhs.
DtY
)
313
&& (
DtZ
== rhs.
DtZ
);
314
}
315
bool
operator!=
(
const
DtNetLinearVelocity
& rhs)
const
316
{
317
return
!
operator==
(rhs);
318
}
319
DtNetFloat32
DtX
;
320
DtNetFloat32
DtY
;
321
DtNetFloat32
DtZ
;
322
}
DtNetLinearVelocity
;
323
324
typedef
struct
DtNetLinearAcceleration
325
{
326
bool
operator==
(
const
DtNetLinearAcceleration
& rhs)
const
327
{
328
return
(
DtX
== rhs.
DtX
)
329
&& (
DtY
== rhs.
DtY
)
330
&& (
DtZ
== rhs.
DtZ
);
331
}
332
bool
operator!=
(
const
DtNetLinearAcceleration
& rhs)
const
333
{
334
return
!
operator==
(rhs);
335
}
336
DtNetFloat32
DtX
;
337
DtNetFloat32
DtY
;
338
DtNetFloat32
DtZ
;
339
}
DtNetLinearAcceleration
;
340
341
typedef
struct
DtNetWorldCoordinates
342
{
343
bool
operator==
(
const
DtNetWorldCoordinates
& rhs)
const
344
{
345
return
(
DtX
== rhs.
DtX
)
346
&& (
DtY
== rhs.
DtY
)
347
&& (
DtZ
== rhs.
DtZ
);
348
}
349
bool
operator!=
(
const
DtNetWorldCoordinates
& rhs)
const
350
{
351
return
!
operator==
(rhs);
352
}
353
DtNetFloat64
DtX
;
354
DtNetFloat64
DtY
;
355
DtNetFloat64
DtZ
;
356
}
DtNetWorldCoordinates
;
357
358
typedef
struct
DtNetEntityCoordinates
359
{
360
bool
operator==
(
const
DtNetEntityCoordinates
& rhs)
const
361
{
362
return
(
DtX
== rhs.
DtX
)
363
&& (
DtY
== rhs.
DtY
)
364
&& (
DtZ
== rhs.
DtZ
);
365
}
366
bool
operator!=
(
const
DtNetEntityCoordinates
& rhs)
const
367
{
368
return
!
operator==
(rhs);
369
}
370
DtNetFloat32
DtX
;
371
DtNetFloat32
DtY
;
372
DtNetFloat32
DtZ
;
373
}
DtNetEntityCoordinates
;
374
375
typedef
struct
DtNetTopoUpCoord
376
{
377
DtNetFloat32
East
;
378
DtNetFloat32
North
;
379
DtNetFloat32
Up
;
380
}
DtNetTopoUpCoord
;
381
382
typedef
struct
383
{
384
DtNetInt32
hour
;
385
DtNetTimeStamp
hourFrac
;
386
}
DtNetClockTime
;
387
388
DT_DLL_VLPROTIND
DtTime
DtClockTime2AbsTime
(
const
DtNetClockTime
*clock);
389
DT_DLL_VLPROTIND
void
DtAbsTime2ClockTime
(
DtTime
absTime,
DtNetClockTime
*clock);
390
Document ID: Generated on Mon Feb 6 18:36:34 EST 2017 from SVN revision 173107
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)