![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 2005 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: forwarderConnectionLostMsg.h,v $ $Revision: 1.5 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtForwarderConnectionLostMsg_H_ 00013 #define DtForwarderConnectionLostMsg_H_ 00014 00015 #include "rtiMsConfig.h" 00016 #include "rtiMsg.h" 00017 00018 class DtConnectionMgr; 00019 class DtForwarderConnectionLostMsg; 00020 class DtNetForwarderConnectionLostMsg; 00021 typedef void (*DtForwarderConnectionLostCb)(const DtForwarderConnectionLostMsg& inter, void* usr); 00022 00023 class DT_DLL_LRC DtForwarderConnectionLostMsg : public DtRtiMsg 00024 { 00025 public: 00026 00028 DtForwarderConnectionLostMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00029 00031 DtForwarderConnectionLostMsg(const DtNetForwarderConnectionLostMsg* netRep, 00032 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00033 00035 DtForwarderConnectionLostMsg( unsigned int senderId, unsigned int lostId, 00036 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00037 00039 virtual ~DtForwarderConnectionLostMsg(); 00040 00042 virtual DtRtiMsg* clone(bool copy = true) const; 00043 00044 00046 virtual void set( unsigned int senderId, unsigned int lostId ); 00047 00050 virtual void setSenderId( unsigned int senderId ); 00051 virtual unsigned int senderId() const; 00052 00055 virtual void setLostId( unsigned int lostId ); 00056 virtual unsigned int lostId() const; 00057 00059 virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const; 00060 00061 public: 00062 00064 static DtRtiMsg* create(const DtNetMsgHeader* initial, 00065 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00066 00067 static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00068 00070 static void addCallback(DtConnectionMgr* conn, 00071 DtForwarderConnectionLostCb cb, void* usr, bool isMomCallback=false); 00072 static void removeCallback(DtConnectionMgr* conn, 00073 DtForwarderConnectionLostCb cb, void* usr, bool isMomCallback=false); 00074 00075 protected: 00076 00078 virtual DtNetForwarderConnectionLostMsg* netForwarderConnectionLostMsg(); 00079 virtual const DtNetForwarderConnectionLostMsg* netForwarderConnectionLostMsg() const; 00080 00082 virtual DtRtiMsgKind internalDtRtiMsgKind(); 00083 00085 virtual int minSize() const; 00086 00088 virtual DtForwarderConnectionLostMsg* self() const; 00089 00090 protected: 00091 00092 }; 00093 00094 inline DtForwarderConnectionLostMsg* DtForwarderConnectionLostMsg::self() const 00095 { 00096 return const_cast<DtForwarderConnectionLostMsg*>( this ); 00097 } 00098 00099 00100 #endif 00101