MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
regEnabledMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: regEnabledMsg.h,v $ $Revision: 1.10 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtRegulationEnabledMsg_H_
13 #define DtRegulationEnabledMsg_H_
14 
15 #ifdef DtTIME
16 
17 #include "rtiMsg.h"
18 #include "netRegEnblMsg.h"
19 
20 class DtConnectionMgr;
21 class DtRegulationEnabledMsg;
22 typedef void (*DtRegulationEnabledCb)(const DtRegulationEnabledMsg& msg, void* usr);
23 
24 class DT_DLL_LRC DtRegulationEnabledMsg : public DtRtiMsg
25 {
26 public:
27 
29  DtRegulationEnabledMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
30 
32  DtRegulationEnabledMsg(
33  DtFederateHandle handle,
34 #ifdef DtIFSPEC1516
35  rti1516::LogicalTime const & theTime,
36 #elif defined(DtIFSPEC1516E)
37  rti1516e::LogicalTime const & theTime,
38 #else
39  RTI::FedTime const & theTime,
40 #endif
41  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
42 
44  DtRegulationEnabledMsg(const DtNetRegulationEnabled* netRepMsg,
45  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
46 
48  virtual ~DtRegulationEnabledMsg();
49 
51  virtual DtRtiMsg* clone(bool copy = true) const;
52 
54  virtual void set(
55  DtFederateHandle handle,
56 #ifdef DtIFSPEC1516
57  rti1516::LogicalTime const & theTime);
58 #elif defined(DtIFSPEC1516E)
59  rti1516e::LogicalTime const & theTime);
60 #else
61  RTI::FedTime const & theTime);
62 #endif
63 
65  virtual void setRequestingFederate(DtFederateHandle handle);
66  virtual DtFederateHandle requestingFederate() const;
67 
69 #ifdef DtIFSPEC1516
70  virtual void setTime(rti1516::LogicalTime const & timeVal);
71  virtual rti1516::LogicalTime const * time(
72  DtLogicalTimeFactory* logicalTimeFactory) const;
73 #elif defined(DtIFSPEC1516E)
74  virtual void setTime(rti1516e::LogicalTime const & timeVal);
75  virtual rti1516e::LogicalTime const * time(
76  DtLogicalTimeFactory* logicalTimeFactory) const;
77 #else
78  virtual void setTime(RTI::FedTime const & timeVal);
79  virtual RTI::FedTime const * time(
80  DtLogicalTimeFactory* logicalTimeFactory) const;
81 #endif
82 
84  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
85 
86 public:
87 
89  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
90 
92  static DtRtiMsg* create(const DtNetMsgHeader* initial,
93  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
94 
96  static void addCallback(DtConnectionMgr *conn,
97  DtRegulationEnabledCb cb, void *usr);
98  static void removeCallback(DtConnectionMgr *conn,
99  DtRegulationEnabledCb cb, void *usr);
100 
101 protected:
102 
105 
107  virtual DtNetRegulationEnabled* netRegulationEnabledMsg();
108  virtual const DtNetRegulationEnabled* netRegulationEnabledMsg() const;
109 
111 #ifdef DtIFSPEC1516
112  virtual int minSize(rti1516::LogicalTime const * theTime=NULL) const;
113 #elif defined(DtIFSPEC1516E)
114  virtual int minSize(rti1516e::LogicalTime const * theTime=NULL) const;
115 #else
116  virtual int minSize(RTI::FedTime const * theTime=NULL) const;
117 #endif
118 
120  virtual void setTimeSize(int size);
121  virtual int timeSize() const;
122 
124  virtual char* timePtr();
125 
127  virtual int timeFieldSize() const;
128 
130  virtual DtRegulationEnabledMsg* self() const;
131 };
132 
133 inline DtRegulationEnabledMsg* DtRegulationEnabledMsg::self() const
134 {
135  return const_cast<DtRegulationEnabledMsg*>( this );
136 }
137 
138 #endif
139 #endif
140 

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)