MAK RTIspy API Documentation for HLA Evolved
regEnabledMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: regEnabledMsg.h,v $ $Revision: 1.10 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtRegulationEnabledMsg_H_
00013 #define DtRegulationEnabledMsg_H_
00014 
00015 #ifdef DtTIME
00016 
00017 #include "rtiMsg.h"
00018 #include "netRegEnblMsg.h"
00019 
00020 class DtConnectionMgr;
00021 class DtRegulationEnabledMsg;
00022 typedef void (*DtRegulationEnabledCb)(const DtRegulationEnabledMsg& msg, void* usr);
00023 
00024 class DT_DLL_LRC DtRegulationEnabledMsg : public DtRtiMsg
00025 {
00026 public:
00027 
00029    DtRegulationEnabledMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00030 
00032    DtRegulationEnabledMsg(
00033       DtFederateHandle handle,
00034 #ifdef DtIFSPEC1516
00035       rti1516::LogicalTime const & theTime,
00036 #elif defined(DtIFSPEC1516E)
00037       rti1516e::LogicalTime const & theTime,
00038 #else
00039       RTI::FedTime const & theTime,
00040 #endif
00041       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00042 
00044    DtRegulationEnabledMsg(const DtNetRegulationEnabled* netRepMsg,
00045       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00046 
00048    virtual ~DtRegulationEnabledMsg();
00049 
00051    virtual DtRtiMsg* clone(bool copy = true) const; 
00052 
00054    virtual void set(
00055       DtFederateHandle handle,
00056 #ifdef DtIFSPEC1516
00057       rti1516::LogicalTime const & theTime);
00058 #elif defined(DtIFSPEC1516E)
00059       rti1516e::LogicalTime const & theTime);
00060 #else
00061       RTI::FedTime const & theTime);
00062 #endif
00063    
00065    virtual void setRequestingFederate(DtFederateHandle handle);
00066    virtual DtFederateHandle requestingFederate() const;
00067 
00069 #ifdef DtIFSPEC1516
00070    virtual void setTime(rti1516::LogicalTime const & timeVal);
00071    virtual rti1516::LogicalTime const * time(
00072       DtLogicalTimeFactory* logicalTimeFactory) const;
00073 #elif defined(DtIFSPEC1516E)
00074    virtual void setTime(rti1516e::LogicalTime const & timeVal);
00075    virtual rti1516e::LogicalTime const * time(
00076        DtLogicalTimeFactory* logicalTimeFactory) const;
00077 #else
00078    virtual void setTime(RTI::FedTime const & timeVal);
00079    virtual RTI::FedTime const * time(
00080       DtLogicalTimeFactory* logicalTimeFactory) const;
00081 #endif
00082 
00084    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00085 
00086 public:
00087 
00089    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00090 
00092    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00093       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00094 
00096    static void addCallback(DtConnectionMgr *conn,
00097       DtRegulationEnabledCb cb, void *usr);
00098    static void removeCallback(DtConnectionMgr *conn,
00099       DtRegulationEnabledCb cb, void *usr);
00100 
00101 protected:
00102    
00104    DtRtiMsgKind internalDtRtiMsgKind();
00105 
00107    virtual DtNetRegulationEnabled* netRegulationEnabledMsg();
00108    virtual const DtNetRegulationEnabled* netRegulationEnabledMsg() const;
00109 
00111 #ifdef DtIFSPEC1516
00112    virtual int minSize(rti1516::LogicalTime const * theTime=NULL) const;
00113 #elif defined(DtIFSPEC1516E)
00114    virtual int minSize(rti1516e::LogicalTime const * theTime=NULL) const;
00115 #else
00116    virtual int minSize(RTI::FedTime const * theTime=NULL) const;
00117 #endif
00118 
00120    virtual void setTimeSize(int size);
00121    virtual int timeSize() const;
00122 
00124    virtual char* timePtr();
00125 
00127    virtual int timeFieldSize() const;
00128 
00130    virtual DtRegulationEnabledMsg* self() const;
00131 };
00132 
00133 inline DtRegulationEnabledMsg* DtRegulationEnabledMsg::self() const
00134 {
00135    return const_cast<DtRegulationEnabledMsg*>( this );
00136 }
00137 
00138 #endif
00139 #endif
00140 

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)