MAK Data Logger API Documentation for DIS
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.h"
16 #include "lgrSimInput.h"
17 #include "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 DtGenericObjectDecoder;
31 class DtGenericStateRepository;
32 
33 namespace MAKLogger
34 {
35  class DtLgrHlaSimulationManager;
36  class DtMessageBuffer;
37  class DtLgrHlaMessageIOInfo;
38 
42  class DT_DLL_LGRSIM DtLgrHlaSimInput : public DtLgrSimInput
43  {
44  public:
45 
46  DT_VIRTUAL_CTR(DtLgrHlaSimInput, (DtLgrHlaSimulationManager& manager))
47 
48  virtual ~DtLgrHlaSimInput();
49 
50  virtual void activateImplementation();
51  virtual void deactivateImplementation();
52 
54  virtual void disconnecting();
55 
56  virtual const DtMessageIOInfo* info() const;
57 
59  virtual DtAbsoluteTime inputTime() const;
60 
61  virtual void tick();
62 
63  static void decodeIsPartOf_RPR_20014( DtBaseEntityStateRepository* stateRep,
64  const RTI::AttributeHandleValuePairSet& attrs,
65  int pairSetIndex );
66 
67  protected:
68 
69  static void discoverObjCb(DtHlaObject* object,void* usr);
70  virtual void discoverObject(DtHlaObject* object);
71 
72  static void receiveInterCb( DtInteraction* inter, void* usr );
73  virtual void receiveInteraction(const DtInteraction * interaction);
74 
77  virtual int getInteractionRegionSet(const DtInteraction *interaction, DtRegionDescSet& regionSet);
78 
80  static void reflectCb(const DtStateMsg& msg, DtHlaObject* obj, void* usr );
81 
83  virtual void reflect(const DtStateMsg& msg, DtHlaObject* obj);
84 
87  virtual int getObjectRegionSet(DtRegionDescSet& regionSet);
88 
89  static void removeObjCb(DtHlaObject* object,void* usr);
90  virtual void removeObject(DtHlaObject* object);
91 
92  virtual void startListening();
93  virtual void stopListening();
94 
97  virtual bool evaluateTrafficAnalyzerFilters(const DtHlaObject& obj) const;
98 
99  protected:
100 
101 #if DtHLA_1516
102  typedef std::map<RTI::ObjectInstanceHandle,DtLgrHlaHandle> ObjectInstanceMap;
103 #else
104  typedef std::map<RTI::ObjectHandle,DtLgrHlaHandle> ObjectInstanceMap;
105 #endif
106 
107  DtLgrHlaSimulationManager& myHlaManager;
108 
109  std::map<DtHlaObject*, DtAbsoluteTime> myTimeoutTimeMap;
110 
111  typedef DtBoost::shared_ptr<DtGenericStateRepository> DtGenericStateRepositorySP;
112  typedef DtBoost::shared_ptr<DtGenericObjectDecoder> DtGenericObjectDecoderSP;
113  class DtStateAndDecoder
114  {
115  public:
116  DtStateAndDecoder();
117  virtual ~DtStateAndDecoder();
118  virtual void initialize(DtExerciseConn* exConn, DtObjClassDesc* classDesc);
119  virtual DtGenericStateRepository* state();
120  virtual DtGenericObjectDecoder* decoder();
121  protected:
122  DtGenericStateRepositorySP myState;
123  DtGenericObjectDecoderSP myDecoder;
124  };
125 
127  std::map<DtHlaObject*, DtStateAndDecoder> myStateAndDecoders;
128 
129  ObjectInstanceMap myObjectInstanceMap;
130  DtLgrHlaHandle myFreeInstanceHandle;
131 
132  bool myCurrentlyListeningFlag;
133 
134  DtLgrHlaMessageIOInfo* myInfo;
135  };
136 
137 }
138 
139 #endif
140 #endif

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)