Msg File src/overlay/quon/QuonPR.msg

Name Description
QUONPRCommand (enum) (no description)
QuonPRSelfMessage (message) (no description)
QuonPRMessage (packet)

JOIN_REQUEST

QuonPRListMessage (packet)

JOIN_ACKNOWLEDGE, NEW_NEIGHBORS, NODE_LEAVE

QuonPRMoveMessage (packet)

NODE_MOVE

QuonPREventMessage (packet) (no description)

Source code:

//
// Copyright (C) 2006 Institut fuer Telematik, Universitaet Karlsruhe (TH)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//

// @file QuonPR.msg
// @author Helge Backhaus
//

cplusplus {{
#include <NodeHandle.h>
#include <QuonDefs.h>
#include <QuonPRDefs.h>
#include <CommonMessages_m.h>

// constants for message length in bit
static const int QUONPRCOMMAND_L = 8;
static const int QUONPRPOSITION_L = 128;
static const int QUONPRENTRYCOUNT_L = 32;
static const int QUONPRFLAG_L = 1;

#define QUONPR_L(msg) (QUONPRCOMMAND_L + NODEHANDLE_L + KEY_L + QUONPRPOSITION_L)
#define QUONPRLIST_L(msg) (QUONPR_L(msg) + QUONPRENTRYCOUNT_L + msg->getNeighborHandleArraySize() * (NODEHANDLE_L + QUONPRPOSITION_L))
#define QUONPRMOVE_L(msg) (QUONPR_L(msg) + (msg->getNeighborHandle(0).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPRPOSITION_L)) + (msg->getNeighborHandle(1).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPRPOSITION_L)) + (msg->getNeighborHandle(2).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPRPOSITION_L)) + (msg->getNeighborHandle(3).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPRPOSITION_L)) + (msg->getNeighborHandle(4).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPRPOSITION_L)) + (msg->getNeighborHandle(5).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPRPOSITION_L)) + (msg->getNeighborHandle(6).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPRPOSITION_L)) + (msg->getNeighborHandle(7).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPRPOSITION_L)) + QUONPRPOSITION_L + QUONPRFLAG_L)
}}


class noncobject NodeHandle;
class noncobject OverlayKey;
class noncobject Vector2D;
class BaseOverlayMessage;

enum QUONPRCommand
{
    JOIN_REQUEST = 0;
    JOIN_ACKNOWLEDGE = 1;
    NODE_MOVE = 2;
    NEW_NEIGHBORS = 3;
    NODE_LEAVE = 4;
    QUON_EVENT = 5;
}

// QuonPR self-messages

message QuonPRSelfMessage extends cMessage
{
    OverlayKey key;
}

// QuonPR overlay-messages

packet QuonPRMessage extends BaseOverlayMessage // JOIN_REQUEST
{
    int command enum(QUONPRCommand);
    NodeHandle sender;
    Vector2D position;
    double AOIsize;
}

packet QuonPRListMessage extends QuonPRMessage // JOIN_ACKNOWLEDGE, NEW_NEIGHBORS, NODE_LEAVE
{
    NodeHandle neighborHandle[];
    Vector2D neighborPosition[];
}

packet QuonPRMoveMessage extends QuonPRMessage // NODE_MOVE
{
    Vector2D newPosition;
    bool isBinding = false;
    NodeHandle neighborHandle[8];
    Vector2D neighborPosition[8];
}

packet QuonPREventMessage extends QuonPRMessage
{
}