MAK Data Logger API Documentation for DIS
hlaGenericPublisher.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 
10 #ifndef hlaGenericPublisher_H_
11 #define hlaGenericPublisher_H_
12 
13 #if DtHLA
14 
15 #include "virtualConstructor.h"
16 
17 #include <vl/objectPublisherHLA.h>
18 #include <vl/rtiCompatibility.h>
19 #include "lgrPublisherInterface.h"
20 #include "absoluteTime.h"
21 
22 class DtGenericStateRepository;
23 
24 namespace MAKLogger
25 {
26 
27  class DtLgrHlaSimulationManager;
28 
31  class DT_DLL_LGRSIM DtHLAGenericPublisher : public DtObjectPublisher ,
32  public DtLgrPublisherInterface
33  {
34  public:
35 
39  DT_VIRTUAL_CTR_DEFAULTS(DtHLAGenericPublisher,
40  (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
41  const char* objName, const DtDDMRegionSet* regionSetToUse,
42  double hbtime, bool waitForRegionData, bool staticRegion, bool immediatePublish),
43  (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
44  const char* objName, const DtDDMRegionSet* regionSetToUse,
45  double hbtime=0.0, bool waitForRegionData=false,
46  bool staticRegion=true, bool immediatePublish=true))
47 
48 
49  virtual ~DtHLAGenericPublisher();
50 
51  private:
52 
54  DtHLAGenericPublisher(const DtHLAGenericPublisher &other);
55 
57  DtHLAGenericPublisher &operator=(const DtHLAGenericPublisher &other);
58 
59  public:
60 
63  virtual DtGenericStateRepository* genericStateRep();
64 
66  virtual DtGenericStateRepository* gsr();
67 
69  virtual void update(const DtStateMsg& msg, double scaling, bool isStatic);
70 
72  virtual DtObjectPublisher* objPublisher();
73 
75  virtual void tick(double scaling, bool isStatic);
76 
82  virtual void setPublish(bool makePublished);
83 
85  virtual bool isPublished();
86 
89  virtual void sendRequestedAttrs();
90 
91  virtual void send(const DtStateMsg& msg);
92 
95  virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale, bool wasStatic, bool isStatic);
96 
97 
99  bool sendAllNextTick();
100 
103  void setSendAllNextTick(bool yesNo = true);
104 
105  virtual void setRegion(const DtDDMRegionSet& region);
106 
108  virtual const DtDDMRegionSet& publishingRegions() const;
109 
111  virtual bool publishingToRegion( DtDDMRegionSP region );
112 
113  protected:
114 
116  virtual void sendTheseAttrs(const RTI::AttributeHandleSet& attrs );
117 
120  virtual bool makeObjectPublished(RTI::ObjectClassHandle classHandle, const char* objName);
121 
123  virtual void makeObjectUnpublished(RTI::ObjectClassHandle classHandle, const char* objName);
124 
125 
126  protected:
127 
129  DtLgrHlaSimulationManager& mySimMgr;
130 
132  bool myPublished;
133 
135  bool mySendAllNextTick;
136 
138  double myHeartbeatInterval;
139 
141  double myLastHeartbeatTime;
142  };
143 
144 }
145 
146 #endif
147 #endif

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)