CAU

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

Block Section Control Functions

enginecarcar
int set_speed(int BLOCK, int SPEED);

The function set_speed() sets the power within block section BLOCK to the value SPEED. Block sections may be specified by their labels which the library defines as symbolic constants. Legal speed values are in between 0 (MINSPEED) and 7 (MAXSPEED). The speed value 0 means power off.
On successful completion the value SUCCESS is returned, otherwise the value FAILURE.

int get_speed(int BLOCK);

The function get_speed() returns the speed value currently set by the last call to the function set_speed() for the given block section BLOCK. This may not be mistaken with the speed measured by a velocity meter.
On successful completion the speed value is returned, otherwise the value FAILURE.

int set_direction(int BLOCK, int DIRECTION);

The function set_direction() sets the operation direction within the given block section BLOCK to DIRECTION. Legal direction values are the symbolic constants CLK for clockwise operation and CNTCLK for counterclockwise operation.

On successful completion the value SUCCESS is returned, otherwise the value FAILURE.

int get_direction(int BLOCK);

The function get_direction() returns the operation direction currently set by the last call to the function set_direction() for the given block section BLOCK.
On successful completion either CLK or CNTCLK is returned, otherwise the value FAILURE.


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