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-2012 VT MAK
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 namespace MAKTrafficClientServerExConn
21 {
22  class DtServerExerciseConnection;
24  typedef DtBoost::shared_ptr<DtServerConnectionThread> DtServerConnectionThreadSP;
25 }
26 
27 namespace MAKTrafficClientServerExConn
28 {
30  {
31  private:
32 
35 
37  DtServerConnectionThread& operator=(const DtServerConnectionThread& orig);
38 
39  public:
40 
43  DtServerConnectionThread(const DtExerciseConnInitializer& init, DtExerciseConn::InitializationStatus* status = 0);
44 
55  DtServerConnectionThread(const char* execName,
56  const char* federateName,
57  DtFomMapper* mapper = DtRprFomMapper::create(0),
58  const char* fedFileName = 0,
59  DtExerciseConn::InitializationStatus* status = 0);
60 
67  DtServerConnectionThread(const char* execName,
68  const char* federateName,
69  const char* dsoName,
70  const char* fedFileName = 0,
71  void* fomMapInitData = 0,
72  DtExerciseConn::InitializationStatus* status = 0);
73 
74 
76  virtual ~DtServerConnectionThread();
77 
80  virtual void start();
81 
84  virtual void join();
85 
89  virtual void stop(bool block);
90 
92  virtual bool running() const;
93 
95  virtual bool started() const;
96 
98  virtual void run();
99 
101  virtual void setTickMin(DtTime minValue);
102 
104  virtual DtTime tickMin() const;
105 
107  virtual void setTickMax(DtTime maxValue);
108 
110  virtual DtTime tickMax() const;
111 
116  virtual void enableAsynchronousCallbacks(DtTime sleepTime);
117 
121  virtual void disableAsynchronousCallbacks();
122 
123  protected:
124 
126  virtual void setRunning(bool value);
127 
128  protected:
129 
132 
134  DtBoost::shared_ptr<DtThread> myThread;
135 
137  mutable DtMutex myMutex;
138 
141 
143  DtTime myMin;
144 
146  DtTime myMax;
147 
149  DtClock myClock;
150 
153 
156 
157  };
158 }
159 
Definition: serverExerciseConnection.h:34
DtBoost::shared_ptr< DtThread > myThread
The thread in which the connection is run.
Definition: serverConnectionThread.h:134
DtBoost::shared_ptr< DtServerConnectionThread > DtServerConnectionThreadSP
Definition: serverConnectionThread.h:23
bool myRunningFlag
Running Status.
Definition: serverConnectionThread.h:140
DtServerExerciseConnection * myServerConnection
The server connection.
Definition: serverConnectionThread.h:131
Definition: serverConnectionThread.h:29
DtMutex myMutex
Protect access to critical sections.
Definition: serverConnectionThread.h:137
DtTime myMax
Max value used in drain input.
Definition: serverConnectionThread.h:146
DtTime myCheckShutdownInterval
The interval to sleep in between checking for shutdown.
Definition: serverConnectionThread.h:152
DtTime myMin
Min value used in drain input.
Definition: serverConnectionThread.h:143
bool myAsynchronousCallbacks
Indicates asynchronous callback mode.
Definition: serverConnectionThread.h:155
#define DT_DLL_CSEC
Definition: clientServerExConnDllDefines.h:17
DtClock myClock
Clock used for timing.
Definition: serverConnectionThread.h:149

Document ID: Generated on Thu Sep 2 15:35:22 EDT 2021 from SVN revision 233992
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)