MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrHlaEntityPublisher.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtHLA
13 
16 
17 #include <vl/rtiCompatibility.h>
18 #include <vl/entityPublisherHLA.h>
19 #include <vl/entityStateRepository.h>
20 
21 
22 namespace MAKLogger
23 {
24  class DtLgrHlaEntityStateRepository;
25 
28  class DT_DLL_LGRSIM DtLgrHlaEntityPublisher : public DtEntityPublisher, public DtLgrPublisherInterface
29  {
30  public:
31 
35  DT_VIRTUAL_CTR_DEFAULTS(DtLgrHlaEntityPublisher,
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))
45 
46 
47  virtual ~DtLgrHlaEntityPublisher();
48 
50  virtual void update(const DtStateMsg& msg, const DtAbsoluteTime& updateTime,
51  bool isTimeFromPast, bool isStateUpdate, double scaling, bool isStatic, bool sendFlag);
52 
54  virtual DtObjectPublisher* objPublisher();
55 
57  virtual void tick(double scale, bool isStatic);
58 
61  virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale, bool wasStatic, bool isStatic);
62 
63  virtual void setRegion(const DtDDMRegionSet& region);
64 
66  virtual const DtDDMRegionSet& publishingRegions() const;
67 
68  virtual bool publishingToRegion( DtDDMRegionSP region );
69 
70  protected:
71 
74  virtual void setPauseUpdateAttributes(double &scale);
75 
77  virtual DtHlaObjectWithStateRep* pubHlaObject();
78 
80  virtual void scaleArticulatedParts(double scale);
81 
84  virtual void generateScaledUpdate(const RTI::AttributeHandleSet& attrs, double scale,
85  bool isStatic, DtStateMsg& msg);
86 
89  virtual void sendRequestedAttrs(double scale, bool isStatic);
90 
93  virtual void sendTheseAttrs(const RTI::AttributeHandleSet& attrs, double scale, bool isStatic);
94 
95  virtual void send(DtStateMsg& msg);
96 
98  DtLgrHlaEntityPublisher(const DtLgrHlaEntityPublisher &other);
99 
101  DtLgrHlaEntityPublisher &operator=(const DtLgrHlaEntityPublisher &other);
102 
103  protected:
104 
106  RTI::AttributeHandleSet* myAttrsToSend;
107 
109  DtBaseEntityStateRepository* mySeenByAttrs;
110  DtDeadReckoner* myDeadReckoner;
111 
112  // Reference to entity state rep. as it instantiated logger derivation.
113  DtLgrHlaEntityStateRepository *myLgrEsr;
114 
115  double myLastTimeScale;
116 
117  double myHeartbeatInterval;
118  double myLastHeartbeatTime;
119 
120  DtVector32 myLastUpdateVelocity;
121  DtVector32 myLastUpdateAcceleration;
122  DtVector32 myLastUpdateRotVel;
123  DtTaitBryan myLastUpdateOrientation;
124  DtVector myLastUpdateLocation;
125 
126  // Frozen state saved when scale goes to 0 (i.e. paused) and is restored when unpaused.
127  bool myFrozenBeforePause;
128 
129  // Flag to set when the tape is paused
130  bool myPaused;
131  bool myUnpausedOnThisSend;
132 
133  DtDeadReckonTypes myOldDRType;
134  bool myDRTypeChanged;
135 
136  };
137 
138 }
139 
140 #endif
141 
#define DT_VIRTUAL_CTR_DEFAULTS(CLASS_NAME, ARG_TYPES_LIST, ARG_DEFAULTS_LIST)
Declare a Virtual Constructor Create using DT_VIRTUAL_CTR_DEFAULTS(CLASS_NAME,ARG_TYPES_LIST,ARG_DEFAULTS_LIST) Where CLASS_NAME = the name of the class being declared Where ARG_TYPES_LIST = a list (ie in side parentheses) of comma seperated types Where ARG_DEFAULTS_LIST = a list (ie in side parentheses) of comma seperated types with default values specified.
Definition: virtualConstructor.h:63
#define DT_DLL_LGRSIM
Definition: lgrSim.h:21
Contains MAKLogger::DtLgrPublisherInterface class.
Contains DT_VIRTUAL_CTR DT_VIRTUAL_CTR_DEFAULTS DT_VIRTUAL_COPY_ASSIGN DT_VIRTUAL_BASE_CTR DT_PURE_VI...
class DT_DLL_LGRUTIL DtAbsoluteTime
Definition: absoluteTime.h:22

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)