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 ()