![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 2008 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: latencyReportMsg.h,v $ $Revision: 1.2 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #ifndef DtLatencyReportMsg_H_ 00010 #define DtLatencyReportMsg_H_ 00011 00015 00016 // PLEASE NOTE: This class is duplicated as DtAssistantLatencyReportMsg 00017 // in assistantLatencyReportMsg.h. Any changes made to this class 00018 // should also be made there. 00019 00020 #include <vlutil/vlString.h> 00021 #include <vlutil/vlUtil.h> 00022 00023 #include "rtiMsg.h" 00024 #include "netLatencyReportMsg.h" 00025 #include <averagedLatencyTestReport.h> 00026 #include <map> 00027 00028 class DtConnectionMgr; 00029 class DtLatencyReportMsg; 00030 00031 typedef void (*DtLatencyReportCb)(const DtLatencyReportMsg& report, void* usr); 00032 00033 00037 class DT_DLL_LRC DtLatencyReportMsg : public DtRtiMsg 00038 { 00039 public: 00040 00041 00043 DtLatencyReportMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00044 00045 DtLatencyReportMsg(const DtAveragedLatencyTestReport& rep, 00046 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00047 00048 DtLatencyReportMsg(const DtNetLatencyReportMsg* netRepMsg, 00049 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00050 00052 virtual ~DtLatencyReportMsg(); 00053 00055 virtual DtRtiMsg* clone(bool copy = true) const; 00056 00058 virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const; 00059 00061 virtual void resize( unsigned int payLoadSize ); 00062 00064 virtual unsigned char* payload(); 00065 00067 virtual const unsigned char* payload() const; 00068 00070 virtual unsigned int totalSize() const; 00071 00073 virtual void setTotalSize(unsigned int times); 00074 00076 virtual void get(DtAveragedLatencyTestReport& report) const; 00077 00079 virtual void set(const DtAveragedLatencyTestReport& report); 00080 00081 public: 00082 00084 static DtRtiMsg* create(const DtNetMsgHeader* initial, 00085 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00086 00087 static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00088 00091 static void addCallback(DtConnectionMgr* conn, 00092 DtLatencyReportCb cb, void* usr); 00093 static void removeCallback(DtConnectionMgr* conn, 00094 DtLatencyReportCb cb, void* usr); 00095 00096 00097 protected: 00098 00100 virtual DtNetLatencyReportMsg* netLatencyReportMsg(); 00101 virtual const DtNetLatencyReportMsg* netLatencyReportMsg() const; 00102 00104 virtual DtRtiMsgKind internalDtRtiMsgKind(); 00105 00107 virtual int minSize() const; 00108 00110 virtual unsigned char* timesPtr() const; 00111 00113 virtual void setTime( DtAssistantReportTimeStampType type, unsigned int time ); 00114 00115 00116 00117 }; 00118 00119 #endif