Public Member Functions

OverSimMessage Class Reference

#include <OverSimMessage.h>

Inheritance diagram for OverSimMessage:
OverSimMessage_Base BaseOverlayMessage P2pnsTunnelMessage BaseAppDataMessage BaseRouteMessage BaseRpcMessage BootstrapLookupMessage ChordMessage GameAPIMessage GiaMessage KademliaRoutingInfoMessage NiceMessage NTreeCollapseMessage NTreeGroupAddMessage NTreeGroupDeleteMessage NTreeLeaveMessage NTreeMoveMessage NTreeReplaceNodeMessage NTreeTakeOverMessage PastryMessage PubSubBackupIntermediateMessage PubSubBackupSubscriptionMessage PubSubBackupUnsubscribeMessage PubSubFailedNodeMessage PubSubHelpReleaseMessage PubSubMoveListMessage PubSubMoveMessage PubSubNodeLeftMessage PubSubReleaseIntermediateMessage PubSubReplacementMessage PubSubUnsubscriptionMessage QuonMessage VastMessage

List of all members.

Public Member Functions

 OverSimMessage (const char *name=NULL, int kind=0)
 OverSimMessage (const OverSimMessage &other)
OverSimMessageoperator= (const OverSimMessage &other)
virtual OverSimMessagedup () const
virtual void parsimPack (cCommBuffer *b)
virtual void parsimUnpack (cCommBuffer *b)

Detailed Description

Definition at line 21 of file OverSimMessage.h.


Constructor & Destructor Documentation

OverSimMessage::OverSimMessage ( const char *  name = NULL,
int  kind = 0 
) [inline]

Definition at line 24 of file OverSimMessage.h.

Referenced by dup().

: OverSimMessage_Base(name,kind) {}

OverSimMessage::OverSimMessage ( const OverSimMessage other  )  [inline]

Definition at line 25 of file OverSimMessage.h.

: OverSimMessage_Base(other.getName()) {operator=(other);}


Member Function Documentation

virtual OverSimMessage* OverSimMessage::dup (  )  const [inline, virtual]

Reimplemented from OverSimMessage_Base.

