Integer Control Type A – step 0031 – February 2010
SrrTrains Controls are a multiplayer-capable means for building user interfaces of cabs in SrrTrains vehicles.
The integer control type A provides the ability to globally maintain an integer state of a control, to request a concrete value at any scene instance and to request the increasing/decreasing of the value at any scene instance.
Currently this control can be used for the regulating notch in an SrrCabA object.
SrrControlIntA creates and uses a network sensor with the streamName/networkSensorId Srr Vehicle <objId>.
SrrControlIntA is an external prototype that is available at the directory srr/.
<ProtoDeclare name="SrrControlIntA">
<ProtoInterface>
<field accessType='inputOutput' name='objType' type='SFString' value='SrrControlIntA'/>
<field accessType='inputOutput' name='version' type='SFFloat' value='0.0031'/>
<field accessType='inputOutput' name='parentCab' type='SFNode'/>
<field accessType='inputOnly' name='basicInitialization' type='SFInt32'/>
<field accessType='inputOutput' name='basicallyInitialized' type='SFNode'/>
<field accessType='inputOutput' name='numberOfPositions' type='SFInt32' value='3'/>
<field accessType='inputOutput' name='initialValue' type='SFInt32' value='0'/>
<field accessType='inputOutput' name='value' type='SFInt32'/>
<field accessType='inputOnly' name='requestValue' type='SFInt32'/>
<field accessType='inputOnly' name='requestInc' type='SFBool'/>
<field accessType='inputOnly' name='requestDec' type='SFBool'/>
</ProtoInterface>
The fields parentCab, basicInitialization and basicallyInitialized are used in the SRR framework and in other SRR objects internally and need not be described here.
In numberOfPositions you can set the number of positions of the control, such that value is in the interval [0, numberOfPositions - 1].
In initialValue you can set the initial value of the control.
The field value outputs the actual value of the control, synchronized for all scene instances.
With requestValue, a scene instance can request a specific value, and with requestInc and requestDec, a scene instance can request to increase/decrease the value of the control.