CURVE_MULTI_LINK
This element connects multiple curves together. Whenever one of the 'from' curves changes, the 'to' curves take the 'from' value modified by the mux_function.
Attributes brief detailed show all inherited
Examples
Here's an example of two curves linked into one with "+" mux_function.

- <!-- curve from param over time 1 -->
- <CURVE_FROM_PARAM_OVER_TIME id="demo_curve_1" param_id="demo_param_1" duration_ms="10000" refresh_time_ms="10"/>
- <PARAM id="demo_param_1" min="-10" max="10" default="0" />
- <!-- curve from param over time 2-->
- <CURVE_FROM_PARAM_OVER_TIME id="demo_curve_2" param_id="demo_param_2" duration_ms="10000" refresh_time_ms="10"/>
- <PARAM id="demo_param_2" min="-10" max="10" default="0" />
- <!-- target curve -->
- <CURVE id="target_curve" x_default="0" x_max="0" x_min="-10" x_unit="s" y_default="0" y_max="15" y_min="-15" y_unit="dB" />
- <!-- link curves into one; mux_function can be +, -, *, / -->
- <CURVE_MULTI_LINK from="demo_curve_1;demo_curve_2" to="target_curve" mux_function="+" />
- <!-- a template to display the curve on a graph -->
- <TEMPLATE id="SHOW_CURVE" curve_id="">
- <PNS_LCD_GROUP_BOX>
- <!-- first graph for the line (stroke) -->
- <CURVE_GRAPH curve_id="$curve_id$" width="500" height="100" color="#327ca3" graph_style="stroke" opacity="1" line_width="4" />
- <!-- second line for the opaque bargraph -->
- <CURVE_GRAPH curve_id="$curve_id$" width="500" height="100" color="#327ca3" graph_style="bargraph" opacity="0.2" line_width="4" />
- </LAYER_STACK>
- </PNS_LCD_GROUP_BOX>
- </TEMPLATE>
- <!-- show the curves -->
- <SHOW_CURVE curve_id="demo_curve_1" />
- <SHOW_CURVE curve_id="demo_curve_2" />
- <SHOW_CURVE curve_id="target_curve" />
- <!-- demo logic to create curves -->
- <SCRIPT script="double demo_val_1 = 0, demo_val_2 = 0;" />
- <TIMER id="forever_timer" refresh_time_ms="5" />
- <ACTION_TRIGGER event_id="forever_timer.elapsed"
- script="
- demo_param_1 = sin(demo_val_1)*5;
- demo_val_1+=0.09;
- demo_param_2 = cos(demo_val_2)*10;
- demo_val_2+=.01;
- " requires="demo_param_1;demo_param_2" />
Related elements
See CURVE_GRAPH, CURVE_FROM_PARAM_OVER_TIME, FORMULA_CURVE, CURVE, CURVE_LINK.
Comments
Please, authorize to view and post comments.