![]() |
VR-Link API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 00006 #ifndef DtCommentRPdu_H_ 00007 #define DtCommentRPdu_H_ 00008 00012 00013 00014 #if DtDIS 00015 00016 #include "hostStructs.h" 00017 #include "pduWithData.h" 00018 #include <vlpi/datumIdType.h> 00019 #include "packets/commentRP.h" 00020 #include "exerciseConn.h" 00021 00022 00023 class DT_DLL_VL DtCommentRPdu; 00024 00026 typedef void (*DtCommentRPduCb)(DtCommentRPdu* pdu, void* usr); 00027 00031 class DT_DLL_VL DtCommentRPdu : public DtPduWithData 00032 { 00033 public: 00035 DtCommentRPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00036 DtCommentRPdu(const DtNetCommentRPdu* initial, 00037 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00038 DtCommentRPdu(const DtEntityIdentifier& sender, 00039 const DtEntityIdentifier& receiver, 00040 const char* message, 00041 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00042 DtCommentRPdu(const DtCommentRPdu& orig); 00043 00045 virtual ~DtCommentRPdu(); 00046 00048 DtCommentRPdu& operator=(const DtCommentRPdu& orig); 00049 00051 virtual void setComment(const char* message, int size); 00052 00053 public: 00056 static DtPdu* create(const DtNetPacket* initial, 00057 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00058 00061 static void addCallback(DtExerciseConn* conn, 00062 DtCommentRPduCb cb, void* usr); 00063 static void removeCallback(DtExerciseConn* conn, 00064 DtCommentRPduCb cb, void* usr); 00065 00066 protected: 00069 void setCommentInternal(const char* message, int size); 00070 00072 virtual DtPduKind internalGetPduKind() const; 00073 00075 virtual DtNetDataPduTail* dataSection() const; 00076 00077 protected: 00078 00079 static const int theStaticSize; 00080 00081 }; 00082 00083 inline DtPduKind DtCommentRPdu::internalGetPduKind() const 00084 { 00085 return DtCommentRPduKind; 00086 } 00087 00088 #endif 00089 #endif //! commentRPdu_h_ 00090