VR-Link API Documentation for HLA 1516
 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) 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 
25 
27 
29 {
30 public:
33 
34  DtFederateId operator=(const DtFederateId &);
35  DtNetFederateId& operator=(const DtNetFederateId &);
36 };
37 
38 
40 {
41  public:
43 #define DtMaxEntityMarkingLength 11
45 };
46 
48 {
49 public:
51 #define DtMaxAggregateMarkingLength 31
53 };
54 
56 {
57  public:
65 
66  DtEntityType operator=(const DtEntityType&);
67  DtNetEntityType& operator=(const DtNetEntityType &);
68 };
69 
71 {
72  public:
79 
80  DtRadioEntityType operator=(const DtRadioEntityType &);
81  DtNetRadioEntityType&operator=(const DtNetRadioEntityType &);
82 };
83 
85 {
86  public:
92 
93  DtBurstDescriptor operator=(const DtBurstDescriptor&);
94  DtNetBurstDescriptor& operator=(const DtNetBurstDescriptor&);
95 };
96 
98 {
99  public:
102 
103  DtSimulationAddress operator=(const DtSimulationAddress&);
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 
117 {
118  public:
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 
140 {
141  public:
143  {rep[0] = rep[1] = rep[2] = 0.0;}
145  {rep[0] = vec[0]; rep[1] = vec[1]; rep[2] = vec[2];}
146  DtVector operator=(const DtVector &vec)
147  {rep[0] = vec[0]; rep[1] = vec[1]; rep[2] = vec[2]; return vec;}
148  operator DtVector() const {return DtVector(rep[0], rep[1], rep[2]);}
149  DtNetFloat64 &operator[](int i) { return rep[i];}
150  DtNetFloat64 operator[](int i) const { return rep[i];}
151  private:
152  DtNetFloat64 rep[3];
153 };
154 
158 {
159  public:
161  {rep[0] = rep[1] = rep[2] = (float)0.0;}
163  {rep[0] = (float)vec[0]; rep[1] = (float)vec[1]; rep[2] = (float)vec[2];}
164  DtVector operator=(const DtVector &vec)
165  {rep[0] = (float)vec[0]; rep[1] = (float)vec[1]; rep[2] = (float)vec[2]; return vec;}
166  operator DtVector() const
167  {return DtVector((DtFloat32) rep[0], (DtFloat32) rep[1], (DtFloat32) rep[2]);}
168  DtNetFloat32 &operator[](int i) { return rep[i];}
169  DtNetFloat32 operator[](int i) const { return rep[i];}
170  private:
171  DtNetFloat32 rep[3];
172 };
173 
175 {
176  public:
177  DtNetEulerAngles() { psi = theta = phi = (float)0.0;}
179  {psi = (DtFloat32)tait.psi(); theta = (DtFloat32)tait.theta(); phi = (DtFloat32)tait.phi();}
180  DtTaitBryan operator=(const DtTaitBryan &tait)
181  {psi = (DtFloat32)tait.psi(); theta = (DtFloat32)tait.theta(); phi = (DtFloat32)tait.phi(); return tait;}
182  operator DtTaitBryan() const {return DtTaitBryan(psi, theta, phi);}
183  DtNetFloat32 psi; /* Counter clockwise about z */
184  DtNetFloat32 theta; /* Counter clockwise about y */
185  DtNetFloat32 phi; /* Counter clockwise about x */
186 };
187 
188 /***************************************************************
189  These structures don't need to be C++ classes even on little endian machines.
190 ****************************************************************/
191 
193 {
202 
203 typedef struct DtNetArtParamRecord
204 {
211 
214 
216 {
227 
228 typedef struct DtNetEntityTypeRecord
229 {
236 
237 typedef struct DtNetSeparationRecord
238 {
248 
249 typedef struct DtNetAttachedPartRPR1
250 {
258 
259 typedef struct DtNetAttachedPart
260 {
261 
268 
269 typedef struct DtNetVPRecord
270 {
277 } DtNetVPRecord;
278 
279 typedef struct DtNetAngularVelocity
280 {
285 
286 typedef struct DtNetLinearVelocity
287 {
288  bool operator==(const DtNetLinearVelocity& rhs) const
289  {
290  return (DtX == rhs.DtX)
291  && (DtY == rhs.DtY)
292  && (DtZ == rhs.DtZ);
293  }
294  bool operator!=(const DtNetLinearVelocity& rhs) const
295  {
296  return !operator==(rhs);
297  }
302 
304 {
305  bool operator==(const DtNetLinearAcceleration& rhs) const
306  {
307  return (DtX == rhs.DtX)
308  && (DtY == rhs.DtY)
309  && (DtZ == rhs.DtZ);
310  }
311  bool operator!=(const DtNetLinearAcceleration& rhs) const
312  {
313  return !operator==(rhs);
314  }
319 
320 typedef struct DtNetWorldCoordinates
321 {
322  bool operator==(const DtNetWorldCoordinates& rhs) const
323  {
324  return (DtX == rhs.DtX)
325  && (DtY == rhs.DtY)
326  && (DtZ == rhs.DtZ);
327  }
328  bool operator!=(const DtNetWorldCoordinates& rhs) const
329  {
330  return !operator==(rhs);
331  }
336 
338 {
339  bool operator==(const DtNetEntityCoordinates& rhs) const
340  {
341  return (DtX == rhs.DtX)
342  && (DtY == rhs.DtY)
343  && (DtZ == rhs.DtZ);
344  }
345  bool operator!=(const DtNetEntityCoordinates& rhs) const
346  {
347  return !operator==(rhs);
348  }
353 
354 typedef struct DtNetTopoUpCoord
355 {
360 
361 typedef struct
362 {
366 
369 

Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)