Changes between Version 35 and Version 36 of Tutorials/a0Basic/Tutorial2
- Timestamp:
- Feb 13, 2013, 6:11:34 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/a0Basic/Tutorial2
v35 v36 85 85 As you noticed the "Hello World" script is almost ''human-readable'', and is quite understandable to any computer-literate reader. As already mentioned above, deep Ruby knowledge is '''not''' a prerequisite to running experiments on the ORBIT testbed. 86 86 87 * This portion of the script establishes a few parameters to control the experiment behavior. In particular the ''defProperty'' function call establishes a ''duration'' property for the experiment. The baseTopo variable is set to a Topology object which has collected names of nodes from the 'system:topo:imaged' set, which was established during your last imaging (omf load) operation. Using the defTopology function we define two topolgies names "sender" and "receiver". The baseTopo object's getNodeByIndex will return a node name from the 'system:topo:imaged' set. 88 87 89 {{{ 88 90 defProperty('duration', 60, "Duration of the experiment") … … 99 101 }}} 100 102 101 This portion of the script establishes a few parameters to control the experiment behavior. In particular the ''defProperty'' function call establishes a '''duration''' property for the experiment. The baseTopo variable is set to a Topology object which has collected names of nodes from the 'system:topo:imaged' set, which was established during your last imaging (omf load) operation. Using the defTopology function we define two topolgies names "sender" and "receiver". The baseTopo object's getNodeByIndex will return a node name from the 'system:topo:imaged' set.103 * Using the ''defGroup'' function we define "Sender" and "Receiver" groups. We associate two existing applications to each group, test:app:otg2 to the "Sender" group and test:app:otr2 to the "Receiver" group. These associations were made with the node.addApplication method. These applications would be installed and run on each node of this group. In this tutorial however, these applications are already installed on the baseline disk image, which you previously loaded on the node. These applications are a simple traffic generator and receiver respectively. By default these applications generate fixed-sized UDP packets at a constant bitrate. We set a bunch of application parameters via the app.setProperty method for each application. We also set some properties of the node using the node.net.w1.* attributes within each group. These attributes will be shared by all nodes in the group (in this case just one per group). 102 104 103 105 {{{ … … 130 132 }}} 131 133 132 Using the ''defGroup'' function we define "Sender" and "Receiver" groups. We associate two existing applications to each group, test:app:otg2 to the "Sender" group and test:app:otr2 to the "Receiver" group. These associations were made with the node.addApplication method. These applications would be installed and run on each node of this group. In this tutorial however, these applications are already installed on the baseline disk image, which you previously loaded on the node. These applications are a simple traffic generator and receiver respectively. By default these applications generate fixed-sized UDP packets at a constant bitrate. We set a bunch of application parameters via the app.setProperty method for each application. We also set some properties of the node using the node.net.w1.* attributes within each group. These attributes will be shared by all nodes in the group (in this case just one per group).134 * Finally the last block sets up the onEvent(:ALL_UP_AND_INSTALLED) trigger. When the experimenter controller receives the :ALL_UP_AND_INSTALLED event, it will execute the steps in this block. After a global waiting time (to synchronize), the allGroups.startApplications function call will start the applications on each node. The one ''duration'' has passed the experiment will stop. 133 135 134 136 {{{ … … 145 147 }}} 146 148 147 Finally the last block sets up the onEvent(:ALL_UP_AND_INSTALLED) trigger. When the 149 148 150 149 151 == 4. Running the "Hello World" experiment ==