ja
サインイン

← API リファレンスに戻る

RouteEvent A route changing

What the layout's route events give (onRouteSet, onRouteReady, onRouteDisturbed, onRouteReleased): the route's name, from which block to which, and how it stands now.

用途: To follow what the interlocking does, for instance a message when a route gets disturbed.

layout.onRouteDisturbed { RouteEvent r ->
   say "Route ${r.name} is disturbed"
}

プロパティ

name → String

Its name.

The route's name, as TRAX Control or the agent named it.

layout.onRouteSet { RouteEvent r -> log r.name }

from → Block

The block it starts in.

The block the route starts in.

layout.onRouteReady { RouteEvent r -> log r.from.name }

to → Block

The block it runs to.

The block the route runs to.

layout.onRouteReady { RouteEvent r -> log r.to.name }

state → String

setting, set, disturbed or released.

How the route stands now: setting, set, disturbed or released.

layout.onRouteDisturbed { RouteEvent r -> log r.state }