VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stateMsgHLA.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
9 
10 #ifndef hDtStateMsg_H_
11 #define hDtStateMsg_H_
12 
13 #if DtHLA
14 
15 
16 #include <vlutil/vlTimeStampType.h>
17 
18 #include <vlutil/vlString.h>
19 #include <vlutil/vlTime.h>
20 #include "rtiNamespace.h"
21 
22 
23 class DT_DLL_VL DtHlaObject;
25 
26 
31 
33 {
34 public:
35 
36 
38  DtStateMsg(
39  objHandle id,
40  const HandleValueMap& attrs
41  );
42 
44  DtStateMsg(
45  objHandle id,
46  HandleValueMap* attrs
47  );
48 
49 
51  virtual ~DtStateMsg();
52 
54  DtStateMsg(const DtStateMsg& orig);
55 
57  DtStateMsg& operator=(const DtStateMsg& orig);
58 
60  virtual objHandle objectId() const;
61 
63  virtual const HandleValueMap& handleMap() const;
64 
66  virtual HandleValueMap* handleMap();
67 
68 #if DtHLA_1516
69 
71  virtual void setTag(const RTI::VariableLengthData& tag);
72  virtual void setCustomTag(const RTI::VariableLengthData& tag);
73  virtual const RTI::VariableLengthData& tag() const;
74 
75  #if DtHLA_1516_EVOLVED
76 
77 
78 
79 
80 
81  virtual void setProducingFederateHandle(RTI::FederateHandle federateHandle);
82 
84  virtual RTI::FederateHandle producingFederateHandle() const;
85 
88  virtual const DtString& producingFederateName(DtExerciseConn* exConn) const;
89  #endif
90 #else
91 
93  virtual void setTag(const DtString& tag);
94  virtual void setCustomTag(const DtString& tag);
95  virtual const DtString& tag() const;
96 
97 #endif
98 
100  virtual bool customTagSet() const;
101 
103  virtual void print(DtExerciseConn* exConn,
104  RTI::ObjectClassHandle h) const;
105 
107  virtual void printToStream(std::ostream& stream,DtExerciseConn* exConn,
108  RTI::ObjectClassHandle h) const;
109 
111  virtual void printHeader(DtExerciseConn* exConn,
112  RTI::ObjectClassHandle classHandle) const;
113 
115  virtual void printHeaderToStream(std::ostream& stream, DtExerciseConn* exConn,
116  RTI::ObjectClassHandle classHandle) const;
117 
119  virtual void printAttrs(DtExerciseConn* exConn,
120  RTI::ObjectClassHandle classHandle, int withHex) const;
121 
123  virtual void printAttrsToStream(std::ostream& stream, DtExerciseConn* exConn,
124  RTI::ObjectClassHandle classHandle, int withHex) const;
125 
127  virtual void print(DtHlaObject *obj,
128  bool fullReport = true) const;
129 
130 
131 
135  virtual void setTimeStamp(DtTime time,
137 
140  virtual DtTime timeStamp() const;
141 
143  virtual DtTimeStampType timeStampType() const;
144 
149  virtual DtTime guessTimeValid(DtTime referenceTime) const;
150 
156 #if DtHLA_1516
157  virtual const RTI::RegionHandleSet* conveyedRegion() const;
158  virtual void setConveyedRegion(const RTI::RegionHandleSet* sentRegionHandleSet);
159 #else
160  virtual const RTI::Region* conveyedRegion() const;
161  virtual void setConveyedRegion(const RTI::Region* region);
162 #endif
163 
164 
165 public:
166 
170  static void setTagIsAsciiTime(bool val);
171  static bool tagIsAsciiTime();
172 
173 protected:
174 
175 #if DtHLA_1516
176  HandleValueMap* myAvList;
177  objHandle myId;
178  RTI::VariableLengthData myTag;
179  const RTI::RegionHandleSet* myConveyedRegion;
180 #if DtHLA_1516_EVOLVED
181  mutable DtString myProducingFederateName;
182  RTI::FederateHandle myProducingFederateHandle;
183 #endif
184 #else
185  HandleValueMap* myAvList;
186  DtString myTag;
187  objHandle myId;
188  const RTI::Region* myConveyedRegion;
189 #endif
190 
191  DtTime myTime;
192  DtTimeStampType myTimeType;
193  bool myCustomTagSet;
194 
195 protected:
196 
197  static bool theTagIsAsciiTime;
198 };
199 
200 inline const HandleValueMap& DtStateMsg::handleMap() const
201 {
202  return *myAvList;
203 }
204 
205 inline HandleValueMap* DtStateMsg::handleMap()
206 {
207  return myAvList;
208 }
209 
210 
211 inline objHandle DtStateMsg::objectId() const
212 {
213  return myId;
214 }
215 
216 #endif
217 #endif
218 

Document ID: Generated on Tue Mar 1 02:56:17 EST 2016 from SVN revision 162687
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)