This article is automatically translated from Russian by Google Translator.
It implements communication between robots in the network by means of the mailbox mechanism.
Connects to the robot with a given IP address on a given port (or default port), gives it its on-board number, and registers with the "mailbox" network.
As parameters, you must specify the IP address of the robot and the port. If no port is specified, the default port is used.
Returns true
if the robot received a new message.
Returns the onboard number of the robot.
Sends a message after receiving a message.
The first parameter is the sender's onboard number, the second is the message itself.
Gets a new message or blocks script execution until the message arrives.
Sends the specified message to the robot with the specified board number (or all robots).
As a parameter, you must specify the on-board number of the robot to which you want to send the message and the message. If no on-board number is specified, the message is sent to all robots registered in the network.
Method
Description
Connects to the robot with a given IP address on a given port (or default port), gives it its on-board number, and registers with the "mailbox" network.
Returns true
if the robot received a new message.
Returns the onboard number of the robot.
Sends a message after receiving a message.
Gets a new message or blocks script execution until the message arrives.
Sends the specified message to the robot with the specified board number (or all robots).