MAK Data Logger API Documentation for DIS
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
libsrc
loggerControlToolkit
libsrc
loggerControl
lcPdu.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 1998 MaK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
#ifndef lcPdu_h_
6
#define lcPdu_h_
7
10
11
#pragma once
12
13
#include "
loggerControlDefines.h
"
14
#include "
packets/lgrControlP.h
"
15
#include <vlutil/vlMachineTypes.h>
16
#include <vlutil/vlPrintUtil.h>
17
#include <matrix/LibMatrix.h>
18
#include <matrix/vlMath.h>
19
#include <vlpi/parseEnum.h>
20
#include <vl/interaction.h>
21
#include <vl/exerciseConn.h>
22
#include <vl/hostStructs.h>
23
#include <vl/pdu.h>
24
25
27
28
enum
DtLgrCommandExt
29
{
30
DtLgrBeginExtension
= 22,
// DtLgrTotalState+1
31
DtLgrEmpty
= 22,
32
DtLgrConnect
= 23,
33
DtLgrConnectionEstablished
= 24,
34
DtLgrDisconnect
= 25,
35
DtLgrAcknowledge
= 26,
36
DtLgrCommandKind
= 27,
37
DtLgrResponse
= 28,
38
DtLgrLgrHeartbeat
= 29
39
};
40
42
enum
DtLgrProtocol
43
{
44
DtLGR_UNKNOWN_PROTOCOL
= 0,
45
DtLGR_DIS
= 1,
46
DtLGR_HLA_13
= 2,
47
DtLGR_HLA_1516
= 3,
48
DtLGR_HLA_1516_EVOLVED
= 4,
49
#if !DtHLA
50
DtLGR_PROTOCOL_IN_USE
=
DtLGR_DIS
,
51
#elif DtHLA_1516_EVOLVED
52
DtLGR_PROTOCOL_IN_USE
=
DtLGR_HLA_1516_EVOLVED
,
53
#elif DtHLA_1516
54
DtLGR_PROTOCOL_IN_USE =
DtLGR_HLA_1516
,
55
#else
56
DtLGR_PROTOCOL_IN_USE =
DtLGR_HLA_13
57
#endif
58
};
59
60
62
enum
DtLgrMode
63
{
64
DtLGR_PLAY
= 0,
65
DtLGR_PAUSE
= 1,
66
DtLGR_RECORD
= 2,
67
DtLGR_STOP
= 3,
68
DtLGR_EMPTY
= 4,
69
DtLGR_LOOP
= 5
70
};
71
72
74
enum
DtLgrDirection
75
{
76
DtLGR_STOPPED
= 0,
77
DtLGR_NOPKT
= 0,
78
DtLGR_FORWARDS
= 1,
79
DtLGR_BACKWARDS
= -1
80
};
81
82
84
enum
DtLgrFilePosition
85
{
86
DtLGR_NOFILE
= 0,
87
DtLGR_START
= 1,
88
DtLGR_MIDDLE
= 2,
89
DtLGR_END
= 3
90
};
91
92
93
enum
DtLgrStyle
94
{
95
DtLGR_PRISTINE
= 0,
96
DtLGR_RVA
= 1
97
};
98
99
101
enum
DtLgrProcess
102
{
103
DtLGR_NONE
= 0,
104
DtLGR_MINE
= 1,
105
DtLGR_ALL
= 2
106
};
107
108
110
enum
DtLgrCtrlFlagStates
111
{
112
DtLGR_EMPTY_FLAG
= 0,
113
DtLGR_STATE_REQUEST
= 1,
114
DtLGR_TIME_CONSTR_ON
= 2,
115
DtLGR_TIME_CONSTR_OFF
= 3,
116
DtLGR_TIME_REGLTD_ON
= 4,
117
DtLGR_TIME_REGLTD_OFF
= 5,
118
DtLGR_OWN_FED_AMB_ON
= 6,
119
DtLGR_OWN_FED_AMB_OFF
= 7
120
};
121
122
#if DtDIS
123
124
class
DT_DLL_LOGGERCONTROL
DtExerciseConn
;
125
class
DT_DLL_LOGGERCONTROL
DtLgrControlPdu
;
126
127
typedef
DtLgrControlPdu
DtLgrControlInteraction
;
128
typedef
void (*
DtLgrControlInteractionCb
)
129
(
DtLgrControlInteraction
* inter,
void
* usr );
130
131
#endif
132
136
#if DtHLA
137
class
DT_DLL_LOGGERCONTROL
DtLgrControlPdu
:
public
DtPdu
138
#else
139
class
DT_DLL_LOGGERCONTROL
DtLgrControlPdu
:
public
DtInteraction
140
#endif
141
{
142
public
:
143
145
DtLgrControlPdu
( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER,
int
pduSize=
sizeof
(
DtNetLgrControlPdu
) );
146
148
DtLgrControlPdu
(
const
DtNetLgrControlPdu
* initial,
149
DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0 );
150
152
virtual
~DtLgrControlPdu
();
153
155
DtLgrControlPdu
(
const
DtLgrControlPdu
& src );
156
158
DtLgrControlPdu
&
operator=
(
const
DtLgrControlPdu
& src );
159
161
virtual
const
DtEntityIdentifier&
receiverId
()
const
;
162
virtual
void
setReceiverId
(
const
DtEntityIdentifier&
id
);
163
165
virtual
const
DtEntityIdentifier&
senderId
()
const
;
166
virtual
void
setSenderId
(
const
DtEntityIdentifier&
id
);
167
169
virtual
DtLgrCommand
lgrCommand
()
const
;
170
172
virtual
DtU16
lctVersion
()
const
;
174
void
setLctVersion
(DtU16 versionNumber);
175
177
virtual
DtU32
sequence
()
const
;
178
virtual
void
setSequence
(DtU32 sequenceNumber);
179
181
virtual
void
printDataToStream
(std::ostream& stream)
const
;
182
184
virtual
bool
checkVersion
()
const
;
185
186
public
:
188
static
DtPdu*
create
(
const
DtNetPacket* initial,
189
DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0 );
190
192
static
DtLgrControlPdu
*
create
( DtLgrCommand command );
193
195
static
DtLgrControlPdu
*
create
(
DtLgrCommandExt
command );
196
198
static
bool
checkVersion
(
DtNetLgrControlPdu
* header);
199
200
#if DtDIS
201
202
static
void
addCallback
(
DtExerciseConn
* conn,
203
DtLgrControlInteractionCb
cb,
void
* usr );
204
static
void
removeCallback
(
DtExerciseConn
* conn,
205
DtLgrControlInteractionCb
cb,
void
* usr );
206
#endif
207
209
static
DtU16
addressWildcard
();
210
212
static
const
DtEntityIdentifier&
wildcardAddress
();
213
215
static
const
char
*
lgrModeEnum2string
(
DtLgrMode
md );
216
218
static
const
char
*
lgrFilePosEnum2string
(
DtLgrFilePosition
pos );
219
221
static
const
char
*
lgrStateFlag2string
(
DtLgrCtrlFlagStates
flg );
222
223
public
:
224
225
// Prior to version 12.2 release 8, some subclasses performed initPdu that zeroed out the version.
226
// This flag allows the version check to be disabled so these subclasses sent from older versions
227
// will not be rejected.
229
static
bool
theDisableCheckVersion
;
230
231
protected
:
233
virtual
void
setLgrCommand
( DtLgrCommand com );
235
virtual
void
setLgrCommand
(
DtLgrCommandExt
com );
236
238
virtual
DtNetLgrControlPdu
*
controlHeader
();
239
241
virtual
DtNetLgrControlPdu
*
controlHeader
()
const
;
242
244
DtPduKind
internalGetPduKind
()
const
{
return
DtLgrControlPduKind; }
245
246
protected
:
248
DtEntityIdentifier
mySenderId
;
249
DtEntityIdentifier
myReceiverId
;
250
251
protected
:
252
static
const
DtU16 theAddressWildcard = ((1<<16)-1);
// 65535 or 0xFFFF
253
static
const
DtEntityIdentifier
theWildcardAddress
;
254
};
255
257
DT_DLL_LOGGERCONTROL
const
char
*
DtLgrCommandEnumString
(DtLgrCommand param);
258
259
#endif // lcPdu_h_
Document ID: Generated on Thu Jul 23 15:05:27 EDT 2020 from SVN revision 215371
Copyright © 2020 MAK Technologies. All Rights Reserved (
www.mak.com
)