2.2.3. Parameter Sets

In addition to the following description a screencast of modeling Parameter sets is shown in section 3.1.2.

Parameter sets are modeled in a SmartSoft communication/coordination repository project. The model has the file extension '*.pardef' and is located in the folder model/parameter. It consists of exactly one ParamRepository which contains an arbitrary number of parameter sets.

Model Parameter Sets

Figure 2.11. Model Parameter Sets


The ParamRepository of the project CommNavigationObjects for example is defined as follows:

	ParamRepository CommNavigationObjects {

	}
				

The definition of a parameter set starts with the keyword 'ParamSet' and is followed by a name.

	ParamSet <name> {
	
	}
				

Inside the parameter set parameters and trigger can be defined. These are enclosed by curly braces.

A parameter is defined as follows:

	Param <name> {
		<name> : <data type>
	}
				

The keyword 'Param' is used to define a parameter. After the keyword the name of the parameter is given. The elements of the parameter are enclosed by curly braces and consist of a name and a data type. Possible data types are:

Furthermore it is possible to use lists of these data types. In order to do so, an opening and closing square bracket has to be written behind the data type. The square brackets enclose the number of elements of the list. If the size of the list should be variable the symbol '*' is used.

A Trigger is defined as follows:

	Trigger <name> {
		<name> : <data type>
	}
				

Trigger are defined with the keyword 'Trigger'. After the keyword the name of the trigger is given. The elements of the trigger are enclosed by curly braces and consist of a name and a data type. The data types are the same as in the parameter definition.

The following example of a parameter set definition can be found in the CommNavigationObjects repository.

	ParamSet MapperParams {
		Trigger CURPARAMETER {
			xsize : Int32
			ysize : Int32
			xpos : Int32
			ypos : Int32
			id : Int32
		}

		Param CURLTM {
			preoccupation : Enum { DISABLE ENABLE }
			threshold : Int32
		}
	}
				

In this example the trigger CURPARAMETER is defined inside the parameter set MapperParams and contains the elements xsize, ysize, xpos, ypos and id. The parameter CURLTM contains the elements preoccupation and threshold.

WordPress Appliance - Powered by TurnKey Linux