#include <Radio.h>
Public Member Functions | |
bool | initialize () |
bool | send (BYTE id, int byteCount, BYTE *message) |
int | checkForMessages () |
void | receive (BYTE *id, int *receivedBytes, BYTE *message) |
void | getActiveRobots (bool active[]) |
int | getMyID () |
int | getCurrentMasterID () |
Static Public Member Functions | |
Radio * | getRadio () |
Protected Member Functions | |
Radio () | |
~Radio () | |
bool | terminate () |
Static Private Attributes | |
Radio | radios [NUMBER_OF_ROBOTS] |
|
|
|
|
|
Checks if there are any messages in the buffer
|
|
Returns an array that indicates which robots in the vicinity are active and can be contacted. The value at an array position is true if that robot is active. The array index equals the id of that robot
|
|
Returns the ID of the robot that is currently the master
|
|
Returns the ID of this robot
|
|
This method is used to get the instance of this singleton class
|
|
Initializes the radio for usage. Should automatically be called by the constructor. But as the EyeSim simulator is not able to execute RoBIOS library functions in class constructors, we have declared this method as public and need to call this method manually in main
|
|
Gets a message from the message buffer. If there are no messages in the buffer the calling thread will be blocked until a message is received. It is suggested to call Radio::checkForMessages() before calling this method The message buffer must have room for MSGMAXLEN (defined in eyebot.h) bytes
|
|
Sends a message
|
|
Terminates the radio communication. Is automatically called by the destructor
|
|
The single instance that exists of this class
|