Reimplemented in DHTPutCall, DHTGetCall, DHTPutResponse, DHTGetResponse, KbrTestCall, KbrTestResponse, ScribeJoinCall, ScribeJoinResponse, ScribePublishCall, ScribePublishResponse, CBRDHTGetCall, CBRDHTGetResponse, CoordsOfNodeCall, RttToNodeCall, CoordsOfNodeResponse, RttToNodeResponse, BaseOverlayMessage, BaseRouteMessage, BaseAppDataMessage, BaseRpcMessage, BaseCallMessage, BaseResponseMessage, RpcTimeoutMessage, FindNodeCall, FindNodeResponse, FailedNodeCall, FailedNodeResponse, PingCall, PingResponse, BootstrapLookupMessage, NextHopCall, NextHopResponse, DHTputCAPICall, DHTgetCAPICall, DHTputCAPIResponse, DHTgetCAPIResponse, DHTdumpCall, DHTdumpResponse, LookupCall, LookupResponse, P2pnsRegisterCall, P2pnsRegisterResponse, P2pnsResolveCall, P2pnsResolveResponse, GameAPIMessage, GameAPIListMessage, GameAPIPositionMessage, GameAPIResizeAOIMessage, GameAPIChatMessage, GameAPISnowMessage, GameAPIFrozenMessage, CoordsReqCall, CoordsReqResponse, BucketCall, BucketResponse, ChordMessage, NewSuccessorHintMessage, NotifyCall, NotifyResponse, JoinCall, JoinResponse, StabilizeCall, StabilizeResponse, FixfingersCall, FixfingersResponse, DeBruijnCall, DeBruijnResponse, GiaMessage, GiaNeighborMessage, TokenMessage, GiaIDMessage, GiaRouteMessage, KeyListMessage, SearchMessage, SearchResponseMessage, KademliaRoutingInfoMessage, MyNeighborCall, MyNeighborResponse, NiceMessage, NiceMemberMessage, NiceClusterMerge, NiceHeartbeat, NiceLeaderHeartbeat, NiceMulticastMessage, NTreeJoinCall, NTreeJoinResponse, NTreeDivideCall, NTreeDivideResponse, NTreePingCall, NTreeNodePingCall, NTreePingResponse, NTreeNodePingResponse, NTreeGroupDeleteMessage, NTreeCollapseMessage, NTreeLeaveMessage, NTreeMoveMessage, NTreeGroupAddMessage, NTreeReplaceNodeMessage, NTreeTakeOverMessage, PastryMessage, PastryJoinMessage, PastryStateMessage, PastryLeafsetMessage, PastryRoutingRowRequestMessage, PastryRoutingRowMessage, PastryRequestMessage, PubSubJoinCall, PubSubJoinResponse, PubSubResponsibleNodeCall, PubSubResponsibleNodeResponse, PubSubTakeOverSubspaceCall, PubSubTakeOverSubspaceResponse, PubSubSubscriptionCall, PubSubSubscriptionResponse, PubSubUnsubscriptionMessage, PubSubHelpCall, PubSubHelpResponse, PubSubIntermediateCall, PubSubIntermediateResponse, PubSubBackupCall, PubSubBackupResponse, PubSubPingCall, PubSubPingResponse, PubSubReplacementMessage, PubSubFailedNodeMessage, PubSubNodeLeftMessage, PubSubAdoptChildCall, PubSubAdoptChildResponse, PubSubReleaseIntermediateMessage, PubSubHelpReleaseMessage, PubSubBackupSubscriptionMessage, PubSubBackupIntermediateMessage, PubSubBackupUnsubscribeMessage, PubSubMoveMessage, PubSubMoveListMessage, QuonMessage, QuonListMessage, QuonMoveMessage, QuonEventMessage, VastMessage, VastListMessage, VastMoveMessage, VastDiscardMessage, VastEventMessage, and P2pnsTunnelMessage.

Definition at line 27 of file OverSimMessage.h.

{return new OverSimMessage(*this);}

OverSimMessage& OverSimMessage::operator= ( const OverSimMessage other  )  [inline]

Definition at line 26 of file OverSimMessage.h.

Referenced by OverSimMessage().

{OverSimMessage_Base::operator=(other); return *this;}

void OverSimMessage::parsimPack ( cCommBuffer *  b  )  [virtual]

Reimplemented from OverSimMessage_Base.

