|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The Transceiver class provides an abstract interface to the hardware of a robot that can communicate.
Copyright (c)1998 Georgia Tech Research Corporation
| Method Summary | |
void |
broadcast(Message m)
Broadcast a message to all teammates, except self. |
boolean |
connected()
Check to see if the transceiver is connected to the server. |
CircularBufferEnumeration |
getReceiveChannel()
Get an enumeration of the incoming messages. |
void |
multicast(int[] ids,
Message m)
Transmit a message to specific teammates. |
void |
quit()
Terminate the connection. |
void |
setCommunicationMaxRange(double r)
Set the maximum range at which communication can occur. |
void |
unicast(int id,
Message m)
Transmit a message to just one teammate. |
| Method Detail |
public void broadcast(Message m)
m - Message, the message to be broadcast.
public void unicast(int id,
Message m)
throws CommunicationException
id - int, the ID of the agent to receive the message.m - Message, the message to transmit.
public void multicast(int[] ids,
Message m)
throws CommunicationException
ids - int[], the IDs of the agents to receive the message.m - Message, the message to transmit.public CircularBufferEnumeration getReceiveChannel()
Transceiver c = new RobotComm(); Enumeration r = c.getReceiveChannel(); while (r.hasMoreElements()) System.out.println(r.nextElement());
public void setCommunicationMaxRange(double r)
r - double, the maximum range.public boolean connected()
public void quit()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||