MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hlaSimInput.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef hlaSimInput_H_
11 #define hlaSimInput_H_
12 
13 #if DtHLA
14 
15 #include <lgrSim/lgrSim.h>
16 #include <lgrCore/lgrSimInput.h>
17 #include <lgrSim/lgrHlaAttribute.h>
18 #include "hlaMessageFactory.h"
19 
20 #include <vl/rtiNamespace.h>
21 #include <vl/rtiCompatibility.h>
22 
23 #include <list>
24 #include <map>
25 
26 class DtHlaObject;
27 class DtInteraction;
28 class DtStateMsg;
29 class DtBaseEntityStateRepository;
30 class DtGenericAttributeDecoder;
31 class DtStateRepository;
32 
33 namespace MAKLogger
34 {
35  class DtLgrHlaSimulationManager;
36  class DtMessageBuffer;
37  class DtLgrHlaMessageIOInfo;
38 
43  {
44  public:
45 
47 
48  virtual ~DtLgrHlaSimInput();
49 
51  virtual void activateImplementation();
52 
54  virtual void deactivateImplementation();
55 
57  virtual void connecting();
58 
60  virtual void disconnecting();
61 
63  virtual const DtMessageIOInfo* info() const;
64 
66  virtual void tick();
67 
68  static void decodeIsPartOf_RPR_20014( DtBaseEntityStateRepository* stateRep,
69  const RTI::AttributeHandleValuePairSet& attrs,
70  int pairSetIndex );
71 
73  virtual void subscribe();
74 
76  virtual void unsubscribe();
77 
78  protected:
79 
81 
82  static void discoverObjCb(DtHlaObject* object,void* usr);
83  virtual void discoverObject(DtHlaObject* object);
85 
87 
88  static void removeObjCb(DtHlaObject* object,void* usr);
89  virtual void removeObject(DtHlaObject* object, bool updateTimeout=true);
91 
93 
94  static void reflectCb(const DtStateMsg& msg, DtHlaObject* obj, void* usr );
95  virtual void reflect(const DtStateMsg& msg, DtHlaObject* obj);
97 
99 
100  static void receiveInterCb( DtInteraction* inter, void* usr );
101  virtual void receiveInteraction(const DtInteraction * interaction);
103 
106  virtual int getInteractionRegionSet(const DtInteraction *interaction, DtRegionDescSet& regionSet);
107 
110  virtual int getObjectRegionSet(DtRegionDescSet& regionSet);
111 
113  virtual void startListening();
114 
116  virtual void stopListening();
117 
120  virtual bool evaluateTrafficAnalyzerFilters(const DtHlaObject& obj) const;
121 
123  virtual void localDeleteObjectForRefresh(DtHlaObject* object);
124 
126  void checkRefresh();
127 
129  void checkTimeouts();
130 
132  void removeTimeout(DtHlaObject* object);
133 
134  protected:
135 
136 #if DtHLA_1516
137  typedef std::map<RTI::ObjectInstanceHandle,DtLgrHlaHandle> ObjectInstanceMap;
138  typedef std::map<DtString, RTI::ObjectInstanceHandle> NameObjectInstanceMap;
139 #else
140  typedef std::map<RTI::ObjectHandle,DtLgrHlaHandle> ObjectInstanceMap;
141  typedef std::map<DtString, RTI::ObjectHandle> NameObjectInstanceMap;
142 #endif
143  typedef std::map<DtHlaObject*, DtAbsoluteTime> TimeoutByObjectMap;
144  typedef std::set<DtHlaObject*> HlaObjectSet;
145  typedef std::map<DtAbsoluteTime, HlaObjectSet> TimeoutByTimeMap;
146 
148 
151 
152  typedef DtBoost::shared_ptr<DtStateRepository> DtStateRepositorySP;
153  typedef DtBoost::shared_ptr<DtGenericAttributeDecoder> DtGenericAttributeDecoderSP;
155  {
156  public:
158  virtual ~DtStateAndDecoder();
159  virtual void initialize(DtExerciseConn* exConn, DtObjClassDesc* classDesc);
160  virtual DtStateRepository* state();
161  virtual DtGenericAttributeDecoder* decoder();
162  protected:
165  };
166 
168  std::map<DtHlaObject*, DtStateAndDecoder> myStateAndDecoders;
169 
173 
176  };
177 
178 }
179 
180 #endif
181 #endif

Document ID: Generated on Wed Jun 5 18:45:18 EDT 2019 from SVN revision 198968
Copyright © 2019 VT MAK. All Rights Reserved (www.mak.com)