Reimplemented in DHTPutCall, DHTGetCall, DHTPutResponse, DHTGetResponse, KbrTestCall, KbrTestResponse, ScribeJoinCall, ScribeJoinResponse, ScribePublishCall, ScribePublishResponse, CBRDHTGetCall, CBRDHTGetResponse, CoordsOfNodeCall, RttToNodeCall, CoordsOfNodeResponse, RttToNodeResponse, BaseOverlayMessage, BaseRouteMessage, BaseAppDataMessage, BaseRpcMessage, BaseCallMessage, BaseResponseMessage, RpcTimeoutMessage, FindNodeCall, FindNodeResponse, FailedNodeCall, FailedNodeResponse, PingCall, PingResponse, BootstrapLookupMessage, NextHopCall, NextHopResponse, DHTputCAPICall, DHTgetCAPICall, DHTputCAPIResponse, DHTgetCAPIResponse, DHTdumpCall, DHTdumpResponse, LookupCall, LookupResponse, P2pnsRegisterCall, P2pnsRegisterResponse, P2pnsResolveCall, P2pnsResolveResponse, GameAPIMessage, GameAPIListMessage, GameAPIPositionMessage, GameAPIResizeAOIMessage, GameAPIChatMessage, GameAPISnowMessage, GameAPIFrozenMessage, CoordsReqCall, CoordsReqResponse, BucketCall, BucketResponse, ChordMessage, NewSuccessorHintMessage, NotifyCall, NotifyResponse, JoinCall, JoinResponse, StabilizeCall, StabilizeResponse, FixfingersCall, FixfingersResponse, DeBruijnCall, DeBruijnResponse, GiaMessage, GiaNeighborMessage, TokenMessage, GiaIDMessage, GiaRouteMessage, KeyListMessage, SearchMessage, SearchResponseMessage, KademliaRoutingInfoMessage, MyNeighborCall, MyNeighborResponse, NiceMessage, NiceMemberMessage, NiceClusterMerge, NiceHeartbeat, NiceLeaderHeartbeat, NiceMulticastMessage, NTreeJoinCall, NTreeJoinResponse, NTreeDivideCall, NTreeDivideResponse, NTreePingCall, NTreeNodePingCall, NTreePingResponse, NTreeNodePingResponse, NTreeGroupDeleteMessage, NTreeCollapseMessage, NTreeLeaveMessage, NTreeMoveMessage, NTreeGroupAddMessage, NTreeReplaceNodeMessage, NTreeTakeOverMessage, PastryMessage, PastryJoinMessage, PastryStateMessage, PastryLeafsetMessage, PastryRoutingRowRequestMessage, PastryRoutingRowMessage, PastryRequestMessage, PubSubJoinCall, PubSubJoinResponse, PubSubResponsibleNodeCall, PubSubResponsibleNodeResponse, PubSubTakeOverSubspaceCall, PubSubTakeOverSubspaceResponse, PubSubSubscriptionCall, PubSubSubscriptionResponse, PubSubUnsubscriptionMessage, PubSubHelpCall, PubSubHelpResponse, PubSubIntermediateCall, PubSubIntermediateResponse, PubSubBackupCall, PubSubBackupResponse, PubSubPingCall, PubSubPingResponse, PubSubReplacementMessage, PubSubFailedNodeMessage, PubSubNodeLeftMessage, PubSubAdoptChildCall, PubSubAdoptChildResponse, PubSubReleaseIntermediateMessage, PubSubHelpReleaseMessage, PubSubBackupSubscriptionMessage, PubSubBackupIntermediateMessage, PubSubBackupUnsubscribeMessage, PubSubMoveMessage, PubSubMoveListMessage, QuonMessage, QuonListMessage, QuonMoveMessage, QuonEventMessage, VastMessage, VastListMessage, VastMoveMessage, VastDiscardMessage, VastEventMessage, and P2pnsTunnelMessage.

Definition at line 26 of file OverSimMessage.cc.

{
    cObject::parsimPack(b);

    if (getContextPointer() || getControlInfo())
        throw cRuntimeError(this, "netPack(): cannot pack object with "
                                "contextPointer or controlInfo set");
    if (getParList().size() > 0) {
        b->packFlag(true);
        b->packObject(&getParList());
    } else {
        b->packFlag(false);
    }

    if (b->packFlag(getEncapsulatedPacket() != NULL))
        b->packObject(getEncapsulatedPacket());
}

void OverSimMessage::parsimUnpack ( cCommBuffer *  b  )  [virtual]

Reimplemented from OverSimMessage_Base.

