MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
interactMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: interactMsg.h,v $ $Revision: 1.26 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtInteractMsg_H_
13 #define DtInteractMsg_H_
14 
15 #include "rtiMsConfig.h"
16 #include "rtiMsg.h"
17 #include "netParms.h"
18 
19 class DtConnectionMgr;
20 class DtInteractionMsg;
21 class DtPhvps;
23 typedef void (*DtInteractionCb)(const DtInteractionMsg& inter, void* usr);
24 
25 
28 {
29 public:
30 
32  DtInteractionMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
33 
35  virtual ~DtInteractionMsg();
36 
38  virtual void setChannel(unsigned long handleValue);
39  virtual unsigned long channel() const;
40 
42  virtual void setHandle(DtInteractionClassHandle hand) = 0;
43  virtual DtInteractionClassHandle handle() const = 0;
44 
46 #ifdef DtIFSPEC1516
47  virtual void setTag(rti1516::VariableLengthData const& tag);
48  virtual rti1516::VariableLengthData const& tag() const;
49 #elif defined(DtIFSPEC1516E)
50  virtual void setTag(rti1516e::VariableLengthData const& tag);
51  virtual rti1516e::VariableLengthData const& tag() const;
52 #else
53  virtual void setTag(char const * tag);
54  virtual char const * tag() const;
55 #endif
56 
58  virtual void setParams(const DtPhvps& theParameters,
59  bool checkBufferSize=true);
60 
65  virtual void getParams(DtPhvps& params, bool useMsgMemory,
66  DtInteractionClassInfo* classInfo=NULL) const;
67 
69  virtual unsigned long numParams() const;
70 
71 public:
72 
74  static void setChannelIncluded(bool includeChannel);
75  static bool channelIncluded();
76 
77 protected:
78 
80  virtual void setTagSize(int size) = 0;
81  virtual int tagSize() const = 0;
82 
84  virtual DtNetU32* channelPtr() const=0;
85 
87  virtual char* tagPtr() = 0;
88 
90  virtual DtNetParams* netParams() = 0;
91 
94  virtual DtNetBigParams* netBigParams() = 0;
95 
98  virtual DtNetParamValue* nextNetParam(char* netParamTail) const;
99 
103  virtual DtNetBigParamValue* nextNetBigParam(char* netParamTail) const;
104 
110  virtual void fillFromNetParams(
111  const DtNetParams* netRepParams,
112  DtPhvps& params,
113  bool useMsgMemory,
114  DtInteractionClassInfo* classInfo=NULL) const;
115 
122  virtual void fillFromNetBigParams(
123  const DtNetBigParams* netRepParams,
124  DtPhvps& params,
125  bool useMsgMemory,
126  DtInteractionClassInfo* classInfo=NULL) const;
127 
129  virtual void fillNetParams(
130  const DtPhvps& theParameters,
131  DtNetParams* netRepParams);
133  virtual void fillNetBigParams(
134  const DtPhvps& theParameters,
135  DtNetBigParams* netRepParams);
136 
138  virtual void adjustBufferForParams(const DtPhvps& params);
139 
141  virtual unsigned long sizeNeededForNetParam(unsigned long paramOffset,
142  unsigned long paramSize) const;
143 
145  virtual unsigned long sizeNeededForNetParams(unsigned long paramOffset,
146  const DtPhvps& params) const;
147 
149  virtual int channelFieldSize() const;
150 
152  virtual int tagFieldSize() const;
153 
155  virtual int paramAlignPaddingSize(unsigned long offset) const;
156 
159  virtual DtInteractionMsg* self() const;
160 
161 protected:
162 
163 #ifdef DtIFSPEC1516
164  rti1516::VariableLengthData* myTag;
165 #elif defined(DtIFSPEC1516E)
166  rti1516e::VariableLengthData* myTag;
167 #else
168  char* myTag;
169 #endif
173  unsigned long myMaxParamSize;
174 
175 protected:
176  static bool theChannelIncluded;
177 };
178 
179 
181 {
182  return const_cast<DtInteractionMsg*>( this );
183 }
184 
186 {
187  return theChannelIncluded;
188 }
189 
190 #endif
191 

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)