MAK Data Logger API Documentation for HLA
lgrDisEntity.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef lgrDisEntity_H_
11 #define lgrDisEntity_H_
12 
13 #if DtDIS
14 
15 #include "lgrPublisherInterface.h"
16 #include "lgrSim.h"
17 #include <vl/entityStatePdu.h>
18 
19 #include "absoluteTime.h"
20 #include "virtualConstructor.h"
21 
22 class DtClock;
23 class DtDIGuyCustomPdu;
25 
26 namespace MAKLogger
27 {
28 
29  class DtLgrDisSimulationManager;
30  class DtLgrArtPartList;
31 
34  class DT_DLL_LGRSIM DtLgrDisEntityPublisher : public DtLgrPublisherInterface
35  {
36  public:
38  DT_VIRTUAL_CTR(DtLgrDisEntityPublisher,(const DtEntityStatePdu& pdu,
39  DtLgrDisSimulationManager* simManager))
40 
41 
42  virtual ~DtLgrDisEntityPublisher();
43  protected:
45  DtLgrDisEntityPublisher( const DtLgrDisEntityPublisher& src );
47  DtLgrDisEntityPublisher& operator=( const DtLgrDisEntityPublisher& src );
48 
49  public:
52  virtual void update( const DtPdu& pdu,double scaling, bool isStatic, bool sendFlag );
53 
57  virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale,
58  bool wasStatic, bool isStatic);
59 
61  virtual bool timeoutNow();
62 
65  virtual void tick(double scale, bool isStatic);
66 
68  virtual const DtEntityIdentifier& id();
69 
70  virtual void processDIGuyPdu(const DtDIGuyCustomPdu& pdu);
71 
72  protected:
73 
74  virtual void doDDR(DtAbsoluteTime tm,double timescale);
75 
80  virtual bool sendNow();
81 
84  virtual void sendScaled( double timescale, bool isStatic, bool doSend );
85 
87  virtual void sendCurrent( double timescale, bool isStatic);
88 
90  virtual void sendPdu();
91 
95  virtual bool getArtPartParamsFromPdu();
96 
100  virtual bool setArtPartParamsToPdu();
101 
104  virtual bool scaleArtPartRateParams( double ts );
105 
108  virtual bool drArtPartParamsToScaleChangePoint( DtTime dt );
109 
112  virtual void scaleVecs( double ts );
113 
115  virtual void scaleVelocity( double ts );
116 
117  protected:
118  DtEntityStatePdu lastRead;
119  DtEntityStatePdu toSend;
120 
121  DtAbsoluteTime myLastScaledTime;
122  DtAbsoluteTime myLastRealTime;
123 
124  DtLgrDisSimulationManager* mySimManager;
125  DtClock* myClock;
126 
127  DtTaitBryan myExtrapEuler;
128  DtVector myExtrapPos;
129  DtVector myExtrapVel;
130  DtVector myScaledVel;
131  DtVector myScaledAcc;
132  DtVector myScaledRotVel;
133 
134  DtLgrArtPartList* myArtPartRecvList;
135  DtLgrArtPartList* myArtPartSendList;
136  int myNumAttParts;
137  char* myPartBuffer;
138  int myPartBufferSize;
139  double myLastTimeScale;
140 
142  };
143 }
144 
145 #endif
146 #endif

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)