Msg File src/overlay/quon/QuonP.msg

Name Description
QUONPCommand (enum) (no description)
QuonPSelfMessage (message) (no description)
QuonPMessage (packet)

JOIN_REQUEST

QuonPListMessage (packet)

JOIN_ACKNOWLEDGE, NEW_NEIGHBORS, NODE_LEAVE

QuonPMoveMessage (packet)

NODE_MOVE

QuonPEventMessage (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 QuonP.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 QUONPCOMMAND_L = 8;
static const int QUONPPOSITION_L = 128;
static const int QUONPAOI_L = 64;
static const int QUONPENTRYCOUNT_L = 32;
static const int QUONPFLAG_L = 1;

#define QUONP_L(msg) (QUONPCOMMAND_L + NODEHANDLE_L + KEY_L + QUONPPOSITION_L + QUONPAOI_L)
#define QUONPLIST_L(msg) (QUONP_L(msg) + QUONPENTRYCOUNT_L + msg->getNeighborHandleArraySize() * (NODEHANDLE_L + QUONPPOSITION_L))
#define QUONPMOVE_L(msg) (QUONP_L(msg) + (msg->getNeighborHandle(0).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPPOSITION_L)) + (msg->getNeighborHandle(1).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPPOSITION_L)) + (msg->getNeighborHandle(2).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPPOSITION_L)) + (msg->getNeighborHandle(3).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPPOSITION_L)) + QUONPPOSITION_L + QUONPFLAG_L)
}}

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

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

// QuonP self-messages

message QuonPSelfMessage
{
    OverlayKey key;
}

// QuonP overlay-messages

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

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

packet QuonPMoveMessage extends QuonPMessage // NODE_MOVE
{
    Vector2D newPosition;
    bool isBinding = false;
    NodeHandle neighborHandle[4];
    Vector2D neighborPosition[4];
}

packet QuonPEventMessage extends QuonPMessage
{
}