PrevTopNext

Creating Switch Commands

  • "Throw over" commands for switches marked with SwitchToken and in the wrong position
  • Specific conditions and actions require dedicated DSL phrases:
    [when]free switch in this route in adverse position=
          SwitchToken( $target: target, route == $route, $reqPos: position )
          $switch: Switch( this == $target, clear == OnOff.ON,
                           $actPos: position )
          eval( $reqPos.isAdverseTo( $actPos ) )
    [then]enter a throw-over command for the switch=
          insert( new ElementCommand( CommandCode.THROW_OVER, $switch,
                                      Operator.getAutoOperator() ) );
    
  • DSLR Rule for commanding switches in a route:
    rule "command switches in route"
    when
        There is a set route
        and a free switch in this route in adverse position
    then
        enter a throw-over command for the switch
    end
    
  • Similar strategy for commanding the start signal

PrevTopNext