VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vl
entityStatePdu.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2013 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
9
10
#pragma once
11
12
#if DtDIS
13
14
15
16
#include "
hostStructs.h
"
17
#include "
pdu.h
"
18
#include "
packets/entityStateP.h
"
19
#include "
stateMsg.h
"
20
21
#include <
vlpi/articulatedPartCollection.h
>
22
#include <
vlpi/attachedPartCollection.h
>
23
#include <
vlpi/disEnums.h
>
24
25
#include <
matrix/vlMath.h
>
26
#include <
matrix/vlDcm.h
>
27
#include <
matrix/vlTaitBryan.h
>
28
29
#define DtMaxNumArtParts 83
30
#define DtMaxNumAttachedParts 83
31
#define DtINCREMENT -1
32
33
#define DtNO_SUCH_ART_PART 0
34
#define DtART_PART_SUCCESS 1
35
36
class
DtExerciseConn
;
37
class
DtEntityStatePdu
;
38
39
typedef
void (*
DtEntityStatePduCb
)(
DtEntityStatePdu
* pdu,
void
* usr);
40
44
class
DT_DLL_VL
DtEntityStatePdu
:
public
DtStateMsg
45
{
46
public
:
47
48
enum
{ PduStaticSize=144 };
49
50
DtEntityStatePdu
(
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
51
53
DtEntityStatePdu
(
const
DtNetEntityStatePdu
* initial,
54
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
,
DtPduFactory
* pduFactory = 0);
55
57
DtEntityStatePdu
(
const
DtEntityIdentifier
&
id
,
const
DtEntityType
& type,
58
const
DtEntityType
& guise,
DtDeadReckonTypes
algorithm,
59
DtForceType
forceId,
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
60
62
virtual
~DtEntityStatePdu
() {};
63
64
/****************** INSPECTOR FUNCTIONS *******************/
65
const
DtEntityIdentifier
& id()
const
;
66
void
setId(
const
DtEntityIdentifier
&
id
);
67
68
DtForceType
forceId()
const
;
69
void
setForceId(
DtForceType
force);
70
71
int
numArtParams()
const
;
72
int
numAttachedParams()
const
;
73
int
numArtPlusAttachedParams()
const
;
74
75
const
DtEntityType
& entityType()
const
;
76
void
setEntityType(
const
DtEntityType
& type);
77
78
const
DtEntityType
& guise()
const
;
79
void
setGuise(
const
DtEntityType
& type);
80
81
const
DtVector
& velocity()
const
;
82
void
setVelocity(
const
DtVector
& Velocity);
83
84
const
DtVector
& location()
const
;
85
void
setLocation(
const
DtVector
& Location);
86
87
const
DtTaitBryan
& orientation()
const
;
88
void
setOrientation(
const
DtTaitBryan
& Orient);
89
91
DtU32
appearance()
const
;
92
94
void
setAppearance(
DtU32
app);
95
97
DtAppearAttrVal
appearanceAttribute(
const
DtAppearAttribute
& attr)
const
;
98
100
void
setAppearanceAttribute(
const
DtAppearAttribute
attr,
101
const
DtAppearAttrVal
val);
102
103
DtDeadReckonTypes
algorithm()
const
;
104
void
setAlgorithm(
DtDeadReckonTypes
alg);
105
106
const
DtVector
& acceleration()
const
;
107
void
setAcceleration(
const
DtVector
& Acceleration);
108
109
const
DtVector
& rotationalVelocity()
const
;
110
void
setRotationalVelocity(
const
DtVector
& BodyRates);
111
112
char
deadReckonParamType()
const
;
113
void
setDeadReckonParamType(
char
param);
114
115
short
deadReckon0Param()
const
;
116
void
setDeadReckon0Param(
short
param);
117
118
const
DtVector
& deadReckonXYZParams()
const
;
119
void
setDeadReckonXYZParams(
const
DtVector
& params);
120
121
122
int
markingCharSet()
const
;
123
void
setMarkingText(
const
char
* text);
124
125
const
char
* markingText()
const
;
126
void
setMarkingCharSet(
int
charSet);
127
128
DtU32
capabilities()
const
;
129
void
setCapabilities(
DtU32
cap);
130
132
133
134
135
const
DtArticulatedPartCollection
& artPartList()
const
;
136
void
setArtPartList(
const
DtArticulatedPartCollection
& apList);
138
140
141
142
143
const
DtAttachedPartCollection
& attPartList()
const
;
144
void
setAttPartList(
const
DtAttachedPartCollection
& apList);
146
147
void
setNumArtPlusAttachedParams(
int
num);
148
150
151
152
153
154
const
DtNetArtPartRecord
* artPartRecord(
int
index)
const
;
155
DtNetArtPartRecord
* artPartRecord(
int
index);
157
159
160
161
162
163
DtNetAttachedPart
* attPartRecord(
int
index);
164
const
DtNetAttachedPart
* attPartRecord(
int
index)
const
;
166
167
DtNetVPRecord
* variableParameterRecord(
int
index);
168
const
DtNetVPRecord
* variableParameterRecord(
int
index)
const
;
169
170
171
void
printData
()
const
;
172
void
printDataToStream
(std::ostream& stream)
const
;
173
175
static
DtPdu
* create(
const
DtNetPacket
* initial,
176
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
,
DtPduFactory
* pduFactory = 0);
177
179
static
void
addCallback(
DtExerciseConn
* conn,
DtEntityStatePduCb
cb,
180
void
* usr);
181
183
static
void
removeCallback(
DtExerciseConn
* conn,
DtEntityStatePduCb
cb,
184
void
* usr);
185
186
protected
:
187
188
DtPduKind
internalGetPduKind
()
const
189
{
190
return
DtEntityStatePduKind
;
191
}
192
193
DtNetArtPartRecord
* artPartRecord(
int
partType,
int
param)
const
;
194
DtNetArtPartRecord
* attachedPartRecord(
int
station)
const
;
195
196
DtEntityIdentifier
myId
;
197
DtEntityType
type
, theGuise;
198
DtVector
vel
, loc, acc;
199
DtTaitBryan
ori
;
200
DtBodyRates
rvel
;
201
DtVector
drParam
;
202
char
markingBuff[
DtMaxEntityMarkingLength
+1];
203
205
mutable
DtArticulatedPartCollection
myArtPartList
;
206
mutable
DtAttachedPartCollection
myAttPartList
;
207
int
myStationList[
DtMaxNumAttachedParts
];
208
209
};
210
211
DT_DLL_VL
std::ostream&
operator<<
(std::ostream& str,
212
const
DtEntityStatePdu
& pdu);
213
214
#endif
Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)