All Packages Class Hierarchy This Package Previous Next Index
Class EDU.gatech.cc.is.abstractrobot.TransceiverSim
java.lang.Object
|
+----EDU.gatech.cc.is.abstractrobot.TransceiverSim
- public class TransceiverSim
- extends Object
Implements the Transceiver interface. You can use
objects of this class in your simulated robot code to easily
implement the Transceiver interface for the robot.
Copyright
(c)1997, 1998 Tucker Balch
- Version:
- $Revision: 1.3 $
- Author:
- Tucker Balch
-
BUF_SIZE
- The maximum number of messages the receive buffer can hold.
-
DEBUG
-
-
TransceiverSim(SimulatedObject, Simple)
- Instantiate a TransceiverSim object.
-
broadcast(Message, SimulatedObject[])
- Transmit a message to all teammates but self.
-
connected()
- Check to see if the transceiver is connected to the server.
-
getReceiveChannel()
- Get an enumeration of the incoming messages.
-
multicast(int[], Message, SimulatedObject[])
- Transmit a message to a list of teammates.
-
receive(Message)
- Receive a message.
-
setCommunicationMaxRange(double)
- Set the maximum range at which a sensor reading should be considered
kin.
-
unicast(int, Message, SimulatedObject[])
- Transmit a message to just one teammate.
BUF_SIZE
public static final int BUF_SIZE
- The maximum number of messages the receive buffer can hold.
DEBUG
public static final boolean DEBUG
TransceiverSim
public TransceiverSim(SimulatedObject rs,
Simple r)
- Instantiate a TransceiverSim object.
- Parameters:
- r - SimulatedObject, the robot on which the Transceiver
resides.
multicast
public void multicast(int ids[],
Message m,
SimulatedObject all_objects[]) throws CommunicationException
- Transmit a message to a list of teammates. Transmission
to self 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.
broadcast
public void broadcast(Message m,
SimulatedObject all_objects[])
- Transmit a message to all teammates but self.
- Parameters:
- m - Message, the message to transmit.
unicast
public void unicast(int id,
Message m,
SimulatedObject all_objects[]) 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.
getReceiveChannel
public Enumeration getReceiveChannel()
- Get an enumeration of the incoming messages. The messages
are automatically buffered by the implementation.
You cannot count on all messages being delivered, unless
you read them as fast as they arrive.
- Returns:
- the Enumeration.
receive
public void receive(Message m)
- Receive a message.
- Parameters:
- m - the message.
setCommunicationMaxRange
public void setCommunicationMaxRange(double range)
- Set the maximum range at which a sensor reading should be considered
kin. Beyond this range, the readings are ignored.
- Parameters:
- range - the range in meters.
connected
public boolean connected()
- Check to see if the transceiver is connected to the server.
All Packages Class Hierarchy This Package Previous Next Index