close
Warning:
BrowserModule failed with ConfigurationError: Look in the Trac log for more information.
- Timestamp:
-
Apr 28, 2009, 2:19:56 PM (16 years ago)
- Author:
-
heep
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v23
|
v24
|
|
9 | 9 | |
10 | 10 | |
| 11 | == '''Be careful:''' == |
| 12 | * This documentation covers only OMNeT++-4.0 compatible versions of OverSim! [[BR]] |
| 13 | (For documentation about OMNeT++-3.x compatible versions of OverSim, see OverSimDevelopOld) |
| 14 | * It is still under development and may be partly incorrect or outdated! [[BR]] |
| 15 | '''--> Any suggestions or contributions are welcome! ''' |
| 16 | |
11 | 17 | ---- |
12 | | == '''Be careful: == |
13 | | == This documentation covers only OMNeT++-4.0 compatible versions of OverSim !! == |
14 | | == It is still under development and may be partly incorrect or outdated !! == |
15 | | == ( For documentation about OMNeT++-3.x compatible versions of OverSim, see OverSimDevelopOld ) == |
16 | | |
17 | | --- |
18 | 18 | |
19 | 19 | == 1. Implementing new overlay modules in !OverSim == |
… |
… |
|
714 | 714 | // The function that will be called from outside |
715 | 715 | |
716 | | void getNeighbors(const OverlayKey& neighborKey); // asynchronously request the neighbors of neighborKey |
| 716 | void getNeighbors(const OverlayKey& neighborKey); // asynchronously request the neighbors of neighborKey |
717 | 717 | |
718 | 718 | // Callback functions (that will be overwritten) |
719 | 719 | |
720 | | virtual void callbackNeighbors( |
721 | | const NodeHandle& neighborKey, |
722 | | const NodeHandle& prevNeighbor, |
723 | | const NodeHandle& nextNeighbor); // function to call to respond about the queried neighbors |
724 | | virtual void callbackTimeout( |
725 | | const OverlayKey &neighborKey); // function to call if the query times out |
| 720 | virtual void callbackNeighbors(const NodeHandle& neighborKey, |
| 721 | const NodeHandle& prevNeighbor, |
| 722 | const NodeHandle& nextNeighbor); // function to call to respond about the queried neighbors |
| 723 | virtual void callbackTimeout(const OverlayKey &neighborKey); // function to call if the query times out |
726 | 724 | |
727 | 725 | // Internal handling of RPCs |
728 | 726 | |
729 | | bool handleRpcCall(BaseCallMessage *msg); // called when we receive an RPC from another node |
730 | | void handleRpcResponse(BaseResponseMessage* msg, // called when we receive an RPC response from another node |
731 | | cPolymorphic* context, |
732 | | int rpcId, |
733 | | simtime_t rtt); |
734 | | void handleRpcTimeout(BaseCallMessage* msg, // called when an RPC times out |
735 | | const TransportAddress& dest, |
736 | | cPolymorphic* context, int rpcId, |
737 | | const OverlayKey&); |
| 727 | bool handleRpcCall(BaseCallMessage *msg); // called when we receive an RPC from another node |
| 728 | void handleRpcResponse(BaseResponseMessage* msg, // called when we receive an RPC response from another node |
| 729 | cPolymorphic* context, |
| 730 | int rpcId, |
| 731 | simtime_t rtt); |
| 732 | void handleRpcTimeout(BaseCallMessage* msg, // called when an RPC times out |
| 733 | const TransportAddress& dest, |
| 734 | cPolymorphic* context, int rpcId, |
| 735 | const OverlayKey&); |
738 | 736 | |
739 | 737 | |
… |
… |
|
867 | 865 | MyNeighborResponse *mrpc = (MyNeighborResponse*)msg; // get Response message |
868 | 866 | callbackNeighbors(mrpc->getRespondingNode(), |
869 | | mrpc->getPrevNeighbor(), |
870 | | mrpc->getNextNeighbor()); // call our interface function |
| 867 | mrpc->getPrevNeighbor(), |
| 868 | mrpc->getNextNeighbor()); // call our interface function |
871 | 869 | } |
872 | 870 | // end the switch |