|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.gatech.cc.is.abstractrobot.TransceiverSim
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
Field Summary | |
static int |
BUF_SIZE
The maximum number of messages the receive buffer can hold. |
static boolean |
DEBUG
|
Constructor Summary | |
TransceiverSim(SimulatedObject rs,
Simple r)
Instantiate a TransceiverSim object. |
Method Summary | |
void |
broadcast(Message m,
SimulatedObject[] all_objects)
Transmit a message to all teammates but 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,
SimulatedObject[] all_objects)
Transmit a message to a list of teammates. |
void |
receive(Message m)
Receive a message. |
void |
setCommunicationMaxRange(double range)
Set the maximum range at which a sensor reading should be considered kin. |
void |
unicast(int id,
Message m,
SimulatedObject[] all_objects)
Transmit a message to just one teammate. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int BUF_SIZE
public static final boolean DEBUG
Constructor Detail |
public TransceiverSim(SimulatedObject rs, Simple r)
r
- SimulatedObject, the robot on which the Transceiver
resides.Method Detail |
public void multicast(int[] ids, Message m, SimulatedObject[] all_objects) throws CommunicationException
ids
- int[], the IDs of the agents to receive the message.m
- Message, the message to transmit.public void broadcast(Message m, SimulatedObject[] all_objects)
m
- Message, the message to transmit.public void unicast(int id, Message m, SimulatedObject[] all_objects) throws CommunicationException
id
- int, the ID of the agent to receive the message.m
- Message, the message to transmit.public CircularBufferEnumeration getReceiveChannel()
public void receive(Message m)
m
- the message.public void setCommunicationMaxRange(double range)
range
- the range in meters.public boolean connected()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |