MAK Data Logger API Documentation for DIS
lgrHlaEntityPublisher.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 lgrHlaEntityPublisher_H_
11 #define lgrHlaEntityPublisher_H_
12 
13 #if DtHLA
14 
15 #include "virtualConstructor.h"
16 
17 #include "lgrPublisherInterface.h"
18 #include <vl/rtiCompatibility.h>
19 #include <vl/entityPublisherHLA.h>
20 
21 class DtBaseEntityStateRepository;
22 class DtDeadReckoner;
23 
24 namespace MAKLogger
25 {
26 
27  class DtLgrHlaSimulationManager;
28 
31  class DT_DLL_LGRSIM DtLgrHlaEntityPublisher : public DtEntityPublisher, public DtLgrPublisherInterface
32  {
33  public:
34 
38  DT_VIRTUAL_CTR_DEFAULTS(DtLgrHlaEntityPublisher,
39  (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
40  const char* objName, const DtDDMRegionSet* regionSetToUse,
41  double hbtime, bool waitForRegionData, bool stat),
42  (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
43  const char* objName, const DtDDMRegionSet* regionSetToUse,
44  double hbtime=0.0, bool waitForRegionData=false, bool stat=true))
45 
46 
47  virtual ~DtLgrHlaEntityPublisher();
48 
49  virtual void update(const DtStateMsg& msg, double scaling, bool isStatic);
50 
51  virtual DtObjectPublisher* objPublisher();
52 
54  virtual void tick(double scale, bool isStatic);
55 
58  virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale, bool wasStatic, bool isStatic);
59 
61  bool sendAllNextTick();
62 
65  void setSendAllNextTick(bool yesNo = true);
66 
67  virtual void setRegion(const DtDDMRegionSet& region);
68 
70  virtual const DtDDMRegionSet& publishingRegions() const;
71 
72  virtual bool publishingToRegion( DtDDMRegionSP region );
73 
74  protected:
77  virtual void sendRequestedAttrs(double scale, bool isStatic);
78 
79  virtual void sendTheseAttrs(const RTI::AttributeHandleSet& attrs, double scale, bool isStatic);
80 
81  virtual void send(DtStateMsg& msg);
82 
84  DtLgrHlaEntityPublisher(const DtLgrHlaEntityPublisher &other);
85 
87  DtLgrHlaEntityPublisher &operator=(const DtLgrHlaEntityPublisher &other);
88 
89  protected:
90 
92  DtLgrHlaSimulationManager& mySimMgr;
93 
95  bool mySendAllNextTick;
96 
97  DtBaseEntityStateRepository* mySeenByAttrs;
98  DtDeadReckoner* myDeadReckoner;
99 
100  double myLastScaling;
101 
102  double myHeartbeatInterval;
103  double myLastHeartbeatTime;
104 
105  DtVector myOrigVelocity;
106  DtVector myOrigAcceleration;
107  DtVector myOrigRotVel;
108  DtTaitBryan myOrigOrientation;
109  DtVector myOrigLocation;
110  DtTime myOrigTime;
111  };
112 
113 }
114 
115 #endif
116 
117 #endif
118 

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)