VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vl
linearObjectStatePdu.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
#include <
vlutil/vlMachineTypes.h
>
15
#include "
hostStructs.h
"
16
#include <
matrix/vlMath.h
>
17
#include "
stateMsg.h
"
18
19
#include "
packets/linObjStP.h
"
20
21
#include "
syntheticEnvironmentObjectType.h
"
22
23
24
class
DT_DLL_VL
DtExerciseConn
;
25
class
DT_DLL_VL
DtLinearObjectStatePdu
;
26
class
DT_DLL_VL
DtLinearSegmentParameter
;
27
29
typedef
void (*
DtLinearObjectStatePduCb
)(
30
DtLinearObjectStatePdu
* pdu,
void
* usr);
31
38
class
DT_DLL_VL
DtLinearObjectStatePdu
:
public
DtStateMsg
39
{
40
41
public
:
42
44
DtLinearObjectStatePdu
(
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
45
DtLinearObjectStatePdu
(
const
DtNetLinearObjectStatePdu
* initial,
46
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
,
DtPduFactory
* pduFactory = 0);
47
DtLinearObjectStatePdu
(
const
DtLinearObjectStatePdu
& orig);
48
50
virtual
~
DtLinearObjectStatePdu
();
51
53
DtLinearObjectStatePdu
&
operator=
(
const
DtLinearObjectStatePdu
& orig);
54
56
virtual
void
setObjectID(
const
DtEntityIdentifier
&
id
);
57
virtual
const
DtEntityIdentifier
& objectID()
const
;
58
60
virtual
void
setReferencedObjectID(
const
DtEntityIdentifier
&
id
);
61
virtual
const
DtEntityIdentifier
& referencedObjectID()
const
;
62
64
virtual
void
setUpdateNumber(
DtU16
field);
65
virtual
DtU16
updateNumber()
const
;
66
68
virtual
void
setForceID(
DtForceType
force);
69
virtual
DtForceType
forceID()
const
;
70
72
virtual
bool
setNumSegments(
DtU8
num);
73
virtual
DtU8
numSegments()
const
;
74
76
virtual
void
setRequesterID(
const
DtSimulationAddress
& type);
77
virtual
const
DtSimulationAddress
& requesterID()
const
;
78
80
virtual
void
setReceivingID(
const
DtSimulationAddress
& type);
81
virtual
const
DtSimulationAddress
& receivingID()
const
;
82
84
virtual
void
setObjectType(
const
DtSyntheticEnvironmentObjectType
& type);
85
virtual
const
DtSyntheticEnvironmentObjectType
& objectType()
const
;
86
89
virtual
bool
setLinearSegmentParameter(
int
index,
90
const
DtLinearSegmentParameter
& init);
91
virtual
bool
getLinearSegmentParameter(
int
index,
92
DtLinearSegmentParameter
& record)
const
;
93
95
virtual
void
printData
()
const
;
96
98
virtual
void
printDataToStream
(std::ostream& stream)
const
;
99
100
public
:
101
104
static
DtPdu
* create(
const
DtNetPacket
* initial,
105
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
,
DtPduFactory
* pduFactory = 0);
106
109
static
void
addCallback(
DtExerciseConn
* conn,
110
DtLinearObjectStatePduCb
cb,
void
* usr);
111
static
void
removeCallback(
DtExerciseConn
* conn,
112
DtLinearObjectStatePduCb
cb,
void
* usr);
113
114
protected
:
115
117
virtual
DtPduKind
internalGetPduKind
()
const
;
118
120
virtual
DtNetLinearObjectStatePdu
* netPduStruct()
const
;
121
124
DtLinearObjectStatePdu
*
self
()
const
;
125
127
virtual
char
* var()
const
;
128
129
protected
:
130
132
static
const
int
theStaticSize
;
133
134
protected
:
135
137
DtEntityIdentifier
myEntityID
;
138
DtSyntheticEnvironmentObjectType
myObjectType
;
139
DtSimulationAddress
mySimulationAddress
;
140
141
};
142
143
#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
)