Go to the documentation of this file.00001
00002
00003
00004
00005
00009
00010 #ifndef lgrHlaAggregatePublisher_H_
00011 #define lgrHlaAggregatePublisher_H_
00012
00013 #if DtHLA
00014
00015 #include "virtualConstructor.h"
00016
00017 #include "lgrPublisherInterface.h"
00018 #include <vl/rtiCompatibility.h>
00019 #include <vl/hAggPub.h>
00020
00021 class DtBaseEntityStateRepository;
00022 class DtDeadReckoner;
00023
00024 namespace MAKLogger
00025 {
00026
00027 class DtLgrHlaSimulationManager;
00028
00031 class DT_DLL_LGRSIM DtLgrHlaAggregatePublisher : public DtAggregatePublisher,
00032 public DtLgrPublisherInterface
00033 {
00034 public:
00035
00039 DT_VIRTUAL_CTR_DEFAULTS(DtLgrHlaAggregatePublisher,
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 stat=true))
00046
00047
00048 virtual ~DtLgrHlaAggregatePublisher();
00049
00050 virtual void update(const DtStateMsg& msg, double scaling, bool isStatic);
00051
00052 virtual DtObjectPublisher* objPublisher();
00053
00055 virtual void tick(double scale, bool isStatic);
00056
00059 virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale, bool wasStatic, bool isStatic);
00060
00062 bool sendAllNextTick();
00063
00066 void setSendAllNextTick(bool yesNo = true);
00067
00068 virtual void setRegion(const DtDDMRegionSet& region);
00069
00071 virtual const DtDDMRegionSet& publishingRegions() const;
00072
00073 virtual bool publishingToRegion( DtDDMRegionSP region );
00074
00075 protected:
00078 virtual void sendRequestedAttrs(double scale, bool isStatic);
00079
00080 virtual void sendTheseAttrs(const RTI::AttributeHandleSet& attrs, double scale, bool isStatic);
00081
00082 virtual void send(DtStateMsg& msg);
00083
00085 DtLgrHlaAggregatePublisher(const DtLgrHlaAggregatePublisher &other);
00086
00088 DtLgrHlaAggregatePublisher &operator=(const DtLgrHlaAggregatePublisher &other);
00089
00090 protected:
00091
00093 DtLgrHlaSimulationManager& mySimMgr;
00094
00096 bool mySendAllNextTick;
00097
00098 DtBaseEntityStateRepository* mySeenByAttrs;
00099
00100 DtDeadReckoner* myDeadReckoner;
00101
00102 double myLastScaling;
00103
00104 double myHeartbeatInterval;
00105 double myLastHeartbeatTime;
00106
00107 DtVector myOrigVelocity;
00108 DtVector myOrigAcceleration;
00109 DtVector myOrigRotVel;
00110 DtTaitBryan myOrigOrientation;
00111 DtVector myOrigLocation;
00112 DtTime myOrigTime;
00113 };
00114
00115
00116 }
00117
00118 #endif //! DtHLA
00119
00120 #endif //! lgrHlaAggregatePublisher_H_