property

Access an experiment properties

This command allow you to access of an experiment property anywhere in the Experiment Description. This experiment property should have been previously defined using the defProperty OEDL command.

  • The command prop is an alias for property
  • The value of an experiment property can be changed at "run time", i.e. while the experiment is executing.
  • A property can be used within simple arithmetic and string operations
  • Some names are reserved and cannot be used as a property name

The Basic Tutorial on "How to define and use Properties" gives a comprehensive example of these features.

Syntax

property.propName
property.propName = newValue

or

prop.propName
prop.propName = newValue 

where:

  • propName: Name of experiment property.
  • newValue: New value to assign to the property.

Usage

 1 defProperty('rate', 300, 'Bits per second sent from sender')
 2 
 3 defGroup('sender', [1,2]) {|node|
 4   node.prototype("test:proto:sender", {
 5     'rate' => property.rate   
 6   })
 7 }
 8 
 9 whenAllInstalled {
10     group('sender').startApplications
11     wait 30
12     property.rate = 2000
13     wait 30
14   }
15 }

A more comprehensive example is provided in the Basic Tutorial on "How to define and use Properties".

  • defProperty - To define a new property in your experiment description