MAK RTIspy API Documentation for HLA Evolved
 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 const char* objName() const;
52 
54  virtual DtRtiApiTagConstRef tag() const;
55 
57  virtual void setAttrs(const DtAhvpBase& theAttributes, bool adjustBufferSize = true);
58 
64  virtual void getAttrs(DtAhvps& attrSetBuff,
65  bool useMsgMemory,
66  DtObjectClassInfo* objDesc=NULL,
67  DtHandle regionSetHandle=DtDefaultRegionSetHandle,
68  DtRtiObject* obj=NULL,
69  float tolerance=0.0) const;
70 
72  virtual unsigned long numAttrs() const;
73 
74 public:
75 
77  static void setChannelIncluded(bool includeChannel);
78  static bool channelIncluded();
79 
80 protected:
81 
84 
85  virtual void setObjName(const char* name, bool adjustBufferSize = true);
87 
89  virtual void setTag(DtRtiApiTagConstRef tag, bool adjustBufferSize = true);
91 
93  virtual void setNameSize(int size) = 0;
94  virtual int nameSize() const = 0;
95 
97  virtual void setTagSize(int size) = 0;
98  virtual int tagSize() const = 0;
99 
101  virtual DtNetU32* channelPtr() const=0;
102 
104  virtual char* namePtr()=0;
105 
107  virtual char* tagPtr()=0;
108 
110  virtual DtNetAttrs* netAttrs() = 0;
111 
114  virtual DtNetBigAttrs* netBigAttrs() = 0;
115 
118  virtual DtNetAttrValue* nextNetAttr(char* netAttrTail) const;
119 
123  virtual DtNetBigAttrValue* nextNetBigAttr(char* netAttrTail) const;
124 
130  virtual void fillFromNetAttrs(
131  const DtNetAttrs* netRepAttrs,
132  DtAhvps& attrs,
133  bool useMsgMemory,
134  DtObjectClassInfo* objDesc=NULL,
135  DtHandle regionSetHandle=DtDefaultRegionSetHandle,
136  DtRtiObject* obj=NULL,
137  float tolerance=0.0) const;
138 
146  virtual void fillFromNetBigAttrs(
147  const DtNetBigAttrs* netAttrs,
148  DtAhvps& attrs,
149  bool useMsgMemory,
150  DtObjectClassInfo* objDesc=NULL,
151  DtHandle regionSetHandle=DtDefaultRegionSetHandle,
152  DtRtiObject* obj=NULL,
153  float tolerance=0.0) const;
154 
156  virtual void fillNetAttrs(
157  const DtAhvpBase& theAttributes,
158  DtNetAttrs* netRepAttrs);
159 
162  virtual void fillNetBigAttrs(
163  const DtAhvpBase& attrs,
164  DtNetBigAttrs* netAttrs);
165 
167  virtual void adjustBufferForAttrs(const DtAhvpBase& attrs);
168 
170  virtual unsigned long sizeNeededForNetAttr(unsigned long attrOffset,
171  unsigned long attrSize) const;
172 
174  virtual unsigned long sizeNeededForNetAttrs(unsigned long offset, const DtAhvpBase& attrs) const;
175 
177  virtual int channelFieldSize() const;
178 
180  virtual int attributeFieldSize() const = 0;
181 
183  virtual int attrAlignPaddingSize(unsigned long offset) const;
184 
186  virtual DtUpdateMsg* self() const;
187 
188 protected:
193  unsigned long myMaxAttrSize;
194 
195 protected:
196  static bool theChannelIncluded;
197 };
198 
199 
201 {
202  return const_cast<DtUpdateMsg*>( this );
203 }
204 
206 {
207  return theChannelIncluded;
208 }
209 
210 #endif
211 
Definition: aHandValBase.h:21
Format for putting upate attributes into messages.
Definition: netAttrs.h:22
Definition: netAttrs.h:99
DtRtiApiVariableLengthData * DtRtiApiTagPtr
Definition: rtiApiTypes.h:100
static bool theChannelIncluded
Definition: updateMsg.h:196
DtHandle DtObjectClassHandle
Definition: internalTypes.h:48
DtRtiApiVariableLengthData const & DtRtiApiTagConstRef
Definition: rtiApiTypes.h:98
static bool channelIncluded()
Definition: updateMsg.h:205
virtual DtUpdateMsg * self() const
Casts away const-ness.
Definition: updateMsg.h:200
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:34
DtHandle DtObjectInstanceHandle
Definition: internalTypes.h:50
The RTI object maintains the internal RTI object state.
Definition: rtiObject.h:123
int myAttrHdrAlignment
Definition: updateMsg.h:190
Definition: netAttrs.h:113
int myAttrHdrSize
Definition: updateMsg.h:192
unsigned long DtHandle
The internal types.
Definition: internalTypes.h:41
The declaration of the RTI object class.
Definition: aHandValSet.h:33
DtRtiApiTagPtr myTag
Definition: updateMsg.h:189
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
Definition: netAttrs.h:61
Definition: updateMsg.h:28
unsigned long myMaxAttrSize
Definition: updateMsg.h:193
void(* DtUpdateCb)(const DtUpdateMsg &msg, void *usr)
Definition: updateMsg.h:26
Definition: objClassInfo.h:36
int myAttrListHdrSize
Definition: updateMsg.h:191
const long DtDefaultRegionSetHandle
Definition: RIDparams.h:31

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)