OverSim
GiaMessage_m.h File Reference
#include <omnetpp.h>
#include <IPvXAddress.h>
#include <OverlayKey.h>
#include <GiaNode.h>
#include <NodeHandle.h>
#include <CommonMessages_m.h>

Go to the source code of this file.

Classes

class  GiaMessage
 Class generated from overlay/gia/GiaMessage.msg by opp_msgc. More...
class  GiaNeighborMessage
 Class generated from overlay/gia/GiaMessage.msg by opp_msgc. More...
class  TokenMessage
 Class generated from overlay/gia/GiaMessage.msg by opp_msgc. More...
class  GiaIDMessage
 Class generated from overlay/gia/GiaMessage.msg by opp_msgc. More...
class  GiaRouteMessage
 Class generated from overlay/gia/GiaMessage.msg by opp_msgc. More...
class  KeyListMessage
 Class generated from overlay/gia/GiaMessage.msg by opp_msgc. More...
class  SearchMessage
 Class generated from overlay/gia/GiaMessage.msg by opp_msgc. More...
class  SearchResponseMessage
 Class generated from overlay/gia/GiaMessage.msg by opp_msgc. More...

Macros

#define MSGC_VERSION   0x0402
#define GIANODE_L   (CAPACITY_L + DEGREE_L + NODEHANDLE_L + 2 * TOKENNR_L)
#define GIA_L(msg)
#define GIANEIGHBOR_L(msg)   (GIA_L(msg) + msg->getNeighborsArraySize() * GIANODE_L)
#define TOKEN_L(msg)   (GIA_L(msg) + 2 * TOKENNR_L)
#define GIAID_L(msg)   (GIA_L(msg) + KEY_L)
#define GIAROUTE_L(msg)   (GIAID_L(msg) + KEY_L + IPADDR_L + UDPPORT_L)
#define KEYLIST_L(msg)   (GIA_L(msg) + (msg->getKeysArraySize() * KEY_L))
#define SEARCH_L(msg)
#define SEARCHRESPONSE_L(msg)

Enumerations

enum  GIACommand {
  JOIN_REQUEST = 0, JOIN_RESPONSE = 1, JOIN_ACK = 2, JOIN_DENY = 3,
  DISCONNECT = 4, ROUTE = 5, SEARCH = 6, ANSWER = 7,
  UPDATE = 8, TOKEN = 9, KEYLIST = 10
}
 Enum generated from overlay/gia/GiaMessage.msg by opp_msgc. More...

Functions

void doPacking (cCommBuffer *b, GiaMessage &obj)
void doUnpacking (cCommBuffer *b, GiaMessage &obj)
void doPacking (cCommBuffer *b, GiaNeighborMessage &obj)
void doUnpacking (cCommBuffer *b, GiaNeighborMessage &obj)
void doPacking (cCommBuffer *b, TokenMessage &obj)
void doUnpacking (cCommBuffer *b, TokenMessage &obj)
void doPacking (cCommBuffer *b, GiaIDMessage &obj)
void doUnpacking (cCommBuffer *b, GiaIDMessage &obj)
void doPacking (cCommBuffer *b, GiaRouteMessage &obj)
void doUnpacking (cCommBuffer *b, GiaRouteMessage &obj)
void doPacking (cCommBuffer *b, KeyListMessage &obj)
void doUnpacking (cCommBuffer *b, KeyListMessage &obj)
void doPacking (cCommBuffer *b, SearchMessage &obj)
void doUnpacking (cCommBuffer *b, SearchMessage &obj)
void doPacking (cCommBuffer *b, SearchResponseMessage &obj)
void doUnpacking (cCommBuffer *b, SearchResponseMessage &obj)

Variables

static const int GIACOMMAND_L = 8
static const int CAPACITY_L = 32
static const int DEGREE_L = 16
static const int TOKENNR_L = 16
static const int MAXRESPONSES_L = 16

Macro Definition Documentation

#define GIA_L (   msg)
#define GIAID_L (   msg)    (GIA_L(msg) + KEY_L)

Definition at line 35 of file GiaMessage_m.h.

#define GIANEIGHBOR_L (   msg)    (GIA_L(msg) + msg->getNeighborsArraySize() * GIANODE_L)

Definition at line 33 of file GiaMessage_m.h.

Referenced by Gia::sendMessage_JOIN_ACK(), and Gia::sendMessage_JOIN_RSP().

#define GIANODE_L   (CAPACITY_L + DEGREE_L + NODEHANDLE_L + 2 * TOKENNR_L)

Definition at line 29 of file GiaMessage_m.h.

#define GIAROUTE_L (   msg)    (GIAID_L(msg) + KEY_L + IPADDR_L + UDPPORT_L)

Definition at line 36 of file GiaMessage_m.h.

Referenced by Gia::getRoute().

#define KEYLIST_L (   msg)    (GIA_L(msg) + (msg->getKeysArraySize() * KEY_L))

Definition at line 37 of file GiaMessage_m.h.

Referenced by Gia::sendKeyListToNeighbor().

#define MSGC_VERSION   0x0402

Definition at line 11 of file GiaMessage_m.h.

#define SEARCH_L (   msg)
Value:
msg->getReversePathArraySize() * KEY_L + \
msg->getFoundNodeArraySize() * KEY_L)

