Boolean Control Type A – step 0031 – February 2010

1 Purpose of SrrControlBoolA

SrrTrains Controls are a multiplayer-capable means for building user interfaces of cabs in SrrTrains vehicles.

The boolean control type A provides the ability to globally maintain a boolean state of a control, to request a concrete value at any scene instance and to request the toggle of the value at any scene instance.

Currently this control can be used to switch the “v=const” mode on and off in the SrrWagon2axA specific vehicle prototype.

SrrControlBoolA creates and uses a network sensor with the streamName/networkSensorId Srr Vehicle <objId>.

2 User Interface of SrrControlBoolA (uiObj)

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

<ProtoDeclare name="SrrControlBoolA">

<ProtoInterface>

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

<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='initialValue' type='SFBool' value='false'/>

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

<field accessType='inputOnly' name='requestValue' type='SFBool'/>

<field accessType='inputOnly' name='requestToggle' 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 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 requestToggle, a scene instance can request to toggle the control.