close
Warning:
BrowserModule failed with ConfigurationError: Look in the Trac log for more information.
- Timestamp:
-
Aug 15, 2008, 4:21:15 PM (16 years ago)
- Author:
-
heep
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v10
|
v11
|
|
16 | 16 | == 1. Implementing new overlay modules in !OverSim == |
17 | 17 | |
18 | | This is a guide to implement new overlay modules for !OverSim. It is aimed to be an introductory guide, for more in-depth information you should consult the links provided in Section 1. This guide is divided as follows. In order to understand the place an overlay module takes inside nodes and how it interacts with them, first the module hierarchy for overlay hosts is described. Then we proceed to explain how overlay modules should declared using the NED language. Next, the basics for the module implementation are described using the base class BaseOverlay. Finally we explain how to make !OverSim compile and run your module. |
| 18 | This is a guide to implement new overlay modules for !OverSim. It is aimed to be an introductory guide, for more in-depth information you should consult the doxygen documentation. This guide is divided as follows. In order to understand the place an overlay module takes inside nodes and how it interacts with them, first the module hierarchy for overlay hosts is described. Then we proceed to explain how overlay modules should declared using the NED language. Next, the basics for the module implementation are described using the base class BaseOverlay. Finally we explain how to make !OverSim compile and run your module. |
19 | 19 | |
20 | 20 | == 2. !OverSim nodes == |
… |
… |
|
43 | 43 | in: from_app; // gate from the application |
44 | 44 | out: to_app; // gate to the application |
| 45 | in: direct_in; // gate for sendDirect |
45 | 46 | endsimple |
46 | 47 | }}} |
47 | 48 | |
48 | | The module declaration is divided in two subsections: parameters and gates. The parameters subsection contains custom parameters established by the user, while the gates subsection establishes the connections to the other layers: from_udp and to_udp to the UDP layer, and from_app and to_app to the application layer. |
| 49 | The module declaration is divided in two subsections: parameters and gates. The parameters subsection contains custom parameters established by the user, while the gates subsection establishes the connections to the other layers: from_udp and to_udp to the UDP layer, and from_app and to_app to the application layer. The direct_in gate is used for e.g. internal RPCs. |
49 | 50 | |
50 | 51 | Modules can be nested inside one another. Modules without any inner modules are called simple modules, and are declared using the keyword simple. Only simple modules can have its behaviour customized with C++ (see Section 4). On the other hand, modules with inner nested modules are called compound modules, and act only as containers; they are declared with the keyword module. |