How it all fit together

ContentModular Layouts



Preface

A modular layout is rearrangeable and the software should make it as easy as possible to support this.

Many issues are already implemented, but the praxis will certainly spit up more wishes regarding this topic.

See also: Plan-F | MGV



Copyright http://www.m-track.org

Splitting it all up

Making separate files for all modules is a first step towards modular layout support. But how to 'glue' them logically together with routes and schedules?
The loc list could reside in a separate file or in any other module.

Every module will get it's own tab in the Rocgui, and because it is possible to have multiple Rocgui's connected to one server it is possible to show the whole layout spread over a stack of computers.

In some cases grouping modules to one logical module make sense:

Modules without any functionality like signals, switches or sensors can be left out to get an overall view as compact as possible.

Routes and block events which are dependent on how modules are arranged. The routes can be in a separate file, but the block events are part of the module.

Block events must be setup new for every arrangement.

Master Plan

The master plan lists up all files needed to get the layout together: http://www.rocrail.net/doc/rocrail-wrappers/wrapper-en.html#modplan Contents:

  • n Modules

> listings: tklist, bklist, swlist, sglist, colist, fblist, ttlist, txlist

  • Locomotives

> listings: lclist

  • Routes

> listings: stlist, linklist, locationlist, sclist

Example

<modplan title="Goes 2008" locs="locdb.xml" routes="beveland.xml">
  <module title="Bergen op Zoom" filename="bergenzoom.xml"/>
  <module title="Rilland" filename="rilland.xml"/>
  <module title="Kruiningen" filename="kruiningen.xml"/>
  <module title="Goes" filename="goes.xml"/>
  <module title="Heinkenszand" filename="heinkenszand.xml"/>
  <module title="Arnemuiden" filename="arnemuiden.xml"/>
  <module title="Middelburg" filename="middelburg.xml"/>
  <module title="Souburg" filename="souburg.xml"/>
  <module title="Vlissingen" filename="vlissingen.xml"/>
</modplan>

Each module becomes it's own level starting with '0' and follow the ordering in the master plan.

Module Merge

svn2391: Successfully merged 2 modules.

<modplan title="Plan-F" locs="Plan-F-1.xml" routes="Plan-F-1.xml" occupancy="occ.xml" initfield="true">
  <module title="Waldbrunn" filename="Plan-F-1.xml"/>
  <module title="Neustadt" filename="Plan-F-2.xml"/>
</modplan>

Plan-F-1.xml also holds the loco and route database.

Tip: Hide the Loco Panel to make more room for the track plan.

Module rotation

<modplan title="Plan-F" locs="Plan-F-1.xml" routes="Plan-F-1.xml" occupancy="occ.xml" initfield="true">
  <module title="Waldbrunn" filename="Plan-F-1.xml"/>
  <module title="Neustadt" filename="Plan-F-2.xml" rotation="180" cx="16" cy="6"/>
</modplan>

First rotation test with svn2399:

As from svn3064 rotations of 90°, 180° and 270° are supported.

Block Occupancy

Centralize the block occupancy in one extra file and leave the module track plans clean. occ.xml svn2402:

<modocc title="Plan-F">
  <occ bkid="1" lcid="v160-22"/>
  <occ bkid="4" lcid="NS2433"/>
  <occ bkid="7" lcid="" closed="true"/>
</modocc>

It will be serialized and written to disk:

  • after a save action is triggered
  • at server shutdown

Init field

To make sure the shown initial switch positions are right in case no switch sensors are used, the initfield flag activates the initField process and flips all switches twice.

Editting a merged track plan

  • Modifications must be written in the module track plan and is made possible by the module map which links plan files with Levels/Tabs.

Visualisation of a ModPlan

Starting at svn2899 a useable visualisation is implemented:

The module positions in the view are setup in the modplan:

<modplan title="Plan-F" locs="locos1.xml" routes="routes1.xml" occupancy="occ.xml" initfield="false">
  <module title="Waldbrunn" filename="mod1.xml" modviewy="0"/>
  <module title="Schönblick" filename="mod4.xml" modviewx="0" modviewy="8"/>
  <module title="Neustadt a/d Weinstrasse" filename="mod6.xml" modviewx="12" modviewy="8"/>
</modplan>

In this example the routes and locos are in separate xml files. The route files can be set up for a certain arrangements, so if properly archived the routes setup has to be done only once.

It is a good praxis if the modules are drawn as compact as possible to get many modules in view without scrolling the big picture.
The view can be down scaled to 25% but is not really read able; 50% is OK to control objects.

If the Rocgui is started with the -tabview command line option the normal multi panel view is active:

Use the -s <index> command line option to select a panel by index at startup.
Very usefull for Rocgui's at module location.

XML Documentation

Examples


Personal Tools