#include <CSWTransceiver.h>
Public Member Functions | |
int | getMaxNumQueuedMessages () const |
int | getNumQueuedMessages () const |
void | send (const std::string &strMessage) |
std::string | getFirstReceived () |
Public Member Functions inherited from CodeSubWars::CSWEquipment | |
bool | isMoving () const |
Public Member Functions inherited from CodeSubWars::CSWObject | |
const std::string & | getName () const |
This class encapsulates transceiver functionality. With this you can send and receive broadcast messages. The last 100 received text messages are queued until they fetched with getFirstReceived.
std::string CodeSubWars::CSWTransceiver::getFirstReceived | ( | ) |
Returns the first (the oldest in the queue) received text and removes it from internal queue. If no text is available "" is returned.
int CodeSubWars::CSWTransceiver::getMaxNumQueuedMessages | ( | ) | const |
Returns the maximal number of messages that will be queued.
int CodeSubWars::CSWTransceiver::getNumQueuedMessages | ( | ) | const |
Returns the current queued number of messages.
void CodeSubWars::CSWTransceiver::send | ( | const std::string & | strMessage | ) |
Sends a given text to all eventdealable objects within the world, but not to itself.
strMessage | The text that should be sent. |