MAK Data Logger API Documentation for DIS
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;
24 class DtEntityStateRepository;
25 
26 namespace MAKLogger
27 {
28 
29  class DtLgrDisSimulationManager;
30  class DtLgrArtPartList;
31 
35  {
36  public:
38  DT_VIRTUAL_CTR(DtLgrDisEntityPublisher,(const DtEntityStatePdu& pdu,
39  DtLgrDisSimulationManager* simManager))
40 
41 
42  virtual ~DtLgrDisEntityPublisher();
43  protected:
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 
123 
125  DtClock* myClock;
126 
127  DtTaitBryan myExtrapEuler;
128  DtVector myExtrapPos;
129  DtVector myExtrapVel;
130  DtVector myScaledVel;
131  DtVector myScaledAcc;
132  DtVector myScaledRotVel;
133 
140 
141  // Frozen state saved when scale goes to 0 (i.e. paused)
142  // and is restored when unpaused.
144 
145  DtEntityStateRepository* myEsr;
146  };
147 }
148 
149 #endif
150 #endif

Document ID: Generated on Mon Jan 19 08:20:14 EST 2015 from SVN revision 149581
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)