OverSim
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Vast_m.h
Go to the documentation of this file.
1
//
2
// Generated file, do not edit! Created by opp_msgc 4.2 from overlay/vast/Vast.msg.
3
//
4
5
#ifndef _VAST_M_H_
6
#define _VAST_M_H_
7
8
#include <omnetpp.h>
9
10
// opp_msgc version check
11
#define MSGC_VERSION 0x0402
12
#if (MSGC_VERSION!=OMNETPP_VERSION)
13
# error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help.
14
#endif
15
16
// cplusplus {{
17
#include <
NodeHandle.h
>
18
#include <
OverlayKey.h
>
19
#include <
Vector2D.h
>
20
#include <
CommonMessages_m.h
>
21
22
23
static
const
int
VASTCOMMAND_L
= 8;
24
static
const
int
POSITION_L
= 128;
25
static
const
int
ENTRYCOUNT_L
= 32;
26
static
const
int
COUNT_L
= 32;
27
static
const
int
FLAG_L
= 8;
28
29
#define VAST_L(msg) (VASTCOMMAND_L + NODEHANDLE_L + KEY_L + POSITION_L + COUNT_L)
30
#define VASTLIST_L(msg) (VAST_L(msg) + ENTRYCOUNT_L + FLAG_L + msg->getNeighborNodeArraySize() * (NODEHANDLE_L + POSITION_L))
31
#define VASTMOVE_L(msg) (VAST_L(msg) + POSITION_L + 2 * FLAG_L)
32
#define VASTDISCARD_L(msg) (VAST_L(msg) + NODEHANDLE_L)
33
// }}
34
35
36
56
enum
VASTCommand
{
57
JOIN_REQUEST
= 0,
58
JOIN_ACKNOWLEDGE
= 1,
59
NODE_MOVE
= 2,
60
NEW_NEIGHBORS
= 3,
61
NODE_LEAVE
= 4,
62
ENCLOSING_NEIGHBORS_REQUEST
= 5,
63
BACKUP_NEIGHBORS
= 6,
64
PING
= 7,
65
PONG
= 8,
66
DISCARD_NODE
= 9,
67
VAST_EVENT
= 10
68
};
69
83
class
VastMessage
:
public
::BaseOverlayMessage
84
{
85
protected
:
86
int
command_var
;
87
NodeHandle
sourceNode_var
;
88
OverlayKey
destKey_var
;
89
Vector2D
pos_var
;
90
int
neighborCount_var
;
91
92
private
:
93
void
copy
(
const
VastMessage
& other);
94
95
protected
:
96
// protected and unimplemented operator==(), to prevent accidental usage
97
bool
operator==
(
const
VastMessage
&);
98
99
public
:
100
VastMessage
(
const
char
*name=NULL,
int
kind=0);
101
VastMessage
(
const
VastMessage
& other);
102
virtual
~VastMessage
();
103
VastMessage
&
operator=
(
const
VastMessage
& other);
104
virtual
VastMessage
*
dup
()
const
{
return
new
VastMessage
(*
this
);}
105
virtual
void
parsimPack
(cCommBuffer *b);
106
virtual
void
parsimUnpack
(cCommBuffer *b);
107
108
// field getter/setter methods
109
virtual
int
getCommand
()
const
;
110
virtual
void
setCommand
(
int
command);
111
virtual
NodeHandle
&
getSourceNode
();
112
virtual
const
NodeHandle
&
getSourceNode
()
const
{
return
const_cast<
VastMessage
*
>
(
this
)->
getSourceNode
();}
113
virtual
void
setSourceNode
(
const
NodeHandle
& sourceNode);
114
virtual
OverlayKey
&
getDestKey
();
115
virtual
const
OverlayKey
&
getDestKey
()
const
{
return
const_cast<
VastMessage
*
>
(
this
)->
getDestKey
();}
116
virtual
void
setDestKey
(
const
OverlayKey
& destKey);
117
virtual
Vector2D
&
getPos
();
118
virtual
const
Vector2D
&
getPos
()
const
{
return
const_cast<
VastMessage
*
>
(
this
)->
getPos
();}
119
virtual
void
setPos
(
const
Vector2D
& pos);
120
virtual
int
getNeighborCount
()
const
;
121
virtual
void
setNeighborCount
(
int
neighborCount);
122
};
123
124
inline
void
doPacking
(cCommBuffer *b,
VastMessage
& obj) {obj.
parsimPack
(b);}
125
inline
void
doUnpacking
(cCommBuffer *b,
VastMessage
& obj) {obj.
parsimUnpack
(b);}
126
138
class
VastListMessage
:
public
::VastMessage
139
{
140
protected
:
141
NodeHandle
*
neighborNode_var
;
// array ptr
142
unsigned
int
neighborNode_arraysize
;
143
Vector2D
*
neighborPos_var
;
// array ptr
144
unsigned
int
neighborPos_arraysize
;
145
bool
requestEnclosingNeighbors_var
;
146
147
private
:
148
void
copy
(
const
VastListMessage
& other);
149
150
protected
:
151
// protected and unimplemented operator==(), to prevent accidental usage
152
bool
operator==
(
const
VastListMessage
&);
153
154
public
:
155
VastListMessage
(
const
char
*name=NULL,
int
kind=0);
156
VastListMessage
(
const
VastListMessage
& other);
157
virtual
~VastListMessage
();
158
VastListMessage
&
operator=
(
const
VastListMessage
& other);
159
virtual
VastListMessage
*
dup
()
const
{
return
new
VastListMessage
(*
this
);}
160
virtual
void
parsimPack
(cCommBuffer *b);
161
virtual
void
parsimUnpack
(cCommBuffer *b);
162
163
// field getter/setter methods
164
virtual
void
setNeighborNodeArraySize
(
unsigned
int
size);
165
virtual
unsigned
int
getNeighborNodeArraySize
()
const
;
166
virtual
NodeHandle
&
getNeighborNode
(
unsigned
int
k);
167
virtual
const
NodeHandle
&
getNeighborNode
(
unsigned
int
k)
const
{
return
const_cast<
VastListMessage
*
>
(
this
)->
getNeighborNode
(k);}
168
virtual
void
setNeighborNode
(
unsigned
int
k,
const
NodeHandle
& neighborNode);
169
virtual
void
setNeighborPosArraySize
(
unsigned
int
size);
170
virtual
unsigned
int
getNeighborPosArraySize
()
const
;
171
virtual
Vector2D
&
getNeighborPos
(
unsigned
int
k);
172
virtual
const
Vector2D
&
getNeighborPos
(
unsigned
int
k)
const
{
return
const_cast<
VastListMessage
*
>
(
this
)->
getNeighborPos
(k);}
173
virtual
void
setNeighborPos
(
unsigned
int
k,
const
Vector2D
& neighborPos);
174
virtual
bool
getRequestEnclosingNeighbors
()
const
;
175
virtual
void
setRequestEnclosingNeighbors
(
bool
requestEnclosingNeighbors);
176
};
177
178
inline
void
doPacking
(cCommBuffer *b,
VastListMessage
& obj) {obj.
parsimPack
(b);}
179
inline
void
doUnpacking
(cCommBuffer *b,
VastListMessage
& obj) {obj.
parsimUnpack
(b);}
180
192
class
VastMoveMessage
:
public
::VastMessage
193
{
194
protected
:
195
Vector2D
newPos_var
;
196
bool
is_boundary_var
;
197
bool
request_list_var
;
198
199
private
:
200
void
copy
(
const
VastMoveMessage
& other);
201
202
protected
:
203
// protected and unimplemented operator==(), to prevent accidental usage
204
bool
operator==
(
const
VastMoveMessage
&);
205
206
public
:
207
VastMoveMessage
(
const
char
*name=NULL,
int
kind=0);
208
VastMoveMessage
(
const
VastMoveMessage
& other);
209
virtual
~VastMoveMessage
();
210
VastMoveMessage
&
operator=
(
const
VastMoveMessage
& other);
211
virtual
VastMoveMessage
*
dup
()
const
{
return
new
VastMoveMessage
(*
this
);}
212
virtual
void
parsimPack
(cCommBuffer *b);
213
virtual
void
parsimUnpack
(cCommBuffer *b);
214
215
// field getter/setter methods
216
virtual
Vector2D
&
getNewPos
();
217
virtual
const
Vector2D
&
getNewPos
()
const
{
return
const_cast<
VastMoveMessage
*
>
(
this
)->
getNewPos
();}
218
virtual
void
setNewPos
(
const
Vector2D
& newPos);
219
virtual
bool
getIs_boundary
()
const
;
220
virtual
void
setIs_boundary
(
bool
is_boundary);
221
virtual
bool
getRequest_list
()
const
;
222
virtual
void
setRequest_list
(
bool
request_list);
223
};
224
225
inline
void
doPacking
(cCommBuffer *b,
VastMoveMessage
& obj) {obj.
parsimPack
(b);}
226
inline
void
doUnpacking
(cCommBuffer *b,
VastMoveMessage
& obj) {obj.
parsimUnpack
(b);}
227
237
class
VastDiscardMessage
:
public
::VastMessage
238
{
239
protected
:
240
NodeHandle
discardNode_var
;
241
242
private
:
243
void
copy
(
const
VastDiscardMessage
& other);
244
245
protected
:
246
// protected and unimplemented operator==(), to prevent accidental usage
247
bool
operator==
(
const
VastDiscardMessage
&);
248
249
public
:
250
VastDiscardMessage
(
const
char
*name=NULL,
int
kind=0);
251
VastDiscardMessage
(
const
VastDiscardMessage
& other);
252
virtual
~VastDiscardMessage
();
253
VastDiscardMessage
&
operator=
(
const
VastDiscardMessage
& other);
254
virtual
VastDiscardMessage
*
dup
()
const
{
return
new
VastDiscardMessage
(*
this
);}
255
virtual
void
parsimPack
(cCommBuffer *b);
256
virtual
void
parsimUnpack
(cCommBuffer *b);
257
258
// field getter/setter methods
259
virtual
NodeHandle
&
getDiscardNode
();
260
virtual
const
NodeHandle
&
getDiscardNode
()
const
{
return
const_cast<
VastDiscardMessage
*
>
(
this
)->
getDiscardNode
();}
261
virtual
void
setDiscardNode
(
const
NodeHandle
& discardNode);
262
};
263
264
inline
void
doPacking
(cCommBuffer *b,
VastDiscardMessage
& obj) {obj.
parsimPack
(b);}
265
inline
void
doUnpacking
(cCommBuffer *b,
VastDiscardMessage
& obj) {obj.
parsimUnpack
(b);}
266
275
class
VastEventMessage
:
public
::VastMessage
276
{
277
protected
:
278
279
private
:
280
void
copy
(
const
VastEventMessage
& other);
281
282
protected
:
283
// protected and unimplemented operator==(), to prevent accidental usage
284
bool
operator==
(
const
VastEventMessage
&);
285
286
public
:
287
VastEventMessage
(
const
char
*name=NULL,
int
kind=0);
288
VastEventMessage
(
const
VastEventMessage
& other);
289
virtual
~VastEventMessage
();
290
VastEventMessage
&
operator=
(
const
VastEventMessage
& other);
291
virtual
VastEventMessage
*
dup
()
const
{
return
new
VastEventMessage
(*
this
);}
292
virtual
void
parsimPack
(cCommBuffer *b);
293
virtual
void
parsimUnpack
(cCommBuffer *b);
294
295
// field getter/setter methods
296
};
297
298
inline
void
doPacking
(cCommBuffer *b,
VastEventMessage
& obj) {obj.
parsimPack
(b);}
299
inline
void
doUnpacking
(cCommBuffer *b,
VastEventMessage
& obj) {obj.
parsimUnpack
(b);}
300
301
302
#endif // _VAST_M_H_
src
overlay
vast
Vast_m.h
Generated on Fri Dec 7 2012 13:37:53 for OverSim by
1.8.1.2