Go to the documentation of this file.00001
00002
00003
00004
00005
00008
00009
00010 #ifndef hlaGenericPublisher_H_
00011 #define hlaGenericPublisher_H_
00012
00013 #if DtHLA
00014
00015 #include "virtualConstructor.h"
00016
00017 #include <vl/hObjPub.h>
00018 #include <vl/rtiCompatibility.h>
00019 #include "lgrPublisherInterface.h"
00020 #include "absoluteTime.h"
00021
00022 class DtGenericStateRepository;
00023
00024 namespace MAKLogger
00025 {
00026
00027 class DtLgrHlaSimulationManager;
00028
00031 class DT_DLL_LGRSIM DtHLAGenericPublisher : public DtObjectPublisher ,
00032 public DtLgrPublisherInterface
00033 {
00034 public:
00035
00039 DT_VIRTUAL_CTR_DEFAULTS(DtHLAGenericPublisher,
00040 (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
00041 const char* objName, const DtDDMRegionSet* regionSetToUse,
00042 double hbtime, bool silent, bool stat),
00043 (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
00044 const char* objName, const DtDDMRegionSet* regionSetToUse,
00045 double hbtime=0.0, bool silent=false, bool staticRegion=true))
00046
00047
00048 virtual ~DtHLAGenericPublisher();
00049
00050 private:
00051
00053 DtHLAGenericPublisher(const DtHLAGenericPublisher &other);
00054
00056 DtHLAGenericPublisher &operator=(const DtHLAGenericPublisher &other);
00057
00058 public:
00059
00062 virtual DtGenericStateRepository* genericStateRep();
00063
00065 virtual DtGenericStateRepository* gsr();
00066
00067 virtual void update(const DtStateMsg& msg,double scaling, bool isStatic);
00068
00069 virtual DtObjectPublisher* objPublisher();
00070
00072 virtual void tick(double scaling, bool isStatic);
00073
00076 virtual void sendRequestedAttrs();
00077
00078 virtual void send(const DtStateMsg& msg);
00079
00082 virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale, bool wasStatic, bool isStatic);
00083
00084
00086 bool sendAllNextTick();
00087
00090 void setSendAllNextTick(bool yesNo = true);
00091
00092 virtual void setRegion(const DtDDMRegionSet& region);
00093
00095 virtual const DtDDMRegionSet& publishingRegions() const;
00096
00097 virtual bool publishingToRegion( DtDDMRegionSP region );
00098
00099 protected:
00100
00101 virtual void sendTheseAttrs(const RTI::AttributeHandleSet& attrs );
00102
00103 protected:
00104
00106 DtLgrHlaSimulationManager& mySimMgr;
00107
00109 bool mySendAllNextTick;
00110
00111 DtStateRepository* mySeenByAttrs;
00112
00113 double myHeartbeatInterval;
00114 double myLastHeartbeatTime;
00115 };
00116
00117 }
00118
00119 #endif
00120 #endif