OverSim
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 PastryStateMessage PubSubBackupIntermediateMessage PubSubBackupSubscriptionMessage PubSubBackupUnsubscribeMessage PubSubFailedNodeMessage PubSubHelpReleaseMessage PubSubMoveListMessage PubSubMoveMessage PubSubNodeLeftMessage PubSubReleaseIntermediateMessage PubSubReplacementMessage PubSubUnsubscriptionMessage QuonMessage VastMessage

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)
- Public Member Functions inherited from OverSimMessage_Base
virtual ~OverSimMessage_Base ()

Additional Inherited Members

- Protected Member Functions inherited from OverSimMessage_Base
bool operator== (const OverSimMessage_Base &)
 OverSimMessage_Base (const char *name=NULL, int kind=0)
 OverSimMessage_Base (const OverSimMessage_Base &other)
OverSimMessage_Baseoperator= (const OverSimMessage_Base &other)

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
inlinevirtual

Reimplemented from OverSimMessage_Base.

Reimplemented in GameAPIFrozenMessage, GameAPISnowMessage, GameAPIChatMessage, GameAPIResizeAOIMessage, GameAPIPositionMessage, GameAPIListMessage, GameAPIMessage, P2pnsResolveResponse, P2pnsResolveCall, P2pnsRegisterResponse, P2pnsRegisterCall, LookupResponse, LookupCall, DHTdumpResponse, DHTdumpCall, DHTgetCAPIResponse, DHTputCAPIResponse, DHTgetCAPICall, DHTputCAPICall, PubSubMoveListMessage, PubSubMoveMessage, PubSubBackupUnsubscribeMessage, PubSubBackupIntermediateMessage, PubSubBackupSubscriptionMessage, PubSubHelpReleaseMessage, PubSubReleaseIntermediateMessage, PubSubAdoptChildResponse, PubSubAdoptChildCall, NextHopResponse, NextHopCall, PubSubNodeLeftMessage, BootstrapLookupMessage, PubSubFailedNodeMessage, PubSubReplacementMessage, PingResponse, PubSubPingResponse, PingCall, PubSubPingCall, FailedNodeResponse, PubSubBackupResponse, FailedNodeCall, CapReqResponse, PubSubBackupCall, NTreeTakeOverMessage, FindNodeResponse, CapReqCall, PubSubIntermediateResponse, AreaDataCall, FindNodeCall, NTreeReplaceNodeMessage, PubSubIntermediateCall, SimpleCoordStrategyCall, RequestRoutingRowResponse, RpcTimeoutMessage, NTreeGroupAddMessage, DeBruijnResponse, PubSubHelpResponse, RegionsStrategyCall, RequestRoutingRowCall, BaseResponseMessage, NTreeMoveMessage, DeBruijnCall, RequestLeafSetResponse, TreeTestStrategyCall, PubSubHelpCall, BaseCallMessage, NTreeLeaveMessage, RequestLeafSetCall, RemoveRandomStrategyCall, PubSubUnsubscriptionMessage, BaseRpcMessage, RequestRepairResponse, SendAllStrategyCall, NTreeCollapseMessage, FixfingersResponse, PubSubSubscriptionResponse, BaseAppDataMessage, RequestRepairCall, SearchResponseMessage, SendCoordinatesCall, FixfingersCall, PubSubSubscriptionCall, NTreeGroupDeleteMessage, RequestStateResponse, ChildCheckResponse, StabilizeResponse, PubSubTakeOverSubspaceResponse, SearchMessage, BaseRouteMessage, RequestStateCall, NTreeNodePingResponse, NiceMulticastMessage, ChildCheckCall, StabilizeCall, PubSubTakeOverSubspaceCall, PastryJoinResponse, KeyListMessage, NTreePingResponse, BaseOverlayMessage, ChildReleaseResponse, PastryJoinCall, NiceLeaderHeartbeat, JoinResponse, PubSubResponsibleNodeResponse, NTreeNodePingCall, GiaRouteMessage, ChildReleaseCall, VastEventMessage, QuonEventMessage, JoinCall, PubSubResponsibleNodeCall, GlobalViewBuilderResponse, VastDiscardMessage, NiceHeartbeat, NTreePingCall, GiaIDMessage, DHTGetResponse, QuonMoveMessage, PubSubJoinResponse, GlobalViewBuilderCall, NotifyResponse, VastMoveMessage, UnderlayTestResponse, ScribePublishResponse, NTreeDivideResponse, TokenMessage, NiceClusterMerge, TreeAppResponse, PubSubJoinCall, DHTPutResponse, QuonListMessage, NotifyCall, UnderlayTestCall, RttToNodeResponse, ScribePublishCall, NTreeDivideCall, GiaNeighborMessage, NiceMemberMessage, VastListMessage, TreeAppCall, BucketResponse, DHTGetCall, KbrTestResponse, NewSuccessorHintMessage, QuonMessage, CoordsOfNodeResponse, PastryStateMessage, ScribeJoinResponse, ParentRequestResponse, NiceMessage, ProxFindNodeResponse, GiaMessage, NTreeJoinResponse, DiscoveryResponse, BucketCall, VastMessage, KbrTestCall, ChordMessage, MyNeighborResponse, CoordsReqResponse, CBRDHTGetResponse, RttToNodeCall, ScribeJoinCall, ParentRequestCall, DHTPutCall, ProxFindNodeCall, NTreeJoinCall, DiscoveryCall, KademliaRoutingInfoMessage, P2pnsTunnelMessage, CoordsOfNodeCall, CoordsReqCall, MyNeighborCall, and CBRDHTGetCall.

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 GameAPIFrozenMessage, GameAPISnowMessage, GameAPIChatMessage, GameAPIResizeAOIMessage, GameAPIPositionMessage, GameAPIListMessage, GameAPIMessage, P2pnsResolveResponse, P2pnsResolveCall, P2pnsRegisterResponse, P2pnsRegisterCall, LookupResponse, LookupCall, DHTdumpResponse, DHTdumpCall, DHTgetCAPIResponse, DHTputCAPIResponse, DHTgetCAPICall, DHTputCAPICall, PubSubMoveListMessage, PubSubMoveMessage, PubSubBackupUnsubscribeMessage, PubSubBackupIntermediateMessage, PubSubBackupSubscriptionMessage, PubSubHelpReleaseMessage, PubSubReleaseIntermediateMessage, PubSubAdoptChildResponse, PubSubAdoptChildCall, NextHopResponse, NextHopCall, PubSubNodeLeftMessage, BootstrapLookupMessage, PubSubFailedNodeMessage, PubSubReplacementMessage, PingResponse, PubSubPingResponse, PingCall, PubSubPingCall, FailedNodeResponse, PubSubBackupResponse, FailedNodeCall, CapReqResponse, PubSubBackupCall, NTreeTakeOverMessage, FindNodeResponse, CapReqCall, PubSubIntermediateResponse, AreaDataCall, FindNodeCall, NTreeReplaceNodeMessage, PubSubIntermediateCall, SimpleCoordStrategyCall, RequestRoutingRowResponse, RpcTimeoutMessage, NTreeGroupAddMessage, DeBruijnResponse, PubSubHelpResponse, RegionsStrategyCall, RequestRoutingRowCall, BaseResponseMessage, NTreeMoveMessage, DeBruijnCall, RequestLeafSetResponse, TreeTestStrategyCall, PubSubHelpCall, BaseCallMessage, NTreeLeaveMessage, RequestLeafSetCall, RemoveRandomStrategyCall, PubSubUnsubscriptionMessage, BaseRpcMessage, RequestRepairResponse, SendAllStrategyCall, NTreeCollapseMessage, FixfingersResponse, PubSubSubscriptionResponse, BaseAppDataMessage, RequestRepairCall, SearchResponseMessage, SendCoordinatesCall, FixfingersCall, PubSubSubscriptionCall, NTreeGroupDeleteMessage, RequestStateResponse, ChildCheckResponse, StabilizeResponse, PubSubTakeOverSubspaceResponse, SearchMessage, BaseRouteMessage, RequestStateCall, NTreeNodePingResponse, NiceMulticastMessage, ChildCheckCall, StabilizeCall, PubSubTakeOverSubspaceCall, PastryJoinResponse, KeyListMessage, NTreePingResponse, BaseOverlayMessage, ChildReleaseResponse, PastryJoinCall, NiceLeaderHeartbeat, JoinResponse, PubSubResponsibleNodeResponse, NTreeNodePingCall, GiaRouteMessage, ChildReleaseCall, VastEventMessage, QuonEventMessage, JoinCall, PubSubResponsibleNodeCall, GlobalViewBuilderResponse, VastDiscardMessage, NiceHeartbeat, NTreePingCall, GiaIDMessage, DHTGetResponse, QuonMoveMessage, PubSubJoinResponse, GlobalViewBuilderCall, NotifyResponse, VastMoveMessage, UnderlayTestResponse, ScribePublishResponse, NTreeDivideResponse, TokenMessage, NiceClusterMerge, TreeAppResponse, PubSubJoinCall, DHTPutResponse, QuonListMessage, NotifyCall, UnderlayTestCall, RttToNodeResponse, ScribePublishCall, NTreeDivideCall, GiaNeighborMessage, NiceMemberMessage, VastListMessage, TreeAppCall, BucketResponse, DHTGetCall, KbrTestResponse, NewSuccessorHintMessage, QuonMessage, CoordsOfNodeResponse, PastryStateMessage, ScribeJoinResponse, ParentRequestResponse, NiceMessage, ProxFindNodeResponse, GiaMessage, NTreeJoinResponse, DiscoveryResponse, BucketCall, VastMessage, KbrTestCall, ChordMessage, MyNeighborResponse, CoordsReqResponse, CBRDHTGetResponse, RttToNodeCall, ScribeJoinCall, ParentRequestCall, DHTPutCall, ProxFindNodeCall, NTreeJoinCall, DiscoveryCall, KademliaRoutingInfoMessage, P2pnsTunnelMessage, CoordsOfNodeCall, CoordsReqCall, MyNeighborCall, and CBRDHTGetCall.

