OverSimMessage Class Reference

#include <OverSimMessage.h>

Inheritance diagram for OverSimMessage:

OverSimMessage_Base BaseOverlayMessage P2pnsTunnelMessage BaseAppDataMessage BaseRouteMessage BaseRpcMessage BootstrapLookupMessage CbrAppMessage ChordMessage GameAPIMessage GiaMessage NiceMessage 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().

00024 : OverSimMessage_Base(name,kind) {}

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

Definition at line 25 of file OverSimMessage.h.

00025 : 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, NiceMessage, NiceMemberMessage, NiceClusterMerge, NiceHeartbeat, NiceLeaderHeartbeat, CbrAppMessage, 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.

00027 {return new OverSimMessage(*this);}

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

Definition at line 26 of file OverSimMessage.h.

Referenced by OverSimMessage().

00026 {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, NiceMessage, NiceMemberMessage, NiceClusterMerge, NiceHeartbeat, NiceLeaderHeartbeat, CbrAppMessage, 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.

00027 {
00028     cObject::parsimPack(b);
00029 
00030     if (getContextPointer() || getControlInfo())
00031         throw cRuntimeError(this, "netPack(): cannot pack object with "
00032                                 "contextPointer or controlInfo set");
00033     if (getParList().size() > 0) {
00034         b->packFlag(true);
00035         b->packObject(&getParList());
00036     } else {
00037         b->packFlag(false);
00038     }
00039 
00040     if (b->packFlag(getEncapsulatedMsg() != NULL))
00041         b->packObject(getEncapsulatedMsg());
00042 }

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, NiceMessage, NiceMemberMessage, NiceClusterMerge, NiceHeartbeat, NiceLeaderHeartbeat, CbrAppMessage, 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.

00045 {
00046     int len = 0;
00047     cNetCommBuffer *netBuffer = dynamic_cast<cNetCommBuffer*>(b);
00048     if (netBuffer != NULL) {
00049         len = netBuffer->getRemainingMessageSize();
00050     }
00051     cObject::parsimUnpack(b);
00052 
00053     ASSERT(getShareCount() == 0);
00054 
00055     if (b->checkFlag()) {
00056         cArray *parlistptr = static_cast<cArray*>(b->unpackObject());
00057         std::cout << "still there: " << *parlistptr << std::endl;
00058         for (int i=0; i<parlistptr->size(); i++) {
00059             std::cout << "i: " << i << " " << parlistptr->get(i) << std::endl;
00060             addObject(static_cast<cObject*>(parlistptr->get(i)->dup()));
00061         }
00062         delete parlistptr;
00063     }
00064 
00065     if (b->checkFlag()) {
00066         encapsulate((cPacket *) b->unpackObject());
00067     }
00068 
00069     // set the length of the received message
00070     // TODO: doesn't contain the length of the string for the object type
00071     setByteLength(len);
00072 }


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

Generated on Tue Sep 8 17:27:00 2009 for OverSim by  doxygen 1.5.8