Setup Point – step 0031 – February 2010

1 Purpose of SrrSetupPoint

It's the purpose of a setup point, to define a position within the track layout, where vehicles can be created (set up onto the tracks).

The point is defined by means of the name (objId) of the edge (track section), on which the vehicle shall be created. Additionally the user can give an offset and a flag, that indicates, whether the vehicle shall be created in direction “from A to B” or “from B to A” (each track section has an “A” end and a “B” end).

The offset ess is measured in meters increasingly from node “A” to node “B” of the parentEdge. The front of the vehicle (origin of the vehicle's local coordinate system) will always be created over the setup point, the vehicle pointing either in direction of increasing ess (isAtoB=true) or pointing in the direction of decreasing ess (isAtoB=false).

The user can select a vehicle by means of a vehicle ID and a setup point by means of the object ID (and module name) of the setup point to create an instance of the selected vehicle.

2 User Interface of SrrSetupPoint (uiObj)

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

<ProtoDeclare name='SrrSetupPoint'>

<ProtoInterface>

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

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

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

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

<field accessType='inputOutput' name='ess' type='SFFloat'/>

<field accessType='inputOutput' name='isAtoB' type='SFBool'/>

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

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

<field accessType='inputOutput' name='registeredVehicleIds' type="MFString"/>

<field accessType='inputOnly' name='createVehicle' type="SFInt32"/>

<field accessType='outputOnly' name='progressIndicator' type="SFFloat"/>

</ProtoInterface>

objId

The user sets the objId before initialization of the setup point. The objId is unique within the module and should indicate the setup point in a descriptive manner.

parentEdgeName, ess, isAtoB

The user describes the initial place of the origin of the vehicle's local coordinate system.

modParam

is needed for the initialization. This value was delivered by the module coordinator SrrModCoord after the registration of the module. The user routes this event from SrrModCoord to SrrSetupPoint.

initialized

fires an SFNode event, after the setup point has been initialized.

registeredVehicleIds

outputs the list of registered vehicles. This list is used to select a vehicle to be created.

createVehicle

creates the vehicle registeredVehicleIds[createVehicle] at the setup point. FBI (forward-backward-indicator) will be set to true, objId will be left blank (the train manager will create an objId for the vehicle).

progressIndicator

indicates the progress of a vehicle creation process. 0.0 means “start of creation”, 1.0 means “creation finished/aborted”. Reporting the values 0.0 and 1.0 is guaranteed, intermediate values may be sent or not.