| 45 | == Dissecting the Experiment == |
| 46 | |
| 47 | {{{ |
| 48 | defProperty('firstMCS',"http://wimaxrf:5052/wimaxrf/dlprofile?dlprof1=13","Set MCS to profile 13 - QPSK (CTC) 1/2 ") |
| 49 | defProperty('secondMCS',"http://wimaxrf:5052/wimaxrf/dlprofile?dlprof1=16","Set MCS to profile 16 - 16-QAM (CTC) 1/2") |
| 50 | defProperty('thirdMCS',"http://wimaxrf:5052/wimaxrf/dlprofile?dlprof1=21","Set MCS to profile 21 - 64-QAM (CTC) 5/6") |
| 51 | defProperty('noMCS',"http://wimaxrf:5052/wimaxrf/dlprofiledlprof2=255&dlprof3=255dlprof4=255&dlprof5=255&dlprof6=255& |
| 52 | dlprof7=255&dlprof8=255&dlprof9=255&dlprof10=255&dlprof11=255&dlprof12=255","Set other MCS to none") |
| 53 | }}} |
| 54 | |
| 55 | ''defProperty'' is a method which appears in different scopes within OMF. In this global case, it creates methods of the ''property'' with the name of the first input (as a string), stores and releases the value of the second input, and takes the third input as a description. |
| 56 | |
| 57 | * As shown in the previous experiment, this URI accesses the base station and assigns it certain values. |
| 58 | |
| 59 | {{{ |
| 60 | defGroup('first_node', 'node1-1.sb4.orbit-lab.org') |
| 61 | }}} |
| 62 | |
| 63 | ''defGroup'' is a method which creates groups of resources (usually nodes), gives them a URI for later identification (first parameter), and identifies these resources by the second parameter (in OMF version 5.3, they are identified as above). The (optional) third parameter is a block argument. |
| 64 | * We do not pass a block as an explicit parameter here, because it follows the method. |
| 65 | |
| 66 | {{{ |
| 67 | defGroup('first_node', 'node1-1.sb4.orbit-lab.org') do |node| |
| 68 | node.net.x0.profile = '51' |
| 69 | node.addApplication("test:app:wimaxcu_app") do |app| |
| 70 | app.measure('status_link') |
| 71 | end |
| 72 | ... |
| 73 | end |
| 74 | }}} |
| 75 | |
| 76 | * As those familiar with ''Ruby'' will note, this method receives additional instructions from a block. Here, ''node'' is a dummy variable referring to the group itself, although the exact behavior of ''Ruby'' blocks is outside the scope (pun intended) of this discussion. |
| 77 | |
| 78 | Here, ''net.x0.profile'' configures the WiMAX network profile default as 51. |
| 79 | |
| 80 | ''addApplication'' gives a group instructions to use the defined application in the specified manner. The principle parameter is the URI of the predefined application. |
| 81 | |
| 82 | * The ''wimaxcu_app'' application is actually already installed in the experiment image here, and "test:app:..." instructs OMF to search in the /test/app/ subdirectory of its primary directory of applications. |
| 83 | |
| 84 | * ''app.measure('status_link')'' tells this application to use its predefined code to measure the 'status_link' property. OML will save these data for later. The exact behavior of this application is outside the scope of this discussion; suffice it to say that the implementation of the application is defined in the ''wimaxcu_app.rb'' and ''wmxstat'' programs mentioned previously. |
| 85 | |
| 86 | ---- |