CAU

- The Model Railway
- - Software
- - - libRailControl
- - - - Constants/Functions
- - - - - Constants
- - - - - Initialisation
- - - - - Block Sections
- - - - - Points
- - - - - Signals
- - - - - Relay
- - - - - Velocity Meters
- - - - - Station Lighting
- - - - - Handling

Velocity Meter Control Functions

enginecarcar
int read_M1(int BLOCK)
int read_M2(int BLOCK)

The functions read_M1() and read_M2() return the state of the velocity meters within the specified block section BLOCK. While read_M1() evaluates the velocity meter which is passed firstly by trains running in clockwise direction, read_M2() evaluates the one passed secondly.
Please note that each velocity meter is only capable of detecting the crossing of a train, not measuring its speed (see description of Velocity Meters for details).
Please note also that not all block sections provide velocity meters. An attempt to evaluate the velocity meters of a block section without will fail.

Evaluating a velocity meter not being crossed by a train results to NOVALUE. If a velocity meter was crossed by a train, an arbitrary value unequal to NOVALUE and unequal to FAILURE will be returned. Any attempt to evaluate a velocity meter will reset it to NOVALUE.
If BLOCK specifies a block section not equipped with velocity meters, FAILURE is returned.


Clemens Grelck
generated on: Mon May 31 10:20:39 MET DST 1999