Definition at line 26 of file OverSimMessage.cc.

{
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 GameAPIFrozenMessage, GameAPISnowMessage, GameAPIChatMessage, GameAPIResizeAOIMessage, GameAPIPositionMessage, GameAPIListMessage, GameAPIMessage, P2pnsResolveResponse, P2pnsResolveCall, P2pnsRegisterResponse, P2pnsRegisterCall, LookupResponse, LookupCall, DHTdumpResponse, DHTdumpCall, DHTgetCAPIResponse, DHTputCAPIResponse, DHTgetCAPICall, DHTputCAPICall, PubSubMoveListMessage, PubSubMoveMessage, PubSubBackupUnsubscribeMessage, PubSubBackupIntermediateMessage, PubSubBackupSubscriptionMessage, PubSubHelpReleaseMessage, PubSubReleaseIntermediateMessage, PubSubAdoptChildResponse, PubSubAdoptChildCall, NextHopResponse, NextHopCall, PubSubNodeLeftMessage, BootstrapLookupMessage, PubSubFailedNodeMessage, PubSubReplacementMessage, PingResponse, PubSubPingResponse, PingCall, PubSubPingCall, FailedNodeResponse, PubSubBackupResponse, FailedNodeCall, CapReqResponse, PubSubBackupCall, NTreeTakeOverMessage, FindNodeResponse, CapReqCall, PubSubIntermediateResponse, AreaDataCall, FindNodeCall, NTreeReplaceNodeMessage, PubSubIntermediateCall, SimpleCoordStrategyCall, RequestRoutingRowResponse, RpcTimeoutMessage, NTreeGroupAddMessage, DeBruijnResponse, PubSubHelpResponse, RegionsStrategyCall, RequestRoutingRowCall, BaseResponseMessage, NTreeMoveMessage, DeBruijnCall, RequestLeafSetResponse, TreeTestStrategyCall, PubSubHelpCall, BaseCallMessage, NTreeLeaveMessage, RequestLeafSetCall, RemoveRandomStrategyCall, PubSubUnsubscriptionMessage, BaseRpcMessage, RequestRepairResponse, SendAllStrategyCall, NTreeCollapseMessage, FixfingersResponse, PubSubSubscriptionResponse, BaseAppDataMessage, RequestRepairCall, SearchResponseMessage, SendCoordinatesCall, FixfingersCall, PubSubSubscriptionCall, NTreeGroupDeleteMessage, RequestStateResponse, ChildCheckResponse, StabilizeResponse, PubSubTakeOverSubspaceResponse, SearchMessage, BaseRouteMessage, RequestStateCall, NTreeNodePingResponse, NiceMulticastMessage, ChildCheckCall, StabilizeCall, PubSubTakeOverSubspaceCall, PastryJoinResponse, KeyListMessage, NTreePingResponse, BaseOverlayMessage, ChildReleaseResponse, PastryJoinCall, NiceLeaderHeartbeat, JoinResponse, PubSubResponsibleNodeResponse, NTreeNodePingCall, GiaRouteMessage, ChildReleaseCall, VastEventMessage, QuonEventMessage, JoinCall, PubSubResponsibleNodeCall, GlobalViewBuilderResponse, VastDiscardMessage, NiceHeartbeat, NTreePingCall, GiaIDMessage, DHTGetResponse, QuonMoveMessage, PubSubJoinResponse, GlobalViewBuilderCall, NotifyResponse, VastMoveMessage, UnderlayTestResponse, ScribePublishResponse, NTreeDivideResponse, TokenMessage, NiceClusterMerge, TreeAppResponse, PubSubJoinCall, DHTPutResponse, QuonListMessage, NotifyCall, UnderlayTestCall, RttToNodeResponse, ScribePublishCall, NTreeDivideCall, GiaNeighborMessage, NiceMemberMessage, VastListMessage, TreeAppCall, BucketResponse, DHTGetCall, KbrTestResponse, NewSuccessorHintMessage, QuonMessage, CoordsOfNodeResponse, PastryStateMessage, ScribeJoinResponse, ParentRequestResponse, NiceMessage, ProxFindNodeResponse, GiaMessage, NTreeJoinResponse, DiscoveryResponse, BucketCall, VastMessage, KbrTestCall, ChordMessage, MyNeighborResponse, CoordsReqResponse, CBRDHTGetResponse, RttToNodeCall, ScribeJoinCall, ParentRequestCall, DHTPutCall, ProxFindNodeCall, NTreeJoinCall, DiscoveryCall, KademliaRoutingInfoMessage, P2pnsTunnelMessage, CoordsOfNodeCall, CoordsReqCall, MyNeighborCall, and CBRDHTGetCall.

Definition at line 44 of file OverSimMessage.cc.

{
int len = 0;
cNetCommBuffer *netBuffer = dynamic_cast<cNetCommBuffer*>(b);
if (netBuffer != NULL) {
len = netBuffer->getRemainingMessageSize();
}
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: