| <?nsuri comps?> |
| <?import types.flexmi?> |
| <?import library.flexmi?> |
| <comp name="SpeedLimitCalculator" _var="this"> |
| <in name="location" type="geo"/> |
| <out name="speedLimit" type="float"/> |
| |
| <comp name="MinimumSpeedLimit"> |
| <out name="speedLimit" type="float"/> |
| </comp> |
| |
| <comp name="SpeedLimitDatastore"> |
| <in name="location" type="geo"/> |
| <out name="speedLimit" type="float"/> |
| </comp> |
| |
| <_nary_operator name="Max" action="result = in1 > in2 ? in1 : in2" |
| _in="float" _out="float" _n="2"/> |
| |
| <con from="${this}.location" to="${this}.SpeedLimitDatastore.location"/> |
| <con from="${this}.SpeedLimitDatastore.speedLimit" to="${this}.Max.in1"/> |
| <con from="${this}.MinimumSpeedLimit.speedLimit" to="${this}.Max.in2"/> |
| <con from="${this}.Max.result" to="${this}.speedLimit"/> |
| |
| </comp> |