Conflicting assignments

Since it is possible to run commands in parallel, possible conflicts might arise. For example, what will happen if something like this is executed?

x=1 & x=5;

x=5 is a conflicting assignment since it accesses the variable x at the same time together with the first assignment. URBI has several blending modes to handle these conflicts, and you can specify these blending modes with the blend property of the variable. For example:

x->blend = add;

This will tell URBI to add the numerical values of any conflicting assignments on x. So, the result of the above command will be 6. There is also a mix mode available, which does an average of conflicting assignments (the result would be 3) and a queue mode which will queue conflicting assignments (the result will be 5). Other blending modes are available and described in the URBI Language Specification.

Variables in URBI have properties which can be accessed with a -> redirector. Properties are not identical to object attributes, they are part of the language semantics and therefore cannot be redefined. There are many properties available, like rangemin, rangemax, speedmax, delta. They are described in the URBI Language specification.

Note that blending modes also apply for sound devices, like speaker on the Aibo, and changing its blending mode from mix to queue will either superimpose sounds or queue them when they are played together.

The add and mix modes are very useful to superimpose sinusoidal assignments to design complex periodical movements, using a Fourier transform of the signal and keeping only the most significant coefficients.