MAK RTIspy API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ambImpBase.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "rtiMsConfig.h"
13 
14 #include <vlutil/vlTime.h>
15 #include <vlutil/vlSmartPointers.h>
16 #include <vlutil/vlString.h>
17 
18 #include <vector>
19 
20 class DtRtiAmbassadorObserver;
22 class DtFedAmbWrapper;
23 class DtFederateMgr;
24 class DtConnectionMgr;
25 class DtObjectMgr;
26 class DtInteractionMgr;
27 class DtFomClassMgr;
28 class DtRIDParameters;
30 class DtAssistantPrinter;
31 #ifndef DT_NO_PLUGINS
32 class DtRtiPluginManager;
33 #endif
34 
35 namespace MAKRti
36 {
37  class DtString;
38  class DtFilePrinter;
39  class DtPrinter;
40 }
41 class DtPrinterBuf;
42 class DtBufferPrinter;
43 
51 {
52 protected:
53 
56 
57 public:
58 
61 
62 public:
63 
64 
66  virtual void addObserver( const MAKRti::DtString& name, DtRtiAmbassadorObserver* observer );
67  virtual DtRtiAmbassadorObserver* removeObserver( const MAKRti::DtString& name );
68 
70  virtual void addFedAmbWrapper( const MAKRti::DtString& name, DtFedAmbWrapper* wrapper );
71  virtual DtFedAmbWrapper* removeFedAmbWrapper( const MAKRti::DtString& name );
72 
77  virtual bool enterServiceCall( const MAKRti::DtString& serviceCallName );
78 
80  virtual void exitServiceCall( const MAKRti::DtString& serviceCallName );
81 
83  virtual bool isConnected() const;
84 
86  virtual DtRIDParameters* params();
87 
91  virtual DtFederateMgr* validatedFedMgr(const char* serviceCallName = nullptr);
92 
97 
98  virtual DtFederateMgr* validateIsJoined(const char* serviceCallName, bool printDiagnostic = false);
99  virtual const DtFederateMgr* validateIsJoined(const char* serviceCallName, bool printDiagnostic = false) const;
101 
104  virtual DtFederateMgr* nakedFedMgr();
105 
108  virtual DtConnectionMgr* validatedConnectMgr();
109 
112  virtual DtConnectionMgr* nakedConnectMgr();
113 
116  virtual DtObjectMgr* objMgr();
117 
120  virtual DtInteractionMgr* interMgr();
121 
124  virtual DtFomClassMgr* fomMgr();
125 
127  virtual DtRtiAmbObserverList* observers();
128 
130  virtual const DtRtiAmbObserverList* observers() const;
131 
134  virtual void enableLogging();
135 
137  virtual std::shared_ptr<MAKRti::DtFilePrinter> logPrinter();
138 
139  unsigned long flags() const;
140 
141 protected:
142 
147  {
148  DtImmediateCallbacks = 0,
150  DtDefaultModel
151  };
152 
154  virtual void setupConnection( const std::vector<MAKRti::DtString>& rid,
155  DtProcessingModelOverride processingModelOverride = DtDefaultModel );
156 
159  virtual void performParameterOverrides( DtRIDParameters& ridParams,
160  DtProcessingModelOverride processingModelOverride ) const;
161 
166  virtual bool completeConnection( MAKRti::DtString& errorMessage );
167 
169  virtual void clearConnection();
170  virtual void clearManagers();
171 
173  virtual void shutdown();
174 
177  virtual bool performMulticastDiscovery();
178 
180  virtual void printDisabledService( const MAKRti::DtString& service );
181 
184  virtual unsigned long incrementServiceCallCount();
185 
187  virtual bool tickOnce();
188 
190  virtual void throwInternalError( const MAKRti::DtString& errorMessage ) const = 0;
191 
193  virtual void throwNotConnected( const MAKRti::DtString& errorMessage ) const = 0;
194 
196  virtual void throwNotJoined( const MAKRti::DtString& errorMessage ) const = 0;
197 
198  // Attach DtStreams to printer
199  virtual void attachStreams(MAKRti::DtPrinter* printer);
200 
201  // Detach DtStreams from printer
202  virtual void detachStreams(MAKRti::DtPrinter* printer);
203 
204  // Detach DtStreams from all printers
205  virtual void detachAllStreams();
206 
207 private:
208 
211 
214 
215 protected:
216 
219 
222 
225 
226 #ifndef DT_NO_PLUGINS
227  DtRtiPluginManager* myPluginMgr;
229 #endif
230 
233 
236 
238  std::shared_ptr<DtRtiAssistantLrcClient> myAssistantClient;
239 
241  std::shared_ptr<MAKRti::DtFilePrinter> myLogPrinter;
242 
244  std::shared_ptr<DtAssistantPrinter> myAssistantPrinter;
245 
247  std::shared_ptr<DtPrinterBuf> myPrinterBuffer;
248  std::shared_ptr<DtBufferPrinter> myBufferPrinter;
249 
250 
253 
255  MAKRti::DtClock myClock;
256 
257  unsigned long myFlags;
258 
260 
262 
263  MAKRti::DtString myErrorMessage;
264 
265 };
std::shared_ptr< DtAssistantPrinter > myAssistantPrinter
The printer which sends output to the assistant file.
Definition: ambImpBase.h:244
This class is a base for the protocol specific DtRtiAmbassadorImplementor class.
Definition: ambImpBase.h:50
Buffers data output by a DtBufferPrinter.
Definition: printerBuf.h:37
std::shared_ptr< MAKRti::DtFilePrinter > myLogPrinter
The printer which prints output to the log file.
Definition: ambImpBase.h:241
Definition: ambObsList.h:20
This class manages the RTI&#39;s start-up configuration using both MTL variables and functions.
Definition: RIDparams.h:87
bool myCallbacksEnabled
Indicates callbacks enabled status.
Definition: ambImpBase.h:252
The client connection to the RTI Assistant for an LRC.
Definition: rtiAssistantLrcClient.h:32
Sends data from an output stream to the RTI Assistant.
Definition: assistantPrinter.h:33
DtProcessingModelOverride
0 == Use an immediate callback processing model 1 == Use an evoked callback processing model 2 == Use...
Definition: ambImpBase.h:146
bool myImmediateCallbackModel
Definition: ambImpBase.h:261
Instances of DtFederateMgr process federation-level messages (such as create, destroy, join, resign, and sync points) and manages the objects responsible for handling general communication, objects, interactions, the FOM, MOM, and data distribution mmg.
Definition: fedMgr.h:93
Instances of DtConnectionMgr manage the communication objects that the RTI will use to either communi...
Definition: connectMgr.h:67
Instances of DtInteractionMgr manage the sending and receiving of interactions.
Definition: interMgr.h:46
DtRtiAmbObserverList * myObservers
The list of RTI Ambassador observers.
Definition: ambImpBase.h:232
DtConnectionMgr * myConnectMgr
The connection manager.
Definition: ambImpBase.h:221
std::shared_ptr< DtPrinterBuf > myPrinterBuffer
The printer which captures output before connecting.
Definition: ambImpBase.h:247
DtRIDParameters * myParams
The RTI initialization parameters.
Definition: ambImpBase.h:218
Definition: fomMgr.h:49
DtFederateMgr * myFedMgr
The federate manager.
Definition: ambImpBase.h:224
The object manager class processes the object management services.
Definition: objMgr.h:81
std::shared_ptr< DtRtiAssistantLrcClient > myAssistantClient
The assistant client. We cache it until we&#39;re initialized.
Definition: ambImpBase.h:238
Prints data from an output stream to a buffer.
Definition: bufferPrinter.h:25
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
std::shared_ptr< DtBufferPrinter > myBufferPrinter
Definition: ambImpBase.h:248
Definition: pluginMgr.h:38
bool myUseBusyWaitForTick
Definition: ambImpBase.h:259
MAKRti::DtClock myClock
Clock used for timing.
Definition: ambImpBase.h:255
DtRtiAmbObserverList * myEmptyObserverList
The empty list.
Definition: ambImpBase.h:235
MAKRti::DtString myErrorMessage
Definition: ambImpBase.h:263
unsigned long myFlags
Definition: ambImpBase.h:257

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)