VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
netStructs.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vlutil/vlTime.h>
12 #include <matrix/vlMath.h>
13 #include <matrix/vlTaitBryan.h>
14 #include <vlutil/vlNetTypes.h>
15 #include <vlutil/vlNetTimeStamp.h>
16 #include "oldTStamp.h"
17 
24 
26 
28 {
29 public:
32 
33  const DtFederateId& operator=(const DtFederateId &);
34  const DtNetFederateId& operator=(const DtNetFederateId &);
35 };
36 
37 
39 {
40  public:
42 #define DtMaxEntityMarkingLength 11
44 };
45 
47 {
48 public:
50 #define DtMaxAggregateMarkingLength 31
52 };
53 
55 {
56  public:
64 
65  const DtEntityType& operator=(const DtEntityType&);
66  const DtNetEntityType& operator=(const DtNetEntityType &);
67 };
68 
70 {
71  public:
78 
79  const DtRadioEntityType& operator=(const DtRadioEntityType &);
80  const DtNetRadioEntityType& operator=(const DtNetRadioEntityType &);
81 };
82 
84 {
85  public:
91 
92  const DtBurstDescriptor& operator=(const DtBurstDescriptor&);
93  const DtNetBurstDescriptor& operator=(const DtNetBurstDescriptor&);
94 };
95 
97 {
98  public:
101 
102  const DtSimulationAddress& operator=(const DtSimulationAddress&);
103  const DtNetSimulationAddress& operator=(const DtNetSimulationAddress&);
104  bool operator==(const DtNetSimulationAddress& rhs) const
105  {
106  return (DtSite == rhs.DtSite)
107  && (DtHost == rhs.DtHost);
108  }
109  bool operator!=(const DtNetSimulationAddress& rhs) const
110  {
111  return !operator==(rhs);
112  }
113 };
114 
116 {
117  public:
120 
121  const DtEntityIdentifier& operator=(const DtEntityIdentifier&);
122  const DtNetEntityIdentifier& operator=(const DtNetEntityIdentifier&);
123  bool operator==(const DtNetEntityIdentifier& rhs) const
124  {
125  return (DtSimulator == rhs.DtSimulator)
126  && (DtEntity == rhs.DtEntity);
127  }
128  bool operator!=(const DtNetEntityIdentifier& rhs) const
129  {
130  return !operator==(rhs);
131  }
132 };
133 
135 {
136 public:
141 
142  const DtNetObjectType& operator=(const DtNetObjectType&);
143  bool operator==(const DtNetObjectType& rhs) const
144  {
145  return (myDomain == rhs.myDomain)
146  && (myKind == rhs.myKind)
147  && (myCategory == rhs.myCategory)
148  && (mySubcategory == rhs.mySubcategory);
149  }
150  bool operator!=(const DtNetObjectType& rhs) const
151  {
152  return !operator==(rhs);
153  }
154 };
155 
157 {
158 public:
159 
160  bool operator == ( const DtNetPatchIdentifier& rhs ) const
161  {
162  return myCountry == rhs.myCountry
163  && myService == rhs.myService
164  && myPatchId == rhs.myPatchId;
165  }
166 
167  bool operator != ( const DtNetPatchIdentifier& rhs ) const
168  {
169  return ! ( *this == rhs );
170  }
171 
176 
177 };
178 
182 {
183  public:
185  {rep[0] = rep[1] = rep[2] = 0.0;}
187  {rep[0] = vec[0]; rep[1] = vec[1]; rep[2] = vec[2];}
189  {rep[0] = vec[0]; rep[1] = vec[1]; rep[2] = vec[2]; return vec;}
190  operator DtVector() const {return DtVector(rep[0], rep[1], rep[2]);}
191  DtNetFloat64 &operator[](int i) { return rep[i];}
192  DtNetFloat64 operator[](int i) const { return rep[i];}
193  private:
194  DtNetFloat64 rep[3];
195 };
196 
200 {
201  public:
203  {rep[0] = rep[1] = rep[2] = (float)0.0;}
205  {rep[0] = (float)vec[0]; rep[1] = (float)vec[1]; rep[2] = (float)vec[2];}
207  {rep[0] = (float)vec[0]; rep[1] = (float)vec[1]; rep[2] = (float)vec[2]; return vec;}
208  operator DtVector() const
209  {return DtVector((DtFloat32) rep[0], (DtFloat32) rep[1], (DtFloat32) rep[2]);}
210  DtNetFloat32 &operator[](int i) { return rep[i];}
211  DtNetFloat32 operator[](int i) const { return rep[i];}
212  private:
213  DtNetFloat32 rep[3];
214 };
215 
217 {
218  public:
219  DtNetEulerAngles() { psi = theta = phi = (float)0.0;}
221  {psi = (DtFloat32)tait.psi(); theta = (DtFloat32)tait.theta(); phi = (DtFloat32)tait.phi();}
223  {psi = (DtFloat32)tait.psi(); theta = (DtFloat32)tait.theta(); phi = (DtFloat32)tait.phi(); return tait;}
224  operator DtTaitBryan() const {return DtTaitBryan(psi, theta, phi);}
225  DtNetFloat32 psi; /* Counter clockwise about z */
226  DtNetFloat32 theta; /* Counter clockwise about y */
227  DtNetFloat32 phi; /* Counter clockwise about x */
228 };
229 
230 /***************************************************************
231  These structures don't need to be C++ classes even on little endian machines.
232 ****************************************************************/
233 
235 {
244 
245 typedef struct DtNetArtParamRecord
246 {
253 
256 
258 {
269 
270 typedef struct DtNetEntityTypeRecord
271 {
278 
279 typedef struct DtNetSeparationRecord
280 {
290 
291 typedef struct DtNetAttachedPartRPR1
292 {
300 
301 typedef struct DtNetAttachedPart
302 {
303 
310 
311 typedef struct DtNetVPRecord
312 {
319 } DtNetVPRecord;
320 
321 typedef struct DtNetAngularVelocity
322 {
327 
328 typedef struct DtNetLinearVelocity
329 {
330  bool operator==(const DtNetLinearVelocity& rhs) const
331  {
332  return (DtX == rhs.DtX)
333  && (DtY == rhs.DtY)
334  && (DtZ == rhs.DtZ);
335  }
336  bool operator!=(const DtNetLinearVelocity& rhs) const
337  {
338  return !operator==(rhs);
339  }
344 
346 {
347  bool operator==(const DtNetLinearAcceleration& rhs) const
348  {
349  return (DtX == rhs.DtX)
350  && (DtY == rhs.DtY)
351  && (DtZ == rhs.DtZ);
352  }
353  bool operator!=(const DtNetLinearAcceleration& rhs) const
354  {
355  return !operator==(rhs);
356  }
361 
362 typedef struct DtNetWorldCoordinates
363 {
364  bool operator==(const DtNetWorldCoordinates& rhs) const
365  {
366  return (DtX == rhs.DtX)
367  && (DtY == rhs.DtY)
368  && (DtZ == rhs.DtZ);
369  }
370  bool operator!=(const DtNetWorldCoordinates& rhs) const
371  {
372  return !operator==(rhs);
373  }
378 
380 {
381  bool operator==(const DtNetEntityCoordinates& rhs) const
382  {
383  return (DtX == rhs.DtX)
384  && (DtY == rhs.DtY)
385  && (DtZ == rhs.DtZ);
386  }
387  bool operator!=(const DtNetEntityCoordinates& rhs) const
388  {
389  return !operator==(rhs);
390  }
395 
396 typedef struct DtNetTopoUpCoord
397 {
402 
403 typedef struct
404 {
408 
411 
DtNetFloat32 East
Definition: netStructs.h:398
struct DtNetTopoUpCoord DtNetTopoUpCoord
DtNetU32 myArtOrAttached
Definition: netStructs.h:239
DtNetU16 site
Definition: netStructs.h:30
DtNetU8 myAssociationStatus
Definition: netStructs.h:261
DtNet64Vector()
Definition: netStructs.h:184
Definition: netStructs.h:270
DtNetU16 myPatchId
Definition: netStructs.h:175
This file contains routines for manipulating DIS time stamps.
struct DtNetLinearVelocity DtNetLinearVelocity
Definition: netStructs.h:396
DtNetU8 kind
Definition: netStructs.h:72
DtNet64Bits DtValue
Definition: netStructs.h:251
const bool operator==(const DtU128 &lhs, const DtU128 &rhs)
DtNetFloat32 DtY
Definition: netStructs.h:392
DtNetU16 DtHost
Definition: netStructs.h:100
DtNetU16 nomenclature
Definition: netStructs.h:77
A DtSimulationAddress is used in DIS to identify a particular simulator.
Definition: simulationAddress.h:29
DtNetU16 country
Definition: netStructs.h:74
bool operator!=(const DtNetEntityIdentifier &rhs) const
Definition: netStructs.h:128
DtNetFloat32 psi
Definition: netStructs.h:225
struct DtNetAttachedPart DtNetAttachedPart
DtNetU16 padding16
Definition: netStructs.h:286
Definition: netStructs.h:216
DtNet32Vector(const DtVector &vec)
Definition: netStructs.h:204
DtNetU8 padding8
Definition: netStructs.h:284
DtNetU32 myClass
Definition: netStructs.h:240
bool operator!=(const DtNetEntityCoordinates &rhs) const
Definition: netStructs.h:387
Definition: netStructs.h:301
DtNetU8 myKind
Definition: netStructs.h:138
DtNetU8 category
Definition: netStructs.h:75
DtNetArtParamRecord DtNetArtPartRecord
Definition: netStructs.h:255
DT_DLL_VLPROTIND DtTime DtClockTime2AbsTime(const DtNetClockTime *clock)
DtNetU8 DtCharacterSet
Definition: netStructs.h:41
DtNetFloat64 & operator[](int i)
Definition: netStructs.h:191
struct DtNetWorldCoordinates DtNetWorldCoordinates
DtNetU16 DtCountry
Definition: netStructs.h:59
DtNetU8 myChange
Definition: netStructs.h:293
DtNetEntityIdentifier myEntityId
Definition: netStructs.h:263
DtNet32Vector()
Definition: netStructs.h:202
DtNetU16 app
Definition: netStructs.h:31
DtNetFloat64 DtX
Definition: netStructs.h:374
Definition: netStructs.h:46
Definition: entityType.h:126
DtNetU8 DtEntityKind
Definition: netStructs.h:57
DtNetU32 myStation
Definition: netStructs.h:297
DtNetU8 myAssociationType
Definition: netStructs.h:262
DtNetU32 myTypeMetric
Definition: netStructs.h:241
Network-order unsigned 16-bit quantity.
Definition: vlNetTypes.h:51
DtNetU16 padding16
Definition: netStructs.h:275
This file contains the declaration of DtClock and DtTime.
DtNetFloat32 phi
Definition: netStructs.h:227
DtNetU32 myUnused4
Definition: netStructs.h:317
DtNetFloat32 DtY
Definition: netStructs.h:358
DtNetU16 myUnused2
Definition: netStructs.h:315
DtNetTimeStamp hourFrac
Definition: netStructs.h:406
struct DtNetAngularVelocity DtNetAngularVelocity
This file contains the declaration of DtNetTimeStamp.
Network-order unsigned 32-bit quantity.
Definition: vlNetTypes.h:98
DtNetU16 myOwnStationLocation
Definition: netStructs.h:264
DtNetU16 myCountry
Definition: netStructs.h:172
Definition: netStructs.h:291
DtNetU8 myGroupMemberType
Definition: netStructs.h:266
Definition: netStructs.h:379
DtNetU8 DtCategory
Definition: netStructs.h:60
Definition: netStructs.h:403
DtNetU8 myChange
Definition: netStructs.h:236
Definition: netStructs.h:362
bool operator!=(const DtNetObjectType &rhs) const
Definition: netStructs.h:150
DtNetU8 padding
Definition: netStructs.h:294
DtNetU32 myUnused3
Definition: netStructs.h:316
DtVector operator=(const DtVector &vec)
Definition: netStructs.h:188
DtNetFloat32 operator[](int i) const
Definition: netStructs.h:211
DtNetSimulationAddress DtSimulator
Definition: netStructs.h:118
DtNetU32 myUnused5
Definition: netStructs.h:318
DtTaitBryans are used to represent orientation of an object, using a set of three Euler angles...
Definition: vlTaitBryan.h:43
DtNetU8 padding
Definition: netStructs.h:237
DtNetU8 DtSpecific
Definition: netStructs.h:62
DtNetU8 mySeparationReason
Definition: netStructs.h:282
DtNetU8 myChange
Definition: netStructs.h:273
DtNetU8 myArtOrAttached
Definition: netStructs.h:272
DtNetFloat32 theta
Definition: netStructs.h:226
bool operator!=(const DtNetSimulationAddress &rhs) const
Definition: netStructs.h:109
DtNet64Vector(const DtVector &vec)
Definition: netStructs.h:186
DtNetU16 myStationNumber
Definition: netStructs.h:288
DtNetFloat32 myValue
Definition: netStructs.h:242
DtNetEntityType myType
Definition: netStructs.h:298
bool operator==(const DtNetLinearVelocity &rhs) const
Definition: netStructs.h:330
DtNetFloat32 wx
Definition: netStructs.h:323
DtNetU16 DtFuze
Definition: netStructs.h:88
DtNetU8 nomenclatureVersion
Definition: netStructs.h:76
DtNetU16 myAttachedTo
Definition: netStructs.h:295
DtNetU32 myStation
Definition: netStructs.h:307
Definition: netStructs.h:328
DtTaitBryan operator=(const DtTaitBryan &tait)
Definition: netStructs.h:222
DtNetU16 myAttachedTo
Definition: netStructs.h:238
Definition: netStructs.h:134
This file defines math constants and methods which may be useful in simulations.
#define DtMaxEntityMarkingLength
Definition: netStructs.h:42
struct DtNetAttachedPartRPR1 DtNetAttachedPartRPR1
DtNetFloat64 DtZ
Definition: netStructs.h:376
This class is deprecated, please use DtNetVector32 in vlVector.h.
Definition: netStructs.h:199
DtNetU32 myArtOrAttatched
Definition: netStructs.h:296
Network-order 64-bit IEEE-754 floating-point quantity.
Definition: vlNetTypes.h:173
DtNetFloat32 wy
Definition: netStructs.h:324
Definition: netStructs.h:257
DtNetU8 myPhysicalConnectionType
Definition: netStructs.h:265
bool operator!=(const DtNetLinearAcceleration &rhs) const
Definition: netStructs.h:353
DtVector64 DtVector
Definition: vlVector.h:285
Definition: vlVector.h:224
Definition: netStructs.h:83
struct DtNetEntityTypeRecord DtNetEntityTypeRecord
This file declares DtTaitBryan.
DtU8 DtNetU8
Unsigned 8-bit value.
Definition: vlNetTypes.h:30
DtNetFloat32 DtZ
Definition: netStructs.h:393
Definition: netStructs.h:38
DtNetU8 myChange
Definition: netStructs.h:260
struct DtNetEntityAssociationRecord DtNetEntityAssociationRecord
DtSimulationAddress DtFederateId
Definition: netStructs.h:25
bool operator==(const DtNetObjectType &rhs) const
Definition: netStructs.h:143
DtNetU8 DtNet64Bits[8]
Definition: vlNetTypes.h:46
DtNetU8 myVPType
Definition: netStructs.h:313
Represents Events in DIS.
Definition: eventId.h:154
DtNetFloat32 wz
Definition: netStructs.h:325
Instances of DtNetTimeStamp are network representations of a DIS time stamp.
Definition: vlNetTimeStamp.h:28
DtNetEntityType myEntityType
Definition: netStructs.h:274
Definition: netStructs.h:115
Definition: netStructs.h:234
bool operator==(const DtNetSimulationAddress &rhs) const
Definition: netStructs.h:104
DtNetEntityType myType
Definition: netStructs.h:308
bool operator!=(const DtNetWorldCoordinates &rhs) const
Definition: netStructs.h:370
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
bool operator==(const DtNetWorldCoordinates &rhs) const
Definition: netStructs.h:364
Definition: netStructs.h:156
Definition: netStructs.h:96
Definition: netStructs.h:245
DtNetU8 padding
Definition: netStructs.h:174
DtNetU16 DtRate
Definition: netStructs.h:90
bool operator==(const DtNetLinearAcceleration &rhs) const
Definition: netStructs.h:347
struct DtNetSeparationRecord DtNetSeparationRecord
#define DT_DLL_VLPROTIND
Definition: vlMachineTypes.h:110
DtFloat64 psi() const
bool operator!=(const DtNetLinearVelocity &rhs) const
Definition: netStructs.h:336
DtVector operator=(const DtVector &vec)
Definition: netStructs.h:206
Definition: netStructs.h:54
DtNetU16 myAttachedTo
Definition: netStructs.h:306
#define DtMaxAggregateMarkingLength
Definition: netStructs.h:50
DtNetFloat32 DtZ
Definition: netStructs.h:342
DtNetFloat32 North
Definition: netStructs.h:399
DtNetU8 myPreEntityIndicator
Definition: netStructs.h:283
DtNetU8 DtCharacterSet
Definition: netStructs.h:49
DtNetFloat32 DtY
Definition: netStructs.h:341
DtNetU16 DtEntity
Definition: netStructs.h:119
Burst descriptors represent Fire and detonate descriptors in DIS and HLA.
Definition: burstDescriptor.h:24
bool operator==(const DtNetEntityIdentifier &rhs) const
Definition: netStructs.h:123
DtNetFloat32 & operator[](int i)
Definition: netStructs.h:210
DtNetU8 DtChange
Definition: netStructs.h:248
DtNetU8 myArtOrAttached
Definition: netStructs.h:281
DtNetFloat64 DtY
Definition: netStructs.h:375
DtNetEulerAngles(const DtTaitBryan &tait)
Definition: netStructs.h:220
struct DtNetArtParamRecordRPR1 DtNetArtParamRecordRPR1
DtNetFloat32 DtX
Definition: netStructs.h:391
DtNetU8 myDomain
Definition: netStructs.h:137
DT_DLL_VLPROTIND void DtAbsTime2ClockTime(DtTime absTime, DtNetClockTime *clock)
Definition: netStructs.h:27
DtNetFloat32 DtX
Definition: netStructs.h:357
DtNetU8 domain
Definition: netStructs.h:73
DtNetU8 myArtOrAttached
Definition: netStructs.h:304
DtNetFloat32 DtX
Definition: netStructs.h:340
const bool operator!=(const DtU128 &lhs, const DtU128 &rhs)
struct DtNetArtParamRecord DtNetArtParamRecord
DtNetFloat32 DtZ
Definition: netStructs.h:359
DtNetInt32 hour
Definition: netStructs.h:405
DtNetU8 DtExtra
Definition: netStructs.h:63
bool operator==(const DtNetEntityCoordinates &rhs) const
Definition: netStructs.h:381
DtNetU8 artOrAttached
Definition: netStructs.h:247
DtNetEntityIdentifier myParentEntityId
Definition: netStructs.h:285
Network-order 32-bit IEEE-754 floating-point quantity.
Definition: vlNetTypes.h:147
DtNetFloat32 Up
Definition: netStructs.h:400
DtNetU8 myUnused1
Definition: netStructs.h:314
DtNetU8 DtSubCategory
Definition: netStructs.h:61
Definition: netStructs.h:279
Definition: netStructs.h:69
DtNetU32 padding32
Definition: netStructs.h:276
Definition: netStructs.h:345
struct DtNetVPRecord DtNetVPRecord
DtNetFloat64 operator[](int i) const
Definition: netStructs.h:192
DtNetArtParamRecord DtArticulatedParts
Definition: netStructs.h:254
DtNetU8 DtDomain
Definition: netStructs.h:58
DtNetU16 DtAttachedTo
Definition: netStructs.h:249
float DtFloat32
A 32 bit floating point value.
Definition: vlMachineTypes.h:209
struct DtNetLinearAcceleration DtNetLinearAcceleration
DtNetEntityType DtMunition
Definition: netStructs.h:86
DtFloat64 phi() const
DtFloat64 theta() const
DtNetU8 myCategory
Definition: netStructs.h:139
This class is deprecated, please use DtNetVector64 in vlVector.h.
Definition: netStructs.h:181
DtNetU16 DtQuantity
Definition: netStructs.h:89
Definition: netStructs.h:321
DtNetU8 myArtOrAttached
Definition: netStructs.h:259
DtNetU16 myGroupNumber
Definition: netStructs.h:267
DtNetU8 myChange
Definition: netStructs.h:305
DtNetU16 myStationName
Definition: netStructs.h:287
Network-order signed 32-bit quantity.
Definition: vlNetTypes.h:123
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26
DtNetU16 DtWarhead
Definition: netStructs.h:87
Definition: netStructs.h:311
DtNetU32 DtType
Definition: netStructs.h:250
DtNetU16 DtSite
Definition: netStructs.h:99
struct DtNetEntityCoordinates DtNetEntityCoordinates
DtNetU8 mySubcategory
Definition: netStructs.h:140
DtNetU8 myService
Definition: netStructs.h:173
DtNetEulerAngles()
Definition: netStructs.h:219

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)