All Packages Class Hierarchy This Package Previous Next Index
Interface EDU.gatech.cc.is.communication.Transceiver
- public interface Transceiver
The Transceiver class provides an abstract interface to the
hardware of a robot that can communicate.
Copyright
(c)1998 Georgia Tech Research Corporation
- Version:
- $Revision: 1.2 $
- Author:
- Tucker Balch
-
broadcast(Message)
- Broadcast a message to all teammates, except self.
-
connected()
- Check to see if the transceiver is connected to the server.
-
getReceiveChannel()
- Get an enumeration of the incoming messages.
-
multicast(int[], Message)
- Transmit a message to specific teammates.
-
setCommunicationMaxRange(double)
- Set the maximum range at which communication can occur.
-
unicast(int, Message)
- Transmit a message to just one teammate.
broadcast
public abstract void broadcast(Message m)
- Broadcast a message to all teammates, except self.
- Parameters:
- m - Message, the message to be broadcast.
unicast
public abstract void unicast(int id,
Message m) throws CommunicationException
- Transmit a message to just one teammate. Transmission to
self is allowed.
- Parameters:
- id - int, the ID of the agent to receive the message.
- m - Message, the message to transmit.
- Throws: CommunicationException
- if the receiving agent does not
exist.
multicast
public abstract void multicast(int ids[],
Message m) throws CommunicationException
- Transmit a message to specific teammates. Transmission to
self is allowed.
- Parameters:
- ids - int[], the IDs of the agents to receive the message.
- m - Message, the message to transmit.
- Throws: CommunicationException
- if one of the receiving agents
does not exist.
getReceiveChannel
public abstract Enumeration getReceiveChannel()
- Get an enumeration of the incoming messages. The messages
are automatically buffered by the implementation.
Unless the implementation guarantees it, you cannot
count on all messages being delivered.
Example, to print all incoming messages:
Transceiver c = new RobotComm();
Enumeration r = c.getReceiveChannel();
while (r.hasMoreElements())
System.out.println(r.nextElement());
- Returns:
- the Enumeration.
setCommunicationMaxRange
public abstract void setCommunicationMaxRange(double r)
- Set the maximum range at which communication can occur.
In simulation, this corresponds to a simulation of physical limits,
on mobile robots it corresponds to a signal strength setting.
- Parameters:
- r - double, the maximum range.
connected
public abstract boolean connected()
- Check to see if the transceiver is connected to the server.
All Packages Class Hierarchy This Package Previous Next Index