Go to the documentation of this file.00001
00002
00003
00004
00005
00009
00010 #if DtDIS
00011
00012 #ifndef lgrDisAggregate_H_
00013 #define lgrDisAggregate_H_
00014
00015 #include "lgrPublisherInterface.h"
00016
00017 #include "absoluteTime.h"
00018 #include "virtualConstructor.h"
00019
00020 #include <vl/aggStatePdu.h>
00021
00022 class DtAggregatePublisher;
00023 class DtClock;
00024
00025 namespace MAKLogger
00026 {
00027 class DtLgrDisSimulationManager;
00028
00031 class DT_DLL_LGRSIM DtLgrDisAggragatePublisher : public DtLgrPublisherInterface
00032 {
00033 public:
00034
00035 DT_VIRTUAL_CTR(DtLgrDisAggragatePublisher,( const DtAggregateStatePdu& pdu,
00036 DtLgrDisSimulationManager* simManager))
00037
00038 virtual ~DtLgrDisAggragatePublisher();
00039
00040 virtual void update( const DtPdu& pdu,double scaling, bool isStatic, bool sendFlag );
00041
00042 virtual void sendUpdateAtScaleChangePoint(double oldScale, double newScale,
00043 bool wasStatic, bool isStatic);
00044
00045 virtual void tick(double scaling, bool isStatic);
00046
00047 protected:
00048
00049 void sendScaled(double scale, bool isStatic);
00050 void sendCurrent( double scale, bool isStatic);
00051 void scaleVecs( double ts );
00052 void sendPdu();
00053 bool timeoutNow();
00054 bool sendNow();
00055
00056 DtAggregatePublisher* myPublisher;
00057
00058 DtAggregateStatePdu lastRead;
00059 DtAggregateStatePdu toSend;
00060
00061 DtAbsoluteTime myLastScaledTime;
00062 DtAbsoluteTime myLastRealTime;
00063
00064 DtLgrDisSimulationManager* mySimManager;
00065 DtClock* myClock;
00066
00067 DtVector scaledVel;
00068 DtVector scaledAcc;
00069 DtVector scaledRotVel;
00070 double myLastTimeScale;
00071
00072 };
00073
00074 }
00075
00076 #endif
00077 #endif