VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vl
dDesignatrPub.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*******************************************************************************/
5
6
9
10
#ifndef DtDisDesignatorPublisher_H_
11
#define DtDisDesignatorPublisher_H_
12
13
#if DtDIS
14
15
16
#include "
dObjPub.h
"
17
#include "
pdu.h
"
18
#include "
designatorSR.h
"
19
#include "
dDesignatrDec.h
"
20
#include "
dDesignatrEnc.h
"
21
#include <
vlutil/vlPrint.h
>
22
23
24
class
DT_DLL_VL
DtDesignatorPublisher
:
public
DtObjectPublisher
25
{
26
public
:
27
29
typedef
DtDesignatorRepository
* (*DtStateRepCreator)();
30
31
public
:
32
34
DtDesignatorPublisher
(
35
DtDesignatorRepository
*stateRepToUse,
36
DtExerciseConn
* conn,
37
const
DtObjectId
& entityId =
DtObjectId::defaultId
());
38
40
DtDesignatorPublisher
(
DtExerciseConn
* conn,
41
const
DtObjectId
&entityId =
DtObjectId::defaultId
());
42
44
virtual
~
DtDesignatorPublisher
();
45
46
public
:
50
virtual
void
tick
();
51
54
virtual
inline
DtDesignatorRepository
* designatorStateRep();
55
57
virtual
inline
DtDesignatorRepository
* dsr();
58
61
virtual
inline
DtDesignatorDecoder
*
decoder
() {
return
myDecoder; }
62
65
virtual
inline
DtDesignatorEncoder
*
encoder
() {
return
myEncoder; }
66
68
virtual
const
DtObjectId
&
id
()
const
;
69
71
virtual
inline
const
DtObjectId
&
localId
()
const
{
return
id
(); }
72
74
virtual
inline
const
DtGlobalObjectDesignator
&
globalId
()
const
{
return
id
(); }
75
78
virtual
inline
void
sendFinalPduOnDestruction(
bool
onOff );
79
82
virtual
inline
void
forceUpdate
();
83
85
virtual
void
setRelPosThreshold(
double
val );
86
virtual
double
relPosThreshold()
const
;
87
89
virtual
void
setAbsPosThreshold(
double
val );
90
virtual
double
absPosThreshold()
const
;
91
93
virtual
void
setAccelThreshold(
double
val );
94
virtual
double
accelThreshold()
const
;
95
96
public
:
97
99
static
inline
void
setDfltRelPosThreshold(
double
val );
100
static
inline
double
dfltRelPosThreshold();
101
103
static
inline
void
setDfltAbsPosThreshold(
double
val );
104
static
inline
double
dfltAbsPosThreshold();
105
107
static
inline
void
setDfltAccelThreshold(
double
val );
108
static
inline
double
dfltAccelThreshold();
109
111
static
void
setStateRepCreator(DtStateRepCreator creator);
112
static
DtStateRepCreator stateRepCreator(
void
);
113
114
static
void
setClassDfltTimeThreshold(
DtTime
threshold);
115
116
protected
:
117
119
void
init(
const
DtObjectId
&);
120
122
void
sendFinalPdu();
123
125
DtDesignatorPublisher
(
const
DtDesignatorPublisher
& );
126
128
DtDesignatorPublisher
&
operator=
(
const
DtDesignatorPublisher
& );
129
130
protected
:
131
DtDesignatorDecoder
*
myDecoder
;
132
DtDesignatorEncoder
*
myEncoder
;
133
bool
mySendFinalInDtor
;
134
bool
myStateRepPassedFlag
;
135
136
protected
:
137
138
static
double
theDfltRelPosThreshold
;
139
static
double
theDfltAbsPosThreshold
;
140
static
double
theDfltAccelThreshold
;
141
static
DtStateRepCreator
theStateRepCreator
;
142
static
DtTime
theClassDfltTimeThreshold
;
143
static
bool
theClassDfltIsSetFlag
;
144
};
145
146
inline
DtDesignatorRepository
*
DtDesignatorPublisher::designatorStateRep
()
147
{
148
return
dsr
();
149
}
150
151
inline
DtDesignatorRepository
*
DtDesignatorPublisher::dsr
()
152
{
153
return
static_cast<
DtDesignatorRepository
*
>
(
myStateRep
);
154
}
155
156
inline
void
DtDesignatorPublisher::forceUpdate
()
157
{
158
myEncoder
->
setSendNeeded
();
159
}
160
161
inline
void
DtDesignatorPublisher::sendFinalPduOnDestruction
(
bool
onOff )
162
{
163
mySendFinalInDtor
= onOff;
164
}
165
166
inline
void
DtDesignatorPublisher::setDfltRelPosThreshold
(
double
val )
167
{
168
theDfltRelPosThreshold
= val;
169
}
170
171
inline
double
DtDesignatorPublisher::dfltRelPosThreshold
()
172
{
173
return
theDfltRelPosThreshold
;
174
}
175
176
inline
void
DtDesignatorPublisher::setDfltAbsPosThreshold
(
double
val )
177
{
178
theDfltAbsPosThreshold
= val;
179
}
180
181
inline
double
DtDesignatorPublisher::dfltAbsPosThreshold
()
182
{
183
return
theDfltAbsPosThreshold
;
184
}
185
186
inline
void
DtDesignatorPublisher::setDfltAccelThreshold
(
double
val )
187
{
188
theDfltAccelThreshold
= val;
189
}
190
191
inline
double
DtDesignatorPublisher::dfltAccelThreshold
()
192
{
193
return
theDfltAccelThreshold
;
194
}
195
196
197
#endif
198
#endif
199
Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)