In order to use mapping scripts, we need to have two components, of which one has the Update method implemented. The mapping script is a powerful tool to update another component of which you know the ID and the parameters to update. This allows you to distribute a value from a master component to multiple other components that need to have the latest value.

The mapping script can send a value that exist in the configuration cluster or in the settings cluster automatically to an ID. This is done after the Update method. Optional is to do simple mathematics on the parameters (add (+), subtract (-), multiply (*) and divide (/)), which enables you to define for example the recipient’s parameter to be the value of the product of two parameters.

Mapping script
  1. Start your component and go to the configure.
  2. Insert the mapping script. The script is of the type: A.B=C; Where A is the ID of the receiver, B the name of the parameter the receiver is listening to in the Update method and C is the name of the parameter that exists in the settings or configuration cluster of the current component. For example receiver.frequency=10*frequency;.
  3. After you update a value on the Main by the Update target method, it updates itself in the Update method. Then it calls the parent and sends another UpdateMessage to the recipients of the mapping script.