regdtcrobot( sectionname, priority )
Parameters
| Type | Description | |
| sectionname | section | name of a section |
| priority | numeric | event priority |
_result
Not set.
Descriptions
Registers the section specified by sectionname
to handle robot detection events. The robot detection event handler is
called if no higher priority events are occurring when a call to
scan detects another robot.
Robot detection events are triggered by the _dtcrobot variable. When a
robot detection event handler
completes, the _dtcrobot variable is automatically decremented by one potentially
ending the event.
Detection variables are counters so that the scan command is able to trigger
another event when called before the detection event handler completes.
When scan detects any obstacle the following system variables are also updated to provide information about the obstacle: _dtcbearing, _dtcheading, _dtcenergy, _dtcid, and _dtcteamid. Robots only track information about the most recent detection event, causing all _dtc variables to be reset for each detection.
The priority value should be a whole number, decimals are ignored. Lower numbers are higher priority. The highest priority possible is 1. If two events registered with the same priority occur at the same time, it is unspecified which event handler will be called.
When an event handler is registered or re-registered, it becomes immediately active. Use the dtcrobotevents command to temporarily deactivate a registered event handler.
See Also
dtcrobotevents, _dtcrobot, _dtcbearing, _dtcheading, _dtcenergy, _dtcid, _dtcteamid, event summary