MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
serverConnectionThread.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <vlutil/vlRunnable.h>
15 #include <vlutil/vlThread.h>
16 #include <vl/exerciseConnHLA.h>
17 #include <vlutil/vlSmartPointers.h>
18 #include <vlutil/vlTime.h>
19 
20 class DtVrlApplicationInitializer;
21 
22 namespace MAKTrafficClientServerExConn
23 {
24  class DtServerExerciseConnection;
26  typedef std::shared_ptr<DtServerConnectionThread> DtServerConnectionThreadSP;
27 }
28 
29 namespace MAKTrafficClientServerExConn
30 {
32  {
33  private:
34 
37 
39  DtServerConnectionThread& operator=(const DtServerConnectionThread& orig);
40 
41  public:
42 
45  DtServerConnectionThread(const DtVrlApplicationInitializer& init, DtExerciseConn::InitializationStatus* status = 0);
46 
57  DtServerConnectionThread(const char* execName,
58  const char* federateName,
59  DtFomMapper* mapper = DtRprFomMapper::create(0),
60  const char* fedFileName = 0,
61  DtExerciseConn::InitializationStatus* status = 0);
62 
69  DtServerConnectionThread(const char* execName,
70  const char* federateName,
71  const char* dsoName,
72  const char* fedFileName = 0,
73  void* fomMapInitData = 0,
74  DtExerciseConn::InitializationStatus* status = 0);
75 
76 
78  virtual ~DtServerConnectionThread();
79 
82  virtual void start();
83 
86  virtual void join();
87 
91  virtual void stop(bool block);
92 
94  virtual bool running() const;
95 
97  virtual bool started() const;
98 
100  virtual void run();
101 
103  virtual void setTickMin(DtTime minValue);
104 
106  virtual DtTime tickMin() const;
107 
109  virtual void setTickMax(DtTime maxValue);
110 
112  virtual DtTime tickMax() const;
113 
118  virtual void enableAsynchronousCallbacks(DtTime sleepTime);
119 
123  virtual void disableAsynchronousCallbacks();
124 
125  protected:
126 
128  virtual void setRunning(bool value);
129 
130  protected:
131 
134 
136  std::shared_ptr<DtThread> myThread;
137 
139  mutable DtMutex myMutex;
140 
143 
145  DtTime myMin;
146 
148  DtTime myMax;
149 
151  DtClock myClock;
152 
155 
158 
159  };
160 }
161 
Definition: serverExerciseConnection.h:35
bool myRunningFlag
Running Status.
Definition: serverConnectionThread.h:142
DtServerExerciseConnection * myServerConnection
The server connection.
Definition: serverConnectionThread.h:133
Definition: serverConnectionThread.h:31
DtMutex myMutex
Protect access to critical sections.
Definition: serverConnectionThread.h:139
DtTime myMax
Max value used in drain input.
Definition: serverConnectionThread.h:148
std::shared_ptr< DtThread > myThread
The thread in which the connection is run.
Definition: serverConnectionThread.h:136
DtTime myCheckShutdownInterval
The interval to sleep in between checking for shutdown.
Definition: serverConnectionThread.h:154
DtTime myMin
Min value used in drain input.
Definition: serverConnectionThread.h:145
bool myAsynchronousCallbacks
Indicates asynchronous callback mode.
Definition: serverConnectionThread.h:157
std::shared_ptr< DtServerConnectionThread > DtServerConnectionThreadSP
Definition: serverConnectionThread.h:25
#define DT_DLL_CSEC
Definition: clientServerExConnDllDefines.h:17
DtClock myClock
Clock used for timing.
Definition: serverConnectionThread.h:151

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)