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
ownershipHandlerDIS.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
6
10
11
#pragma once
12
13
#if DtDIS
14
15
#include <
vlutil/vlMachineTypes.h
>
16
#include <
vl/exerciseConn.h
>
17
#include <
vl/acknowledgeRPdu.h
>
18
#include <
vl/setRecordPdu.h
>
19
#include <
vl/eventReportPdu.h
>
20
#include <
vl/transferControlRequestPdu.h
>
21
22
enum
DtOwnershipStatus
23
{
24
OWNERSHIP_NONE
,
25
OWNERSHIP_BEGIN_PUSH
,
26
OWNERSHIP_BEGIN_PULL
,
27
OWNERSHIP_RECEIVED_ACKNOWLEDGE
,
28
OWNERSHIP_RECEIVED_SET_RECORD
,
29
OWNERSHIP_WAIT_INITIAL_STATE
,
30
OWNERSHIP_WAIT_EVENT_REPORT
31
};
32
39
class
DT_DLL_VL
DtOwnershipHandler
40
{
41
public
:
42
44
DtOwnershipHandler
();
45
47
virtual
~
DtOwnershipHandler
();
48
50
DtOwnershipHandler
(
const
DtOwnershipHandler
& other);
51
53
DtOwnershipHandler
& operator=(
const
DtOwnershipHandler
& other);
54
56
virtual
DtOwnershipHandler
* clone()
const
;
57
62
virtual
void
divestObject(
DtU16
siteTarget,
DtU16
applicationTarget);
63
66
virtual
void
acquireObject();
67
68
virtual
void
setExConn(
DtExerciseConn
* exConn);
69
virtual
void
setEntityId(
const
DtEntityIdentifier
& entityId);
70
74
virtual
void
setAutoResponseTimer(
double
time);
75
76
protected
:
79
static
void
acknowledgeRCb(
DtAcknowledgeRPdu
* ack,
void
* usr);
80
static
void
setRecordCb(
DtSetRecordPdu
* setRec,
void
* usr);
81
static
void
eventReportCb(
DtEventReportPdu
* setRec,
void
* usr);
82
static
void
transferOwnershipCb(
DtTransferControlRequestPdu
* setRec,
void
* usr);
83
virtual
void
acknowledgeCallback(
DtAcknowledgeRPdu
* ack);
84
virtual
void
setRecordCallback(
DtSetRecordPdu
* setRec);
85
virtual
void
eventReportCallback(
DtEventReportPdu
* setRec);
86
virtual
void
transferOwnershipCallback(
DtTransferControlRequestPdu
* transfer);
87
89
virtual
void
transferFailed();
90
93
virtual
void
gainOwnership();
94
96
virtual
void
loseOwnership();
97
98
virtual
bool
requestOwnershipRelease();
99
virtual
bool
requestOwnershipAssumption();
100
101
protected
:
102
DtOwnershipStatus
myStatus
;
103
DtTime
myOwnershipTimer
;
104
double
myAutoResponseTimer
;
105
DtU32
myRequestId
;
106
107
DtExerciseConn
*
myExConn
;
108
DtEntityIdentifier
myEntityId
;
109
110
bool
myAckReceived
;
111
bool
myEventReportReceived
;
112
};
113
114
#endif //DtDIS
Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)