next up previous contents
Next: 4.3 Using include files Up: 4. Configuration Files Previous: 4.1 Basic Syntax   Contents

4.2 Defining new device types

The define statement can be used to define new types of devices. New devices are defined using the syntax:

define newdevice olddevice (...)
For example, the line:
define pioneer2 position (driver "p2os_position" port "/dev/ttyS0")
defines a new pioneer2 device type composed of the primitive position device, appropriately configured for a Pioneer robot attached to the first serial port. This device may be instantiated using the standard syntax:
pioneer2 ()