VR-Link API Documentation for HLA 1516
tExerciseConn.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
10 #if DtTENA
11 
12 #ifndef tExerciseConn_H_
13 #define tExerciseConn_H_
14 
15 #include <TENA/Middleware/config.h>
16 #include <TENA/Middleware/SDO/ID.h>
17 #include "baseExConn.h"
18 #include "tInterCbMgr.h"
19 #include "globalObjDes.h"
20 #include "eventId.h"
21 
22 #include <set>
23 
24 
26 class DtLromMapper;
27 class DtInteraction;
28 class DtDynamicLibrary;
29 class DtAmoPublisher;
30 
37 {
38 public:
40  typedef DtLromMapper* (*DtLromMapperCreator)(void* usr);
41 
43  typedef void (*DtLromMapperDeletor)(DtLromMapper*);
44 
45 public:
50 
54  DtExerciseConn(int site, int app, DtLromMapper* mapper, const DtString& execName,
55  const DtString& sessionName, const DtString& orbDefaultInitRef, bool useAmo = true,
56  TENA::Middleware::CommunicationProperties transport = TENA::Middleware::Reliable);
57 
59  virtual ~DtExerciseConn();
60 
61 private:
63  DtExerciseConn(const DtExerciseConn& other);
64 
67 
68 public:
70  virtual TENA::Middleware::SessionPtr sessionPtr();
71 
74  virtual void send(const DtStateMsg& msg);
75 
77  virtual void send(const DtInteraction& msg);
78 
82  virtual void sendStamped(const DtStateMsg& msg);
83 
86  virtual void sendStamped(const DtInteraction& msg);
87 
89  static DtString vrlinkVersion();
90 
92  virtual int siteId() const;
93 
95  virtual int applicationId() const;
96 
102  virtual void drainInput(int usecs = 20);
103 
105  virtual void addInteractionCallback(const DtString& name,
106  DtReceiveInteractionCb cb, void* userData);
107 
109  virtual void removeInteractionCallback(const DtString& name,
110  DtReceiveInteractionCb cb, void* userData);
111 
113  virtual void applyInteractionCallback(const DtString& name,
114  DtInteraction* interaction);
115 
117  virtual DtLromMapper *lromMapper();
118 
121  virtual const DtGlobalObjectDesignator& nextMessageId();
122 
124  virtual const DtEventId& nextEventId();
125 
128  virtual void setReflecting();
129 
131  virtual bool reflecting() const;
132 
135  virtual DtAmoPublisher* amoPublisher();
136 
140  virtual void setTransportType(TENA::Middleware::CommunicationProperties transportType);
141 
143  virtual TENA::Middleware::CommunicationProperties transportType() const;
144 
148  virtual void incrementNumberOfObjectsServed();
149 
153  virtual void decrementNumberOfObjectsServed();
154 
158  virtual void incrementNumberOfProxies();
159 
163  virtual void decrementNumberOfProxies();
164 protected:
168  void initializeLromMapper(const DtString& lromMapperLibName, void* initData);
169 
170  void getFuncsFromSharedLib(DtDynamicLibrary& dso, DtLromMapperCreator* creator,
171  DtLromMapperDeletor* deletor);
172 
173 protected:
174 
175  TENA::Middleware::RuntimePtr myRuntimePtr;
176  TENA::Middleware::ExecutionPtr myExecutionPtr;
177  TENA::Middleware::SessionPtr mySessionPtr;
178  TENA::Middleware::CommunicationProperties myTransportType;
179 
180  int mySiteId;
181  int myApplicationId;
182  int myAvailEventNum;
183  DtGlobalObjectDesignator myCurrentMessageId;
184  DtEventID myCurrentEventId;
185  DtString myExecutionName;
186  DtString mySessionName;
187  DtInteractionCallbackManager myInteractionCallbackManager;
188  DtLromMapper *myLromMapper;
189  DtLromMapperCreator myDsoCreator;
190  DtLromMapperDeletor myDsoDeletor;
191  bool myUseLromMapperDeletor;
192  bool myReflecting;
193  DtAmoPublisher* myAmoPublisher;
194  DtTime myLastAmoUpdate;
195 
196  DtDynamicLibrary* myLromMapperDso;
197 };
198 
199 #endif
200 #endif
201 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)