Reimplemented in DHTPutCall, DHTGetCall, DHTPutResponse, DHTGetResponse, KbrTestCall, KbrTestResponse, ScribeJoinCall, ScribeJoinResponse, ScribePublishCall, ScribePublishResponse, CBRDHTGetCall, CBRDHTGetResponse, CoordsOfNodeCall, RttToNodeCall, CoordsOfNodeResponse, RttToNodeResponse, BaseOverlayMessage, BaseRouteMessage, BaseAppDataMessage, BaseRpcMessage, BaseCallMessage, BaseResponseMessage, RpcTimeoutMessage, FindNodeCall, FindNodeResponse, FailedNodeCall, FailedNodeResponse, PingCall, PingResponse, BootstrapLookupMessage, NextHopCall, NextHopResponse, DHTputCAPICall, DHTgetCAPICall, DHTputCAPIResponse, DHTgetCAPIResponse, DHTdumpCall, DHTdumpResponse, LookupCall, LookupResponse, P2pnsRegisterCall, P2pnsRegisterResponse, P2pnsResolveCall, P2pnsResolveResponse, GameAPIMessage, GameAPIListMessage, GameAPIPositionMessage, GameAPIResizeAOIMessage, GameAPIChatMessage, GameAPISnowMessage, GameAPIFrozenMessage, CoordsReqCall, CoordsReqResponse, BucketCall, BucketResponse, ChordMessage, NewSuccessorHintMessage, NotifyCall, NotifyResponse, JoinCall, JoinResponse, StabilizeCall, StabilizeResponse, FixfingersCall, FixfingersResponse, DeBruijnCall, DeBruijnResponse, GiaMessage, GiaNeighborMessage, TokenMessage, GiaIDMessage, GiaRouteMessage, KeyListMessage, SearchMessage, SearchResponseMessage, KademliaRoutingInfoMessage, MyNeighborCall, MyNeighborResponse, NiceMessage, NiceMemberMessage, NiceClusterMerge, NiceHeartbeat, NiceLeaderHeartbeat, NiceMulticastMessage, NTreeJoinCall, NTreeJoinResponse, NTreeDivideCall, NTreeDivideResponse, NTreePingCall, NTreeNodePingCall, NTreePingResponse, NTreeNodePingResponse, NTreeGroupDeleteMessage, NTreeCollapseMessage, NTreeLeaveMessage, NTreeMoveMessage, NTreeGroupAddMessage, NTreeReplaceNodeMessage, NTreeTakeOverMessage, PastryMessage, PastryJoinMessage, PastryStateMessage, PastryLeafsetMessage, PastryRoutingRowRequestMessage, PastryRoutingRowMessage, PastryRequestMessage, PubSubJoinCall, PubSubJoinResponse, PubSubResponsibleNodeCall, PubSubResponsibleNodeResponse, PubSubTakeOverSubspaceCall, PubSubTakeOverSubspaceResponse, PubSubSubscriptionCall, PubSubSubscriptionResponse, PubSubUnsubscriptionMessage, PubSubHelpCall, PubSubHelpResponse, PubSubIntermediateCall, PubSubIntermediateResponse, PubSubBackupCall, PubSubBackupResponse, PubSubPingCall, PubSubPingResponse, PubSubReplacementMessage, PubSubFailedNodeMessage, PubSubNodeLeftMessage, PubSubAdoptChildCall, PubSubAdoptChildResponse, PubSubReleaseIntermediateMessage, PubSubHelpReleaseMessage, PubSubBackupSubscriptionMessage, PubSubBackupIntermediateMessage, PubSubBackupUnsubscribeMessage, PubSubMoveMessage, PubSubMoveListMessage, QuonMessage, QuonListMessage, QuonMoveMessage, QuonEventMessage, VastMessage, VastListMessage, VastMoveMessage, VastDiscardMessage, VastEventMessage, and P2pnsTunnelMessage.

Definition at line 44 of file OverSimMessage.cc.

{
    int len = 0;
    cNetCommBuffer *netBuffer = dynamic_cast<cNetCommBuffer*>(b);
    if (netBuffer != NULL) {
        len = netBuffer->getRemainingMessageSize();
    }
    cObject::parsimUnpack(b);

    ASSERT(getShareCount() == 0);

    if (b->checkFlag()) {
        cArray *parlistptr = static_cast<cArray*>(b->unpackObject());
        std::cout << "still there: " << *parlistptr << std::endl;
        for (int i=0; i<parlistptr->size(); i++) {
            std::cout << "i: " << i << " " << parlistptr->get(i) << std::endl;
            addObject(static_cast<cObject*>(parlistptr->get(i)->dup()));
        }
        delete parlistptr;
    }

    if (b->checkFlag()) {
        encapsulate((cPacket *) b->unpackObject());
    }

    // set the length of the received message
    // TODO: doesn't contain the length of the string for the object type
    setByteLength(len);
}


The documentation for this class was generated from the following files: