defProperty

Define a Property

This command defines a new experiment property that can be used throughout the Experiment Description. The value of a property defined in an ED is tracked in the experiment database. It is also accessible through the Experiment Controller's web interface. It is highly recommended to use properties for values that define the character of the experiment. This is especially true for values that change through the course of the experiment.

  • This command will create a OMF command line parameter of the same name, which you can use to set the value of the property directly from the command line when running the experiment.
  • 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

defProperty(name, initialValue, description)

where:

  • name: name of the property. This name will be used to refer to this property in any consecutive OEDL commands.
  • initialValue: the initial value of the property. This also determines the type of the property.
  • description: Textual description. Used in Experiment Controller's help message, as well as for the default web interface.

Usage Examples

1 defProperty('rate', 300, 'Bits per second sent from sender')
2 defProperty('packetSize', 1024, 'Size of packets sent from sender')

The initial value of an experiment property can be overriden from the command line of the Experiment Controller. For instance the 'rate' property, defined above can be set to 1000 when running the experiment, as follows:

omf exec path_to_your_experiment_script -- --rate 1000

Note the use of '--' after the experiment URI, which separates the command line parameters of the Experiment Controller (i.e. 'omf exec') from those of the experiment (e.g. '--rate').

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

You can change values of properties at "run-time", i.e. when your experiment is executing. This is also shown in the the Basic Tutorial on "How to define and use Properties".

  • property - To access the value of your newly defined property in your experiment description