| 1 | = defNodes: Define Nodes used in Experiment = |
| 2 | |
| 3 | This command defines a set of nodes used in the experiment. An experiment can contain multiple such declarations. |
| 4 | |
| 5 | == Syntax: defNodes(setName, selector, &block) == |
| 6 | |
| 7 | * '''setName:''' Name of the defined set. |
| 8 | * '''selector:''' Selects the nodes contained in this set. |
| 9 | * '''block:''' Instructions for all nodes in the set. |
| 10 | |
| 11 | The 'setName' is a simple string which is used in the remander of the experiment script to refer to this set of nodes. |
| 12 | |
| 13 | The 'selector' defines which nodes are in the set. A selector can have the following forms: |
| 14 | |
| 15 | * [x,y]: Describes a single node at location x@y |
| 16 | * [x1..x2, y]: Describes a set of nodes along a line starting at x1@y and ending at x2@y. For instance, [2..4, 5] defines the nodes [2,5], [3,5], [4,5]. |
| 17 | * [x, y1..y2]: Same as previous, but for the y coordinate. |
| 18 | * [x1..x2, y1..y2]: This defines a rectangle area of nodes within the grid. |
| 19 | * [[x1,y1], [x2,y2], [x3,y3]]: An arbitrary long list of single nodes. Obvioulsy, any entry in this list can also use the line and rectangle descriptions defined above. |
| 20 | |
| 21 | == Usage == |
| 22 | |
| 23 | == See Also == |