Changes between Version 1 and Version 2 of Old/NodeHandler/Commands/prop


Ignore:
Timestamp:
Apr 13, 2006, 1:12:51 PM (18 years ago)
Author:
max
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/NodeHandler/Commands/prop

    v1 v2  
    1212
    1313
    14 == Syntax: prop.''propName'' = newValue ==
     14== Syntax: prop.''propName'', prop.''propName'' = ''newValue'' ==
    1515
    16   * '''setSelector''': The set of nodes to use
    17   * '''command''': Command to issue on the set.
    18   * '''resource_path:''' Path to resource.
    19   * '''value:''' Value to assign to resource.
    20 
    21 The supported syntax for the ''setSelector'' can be found in [wiki:Documentation/NodeHandler/Commands/defNodes defNodes] where it is simply called ''selector''.
    22 
    23 The list of commands currently defined can be found '''missing'''. A description of the resource paths can be found '''mssing'''.
     16  * '''propName''': Name of experiment property
     17  * '''newValue''': New value to assign to property.
    2418
    2519== Usage ==
    2620
    2721{{{
    28 nodes('sender1').startApplications
    29 nodes(['s1', 'r1']).net.wo.essid = "orbit"
    30 nodes('sender').net.wo { |w|
    31   w.essid = "orbit"
    32   w.ip = "%192.168.%x.%y"
     22defProperty('rate', 300, 'Bits per second sent from sender')
     23
     24defNodes('sender', [1,2]) {|node|
     25  node.prototype("test:proto:sender", {
     26    ...
     27    'rate' => prop.rate   
     28  })
     29}
     30
     31whenAllInstalled {
     32  ...
     33  [500, 1000, 2000].each { |newRate|
     34    prop.rate = newRate
     35    wait 30
     36  }
    3337}
    3438}}}
    35 
    36 
    3739
    3840