regradio( 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 radio events. The radio event handler is called if no higher priority events are occurring when a robot receives a radio message from another robot.  

Radio events are triggered by the _radio variable. When a radio event handler completes, the _radio variable is automatically set to false causing the event to end. Received messages are places in the _radiocomm system variable. The _radiocomm variable fills with messages until the 26th message is received, at which point the _radiocomm variable will be automatically cleared when the robot's turn ends.  

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 radioevents command to temporarily deactivate a registered event handler.

See Also

radioevents, _radio, _radiocomm, event summary