MAK RTIspy API Documentation for HLA 1516
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;
92  virtual DtNetBigParams* netBigParams() = 0;
93 
95  virtual DtNetParamValue* nextNetParam(DtNetParamValue* netParam) const;
97  virtual DtNetBigParamValue* nextNetBigParam(
98  DtNetBigParamValue* netParam) const;
99 
105  virtual void fillFromNetParams(
106  const DtNetParams* netRepParams,
107  DtPhvps& params,
108  bool useMsgMemory,
109  DtInteractionClassInfo* classInfo=NULL) const;
110 
117  virtual void fillFromNetBigParams(
118  const DtNetBigParams* netRepParams,
119  DtPhvps& params,
120  bool useMsgMemory,
121  DtInteractionClassInfo* classInfo=NULL) const;
122 
124  virtual void fillNetParams(
125  const DtPhvps& theParameters,
126  DtNetParams* netRepParams);
128  virtual void fillNetBigParams(
129  const DtPhvps& theParameters,
130  DtNetBigParams* netRepParams);
131 
133  virtual void setSizeOfNetParams(unsigned long size);
134 
136  virtual unsigned long sizeNeededForNetParams(
137  const DtPhvps& params) const;
138 
140  virtual int channelFieldSize() const;
141 
143  virtual int tagFieldSize() const;
144 
147  virtual DtInteractionMsg* self() const;
148 
149 protected:
150 
151 #ifdef DtIFSPEC1516
153 #elif defined(DtIFSPEC1516E)
155 #else
156  char* myTag;
157 #endif
158  unsigned long myParamFieldLength;
159 
160 protected:
161  static bool theChannelIncluded;
162 };
163 
164 
166 {
167  return const_cast<DtInteractionMsg*>( this );
168 }
169 
171 {
172  return theChannelIncluded;
173 }
174 
175 #endif
176 

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)