lgrHlaEntityPublisher.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00009 
00010 #ifndef lgrHlaEntityPublisher_H_
00011 #define lgrHlaEntityPublisher_H_
00012 
00013 #if DtHLA
00014 
00015 #include "virtualConstructor.h"
00016 
00017 #include "lgrPublisherInterface.h"
00018 #include <vl/rtiCompatibility.h>
00019 #include <vl/hEntityPub.h>
00020 
00021 class DtBaseEntityStateRepository;
00022 class DtDeadReckoner;
00023 
00024 namespace MAKLogger
00025 {
00026 
00027    class DtLgrHlaSimulationManager;
00028 
00031    class DT_DLL_LGRSIM DtLgrHlaEntityPublisher : public DtEntityPublisher, public DtLgrPublisherInterface
00032    {
00033    public:
00034 
00038       DT_VIRTUAL_CTR_DEFAULTS(DtLgrHlaEntityPublisher,
00039                               (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
00040                                const char* objName, const DtDDMRegionSet* regionSetToUse,
00041                                double hbtime, bool silent, bool stat),
00042                               (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
00043                                const char* objName, const DtDDMRegionSet* regionSetToUse,
00044                                double hbtime=0.0, bool silent=false, bool stat=true))
00045 
00046       
00047       virtual ~DtLgrHlaEntityPublisher();
00048 
00049       virtual void update(const DtStateMsg& msg, double scaling, bool isStatic);
00050 
00051       virtual DtObjectPublisher* objPublisher();
00052 
00054       virtual void tick(double scale, bool isStatic);
00055 
00058       virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale, bool wasStatic, bool isStatic);
00059 
00061       bool sendAllNextTick();
00062 
00065       void setSendAllNextTick(bool yesNo = true);
00066 
00067       virtual void setRegion(const DtDDMRegionSet& region);
00068       
00070       virtual const DtDDMRegionSet& publishingRegions() const;
00071 
00072       virtual bool publishingToRegion( DtDDMRegionSP region );
00073 
00074    protected:
00077       virtual void sendRequestedAttrs(double scale, bool isStatic);
00078 
00079       virtual void sendTheseAttrs(const RTI::AttributeHandleSet& attrs, double scale, bool isStatic);
00080 
00081       virtual void send(DtStateMsg& msg);
00082 
00084       DtLgrHlaEntityPublisher(const DtLgrHlaEntityPublisher &other);
00085 
00087       DtLgrHlaEntityPublisher &operator=(const DtLgrHlaEntityPublisher &other);
00088 
00089    protected:
00090 
00092       DtLgrHlaSimulationManager& mySimMgr;
00093 
00095       bool mySendAllNextTick;
00096 
00097       DtBaseEntityStateRepository* mySeenByAttrs;
00098       DtDeadReckoner* myDeadReckoner;
00099 
00100       double myLastScaling;
00101 
00102       double myHeartbeatInterval;
00103       double myLastHeartbeatTime;
00104 
00105       DtVector myOrigVelocity;
00106       DtVector myOrigAcceleration;
00107       DtVector myOrigRotVel;
00108       DtTaitBryan myOrigOrientation;
00109       DtVector myOrigLocation;
00110       DtTime myOrigTime;
00111    };
00112 
00113 }
00114 
00115 #endif   //! DtHLA
00116 
00117 #endif   //! lgrHlaEntityPublisher_H_
00118 

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)