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
environmentProcessPublisherDIS.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
9
10
#ifndef DtEnvironmentProcessPublisher_H_
11
#define DtEnvironmentProcessPublisher_H_
12
13
#if DtDIS
14
15
16
#include "
objectPublisherDIS.h
"
17
#include "
pdu.h
"
18
#include "
environmentProcessRepository.h
"
19
#include "
environmentProcessEncoderDIS.h
"
20
#include "
environmentProcessDecoderDIS.h
"
21
30
class
DT_DLL_VL
DtEnvironmentProcessPublisher
:
public
DtObjectPublisher
31
{
32
33
public
:
36
typedef
DtEnvironmentProcessRepository
* (*DtStateRepCreator)();
37
38
public
:
39
41
DtEnvironmentProcessPublisher
(
42
DtEnvironmentProcessRepository
* stateRepToUse,
43
DtExerciseConn
* conn,
44
const
DtObjectId
&
id
=
DtObjectId::defaultId
());
45
47
DtEnvironmentProcessPublisher
(
48
DtExerciseConn
* conn,
49
const
DtObjectId
&
id
=
DtObjectId::defaultId
());
50
52
virtual
~
DtEnvironmentProcessPublisher
();
53
58
virtual
void
tick
();
59
62
virtual
DtEnvironmentProcessRepository
* environmentProcessStateRep();
63
65
virtual
DtEnvironmentProcessRepository
* epsr();
66
70
virtual
DtEnvironmentProcessDecoder
* decoder();
71
74
virtual
DtEnvironmentProcessEncoder
* encoder();
75
77
virtual
const
DtObjectId
&
id
()
const
;
78
80
virtual
const
DtObjectId
&
localId
()
const
;
81
83
virtual
const
DtGlobalObjectDesignator
&
globalId
()
const
;
84
88
virtual
void
sendFinalPduOnDestruction(
bool
onOff);
89
92
virtual
void
forceUpdate
();
93
94
public
:
95
97
static
void
setStateRepCreator(DtStateRepCreator creator);
98
static
DtStateRepCreator stateRepCreator(
void
);
99
100
static
void
setClassDfltTimeThreshold(
DtTime
threshold);
101
102
protected
:
103
105
void
sendFinalPdu();
106
108
void
init(
const
DtEntityIdentifier
& vehId);
109
110
//copy constructor -- not implemented
111
DtEnvironmentProcessPublisher
(
const
DtEnvironmentProcessPublisher
& orig);
112
114
DtEnvironmentProcessPublisher
&
operator
=
115
(
const
DtEnvironmentProcessPublisher
& orig);
116
117
protected
:
118
119
DtObjectId
myId
;
120
DtEnvironmentProcessDecoder
*
myDecoder
;
121
DtEnvironmentProcessEncoder
*
myEncoder
;
122
bool
mySendFinalInDtor
;
123
124
protected
:
125
static
DtStateRepCreator
theStateRepCreator
;
126
static
DtTime
theClassDfltTimeThreshold
;
127
static
bool
theClassDfltIsSetFlag
;
128
};
129
130
inline
DtEnvironmentProcessRepository
*
131
DtEnvironmentProcessPublisher::environmentProcessStateRep
()
132
{
133
return
epsr
();
134
}
135
136
inline
DtEnvironmentProcessRepository
*
DtEnvironmentProcessPublisher::epsr
()
137
{
138
return
static_cast<
DtEnvironmentProcessRepository
*
>
(
myStateRep
);
139
}
140
141
inline
DtEnvironmentProcessEncoder
*
DtEnvironmentProcessPublisher::encoder
()
142
{
143
return
myEncoder
;
144
}
145
146
inline
DtEnvironmentProcessDecoder
*
DtEnvironmentProcessPublisher::decoder
()
147
{
148
return
myDecoder
;
149
}
150
151
152
inline
void
DtEnvironmentProcessPublisher::sendFinalPduOnDestruction
(
bool
onOff)
153
{
154
mySendFinalInDtor
= onOff;
155
}
156
157
inline
const
DtObjectId
&
DtEnvironmentProcessPublisher::id
()
const
158
{
159
return
myId
;
160
}
161
162
inline
const
DtObjectId
&
DtEnvironmentProcessPublisher::localId
()
const
163
{
164
return
id
();
165
}
166
167
#endif
168
#endif
169
Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)