MAK RTIspy API Documentation for HLA 1516
forwarderPingMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2005 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: forwarderPingMsg.h,v $ $Revision: 1.7 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtForwarderPingMsg_H_
00013 #define DtForwarderPingMsg_H_
00014 
00015 #include "rtiMsConfig.h"
00016 #include "rtiMsg.h"
00017 
00018 class DtConnectionMgr;
00019 class DtForwarderPingMsg;
00020 class DtNetForwarderPingMsg;
00021 typedef void (*DtForwarderPingCb)(const DtForwarderPingMsg& inter, void* usr);
00022 
00023 class DT_DLL_LRC DtForwarderPingMsg : public DtRtiMsg
00024 {
00025 public:
00026    enum DtPingStatus
00027    {
00028       PingRequest = 0,
00029       PingResponseSuccess,
00030       PingResponseNotFound
00031    };
00032          
00034    DtForwarderPingMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00035 
00037    DtForwarderPingMsg(const DtNetForwarderPingMsg* netRep,
00038       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00039 
00041    DtForwarderPingMsg( unsigned long target, DtPingStatus status,
00042       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00043 
00045    virtual ~DtForwarderPingMsg();
00046 
00048    virtual DtRtiMsg* clone(bool copy = true) const;
00049 
00050 
00052    virtual void set( unsigned long target, DtPingStatus status );
00053    
00055    virtual void setPingStatus( DtPingStatus status );
00056    virtual DtPingStatus pingStatus() const;
00057    
00060    virtual void setDestination( unsigned long target );
00061    virtual unsigned long destination() const;
00062 
00064    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00065 
00066 public:
00067 
00069    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00070       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00071 
00072    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00073 
00075    static void addCallback(DtConnectionMgr* conn,
00076       DtForwarderPingCb cb, void* usr, bool isMomCallback=false);
00077    static void removeCallback(DtConnectionMgr* conn,
00078       DtForwarderPingCb cb, void* usr, bool isMomCallback=false);
00079 
00080 protected:
00081 
00083    virtual DtNetForwarderPingMsg* netForwarderPingMsg();
00084    virtual const DtNetForwarderPingMsg* netForwarderPingMsg() const;
00085 
00087    virtual DtRtiMsgKind internalDtRtiMsgKind();
00088 
00090    virtual int minSize() const;
00091 
00093    virtual DtForwarderPingMsg* self() const;
00094    
00095 protected:
00096 
00097 };
00098 
00099 inline DtForwarderPingMsg* DtForwarderPingMsg::self() const
00100 {
00101    return const_cast<DtForwarderPingMsg*>( this );
00102 }
00103 
00104 
00105 #endif
00106 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)