MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
updateMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: updateMsg.h,v $ $Revision: 1.25 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtUpdateMsg_H_
13 #define DtUpdateMsg_H_
14 
15 #include "rtiMsConfig.h"
16 #include "rtiMsg.h"
17 #include "netAttrs.h"
18 #include "rtiObject.h"
20 #include "RIDparams.h"
21 class DtAhvps;
22 class DtAhvpBase;
23 class DtUpdateMsg;
24 class DtObjectClassInfo;
25 
26 typedef void (*DtUpdateCb)(const DtUpdateMsg& msg, void* usr);
27 
29 {
30 public:
31 
33  DtUpdateMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
34 
36  virtual ~DtUpdateMsg();
37 
39  virtual void setClassHandle(DtObjectClassHandle hand) = 0;
40  virtual DtObjectClassHandle classHandle() const = 0;
41 
43  virtual void setObjHandle(DtObjectInstanceHandle id) = 0;
44  virtual DtObjectInstanceHandle objHandle() const = 0;
45 
47  virtual void setChannel(unsigned long handleValue);
48  virtual unsigned long channel() const;
49 
51  virtual void setObjName(const char* name, bool resize = true);
52  virtual const char* objName() const;
53 
55 #ifdef DtIFSPEC1516
56  virtual void setTag(rti1516::VariableLengthData const& tag, bool resize = true);
57  virtual rti1516::VariableLengthData const& tag() const;
58 #elif defined(DtIFSPEC1516E)
59  virtual void setTag(rti1516e::VariableLengthData const& tag, bool resize = true);
60  virtual rti1516e::VariableLengthData const& tag() const;
61 #else
62  virtual void setTag(char const * tag, bool resize = true);
63  virtual char const * tag() const;
64 #endif
65 
67  virtual void setAttrs(
68  const DtAhvpBase& theAttributes,
69  bool checkBufferSize=true);
70 
76  virtual void getAttrs(DtAhvps& attrSetBuff,
77  bool useMsgMemory,
78  DtObjectClassInfo* objDesc=NULL,
79  DtHandle regionSetHandle=DtDefaultRegionSetHandle,
80  DtRtiObject* obj=NULL,
81  float tolerance=0.0) const;
82 
84  virtual unsigned long numAttrs() const;
85 
86 public:
87 
89  static void setChannelIncluded(bool includeChannel);
90  static bool channelIncluded();
91 
92 protected:
94 #ifdef DtIFSPEC1516
95  virtual void setObjNameAndTag(const char* name, rti1516::VariableLengthData const& tag, bool resize = true);
96 #elif defined(DtIFSPEC1516E)
97  virtual void setObjNameAndTag(const char* name, rti1516e::VariableLengthData const& tag, bool resize = true);
98 #else
99  virtual void setObjNameAndTag(const char* name, char const * tag, bool resize = true);
100 #endif
101 
103  virtual void setNameSize(int size) = 0;
104  virtual int nameSize() const = 0;
105 
107  virtual void setTagSize(int size) = 0;
108  virtual int tagSize() const = 0;
109 
111  virtual DtNetU32* channelPtr() const=0;
112 
114  virtual char* namePtr()=0;
115 
117  virtual char* tagPtr()=0;
118 
120  virtual DtNetAttrs* netAttrs() = 0;
121 
124  virtual DtNetBigAttrs* netBigAttrs() = 0;
125 
128  virtual DtNetAttrValue* nextNetAttr(char* netAttrTail) const;
129 
133  virtual DtNetBigAttrValue* nextNetBigAttr(char* netAttrTail) const;
134 
140  virtual void fillFromNetAttrs(
141  const DtNetAttrs* netRepAttrs,
142  DtAhvps& attrs,
143  bool useMsgMemory,
144  DtObjectClassInfo* objDesc=NULL,
145  DtHandle regionSetHandle=DtDefaultRegionSetHandle,
146  DtRtiObject* obj=NULL,
147  float tolerance=0.0) const;
148 
156  virtual void fillFromNetBigAttrs(
157  const DtNetBigAttrs* netAttrs,
158  DtAhvps& attrs,
159  bool useMsgMemory,
160  DtObjectClassInfo* objDesc=NULL,
161  DtHandle regionSetHandle=DtDefaultRegionSetHandle,
162  DtRtiObject* obj=NULL,
163  float tolerance=0.0) const;
164 
166  virtual void fillNetAttrs(
167  const DtAhvpBase& theAttributes,
168  DtNetAttrs* netRepAttrs);
169 
172  virtual void fillNetBigAttrs(
173  const DtAhvpBase& attrs,
174  DtNetBigAttrs* netAttrs);
175 
177  virtual void adjustBufferForAttrs(const DtAhvpBase& attrs);
178 
180  virtual unsigned long sizeNeededForNetAttr(unsigned long attrOffset,
181  unsigned long attrSize) const;
182 
184  virtual unsigned long sizeNeededForNetAttrs(unsigned long offset, const DtAhvpBase& attrs) const;
185 
187  virtual int channelFieldSize() const;
188 
190  virtual int tagFieldSize() const;
191 
193  virtual int nameFieldSize() const;
194 
196  virtual int attrAlignPaddingSize(unsigned long offset) const;
197 
199  virtual DtUpdateMsg* self() const;
200 
201 protected:
202 #ifdef DtIFSPEC1516
204 #elif defined(DtIFSPEC1516E)
205  rti1516e::VariableLengthData* myTag;
206 #endif
210  unsigned long myMaxAttrSize;
211 
212 protected:
213  static bool theChannelIncluded;
214 };
215 
216 
218 {
219  return const_cast<DtUpdateMsg*>( this );
220 }
221 
223 {
224  return theChannelIncluded;
225 }
226 
227 #endif
228 
#define DtAhvpBase
Definition: aHandValBase.h:85
Format for putting upate attributes into messages.
Definition: netAttrs.h:22
Definition: netAttrs.h:99
static bool theChannelIncluded
Definition: updateMsg.h:213
DtHandle DtObjectClassHandle
Definition: internalTypes.h:31
static bool channelIncluded()
Definition: updateMsg.h:222
virtual DtUpdateMsg * self() const
Casts away const-ness.
Definition: updateMsg.h:217
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:45
DtHandle DtObjectInstanceHandle
Definition: internalTypes.h:33
The RTI object maintains the internal RTI object state.
Definition: rtiObject.h:116
int myAttrHdrAlignment
Definition: updateMsg.h:207
Definition: netAttrs.h:113
int myAttrHdrSize
Definition: updateMsg.h:209
unsigned long DtHandle
The internal types.
Definition: internalTypes.h:25
The declaration of the RTI object class.
Definition: VariableLengthData.h:22
#define DT_DLL_LRC
Definition: rtiMsConfig.h:126
Definition: netAttrs.h:61
Definition: updateMsg.h:28
unsigned long myMaxAttrSize
Definition: updateMsg.h:210
void(* DtUpdateCb)(const DtUpdateMsg &msg, void *usr)
Definition: updateMsg.h:26
Definition: objClassInfo.h:37
int myAttrListHdrSize
Definition: updateMsg.h:208
const long DtDefaultRegionSetHandle
Definition: RIDparams.h:31

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)