VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vl
undwaAcPdu.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 <
vlutil/vlMachineTypes.h
>
15
16
#include <
vl/packets/undwaAcP.h
>
17
#include <
vl/undwaAcEmtSys.h
>
18
#include <
vl/undwaAcPasAct.h
>
19
#include <
vl/exerciseConn.h
>
20
#include <
vl/undwaAcShaft.h
>
21
#include <
vl/undwaAcBeam.h
>
22
#include <
vl/hostStructs.h
>
23
#include <
vl/dStateMsg.h
>
24
25
#include <
matrix/vlMath.h
>
26
27
#define DtINCONSISTENT_UA_PDU_LENGTH 1
28
#define DtINCONSISTENT_UA_SYS_LENGTHS 2
29
#define DtINCONSISTENT_UA_SYS_BEAM_LENGTHS 3
30
31
class
DtUnderwaterAcousticPdu
;
32
34
typedef
void (*
DtUnderwaterAcousticPduCb
)(
DtUnderwaterAcousticPdu
* pdu,
void
* usr );
35
39
class
DT_DLL_VL
DtUnderwaterAcousticPdu
:
public
DtStateMsg
40
{
41
public
:
42
44
DtUnderwaterAcousticPdu
(
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
45
DtUnderwaterAcousticPdu
(
const
DtNetUnderwaterAcousticPdu
* initial,
46
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
47
DtUnderwaterAcousticPdu
(
const
DtUnderwaterAcousticPdu
& orig );
48
50
virtual
~
DtUnderwaterAcousticPdu
();
51
53
DtUnderwaterAcousticPdu
&
operator =
(
const
DtUnderwaterAcousticPdu
& orig );
54
56
virtual
void
setEmittingEntityID(
const
DtEntityIdentifier
& entity );
57
virtual
const
DtEntityIdentifier
& emittingEntityID()
const
;
58
60
virtual
void
setEventID(
const
DtEventID
& event );
61
virtual
const
DtEventID
& eventID()
const
;
62
64
virtual
void
setStateChangeUpdate(
DtUnderwaterAcousticUpdate
upd );
65
virtual
DtUnderwaterAcousticUpdate
stateChangeUpdate()
const
;
66
68
virtual
void
setPassiveParameterIndex(
69
DtUnderwaterAcousticPassiveParmIndex
ind );
70
virtual
DtUnderwaterAcousticPassiveParmIndex
71
passiveParameterIndex()
const
;
72
74
virtual
void
setPropulsionPlantConfig(
75
DtUnderwaterAcousticPropulsionPlantConfig
config );
76
virtual
DtUnderwaterAcousticPropulsionPlantConfig
77
propulsionPlantConfig()
const
;
78
81
virtual
bool
setNumShafts(
DtU8
num );
82
virtual
DtU8
numShafts()
const
;
83
86
virtual
bool
setNumAdditionalPassiveAct(
DtU8
num );
87
virtual
DtU8
numAdditionalPassiveAct()
const
;
88
91
virtual
bool
setNumEmitterSystems(
DtU8
num );
92
virtual
DtU8
numEmitterSystems()
const
;
93
97
virtual
bool
setNumBeams(
int
emitterSystemIndex,
DtU8
num );
98
virtual
DtU8
numBeams(
int
emitterSystemIndex )
const
;
99
102
virtual
bool
setShaftSpeed(
int
index,
103
const
DtUnderwaterAcousticShaftSpeed
& record );
104
virtual
bool
getShaftSpeed(
int
index,
105
DtUnderwaterAcousticShaftSpeed
& record )
const
;
106
109
virtual
bool
setAddtnlPassiveAct(
int
index,
110
const
DtUnderwaterAcousticAddtnlPassiveAct
& record );
111
virtual
bool
getAddtnlPassiveAct(
int
index,
112
DtUnderwaterAcousticAddtnlPassiveAct
& record )
const
;
113
117
virtual
bool
setEmitterSystem(
int
index,
118
const
DtUnderwaterAcousticEmitterSystem
& record );
119
virtual
bool
getEmitterSystem(
int
index,
120
DtUnderwaterAcousticEmitterSystem
& record )
const
;
121
125
virtual
bool
setBeam(
int
emitterSystemIndex,
int
beamIndex,
126
const
DtUnderwaterAcousticBeam
& record );
127
virtual
bool
getBeam(
int
emitterSystemIndex,
int
beamIndex,
128
DtUnderwaterAcousticBeam
& record )
const
;
129
131
virtual
void
printData
()
const
;
132
virtual
void
printDataToStream
( std::ostream& stream )
const
;
133
134
public
:
135
138
static
DtPdu
* create(
const
DtNetPacket
* initial,
139
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
140
143
static
void
addCallback(
DtExerciseConn
* conn,
144
DtUnderwaterAcousticPduCb
cb,
void
* usr );
145
static
void
removeCallback(
DtExerciseConn
* conn,
146
DtUnderwaterAcousticPduCb
cb,
void
* usr );
147
148
protected
:
149
152
DtUnderwaterAcousticPdu
*
self
()
const
;
153
155
virtual
DtPduKind
internalGetPduKind
()
const
{
return
DtUnderwaterAcousticPduKind
; }
156
158
virtual
DtNetUnderwaterAcousticPdu
* netPduStruct()
const
;
159
161
virtual
char
* var()
const
;
162
164
virtual
int
shaftSpeedRecordOffset(
int
recordIndex )
const
;
165
167
virtual
int
passiveActRecordOffset(
int
recordIndex )
const
;
168
170
virtual
int
emitterSystemRecordOffset(
int
recordIndex )
const
;
171
174
virtual
int
beamDataRecordOffset(
int
emitterSystemIndex,
int
beamIndex )
const
;
175
176
int
computeStatus()
const
;
177
178
protected
:
179
180
static
const
int
theNetUaPduSize
;
181
static
const
int
theNetShaftSize
;
182
static
const
int
theNetApaSize
;
183
static
const
int
theNetSystemSize
;
184
static
const
int
theNetBeamSize
;
185
186
protected
:
187
189
DtEntityIdentifier
myEntityID
;
190
DtEventID
myEventID
;
191
192
};
193
194
#endif // DtDIS
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
)