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

Method Index

 o broadcast(Message)
Broadcast a message to all teammates, except self.
 o connected()
Check to see if the transceiver is connected to the server.
 o getReceiveChannel()
Get an enumeration of the incoming messages.
 o multicast(int[], Message)
Transmit a message to specific teammates.
 o setCommunicationMaxRange(double)
Set the maximum range at which communication can occur.
 o unicast(int, Message)
Transmit a message to just one teammate.

Methods

 o broadcast
 public abstract void broadcast(Message m)
Broadcast a message to all teammates, except self.

Parameters:
m - Message, the message to be broadcast.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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