Track Edge – step 0030 – December 2009

1 Purpose of SrrTrackEdge

SrrTrackEdge is an SRR object that is used to instrument a track edge.

A track edge is bordered by two track nodes, the “A” node and the “B” node.

The concrete geometry of the track edge is stored in the trackGeometry node. One of the most important properties of the trackGeometry node is the length field, that is the length of the track edge in meters.

Since track edges and track nodes are orchestrated by higher layer SRR objects (e.g. SrrBasicTrackSection, SrrBasicTurnout2Way), most fields of SrrTrackEdge are set “automatically”. The user (author of a track/turnout model) needs only to set the trackGeometry field and the exitViewpoint field.

2 User Interface of SrrTrackEdge (uiObj)

SrrTrackEdge is an external prototype that is available at the directory srr/.

<ProtoDeclare name='SrrTrackEdge'>

<ProtoInterface>

<field accessType='inputOutput' name='objType' type='SFString' value='SrrTrackEdge'/>

<field accessType='inputOutput' name='version' type='SFFloat' value='0.0022'/>

<field accessType='inputOutput' name='objId' type='SFString'/>

<field accessType='inputOutput' name='trackNodeA' type='SFNode'/>

<field accessType='inputOutput' name='trackNodeB' type='SFNode'/>

<field accessType='inputOutput' name='trackGeometry' type='SFNode'/>

<field accessType='inputOutput' name='modParam' type='SFNode'/>

<field accessType='inputOutput' name='initialized' type='SFNode'/>

<field accessType='inputOutput' name='exitViewpoint' type='SFNode'/>

</ProtoInterface>

objId

The object ID is used to identify the track edge within a module. It will be used to announce the track edge at the module coordinator – TMM (see a description of the iiObj interface in the paper “How to develop my own SRR object” at the http://simulrr.wordpress.com/download-area).

This value will be set by the higher layer SRR object, that orchestrates the track section/turnout (SrrBasicTrackSection, SrrBasicTurnout2Way, …).

trackNodeA, trackNodeB

will be set by the module coordinator – TMM, when linking neighbour nodes during initialization of the track section/turnout (after initialization of the track edge).

trackGeometry

has to be set by the author of the track/turnout model. It will contain a (reference to a) concrete track geometry node, that describes the track geometry of the track edge. In case of the SRR v0.01 example “ABI” track geometry, this is an SrrTrackGeometryABI node.

modParam, initialized

These fields are used to coordinate the initialization of the track edge.

The higher layer SRR object (SrrBasicTrackSection, SrrBasicTurnout2Way, …) will send the module parameters modParam to trigger the initialization of the track edge and of the trackGeometry node.

The trackGeometry node will get the object ID <objId>, before it will be initialized.

After the trackGeometry node has reported it's successful initialization, SrrTrackEdge responds to the higher layer SRR object with initialized.

exitViewpoint

The author of the track/turnout model should provide this parameter at his miMod(Model) Interface to enable the module author to set a reference to an “exit viewpoint” for each track edge. The SRR object SrrVehicle will report the “current exit viewpoint” to the vehicle model, each time, when it moves from one edge to the next.

The model author should send a set_bind event to this viewpoint, each time when the user wants to exit or exits a vehicle (e.g. detected by a <ProximitySensor>).