![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 2008 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: assistantLatencyReportMsg.h,v $ $Revision: 1.7 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #ifndef DtAssistantLatencyReportMsg_H_ 00010 #define DtAssistantLatencyReportMsg_H_ 00011 00015 00016 // PLEASE NOTE: This class is duplicated as DtLatencyReportMsg 00017 // in latencyReportMsg.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 "assistantMsg.h" 00024 #include "netAssistantLatencyReportMsg.h" 00025 #include <averagedLatencyTestReport.h> 00026 #include <map> 00027 00028 class DtRtiAssistantServer; 00029 class DtRtiAssistantPeer; 00030 class DtAssistantLatencyReportMsg; 00031 00032 typedef void (*DtAssistantLatencyReportCb)(const DtAssistantLatencyReportMsg& report, void* usr); 00033 00034 00038 class DT_DLL_ASSISTANT DtAssistantLatencyReportMsg : public DtAssistantMsg 00039 { 00040 public: 00041 00042 00044 DtAssistantLatencyReportMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00045 00046 DtAssistantLatencyReportMsg(const DtAveragedLatencyTestReport& rep, 00047 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00048 00049 DtAssistantLatencyReportMsg(const DtNetAssistantLatencyReportMsg* netRepMsg, 00050 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00051 00053 virtual ~DtAssistantLatencyReportMsg(); 00054 00056 virtual DtAssistantMsg* clone(bool copy = true) const; 00057 00059 virtual void printData() const; 00060 00062 virtual void resize( unsigned int payLoadSize ); 00063 00065 virtual unsigned char* payload(); 00066 00068 virtual const unsigned char* payload() const; 00069 00071 virtual unsigned int totalSize() const; 00072 00074 virtual void setTotalSize(unsigned int times); 00075 00077 virtual void get(DtAveragedLatencyTestReport& report) const; 00078 00080 virtual void set(const DtAveragedLatencyTestReport& report); 00081 00082 public: 00083 00085 static DtAssistantMsg* create(const DtNetAssistantMsgHeader* initial, 00086 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00087 00088 static DtAssistantMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00089 00092 static void addCallback(DtRtiAssistantServer* conn, 00093 DtAssistantLatencyReportCb cb, void* usr); 00094 static void removeCallback(DtRtiAssistantServer* conn, 00095 DtAssistantLatencyReportCb cb, void* usr); 00096 00099 static void addCallback(DtRtiAssistantPeer* conn, 00100 DtAssistantLatencyReportCb cb, void* usr); 00101 static void removeCallback(DtRtiAssistantPeer* conn, 00102 DtAssistantLatencyReportCb cb, void* usr); 00103 00104 00105 protected: 00106 00108 virtual DtNetAssistantLatencyReportMsg* netAssistantLatencyReportMsg(); 00109 virtual const DtNetAssistantLatencyReportMsg* netAssistantLatencyReportMsg() const; 00110 00112 virtual DtAssistantMsgKind internalMsgKind(); 00113 00115 virtual int minSize() const; 00116 00118 virtual unsigned char* timesPtr() const; 00119 00121 virtual void setTime( DtAssistantReportTimeStampType type, unsigned int time ); 00122 00123 00124 00125 }; 00126 00127 #endif