Ignore:
Timestamp:
Jul 21, 2009, 1:54:55 PM (15 years ago)
Author:
Christoph Mayer
Message:

begin merge back from relay branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sample/pingpong/PingPong.h

    r3071 r5151  
    66#include "ariba/utility/system/StartupInterface.h"
    77#include "ariba/utility/system/Timer.h"
     8
     9#include <vector>
    810
    911using namespace ariba;
     
    1517namespace pingpong {
    1618
     19using namespace std;
     20
    1721/**
    18 /* The PingPong main class
    19 /* This class implements an example service for demonstration purposes
    20 /* The pingpong class sends and receives messages between two SpoVNet
    21 /* instances
    22 **/
    23 class PingPong :
    24         public NodeListener,
     22 /* The PingPong main class
     23 /* This class implements an example service for demonstration purposes
     24 /* The pingpong class sends and receives messages between two SpoVNet
     25 /* instances
     26 **/
     27class PingPong: public NodeListener,
    2528        public CommunicationListener,
    2629        public StartupInterface,
     
    3538protected:
    3639        // communication listener interface
    37         virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg = DataMessage::UNSPECIFIED);
    38         virtual void onMessage(const DataMessage& msg, const NodeID& remote, const LinkID& lnk= LinkID::UNSPECIFIED);
     40        virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg =
     41                        DataMessage::UNSPECIFIED);
     42        virtual void onMessage(const DataMessage& msg, const NodeID& remote,
     43                const LinkID& lnk = LinkID::UNSPECIFIED);
    3944        virtual void onLinkUp(const LinkID& lnk, const NodeID& remote);
    4045        virtual void onLinkDown(const LinkID& lnk, const NodeID& remote);
     
    4348
    4449        // node listener interface
    45         virtual void onJoinCompleted( const SpoVNetID& vid );
    46         virtual void onJoinFailed( const SpoVNetID& vid );
    47         virtual void onLeaveCompleted( const SpoVNetID& vid );
    48         virtual void onLeaveFailed( const SpoVNetID& vid );
     50        virtual void onJoinCompleted(const SpoVNetID& vid);
     51        virtual void onJoinFailed(const SpoVNetID& vid);
     52        virtual void onLeaveCompleted(const SpoVNetID& vid);
     53        virtual void onLeaveFailed(const SpoVNetID& vid);
    4954
    5055        // startup wrapper interface
     
    5358
    5459        // timer events
    55         virtual void eventFunction();
     60        virtual void eventFunction();
    5661
    5762private:
    5863        // the ariba module and a node
    5964        AribaModule* ariba;
    60         Node*        node;
     65        Node* node;
     66        string name;
     67        int counter;
     68        vector<string> names;
    6169
    6270        // flag, whether this node initiates or just joins the spovnet
    6371        bool isInitiator;
    6472
    65         // the ping pong service id
    66         static ServiceID PINGPONG_SERVICEID;
     73        // the ping pong service id
     74        static ServiceID PINGPONG_SERVICEID;
    6775
    68         // the current ping id
    69         unsigned long pingId;
     76        // the current ping id
     77        unsigned long pingId;
    7078
    7179};
Note: See TracChangeset for help on using the changeset viewer.