Detect direction of rotation
function directionOfRotation extends Modelica.Icons.Function; input Boolean A "Track A"; input Boolean preA "pre(Track A)"; input Boolean B "Track B"; input Boolean preB "pre(Track B)"; output Integer dir "Direction of rotation"; end directionOfRotation;