VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrfExtProtocol
ifVrfObjData.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2003 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: ifVrfObjData.h,v $ $Revision: 1.16 $ $State: Exp $
7
*******************************************************************************/
8
9
#ifndef DtIfVrfObjectData_H_
10
#define DtIfVrfObjectData_H_
11
12
#include <
vrfExtProtocol/ifaceCont.h
>
13
#include <vlutil/vlString.h>
14
#include <
vrfExtProtocol/objType.h
>
15
#include <
vrfExtProtocol/rangeItem.h
>
16
#include <vlpi/disEnums.h>
17
#include <vl/globalObjDes.h>
18
19
const
unsigned
char
DtVrfObjectDataVersion
= 6;
20
21
struct
DtNetIfVrfObjectData_V1
22
{
23
DtNetEntityIdentifier
myObjectIdentifier
;
// 48 bytes
24
DtNetEntityType
myEntityType
;
// 8 bytes
25
DtNetU8
mySuperType
;
// 1 byte
26
DtNetU8
myLabelLength
;
// 1 byte
27
DtNetU8
myEchelonIdLength
;
// 1 bytes
28
DtNetBoolean
myIsSubordinateOfForce
;
// 1 byte
29
// DtNetU32 myPadding2; // 4 bytes
30
};
// Total: 64 bytes
31
32
struct
DtNetIfVrfObjectData_V2
33
{
34
DtNetEntityIdentifier
myObjectIdentifier
;
// 48 bytes
35
DtNetEntityType
myEntityType
;
// 8 bytes
36
DtNetU8
mySuperType
;
// 1 byte
37
DtNetU8
myLabelLength
;
// 1 byte
38
DtNetU8
myEchelonIdLength
;
// 1 bytes
39
DtNetBoolean
myIsSubordinateOfForce
;
// 1 byte
40
DtNetBoolean
myIndependentlyTasked
;
// 1 byte
41
DtNetU32
myPadding1
;
// 4 bytes
42
};
// Total: 64 bytes
43
44
struct
DtNetIfVrfObjectData_V3
45
{
46
DtNetEntityIdentifier
myObjectIdentifier
;
// 6 bytes
47
DtNetEntityType
myEntityType
;
// 8 bytes
48
DtNetU8
mySuperType
;
// 1 byte
49
DtNetU8
myLabelLength
;
// 1 byte
50
DtNetU8
myEchelonIdLength
;
// 1 bytes
51
DtNetBoolean
myIsSubordinateOfForce
;
// 1 byte
52
DtNetBoolean
myIndependentlyTasked
;
// 1 byte
53
DtNetU8
myVrfObjectDataVersion
;
// 1 byte
54
DtNetU8
myOverlayParentLength
;
// 1 byte
55
DtNetBoolean
myUnderFire
;
// 1 bytes
56
};
// Total: 22 bytes
57
58
struct
DtNetIfVrfObjectData
59
{
60
DtNetEntityIdentifier
myObjectIdentifier
;
// 6 bytes
61
DtNetEntityType
myEntityType
;
// 8 bytes
62
DtNetU8
mySuperType
;
// 1 byte
63
DtNetU8
myLabelLength
;
// 1 byte
64
DtNetU8
myEchelonIdLength
;
// 1 bytes
65
DtNetBoolean
myIsSubordinateOfForce
;
// 1 byte
66
DtNetBoolean
myIndependentlyTasked
;
// 1 byte
67
DtNetU8
myVrfObjectDataVersion
;
// 1 byte
68
DtNetU8
myOverlayParentLength
;
// 1 byte
69
DtNetBoolean
myUnderFire
;
// 1 byte
70
DtNetBoolean
myVrfSimulated
;
// 1 byte
71
DtNetU32
myVrfSessionId
;
// 4 bytes
72
// Added version 4 of PDU
73
DtNetU32
myVrfMessageVersionSupported
;
// 4 bytes
74
DtNetBoolean
myHasPlan
;
// 1 byte
75
DtNetU8
myRulesOfEngagementLength
;
// 1 byte
76
DtNetBoolean
myIsCurrentlyTasked
;
// 1 bytes
77
DtNetBoolean
myExecutingPlan
;
// 1 byte
78
DtNetU16
myPadding1
;
// 2 bytes
79
DtNetU8
myPadding2
;
// 1 byte
80
DtNetU8
myPadding3
;
// 1 byte
81
DtNetU8
myPadding4
;
// 1 byte
82
};
// Total: 40 bytes
83
84
// class DtIfVrfObjectData:
85
//
86
// Instances of DtIfVrfObjectData are the message content for vrf
87
// object data messages. The purpose of these messages is to convey
88
// essential information about a given vrf object that is beyond the
89
// scope of DIS or the RPR FOM. This message, in combination with the
90
// corresponding entity, aggregate, or environmental PDU/interaction, provides
91
// enough information for a remote VR-Forces process to update an existing
92
// vrf object.
93
//
94
// Content-Type: DtVrfObjectDataMessageType
95
//
96
#include <
vrfExtProtocol/vrfExtProtocolDefines.h
>
97
class
DT_DLL_vrfExtProtocol
DtIfVrfObjectData
:
public
DtSimInterfaceContent
98
{
99
public
:
100
101
// default constructor
102
DtIfVrfObjectData
();
103
104
// destructor
105
virtual
~
DtIfVrfObjectData
();
106
107
// copy constructor
108
DtIfVrfObjectData
(
const
DtIfVrfObjectData
& orig);
109
110
// assignment operator
111
DtIfVrfObjectData
&
operator=
(
const
DtIfVrfObjectData
& orig);
112
113
// Returns a newly created instance of a DtIfVrfObjectData.
114
virtual
DtSimInterfaceContent
*
clone
()
const
;
115
116
// Returns the string type of message, DtVrfObjectResponseMessageType
117
// (defined in msgTypes.h).
118
virtual
int
type
()
const
;
119
120
// Set/get the object identifier (site:app:object id) of the vrf object.
121
// Corresponds to entity identifier for individual entities, aggregate Id
122
// for aggregates, and object identifier for environmental process objects.
123
virtual
void
setObjectIdentifier(
const
DtEntityIdentifier & objectIdentifier);
124
virtual
const
DtEntityIdentifier & objectIdentifier()
const
;
125
126
// Set/get the session id. This is the id that is used to say whether or not
127
// front ends that are running in a particular session can control these objects
128
virtual
void
setVrfSessionId(
int
s);
129
virtual
int
vrfSessionId()
const
;
130
131
// Set/get the message version id. This is the message version of the VRF simulator
132
// that created this object
133
virtual
void
setVrfMessageVersionSupported(
int
s);
134
virtual
int
vrfMessageVersionSupported()
const
;
135
136
// Set/get the object label of the vrf object.
137
virtual
void
setObjectLabel(
const
DtString
& objectLabel);
138
virtual
const
DtString
& objectLabel()
const
;
139
140
// Set/get object type
141
virtual
void
setObjectType(
const
DtObjectType
& objectType);
142
virtual
const
DtObjectType
& objectType()
const
;
143
144
virtual
void
setEchelonIdString(
const
DtString
& echelonId);
145
virtual
const
DtString
& echelonIdString()
const
;
146
147
virtual
void
setIsSubordinateOfForce(
bool
yesNo);
148
virtual
bool
isSubordinateOfForce()
const
;
149
150
virtual
void
setIndependentlyTasked(
bool
yesNo);
151
virtual
bool
independentlyTasked()
const
;
152
153
virtual
void
setOverlayParent(
const
DtString
& parent);
154
virtual
const
DtString
& overlayParent()
const
;
155
156
// Does the entity think its currently under-fire. Default is false.
157
// @{
158
virtual
void
setUnderFire(
bool
yesNo);
159
virtual
bool
underFire()
const
;
160
// @}
161
162
// Does the entity have a plan
163
// @{
164
virtual
void
setHasPlan(
bool
yesNo);
165
virtual
bool
hasPlan()
const
;
166
// @}
167
168
// Indicates whether the entity is executing its plan or not.
170
virtual
void
setExecutingPlan(
bool
yesNo);
171
virtual
bool
executingPlan()
const
;
173
174
// Is the entity currently tasked
175
// @{
176
virtual
void
setIsCurrentlyTasked(
bool
yesNo);
177
virtual
bool
isCurrentlyTasked()
const
;
178
// @}
179
180
// Entities rules of engagement
181
// @{
182
virtual
void
setRulesOfEngagement(
const
DtString
&);
183
virtual
const
DtString
& rulesOfEngagement()
const
;
184
// @}
185
186
// Set when this entity is simulated by a VR-Force back-end. Default is false.
187
// Only the VR-Forces back-end engine should set this value. Do not set this
188
// value to true unless you are planning on handling messages sent by the front-end
189
// that are supported by the VR-Forces back-end in some manner
190
// @{
191
virtual
void
setVrfSimulated(
bool
yesNo);
192
virtual
bool
vrfSimulated()
const
;
193
// @}
194
196
//{@
197
virtual
void
addRangeItem(
const
DtRangeItem
&);
198
virtual
void
removeRangeItem(
int
index);
199
virtual
void
setRangeItems(
const
DtRangeItems
&);
200
const
DtRangeItems
& rangeItems()
const
;
202
206
virtual
void
setBoundingVolume(
const
DtVector
&);
207
virtual
const
DtVector
& boundingVolume()
const
;
208
209
virtual
void
setBoundingVolumeOffset(
const
DtVector
&);
210
virtual
const
DtVector
& boundingVolumeOffset()
const
;
212
213
virtual
char
vrfObjectDataVersion()
const
;
214
215
virtual
int
netRepSize
()
const
;
216
virtual
bool
setFromNet
(
const
char
* contentBuffer,
217
unsigned
contentSize);
218
virtual
bool
setToNet
();
219
220
virtual
void
printDataToString
(
DtString
& str);
221
222
static
DtSimInterfaceContent
* creator();
223
224
bool
operator!=
(
const
DtIfVrfObjectData
&)
const
;
225
bool
operator==
(
const
DtIfVrfObjectData
&)
const
;
226
227
// If myDirty flag is true, calls setToNet() before returning buffer. Called
228
// from equality operator
229
virtual
char
* fillInNetRep();
230
231
protected
:
232
virtual
bool
parseV1Buffer(
const
char
* contentBuffer,
233
unsigned
contentSize);
234
virtual
bool
parseV2Buffer(
const
char
* contentBuffer,
235
unsigned
contentSize);
236
virtual
bool
parseV3Buffer(
const
char
* contentBuffer,
237
unsigned
contentSize);
238
239
protected
:
240
241
DtEntityIdentifier
myObjectIdentifier
;
242
DtObjectType
myObjectType
;
243
DtString
myObjectLabel
;
244
DtString
myEchelonIdString
;
245
DtString
myOverlayParent
;
246
int
myVrfSessionId
;
247
int
myVrfMessageVersionSupported
;
248
bool
myIsSubordinateOfForce
;
249
bool
myIndependentlyTasked
;
250
char
myVrfObjectDataVersion
;
251
bool
myUnderFire
;
252
bool
myVrfSimulated
;
253
bool
myHasPlan
;
254
bool
myExecutingPlan
;
255
bool
myIsCurrentlyTasked
;
256
DtString
myRulesOfEngagement
;
257
258
// Used for filledInNetRep() method. If myDirty is true, will call
259
// setToNet()
260
bool
myDirty
;
261
262
DtRangeItems
myRangeItems
;
263
264
DtVector
myBoundingVolume
;
265
DtVector
myBoundingVolumeOffset
;
266
};
267
268
#endif
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)