Definition at line 38 of file GiaMessage_m.h.

Referenced by Gia::handleAppMessage().

#define SEARCHRESPONSE_L (   msg)
Value:
(GIAID_L(msg) + KEY_L + msg->getReversePathArraySize() * KEY_L + \
GIANODE_L + HOPCOUNT_L)

Definition at line 41 of file GiaMessage_m.h.

Referenced by Gia::sendSearchResponseMessage().

#define TOKEN_L (   msg)    (GIA_L(msg) + 2 * TOKENNR_L)

Definition at line 34 of file GiaMessage_m.h.

Referenced by Gia::sendToken().

Enumeration Type Documentation

enum GIACommand

Enum generated from overlay/gia/GiaMessage.msg by opp_msgc.

enum GIACommand
{
    JOIN_REQUEST = 0;    
    JOIN_RESPONSE = 1;    
    JOIN_ACK = 2;    
    JOIN_DENY = 3;    
    DISCONNECT = 4;    
    ROUTE = 5;    
    SEARCH = 6;    
    ANSWER = 7;    
    UPDATE = 8;    
    TOKEN = 9;    
    KEYLIST= 10;    
};
Enumerator:
JOIN_REQUEST 
JOIN_RESPONSE 
JOIN_ACK 
JOIN_DENY 
DISCONNECT 
ROUTE 
SEARCH 
ANSWER 
UPDATE 
TOKEN 
KEYLIST 

Definition at line 66 of file GiaMessage_m.h.

{
JOIN_ACK = 2,
JOIN_DENY = 3,
ROUTE = 5,
SEARCH = 6,
ANSWER = 7,
UPDATE = 8,
TOKEN = 9,
KEYLIST = 10
};

Function Documentation

void doPacking ( cCommBuffer *  b,
GiaMessage obj 
)
inline

Definition at line 132 of file GiaMessage_m.h.

{obj.parsimPack(b);}
void doPacking ( cCommBuffer *  b,
GiaNeighborMessage obj 
)
inline

Definition at line 174 of file GiaMessage_m.h.

{obj.parsimPack(b);}
void doPacking ( cCommBuffer *  b,
TokenMessage obj 
)
inline

Definition at line 216 of file GiaMessage_m.h.

{obj.parsimPack(b);}
void doPacking ( cCommBuffer *  b,
GiaIDMessage obj 
)
inline

Definition at line 260 of file GiaMessage_m.h.

{obj.parsimPack(b);}
void doPacking ( cCommBuffer *  b,
GiaRouteMessage obj 
)
inline

Definition at line 308 of file GiaMessage_m.h.

{obj.parsimPack(b);}
void doPacking ( cCommBuffer *  b,
KeyListMessage obj 
)
inline

Definition at line 350 of file GiaMessage_m.h.

{obj.parsimPack(b);}
void doPacking ( cCommBuffer *  b,
SearchMessage obj 
)
inline

Definition at line 409 of file GiaMessage_m.h.

{obj.parsimPack(b);}
void doPacking ( cCommBuffer *  b,
SearchResponseMessage obj 
)
inline

Definition at line 465 of file GiaMessage_m.h.

{obj.parsimPack(b);}
void doUnpacking ( cCommBuffer *  b,
GiaMessage obj 
)
inline

Definition at line 133 of file GiaMessage_m.h.

{obj.parsimUnpack(b);}
void doUnpacking ( cCommBuffer *  b,
GiaNeighborMessage obj 
)
inline

Definition at line 175 of file GiaMessage_m.h.

{obj.parsimUnpack(b);}
void doUnpacking ( cCommBuffer *  b,
TokenMessage obj 
)
inline

Definition at line 217 of file GiaMessage_m.h.

{obj.parsimUnpack(b);}
void doUnpacking ( cCommBuffer *  b,
GiaIDMessage obj 
)
inline

Definition at line 261 of file GiaMessage_m.h.

{obj.parsimUnpack(b);}
void doUnpacking ( cCommBuffer *  b,
GiaRouteMessage obj 
)
inline

Definition at line 309 of file GiaMessage_m.h.

{obj.parsimUnpack(b);}
void doUnpacking ( cCommBuffer *  b,
KeyListMessage obj 
)
inline

Definition at line 351 of file GiaMessage_m.h.

{obj.parsimUnpack(b);}
void doUnpacking ( cCommBuffer *  b,
SearchMessage obj 
)
inline

Definition at line 410 of file GiaMessage_m.h.

{obj.parsimUnpack(b);}
void doUnpacking ( cCommBuffer *  b,
SearchResponseMessage obj 
)
inline

Definition at line 466 of file GiaMessage_m.h.

{obj.parsimUnpack(b);}

Variable Documentation

const int CAPACITY_L = 32
static

Definition at line 25 of file GiaMessage_m.h.

const int DEGREE_L = 16
static

Definition at line 26 of file GiaMessage_m.h.

const int GIACOMMAND_L = 8
static

Definition at line 24 of file GiaMessage_m.h.

const int MAXRESPONSES_L = 16
static

Definition at line 28 of file GiaMessage_m.h.

const int TOKENNR_L = 16
static

Definition at line 27 of file GiaMessage_m.h.