MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
29 {
30  DtLgrBeginExtension = 22, // DtLgrTotalState+1
31  DtLgrEmpty = 22,
39 };
40 
43 {
45  DtLGR_DIS = 1,
50 #if !DtHLA
52 #elif DtHLA_4
54 #elif DtHLA_1516_EVOLVED
55  DtLGR_PROTOCOL_IN_USE = DtLGR_HLA_1516_EVOLVED,
56 #elif DtHLA_1516
57  DtLGR_PROTOCOL_IN_USE = DtLGR_HLA_1516,
58 #else
59  DtLGR_PROTOCOL_IN_USE = DtLGR_HLA_13
60 #endif
61 };
62 
63 
66 {
73 };
74 
75 
78 {
83 };
84 
85 
88 {
93 };
94 
95 
97 {
100 };
101 
102 
105 {
109 };
110 
111 
114 {
123 };
124 
125 #if DtDIS
126 
129 
131 typedef void (*DtLgrControlInteractionCb)
132  ( DtLgrControlInteraction* inter, void* usr );
133 
134 #endif
135 
139 #if DtHLA
141 #else
143 #endif
144 {
145 public:
146 
148  DtLgrControlPdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, int pduSize=sizeof(DtNetLgrControlPdu) );
149 
151  DtLgrControlPdu( const DtNetLgrControlPdu* initial,
152  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0 );
153 
155  virtual ~DtLgrControlPdu();
156 
158  DtLgrControlPdu( const DtLgrControlPdu& src );
159 
162 
164  virtual const DtEntityIdentifier& receiverId() const;
165  virtual void setReceiverId( const DtEntityIdentifier& id );
166 
168  virtual const DtEntityIdentifier& senderId() const;
169  virtual void setSenderId( const DtEntityIdentifier& id );
170 
172  virtual DtLgrCommand lgrCommand() const;
173 
175  virtual DtU16 lctVersion() const;
177  void setLctVersion(DtU16 versionNumber);
178 
180  virtual DtU32 sequence() const;
181  virtual void setSequence(DtU32 sequenceNumber);
182 
184  virtual void printDataToStream(std::ostream& stream) const;
185 
187  virtual bool checkVersion() const;
188 
189 public:
191  static DtPdu* create( const DtNetPacket* initial,
192  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0 );
193 
195  static DtLgrControlPdu* create( DtLgrCommand command );
196 
198  static DtLgrControlPdu* create( DtLgrCommandExt command );
199 
201  static bool checkVersion(DtNetLgrControlPdu* header);
202 
203 #if DtDIS
204  static void addCallback( DtExerciseConn* conn,
206  DtLgrControlInteractionCb cb, void* usr );
207  static void removeCallback( DtExerciseConn* conn,
208  DtLgrControlInteractionCb cb, void* usr );
209 #endif
210 
212  static DtU16 addressWildcard();
213 
215  static const DtEntityIdentifier& wildcardAddress();
216 
218  static const char* lgrModeEnum2string( DtLgrMode md );
219 
221  static const char* lgrFilePosEnum2string( DtLgrFilePosition pos );
222 
224  static const char* lgrStateFlag2string( DtLgrCtrlFlagStates flg );
225 
226 public:
227 
228  // Prior to version 12.2 release 8, some subclasses performed initPdu that zeroed out the version.
229  // This flag allows the version check to be disabled so these subclasses sent from older versions
230  // will not be rejected.
233 
234 protected:
236  virtual void setLgrCommand( DtLgrCommand com );
238  virtual void setLgrCommand( DtLgrCommandExt com );
239 
242 
244  virtual DtNetLgrControlPdu* controlHeader() const;
245 
247  DtPduKind internalGetPduKind() const { return DtLgrControlPduKind; }
248 
249 protected:
251  DtEntityIdentifier mySenderId;
252  DtEntityIdentifier myReceiverId;
253 
254 protected:
255  static const DtU16 theAddressWildcard = ((1<<16)-1); // 65535 or 0xFFFF
256  static const DtEntityIdentifier theWildcardAddress;
257 };
258 
260 DT_DLL_LOGGERCONTROL const char *DtLgrCommandEnumString(DtLgrCommand param);
261 
262 #endif // lcPdu_h_
Definition: lcPdu.h:121
DtLgrCommandExt
Definition: lcPdu.h:28
Definition: lcPdu.h:34
DtLgrMode
General operation modes.
Definition: lcPdu.h:65
virtual DtNetLgrControlPdu * controlHeader()
Access to the payload as control pdu header.
virtual const DtEntityIdentifier & senderId() const
Get/set identifier of sender, if applicable.
Definition: lcPdu.h:99
Definition: lcPdu.h:47
void setLctVersion(DtU16 versionNumber)
Called in constructor so not virtual.
Definition: lcPdu.h:33
Definition: lcPdu.h:92
static bool theDisableCheckVersion
Enable/Disable version check.
Definition: lcPdu.h:232
virtual void setSequence(DtU32 sequenceNumber)
Definition: lcPdu.h:116
DtPduKind internalGetPduKind() const
Identity for use by toolkit.
Definition: lcPdu.h:247
Definition: lgrControlP.h:61
DtLgrDirection
Play forwards or backwards when in LGR_PLAY mode.
Definition: lcPdu.h:77
Definition: lcPdu.h:91
Definition: lcPdu.h:67
Definition: lcPdu.h:72
static const char * lgrFilePosEnum2string(DtLgrFilePosition pos)
The name (as a string) of a &#39;DtLgrFilePosition&#39;-type enum (from value)
static DtU16 addressWildcard()
Wildcard value for addresses.
Definition: lcPdu.h:71
virtual DtU16 lctVersion() const
Get/set version.
Definition: lcPdu.h:118
static const DtEntityIdentifier theWildcardAddress
Definition: lcPdu.h:256
virtual bool checkVersion() const
Check that this PDU&#39;s LCT version is compatible.
virtual DtLgrCommand lgrCommand() const
Get message-type for proper casting to a subclass.
DtLgrFilePosition
Location status.
Definition: lcPdu.h:87
DtLgrCtrlFlagStates
Controlling runtime-settable flags and options of the Logger.
Definition: lcPdu.h:113
DT_DLL_LOGGERCONTROL const char * DtLgrCommandEnumString(DtLgrCommand param)
Handles extensions to logger commands.
virtual const DtEntityIdentifier & receiverId() const
Get/set identifier of intended recipient (logger).
Definition: lcPdu.h:120
Definition: lcPdu.h:80
static const DtEntityIdentifier & wildcardAddress()
Wildcard address.
Definition: lcPdu.h:48
Definition: lcPdu.h:35
DtLgrControlPdu & operator=(const DtLgrControlPdu &src)
assignment operator
Definition: lcPdu.h:32
Definition: lcPdu.h:45
Instances of DtLgrControlInteraction are used to represent LgrControl Interactions in HLA...
Definition: hLcInter.h:28
Definition: lcPdu.h:30
Instances of DtLgrControlPdu are a family of messages used to control a remote instance of the MAK-Lo...
Definition: lcPdu.h:140
Definition: lcPdu.h:38
Definition: lcPdu.h:117
static DtPdu * create(const DtNetPacket *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER, DtPduFactory *pduFactory=0)
Create a PDU representation from a network packet.
DtEntityIdentifier mySenderId
Parameter.
Definition: lcPdu.h:251
Definition: lcPdu.h:69
virtual void setSenderId(const DtEntityIdentifier &id)
void(* DtLgrControlInteractionCb)(DtLgrControlInteraction *inter, void *usr)
LgrControl interaction callback function signature.
Definition: hLcInter.h:22
DtLgrControlPdu(DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER, int pduSize=sizeof(DtNetLgrControlPdu))
(default) constructor
Definition: lcPdu.h:37
Definition: lcPdu.h:98
virtual DtU32 sequence() const
Get/set sequence number.
static const char * lgrStateFlag2string(DtLgrCtrlFlagStates flg)
The name (as a string) of a &#39;DtLgrCtrlFlagStates&#39;-type enum (from value)
Definition: lcPdu.h:68
static const char * lgrModeEnum2string(DtLgrMode md)
The name (as a string) of a &#39;DtLgrMode&#39;-type enum (from value)
class DT_DLL_MATREX_TSPI_FOM_MAP DtInteraction
Definition: matrexTspiTagModifier.h:20
Definition: lcPdu.h:90
Definition: lcPdu.h:81
Definition: lcPdu.h:70
Contains network data structures for logger control PDUs.
virtual void setReceiverId(const DtEntityIdentifier &id)
Definition: lcPdu.h:44
Definition: lcPdu.h:46
Definition: lcPdu.h:79
DtLgrProcess
Receiving application may filter lcPdu based on this start-up flag.
Definition: lcPdu.h:104
Contains export defines for logger control toolkit.
virtual void setLgrCommand(DtLgrCommand com)
Set is done by constructing the proper subclass.
DtLgrProtocol
Protocols.
Definition: lcPdu.h:42
Definition: lcPdu.h:82
Definition: lcPdu.h:108
Definition: lcPdu.h:107
Definition: lcPdu.h:115
Definition: lcPdu.h:36
Definition: lcPdu.h:122
Definition: lcPdu.h:119
Definition: lcPdu.h:57
Definition: lcPdu.h:106
DtLgrStyle
Definition: lcPdu.h:96
virtual void printDataToStream(std::ostream &stream) const
Print contents.
Definition: lcPdu.h:49
Definition: lcPdu.h:89
virtual ~DtLgrControlPdu()
destructor
Definition: lcPdu.h:31
DtEntityIdentifier myReceiverId
Definition: lcPdu.h:252
#define DT_DLL_LOGGERCONTROL
Include vlconfig.h to get relivant platform info like if we need declspec stuff or not...
Definition: loggerControlDefines.h:31

Document ID: Generated on Tue Nov 17 15:25:07 EST 2026 from SVN revision 298446
Copyright © 2026 MAK Technologies. All Rights Reserved (www.mak.com)