MAK RTIspy API Documentation for HLA 1516
conEnabledMsg.h
Go to the documentation of this file.
00001 
00002 /*********************************************************************
00003 ** Copyright (c) 1998 MaK Technologies, Inc.
00004 ** All rights reserved.
00005 *********************************************************************/
00006 /*********************************************************************
00007 ** $RCSfile: conEnabledMsg.h,v $ $Revision: 1.9 $ $State: Exp $
00008 *********************************************************************/
00009 
00012 
00013 #ifndef DtConstrainedEnabledMsg_H_
00014 #define DtConstrainedEnabledMsg_H_
00015 
00016 #ifdef DtTIME
00017 
00018 #include "rtiMsConfig.h"
00019 #include "rtiMsg.h"
00020 #include "netConEnblMsg.h"
00021 
00022 class DtConnectionMgr;
00023 class DtConstrainedEnabledMsg;
00024 typedef void (*DtConstrainedEnabledMsgCb)(const DtConstrainedEnabledMsg& msg, void* usr);
00025 
00026 class DT_DLL_LRC DtConstrainedEnabledMsg : public DtRtiMsg
00027 {
00028 public:
00029 
00031    DtConstrainedEnabledMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00032 
00034    DtConstrainedEnabledMsg(
00035       DtFederateHandle handle,
00036 #ifdef DtIFSPEC1516
00037       rti1516::LogicalTime const & theTime,
00038       rti1516::LogicalTime const & theLbts,
00039 #elif defined(DtIFSPEC1516E)
00040       rti1516e::LogicalTime const & theTime,
00041       rti1516e::LogicalTime const & theLbts,
00042 #else
00043       RTI::FedTime const & theTime,
00044       RTI::FedTime const & theLbts,
00045 #endif
00046       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00047 
00049    DtConstrainedEnabledMsg(const DtNetConstrainedEnabled* netRepMsg,
00050       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00051 
00053    virtual ~DtConstrainedEnabledMsg();
00054 
00056    virtual DtRtiMsg* clone(bool copy = true) const; 
00057 
00059    virtual void set(
00060       DtFederateHandle handle,
00061 #ifdef DtIFSPEC1516
00062       rti1516::LogicalTime const & theTime,
00063       rti1516::LogicalTime const & theLbts);
00064 #elif defined(DtIFSPEC1516E)
00065       rti1516e::LogicalTime const & theTime,
00066       rti1516e::LogicalTime const & theLbts);
00067 #else
00068       RTI::FedTime const & theTime,
00069       RTI::FedTime const & theLbts);
00070 #endif
00071    
00073    virtual void setRequestingFederate(DtFederateHandle handle);
00074    virtual DtFederateHandle requestingFederate() const;
00075 
00077 #ifdef DtIFSPEC1516
00078    virtual void setTime(rti1516::LogicalTime const & timeVal);
00079    virtual rti1516::LogicalTime const * time(
00080       DtLogicalTimeFactory* logicalTimeFactory) const;
00081 #elif defined(DtIFSPEC1516E)
00082    virtual void setTime(rti1516e::LogicalTime const & timeVal);
00083    virtual rti1516e::LogicalTime const * time(
00084        DtLogicalTimeFactory* logicalTimeFactory) const;
00085 #else
00086    virtual void setTime(RTI::FedTime const & timeVal);
00087    virtual RTI::FedTime const * time(
00088       DtLogicalTimeFactory* logicalTimeFactory) const;
00089 #endif
00090 
00092 #ifdef DtIFSPEC1516
00093    virtual void setLbts(rti1516::LogicalTime const & lbtsVal);
00094    virtual rti1516::LogicalTime const * lbts(
00095       DtLogicalTimeFactory* logicalTimeFactory) const;
00096 #elif defined(DtIFSPEC1516E)
00097    virtual void setLbts(rti1516e::LogicalTime const & lbtsVal);
00098    virtual rti1516e::LogicalTime const * lbts(
00099        DtLogicalTimeFactory* logicalTimeFactory) const;
00100 #else
00101    virtual void setLbts(RTI::FedTime const & lbtsVal);
00102    virtual RTI::FedTime  const * lbts(
00103       DtLogicalTimeFactory* logicalTimeFactory) const;
00104 #endif
00105 
00107    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00108 
00109 public:
00110 
00112    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00113 
00115    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00116       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00117 
00119    static void addCallback(DtConnectionMgr *conn,
00120       DtConstrainedEnabledMsgCb cb, void *usr);
00121    static void removeCallback(DtConnectionMgr *conn,
00122       DtConstrainedEnabledMsgCb cb, void *usr);
00123 
00124 protected:
00125    
00127    DtRtiMsgKind internalDtRtiMsgKind();
00128 
00130    virtual DtNetConstrainedEnabled* netConstrainedEnabledMsg();
00131    virtual const DtNetConstrainedEnabled* netConstrainedEnabledMsg() const;
00132 
00134 #ifdef DtIFSPEC1516
00135    virtual int minSize(rti1516::LogicalTime const * theTime=NULL,
00136       rti1516::LogicalTime const * theLbts=NULL) const;
00137 #elif defined(DtIFSPEC1516E)
00138    virtual int minSize(rti1516e::LogicalTime const * theTime=NULL,
00139        rti1516e::LogicalTime const * theLbts=NULL) const;
00140 #else
00141    virtual int minSize(RTI::FedTime const * theTime=NULL,
00142       RTI::FedTime  const * theLbts=NULL) const;
00143 #endif
00144 
00146    virtual void setTimeSize(int size);
00147    virtual int timeSize() const;
00148 
00150    virtual char* timePtr();
00151 
00153    virtual void setLbtsSize(int size);
00154    virtual int lbtsSize() const;
00155 
00157    virtual char* lbtsPtr();
00158 
00160    virtual int timeFieldSize() const;
00161 
00163    virtual int lbtsFieldSize() const;
00164 
00166    virtual DtConstrainedEnabledMsg* self() const;
00167 
00168 protected:
00170 #ifdef DtIFSPEC1516
00171    rti1516::LogicalTime* myLbts;
00172 #elif defined(DtIFSPEC1516E)
00173    rti1516e::LogicalTime* myLbts;
00174 #else
00175    RTI::FedTime* myLbts;
00176 #endif
00177 };
00178 
00179 inline DtConstrainedEnabledMsg* DtConstrainedEnabledMsg::self() const
00180 {
00181    return const_cast<DtConstrainedEnabledMsg*>( this );
00182 }
00183 
00184 #endif
00185 #endif
00186 

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)