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
pointObjectPublisherDIS.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/pointObjectRepository.h
>
17
#include <
vl/pointObjectDecoderDIS.h
>
18
#include <
vl/pointObjectEncoderDIS.h
>
19
#include <
vlutil/vlPrint.h
>
20
21
class
DT_DLL_VL
DtPointObjectPublisher
:
public
DtObjectPublisher
22
{
23
public
:
24
26
typedef
DtPointObjectRepository
* (*DtStateRepCreator)();
27
28
public
:
29
31
DtPointObjectPublisher
(
DtExerciseConn
* conn,
32
const
DtObjectId
&
id
=
DtObjectId::defaultId
() );
33
35
DtPointObjectPublisher
(
DtPointObjectRepository
* stateRepToUse,
36
DtExerciseConn
* conn,
const
DtObjectId
&
id
=
DtObjectId::defaultId
() );
37
39
DtPointObjectPublisher
(
const
DtSyntheticEnvironmentObjectType
& type,
40
DtExerciseConn
* conn,
const
DtObjectId
&
id
=
DtObjectId::defaultId
() );
41
43
virtual
~
DtPointObjectPublisher
();
44
48
virtual
void
tick
();
49
52
virtual
inline
DtPointObjectRepository
* pointObjectStateRep();
53
55
virtual
inline
DtPointObjectRepository
* posr();
56
59
virtual
inline
DtPointObjectDecoder
*
decoder
() {
return
myDecoder; }
60
63
virtual
inline
DtPointObjectEncoder
*
encoder
() {
return
myEncoder; }
64
66
virtual
const
DtObjectId
&
id
()
const
;
67
69
virtual
inline
const
DtObjectId
&
localId
()
const
{
return
id
(); }
70
72
virtual
inline
const
DtGlobalObjectDesignator
&
globalId
()
const
{
return
id
(); }
73
76
virtual
inline
void
sendFinalPduOnDestruction(
bool
onOff );
77
80
virtual
inline
void
forceUpdate
();
81
83
virtual
void
setLocThreshold(
double
val );
84
virtual
double
locThreshold()
const
;
85
87
virtual
void
setOriThreshold(
double
val );
88
virtual
double
oriThreshold()
const
;
89
91
static
inline
void
setDfltLocThreshold(
double
val );
92
static
inline
double
dfltLocThreshold();
93
95
static
inline
void
setDfltOriThreshold(
double
val );
96
static
inline
double
dfltOriThreshold();
97
99
static
void
setStateRepCreator( DtStateRepCreator creator );
100
static
DtStateRepCreator stateRepCreator();
101
102
static
void
setClassDfltTimeThreshold(
DtTime
threshold );
103
104
protected
:
105
107
void
init(
const
DtObjectId
& );
108
110
void
sendFinalPdu();
111
112
private
:
113
115
DtPointObjectPublisher
(
const
DtPointObjectPublisher
& );
116
118
DtPointObjectPublisher
&
operator =
(
const
DtPointObjectPublisher
& );
119
120
protected
:
121
122
static
DtStateRepCreator
theStateRepCreator
;
123
124
static
double
theDfltLocThreshold
;
125
static
double
theDfltOriThreshold
;
126
static
DtTime
theClassDfltTimeThreshold
;
127
static
bool
theClassDfltIsSetFlag
;
128
129
DtPointObjectDecoder
*
myDecoder
;
130
DtPointObjectEncoder
*
myEncoder
;
131
bool
myStateRepPassedFlag
;
132
bool
mySendFinalInDtor
;
133
134
};
135
136
inline
DtPointObjectRepository
*
DtPointObjectPublisher::pointObjectStateRep
()
137
{
138
return
posr
();
139
}
140
141
inline
DtPointObjectRepository
*
DtPointObjectPublisher::posr
()
142
{
143
return
static_cast<
DtPointObjectRepository
*
>
(
myStateRep
);
144
}
145
146
inline
void
DtPointObjectPublisher::forceUpdate
()
147
{
148
myEncoder
->
setSendNeeded
();
149
}
150
151
inline
void
DtPointObjectPublisher::sendFinalPduOnDestruction
(
bool
onOff )
152
{
153
mySendFinalInDtor
= onOff;
154
}
155
156
inline
void
DtPointObjectPublisher::setDfltLocThreshold
(
double
val )
157
{
158
theDfltLocThreshold
= val;
159
}
160
161
inline
double
DtPointObjectPublisher::dfltLocThreshold
()
162
{
163
return
theDfltLocThreshold
;
164
}
165
166
inline
void
DtPointObjectPublisher::setDfltOriThreshold
(
double
val )
167
{
168
theDfltOriThreshold
= val;
169
}
170
171
inline
double
DtPointObjectPublisher::dfltOriThreshold
()
172
{
173
return
theDfltOriThreshold
;
174
}
175
176
#endif // DtDIS
Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (
www.mak.com
)