Software Structure (Overview) – step 0022 – December 2009
Figure
1: Components and Interfaces of an SrrTrains Layout
Figure 1 shows the different components and interfaces that are involved in an SrrTrains model railroad layout.
The Frame is provided by the model railroad operator / frame author. It contains the main file which must be opened by everyone, who wants to take part in the game with this model railroad layout.
Each model railroad layout is buildt by so-called modules, that are provided by module authors. A module contains a landscape and other static objects like houses, bridges, but also tracks and turnouts.
When playing with a model railroad layout, one can create locomotives and wagons by loading models from some URLs. Models are provided by model authors.
The SRR Framework is provided by the SrrTrains Core Team (http://simulrr.wordpress.com/about) and can be used by anybody, who wants to build frames, modules or models of an SrrTrains layout.
Frame is synonymous for everything that a model railroad operator (frame author) provides to all users of his model railroad layout.
That may be avatars, it may be a general infrastructure or some means to perform 3D chat and 3D voice chat.
SrrTrains requires the following preconditions from an SrrTrains frame
instantiate the SRR Controller – Base exactly once and control the whole simulation by using the uiControl interface
if at least one module of the layout contains tracks and/or turnouts, instantiate the SRR Controller – TMM and use it via the uiControl interface
if at least one module or model of the layout uses the SrrAvatarContainer to avoid the "bouncing avatars problem" in moving objects, then instantiate the SrrMasterAvatarContainer exactly once by using the uiAva interface
load/unload modules and initialize them by using the miMod(Module) interface
Module is synonymous for everything that a module author provides to a model railroad operator and to all users of a model railroad layout.
Usually that will comprise some landscape, some tracks and turnouts and other objects (houses, carousels, but also e.g. some ambient birds singing).
Tracks and turnouts must be instrumented by SRR objects to allow all vehicle models to use them.
Other objects may be instrumented by SRR objects (e.g. using SrrSwitchA to animate a door in a manner synchronized among the scene instances).
SrrTrains requires the following preconditions from an SrrTrains module
instantiate the Module Coordinator - Base exactly once and control the part of the simulation, which it is responsible for, by using the uiMod interface
if the module contains tracks and/or turnouts, instantiate the Module Coordinator – TMM exactly once and use it via the uiMod interface
provide at least the miMod(Module) interface to the frame
Use models by their respective interface
Non-SrrTrains Models: SrrTrains doesn't pose any requirements on this case
Intrinsic Models: use the uiObj interfaces of SRR objects to instrument these models
Static Models: use the miMod(Model) interface of these models to load and initialize them.
Tracks/Turnouts: use the provided track geometry to realize and instrument tracks and turnouts (interworking with vehicle models will be ensured this way)
Model is synonymous for everything that a model author provides to the users of a model railroad layout.
That comprises a graphical and acoustic representation of the model and some instrumented means to operate the model (levers, scrollers, generally spoken one or more cabs).
Vehicles must be instrumented by the use of SRR objects to allow the interworking with tracks and turnouts.
Other models may be instrumented by the use of SRR objects.
SrrTrains requires the following preconditions from a static model
provide at least the miMod(Model) interface to be loaded and initialized by the module
use the uiObj interface of the necessary SRR objects to instrument the model
SrrTrains requires the following preconditions from a vehicle model
provide at least the miMod(Model) interface to be loaded and initialized by the SRR Controller – TMM.
Use the uiObj interface of the according SRR objects (SrrAxle, SrrWagon2axA, .......) to instrument the kinematics of the wagon (ensuring interworking with all tracks and turnouts).
Those are internal components of the SRR framework and need not be further described here.
One could implement his own SRR objects – see the "How to build my own SRR object" paper on the Download Area. There you can (not yet but soon) find a description of the iiObj interface.