17 #include <vl/rtiCompatibility.h>
18 #include <vl/entityPublisherHLA.h>
19 #include <vl/entityStateRepository.h>
24 class DtLgrHlaEntityStateRepository;
28 class DT_DLL_LGRSIM DtLgrHlaEntityPublisher :
public DtEntityPublisher,
public DtLgrPublisherInterface
36 (DtLgrHlaSimulationManager& simMgr, DtLgrHlaHandle loggerObjectId,
37 DtLgrHlaHandle loggerClassHandle, RTI::ObjectClassHandle classHandle,
38 const char* objName,
const DtDDMRegionSet* regionSetToUse,
39 double hbtime,
bool waitForRegionData,
bool stat),
40 (DtLgrHlaSimulationManager& simMgr,
41 DtLgrHlaHandle loggerObjectId, DtLgrHlaHandle loggerClassHandle,
42 RTI::ObjectClassHandle classHandle,
43 const char* objName,
const DtDDMRegionSet* regionSetToUse,
44 double hbtime=0.0,
bool waitForRegionData=
false,
bool stat=
true))
47 virtual ~DtLgrHlaEntityPublisher();
50 virtual
void update(const DtStateMsg& msg, const
DtAbsoluteTime& updateTime,
51 bool isTimeFromPast,
bool isStateUpdate,
double scaling,
bool isStatic,
bool sendFlag);
54 virtual DtObjectPublisher* objPublisher();
57 virtual
void tick(
double scale,
bool isStatic);
61 virtual
void sendUpdateAtScaleChangePoint(
double oldScale,
double newScale,
bool wasStatic,
bool isStatic);
63 virtual
void setRegion(const DtDDMRegionSet& region);
66 virtual const DtDDMRegionSet& publishingRegions() const;
68 virtual
bool publishingToRegion( DtDDMRegionSP region );
74 virtual
void setPauseUpdateAttributes(
double &scale);
77 virtual DtHlaObjectWithStateRep* pubHlaObject();
80 virtual
void scaleArticulatedParts(
double scale);
84 virtual
void generateScaledUpdate(const RTI::AttributeHandleSet& attrs,
double scale,
85 bool isStatic, DtStateMsg& msg);
89 virtual
void sendRequestedAttrs(
double scale,
bool isStatic);
93 virtual
void sendTheseAttrs(const RTI::AttributeHandleSet& attrs,
double scale,
bool isStatic);
95 virtual
void send(DtStateMsg& msg);
98 DtLgrHlaEntityPublisher(const DtLgrHlaEntityPublisher &other);
101 DtLgrHlaEntityPublisher &operator=(const DtLgrHlaEntityPublisher &other);
106 RTI::AttributeHandleSet* myAttrsToSend;
109 DtBaseEntityStateRepository* mySeenByAttrs;
110 DtDeadReckoner* myDeadReckoner;
113 DtLgrHlaEntityStateRepository *myLgrEsr;
115 double myLastTimeScale;
117 double myHeartbeatInterval;
118 double myLastHeartbeatTime;
120 DtVector32 myLastUpdateVelocity;
121 DtVector32 myLastUpdateAcceleration;
122 DtVector32 myLastUpdateRotVel;
123 DtTaitBryan myLastUpdateOrientation;
124 DtVector myLastUpdateLocation;
127 bool myFrozenBeforePause;
131 bool myUnpausedOnThisSend;
133 DtDeadReckonTypes myOldDRType;
134 bool myDRTypeChanged;