VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vl
designatorPublisherDIS.h
Go to the documentation of this file.
1
/****************************************************************************
2
* Copyright (c) 2013 VT MAK
3
* All rights reserved.
4
****************************************************************************/
5
9
10
#pragma once
11
12
#if DtDIS
13
14
#include <
vl/pdu.h
>
15
#include <
vl/objectPublisherDIS.h
>
16
#include <
vl/designatorRepository.h
>
17
#include <
vl/designatorDecoderDIS.h
>
18
#include <
vl/designatorEncoderDIS.h
>
19
#include <
vlutil/vlPrint.h
>
20
21
class
DT_DLL_VL
DtDesignatorPublisher
:
public
DtObjectPublisher
22
{
23
public
:
24
26
typedef
DtDesignatorRepository
* (*DtStateRepCreator)();
27
28
public
:
29
31
DtDesignatorPublisher
(
DtExerciseConn
* conn,
32
const
DtObjectId
& entityId =
DtObjectId::defaultId
() );
33
35
DtDesignatorPublisher
(
DtDesignatorRepository
* stateRepToUse,
36
DtExerciseConn
* conn,
const
DtObjectId
& entityId =
DtObjectId::defaultId
() );
37
39
virtual
~
DtDesignatorPublisher
();
40
44
virtual
void
tick
();
45
48
virtual
inline
DtDesignatorRepository
* designatorStateRep();
49
51
virtual
inline
DtDesignatorRepository
* dsr();
52
55
virtual
inline
DtDesignatorDecoder
*
decoder
() {
return
myDecoder; }
56
59
virtual
inline
DtDesignatorEncoder
*
encoder
() {
return
myEncoder; }
60
62
virtual
const
DtObjectId
&
id
()
const
;
63
65
virtual
inline
const
DtObjectId
&
localId
()
const
{
return
id
(); }
66
68
virtual
inline
const
DtGlobalObjectDesignator
&
globalId
()
const
{
return
id
(); }
69
72
virtual
inline
void
sendFinalPduOnDestruction(
bool
onOff );
73
76
virtual
inline
void
forceUpdate
();
77
79
virtual
void
setRelPosThreshold(
double
val );
80
virtual
double
relPosThreshold()
const
;
81
83
virtual
void
setAbsPosThreshold(
double
val );
84
virtual
double
absPosThreshold()
const
;
85
87
virtual
void
setAccelThreshold(
double
val );
88
virtual
double
accelThreshold()
const
;
89
91
static
inline
void
setDfltRelPosThreshold(
double
val );
92
static
inline
double
dfltRelPosThreshold();
93
95
static
inline
void
setDfltAbsPosThreshold(
double
val );
96
static
inline
double
dfltAbsPosThreshold();
97
99
static
inline
void
setDfltAccelThreshold(
double
val );
100
static
inline
double
dfltAccelThreshold();
101
103
static
void
setStateRepCreator(DtStateRepCreator creator);
104
static
DtStateRepCreator stateRepCreator(
void
);
105
106
static
void
setClassDfltTimeThreshold(
DtTime
threshold);
107
108
protected
:
109
111
void
init(
const
DtObjectId
& );
112
114
void
sendFinalPdu();
115
116
private
:
117
119
DtDesignatorPublisher
(
const
DtDesignatorPublisher
& );
120
122
DtDesignatorPublisher
&
operator =
(
const
DtDesignatorPublisher
& );
123
124
protected
:
125
126
static
DtStateRepCreator
theStateRepCreator
;
127
128
static
double
theDfltRelPosThreshold
;
129
static
double
theDfltAbsPosThreshold
;
130
static
double
theDfltAccelThreshold
;
131
static
DtTime
theClassDfltTimeThreshold
;
132
static
bool
theClassDfltIsSetFlag
;
133
134
DtDesignatorDecoder
*
myDecoder
;
135
DtDesignatorEncoder
*
myEncoder
;
136
bool
mySendFinalInDtor
;
137
138
};
139
140
141
inline
DtDesignatorRepository
*
DtDesignatorPublisher::designatorStateRep
()
142
{
143
return
dsr
();
144
}
145
146
inline
DtDesignatorRepository
*
DtDesignatorPublisher::dsr
()
147
{
148
return
static_cast<
DtDesignatorRepository
*
>
(
myStateRep
);
149
}
150
151
inline
void
DtDesignatorPublisher::forceUpdate
()
152
{
153
myEncoder
->
setSendNeeded
();
154
}
155
156
inline
void
DtDesignatorPublisher::sendFinalPduOnDestruction
(
bool
onOff )
157
{
158
mySendFinalInDtor
= onOff;
159
}
160
161
inline
void
DtDesignatorPublisher::setDfltRelPosThreshold
(
double
val )
162
{
163
theDfltRelPosThreshold
= val;
164
}
165
166
inline
double
DtDesignatorPublisher::dfltRelPosThreshold
()
167
{
168
return
theDfltRelPosThreshold
;
169
}
170
171
inline
void
DtDesignatorPublisher::setDfltAbsPosThreshold
(
double
val )
172
{
173
theDfltAbsPosThreshold
= val;
174
}
175
176
inline
double
DtDesignatorPublisher::dfltAbsPosThreshold
()
177
{
178
return
theDfltAbsPosThreshold
;
179
}
180
181
inline
void
DtDesignatorPublisher::setDfltAccelThreshold
(
double
val )
182
{
183
theDfltAccelThreshold
= val;
184
}
185
186
inline
double
DtDesignatorPublisher::dfltAccelThreshold
()
187
{
188
return
theDfltAccelThreshold
;
189
}
190
191
#endif // DtDIS
Document ID: Generated on Mon Feb 6 18:36:34 EST 2017 from SVN revision 173107
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)