EDU.gatech.cc.is.abstractrobot
Class SimpleN150Sim

java.lang.Object
  |
  +--EDU.gatech.cc.is.abstractrobot.Simple
        |
        +--EDU.gatech.cc.is.abstractrobot.SimpleN150Sim
Direct Known Subclasses:
CommN150Sim, MultiForageN150Sim

public class SimpleN150Sim
extends Simple
implements SimpleN150, SimulatedObject

SimpleN150Sim implements SimpleN150 for simulation. Also includes code implementing communication, gripper and vision.

Copyright (c)1998 Tucker Balch

See Also:
SimpleN150

Field Summary
protected  java.awt.Color background
           
protected  double base_speed
           
protected  double bottom
           
static boolean DEBUG
           
protected  java.awt.Color foreground
           
protected  double left
           
protected  Vec2 position
           
protected  double right
           
protected  Vec2 steer
           
protected  double top
           
 
Fields inherited from class EDU.gatech.cc.is.abstractrobot.Simple
dictionary, displayVectors, unique_id
 
Fields inherited from interface EDU.gatech.cc.is.abstractrobot.SimpleN150
MAX_STEER, MAX_TRANSLATION, MAX_TURRET, RADIUS, SONAR_RADIUS
 
Constructor Summary
SimpleN150Sim()
          Instantiate a SimpleN150Sim object.
 
Method Summary
 void broadcast(Message m)
           
 boolean checkCollision(Circle2 c)
          determine if the object is intersecting with a specified circle.
 boolean checkCollision(Polygon2 p)
          determine if the object is intersecting with a specified polygon.
 void clearTrail()
          Clear the trail.
 boolean connected()
           
 void draw(java.awt.Graphics g, int w, int h, double t, double b, double l, double r)
          Draw the robot.
 void draw(Vec2 pos, java.awt.Graphics g, int w, int h, double t, double b, double l, double r)
          Draw the robot in a specific spot.
 void drawIcon(java.awt.Graphics g, int w, int h, double t, double b, double l, double r)
          Draw the object as an icon.
 void drawID(java.awt.Graphics g, int w, int h, double t, double b, double l, double r)
          Draw the robot's ID.
 void drawState(java.awt.Graphics g, int w, int h, double t, double b, double l, double r)
          Draw the robot's state.
 void drawTrail(java.awt.Graphics g, int w, int h, double t, double b, double l, double r)
          Draw the robot's Trail.
 java.awt.Color getBackgroundColor()
          Gets the background color of the robot.
 Vec2 getCenter(Vec2 from)
          Find the center point of the object from a particular location.
 Vec2 getClosestPoint(Vec2 from)
          Find the closest point on the object from a particular location.
 java.awt.Color getForegroundColor()
          Gets the foreground color of the robot.
 int getObjectInGripper(long timestamp)
          Get the kind of object in the gripper.
 Vec2[] getObstacles(long timestamp)
          Get an array of Vec2s that point egocentrically from the center of the robot to the obstacles currently sensed by the bumpers and sonars.
 Vec2[] getOpponents(long timestamp)
          Get an array of Vec2s that point egocentrically from the center of the robot to the opponents currently sensed by the robot
 int getPlayerNumber(long timestamp)
          Return an int represting the player's ID on the team.
 Vec2 getPosition()
          Get the position of the robot in global coordinates.
 Vec2 getPosition(long timestamp)
          Get the position of the robot in global coordinates.
 CircularBufferEnumeration getReceiveChannel()
           
 double getSteerHeading(long timestamp)
          Get the current heading of the steering motor.
 Vec2[] getTeammates(long timestamp)
          Get an array of Vec2s that point egocentrically from the center of the robot to the teammates currently sensed by the robot.
 long getTime()
          Gets time elapsed since the robot was instantiated.
 double getTurretHeading(long timestamp)
          Get the current heading of the turret motor.
 int getVisionClass()
          Return the vision class of the object.
 double[] getVisualAxes(long timestamp, int channel)
          NOT IMPLEMENTED: Get an array of doubles that represent the major axis orientation of the visually sensed objects.
 Vec2[] getVisualObjects(long timestamp, int channel)
          Get an array of Vec2s that represent the locations of visually sensed objects egocentrically from center of the robot to the objects currently sensed by the vision system.
 double[] getVisualSizes(long timestamp, int channel)
          NOT IMPLEMENTED: Get an array of doubles that represent an estimate of the size in square meters of the visually sensed objects.
 void init(double xp, double yp, double tp, double ignore, java.awt.Color f, java.awt.Color b, int v, int i, long s)
          Initialize a SimpleN150Sim object.
 boolean isObstacle()
          true if the object should be considered an obstacle, false otherwise.
 boolean isPickupable()
          true if the object can be picked up, false otherwise.
 boolean isPushable()
          true if the object is pushable false otherwise.
 void multicast(int[] ids, Message m)
           
 void pickUp(SimulatedObject o)
          Try to pick up the object.
 void push(Vec2 d, Vec2 v)
          Try to push the object.
 void putDown(Vec2 p)
          Try to put down the object.
 void quit()
          Clean up.
 void receive(Message m)
          Receive a message.
 void resetPosition(Vec2 posit)
          Reset the odometry of the robot in global coordinates.
 void resetSteerHeading(double heading)
          Reset the steering odometry of the robot in global coordinates.
 void resetTurretHeading(double heading)
          Reset the turret odometry of the robot in global coordinates.
 void setBaseSpeed(double speed)
          Set the base speed for the robot (translation) in meters per second.
 void setCommunicationMaxRange(double m)
           
 void setDisplayString(java.lang.String s)
          Set the String that is printed on the robot's display.
 void setGripperFingers(long timestamp, double grip)
          0 closed 1 open.
 void setGripperHeight(long timestamp, double position)
          NOT IMPLEMENTED
 void setKinMaxRange(double range)
          Set the maximum range at which a sensor reading should be considered kin.
 void setObstacleMaxRange(double range)
          Set the maximum range at which a sensor reading should be considered an obstacle.
 void setSpeed(long timestamp, double speed)
          Set the desired speed for the robot (translation).
 void setSteerHeading(long timestamp, double heading)
          Set the desired heading for the steering motor.
 void setTrailLength(int l)
          Set the length of the trail (in movement steps).
 void setTurretHeading(long timestamp, double heading)
          Set the desired heading for the turret motor.
 void setVisionClass(int v)
          Change the way the object is perceived by vision hardware.
 void setVisionNoise(double mean, double stddev, long seed)
          this is a dummy implementation to keep compatibility with VisualSensorObject.
 void takeStep(long time_increment, SimulatedObject[] all_objs)
          Take a simulated step.
 void unicast(int id, Message m)
           
 
Methods inherited from class EDU.gatech.cc.is.abstractrobot.Simple
getDictionary, getID, getID, setDictionary, setID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

position

protected Vec2 position

steer

protected Vec2 steer

foreground

protected java.awt.Color foreground

background

protected java.awt.Color background

left

protected double left

right

protected double right

top

protected double top

bottom

protected double bottom

DEBUG

public static final boolean DEBUG

base_speed

protected double base_speed
Constructor Detail

SimpleN150Sim

public SimpleN150Sim()
Instantiate a SimpleN150Sim object. Be sure to also call init with proper values.
See Also:
init(double, double, double, double, java.awt.Color, java.awt.Color, int, int, long)
Method Detail

init

public void init(double xp,
                 double yp,
                 double tp,
                 double ignore,
                 java.awt.Color f,
                 java.awt.Color b,
                 int v,
                 int i,
                 long s)
Initialize a SimpleN150Sim object.
Specified by:
init in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
x - the initial x position.
y - the initial y position.
t - orientation.
r - radius.
fg - the foreground color of the object when drawn.
bg - the background color of the object when drawn.
vc - the vision class of the object - for use by simulated vision.
id - a unique ID number fore the object.
s - random number seed.

takeStep

public void takeStep(long time_increment,
                     SimulatedObject[] all_objs)
Description copied from interface: SimulatedObject
Take a simulated step.
Specified by:
takeStep in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
time_increment - how much time has elapsed since the last call.
all_objects - the other objects in the simulation.

isObstacle

public boolean isObstacle()
Description copied from interface: SimulatedObject
true if the object should be considered an obstacle, false otherwise.
Specified by:
isObstacle in interface SimulatedObject
Tags copied from interface: SimulatedObject
Returns:
true if the object should be considered an obstacle, false otherwise.

isPushable

public boolean isPushable()
Description copied from interface: SimulatedObject
true if the object is pushable false otherwise.
Specified by:
isPushable in interface SimulatedObject
Tags copied from interface: SimulatedObject
Returns:
true if the object is pushable, false otherwise.

isPickupable

public boolean isPickupable()
Description copied from interface: SimulatedObject
true if the object can be picked up, false otherwise.
Specified by:
isPickupable in interface SimulatedObject
Tags copied from interface: SimulatedObject
Returns:
true if the object can be picked up, false otherwise.

getClosestPoint

public Vec2 getClosestPoint(Vec2 from)
Description copied from interface: SimulatedObject
Find the closest point on the object from a particular location. This is useful for obstacle avoidance and so on.
Specified by:
getClosestPoint in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
from - the place from which the point is determined.
Returns:
the closest point.

getCenter

public Vec2 getCenter(Vec2 from)
Description copied from interface: SimulatedObject
Find the center point of the object from a particular location.
Specified by:
getCenter in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
from - the place from which the point is determined.
Returns:
the center point.

checkCollision

public boolean checkCollision(Circle2 c)
determine if the object is intersecting with a specified circle. This is useful for obstacle avoidance and so on.
Specified by:
checkCollision in interface SimulatedObject
Parameters:
c - the circle which may be intersecting the current object.
Returns:
true if collision detected.

checkCollision

public boolean checkCollision(Polygon2 p)
determine if the object is intersecting with a specified polygon. This is useful for obstacle avoidance and so on.
Specified by:
checkCollision in interface SimulatedObject
Parameters:
p - the polygon which may be intersecting the current object.
Returns:
true if collision detected.

push

public void push(Vec2 d,
                 Vec2 v)
Description copied from interface: SimulatedObject
Try to push the object.
Specified by:
push in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
d - the direction and distance of the push.
v - the velocity of the push.

pickUp

public void pickUp(SimulatedObject o)
Description copied from interface: SimulatedObject
Try to pick up the object.
Specified by:
pickUp in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
o - the object picking it up - this is used for drawing purposes.

putDown

public void putDown(Vec2 p)
Description copied from interface: SimulatedObject
Try to put down the object.
Specified by:
putDown in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
p - the location of deposit.

setVisionClass

public void setVisionClass(int v)
Description copied from interface: SimulatedObject
Change the way the object is perceived by vision hardware. This can be used to make old targets invisible (a simulation hack.... sorry).
Specified by:
setVisionClass in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
v - the new vision class.

getVisionClass

public int getVisionClass()
Description copied from interface: SimulatedObject
Return the vision class of the object.
Specified by:
getVisionClass in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
v - the new vision class.

drawID

public void drawID(java.awt.Graphics g,
                   int w,
                   int h,
                   double t,
                   double b,
                   double l,
                   double r)
Draw the robot's ID.
Specified by:
drawID in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
g - graphics area to draw the object.
w - the width in pixels of g.
h - the height in pixels of g.
t - the y coordinate represented by the top boundary of the drawing area.
b - the y coordinate represented by the bottom boundary of the drawing area.
l - the x coordinate represented by the left boundary of the drawing area.
r - the x coordinate represented by the right boundary of the drawing area.

drawIcon

public void drawIcon(java.awt.Graphics g,
                     int w,
                     int h,
                     double t,
                     double b,
                     double l,
                     double r)
Draw the object as an icon. Default is just to do a regular draw.
Specified by:
drawIcon in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
g - graphics area to draw the object.
w - the width in pixels of g.
h - the height in pixels of g.
t - the y coordinate represented by the top boundary of the drawing area.
b - the y coordinate represented by the bottom boundary of the drawing area.
l - the x coordinate represented by the left boundary of the drawing area.
r - the x coordinate represented by the right boundary of the drawing area.

drawTrail

public void drawTrail(java.awt.Graphics g,
                      int w,
                      int h,
                      double t,
                      double b,
                      double l,
                      double r)
Draw the robot's Trail.
Specified by:
drawTrail in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
g - graphics area to draw the object.
w - the width in pixels of g.
h - the height in pixels of g.
t - the y coordinate represented by the top boundary of the drawing area.
b - the y coordinate represented by the bottom boundary of the drawing area.
l - the x coordinate represented by the left boundary of the drawing area.
r - the x coordinate represented by the right boundary of the drawing area.

setDisplayString

public void setDisplayString(java.lang.String s)
Set the String that is printed on the robot's display. For simulated robots, this appears printed below the agent when view "Robot State" is selected.
Overrides:
setDisplayString in class Simple
Parameters:
s - String, the text to display.

drawState

public void drawState(java.awt.Graphics g,
                      int w,
                      int h,
                      double t,
                      double b,
                      double l,
                      double r)
Draw the robot's state.
Specified by:
drawState in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
g - graphics area to draw the object.
w - the width in pixels of g.
h - the height in pixels of g.
t - the y coordinate represented by the top boundary of the drawing area.
b - the y coordinate represented by the bottom boundary of the drawing area.
l - the x coordinate represented by the left boundary of the drawing area.
r - the x coordinate represented by the right boundary of the drawing area.

setTrailLength

public void setTrailLength(int l)
Set the length of the trail (in movement steps).
Specified by:
setTrailLength in interface SimulatedObject
Parameters:
l - int, the length of the trail.

clearTrail

public void clearTrail()
Clear the trail.
Specified by:
clearTrail in interface SimulatedObject

draw

public void draw(Vec2 pos,
                 java.awt.Graphics g,
                 int w,
                 int h,
                 double t,
                 double b,
                 double l,
                 double r)
Draw the robot in a specific spot.
Specified by:
draw in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
p - location to draw it at.
g - graphics area to draw the object.
w - the width in pixels of g.
h - the height in pixels of g.
t - the y coordinate represented by the top boundary of the drawing area.
b - the y coordinate represented by the bottom boundary of the drawing area.
l - the x coordinate represented by the left boundary of the drawing area.
r - the x coordinate represented by the right boundary of the drawing area.

draw

public void draw(java.awt.Graphics g,
                 int w,
                 int h,
                 double t,
                 double b,
                 double l,
                 double r)
Draw the robot.
Specified by:
draw in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
g - graphics area to draw the object.
w - the width in pixels of g.
h - the height in pixels of g.
t - the y coordinate represented by the top boundary of the drawing area.
b - the y coordinate represented by the bottom boundary of the drawing area.
l - the x coordinate represented by the left boundary of the drawing area.
r - the x coordinate represented by the right boundary of the drawing area.

quit

public void quit()
Clean up.
Specified by:
quit in interface SimulatedObject
Overrides:
quit in class Simple

getTime

public long getTime()
Gets time elapsed since the robot was instantiated. Since this is simulation, it may not match real elapsed time.
Overrides:
getTime in class Simple

getObstacles

public Vec2[] getObstacles(long timestamp)
Get an array of Vec2s that point egocentrically from the center of the robot to the obstacles currently sensed by the bumpers and sonars.
Overrides:
getObstacles in class Simple
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1 .
Returns:
the sensed obstacles.

setObstacleMaxRange

public void setObstacleMaxRange(double range)
Set the maximum range at which a sensor reading should be considered an obstacle. Beyond this range, the readings are ignored. The default range on startup is 1 meter.
Overrides:
setObstacleMaxRange in class Simple
Parameters:
range - the range in meters.

getVisualObjects

public Vec2[] getVisualObjects(long timestamp,
                               int channel)
Get an array of Vec2s that represent the locations of visually sensed objects egocentrically from center of the robot to the objects currently sensed by the vision system.
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1 .
channel - (1-6) which type/color of object to retrieve.
Returns:
the sensed objects.

setVisionNoise

public void setVisionNoise(double mean,
                           double stddev,
                           long seed)
this is a dummy implementation to keep compatibility with VisualSensorObject. at this point, vision noise is not built into the class. for an example, see SimpleCyeSim.

getVisualSizes

public double[] getVisualSizes(long timestamp,
                               int channel)
NOT IMPLEMENTED: Get an array of doubles that represent an estimate of the size in square meters of the visually sensed objects.
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1 .
channel - (1-6) which type/color of object to retrieve.
Returns:
the sizes of the sensed objects.

getVisualAxes

public double[] getVisualAxes(long timestamp,
                              int channel)
NOT IMPLEMENTED: Get an array of doubles that represent the major axis orientation of the visually sensed objects. 0 and PI are horizontal, PI/2 is vertical.
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1 .
channel - (1-6) which type/color of object to retrieve.
Returns:
the major axes of the sensed objects.

getObjectInGripper

public int getObjectInGripper(long timestamp)
Get the kind of object in the gripper.
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1 .
Returns:
channel (1-6) which type/color of object in the gripper, 0 otherwise.

getPosition

public Vec2 getPosition(long timestamp)
Get the position of the robot in global coordinates.
Overrides:
getPosition in class Simple
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1.
Returns:
the position.

getPosition

public Vec2 getPosition()
Get the position of the robot in global coordinates.
Specified by:
getPosition in interface SimulatedObject
Returns:
the position.

resetPosition

public void resetPosition(Vec2 posit)
Reset the odometry of the robot in global coordinates. This might be done when reliable sensor information provides a very good estimate of the robot's location, or if you are starting the robot in a known location other than (0,0). Do this only if you are certain you're right!
Overrides:
resetPosition in class Simple
Parameters:
position - the new position.

getSteerHeading

public double getSteerHeading(long timestamp)
Description copied from interface: SimpleInterface
Get the current heading of the steering motor.
Overrides:
getSteerHeading in class Simple
Tags copied from interface: SimpleInterface
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1.
Returns:
the heading in radians.
See Also:
Simple.setSteerHeading(long, double)

resetSteerHeading

public void resetSteerHeading(double heading)
Description copied from interface: SimpleInterface
Reset the steering odometry of the robot in global coordinates. This might be done when reliable sensor information provides a very good estimate of the robot's heading. Do this only if you are certain you're right!
Overrides:
resetSteerHeading in class Simple
Tags copied from interface: SimpleInterface
Parameters:
heading - the new heading in radians.
See Also:
Simple.getSteerHeading(long), Simple.setSteerHeading(long, double)

setSteerHeading

public void setSteerHeading(long timestamp,
                            double heading)
Description copied from interface: SimpleInterface
Set the desired heading for the steering motor.
Overrides:
setSteerHeading in class Simple
Tags copied from interface: SimpleInterface
Parameters:
heading - the heading in radians.
timestamp - only get new information if timestamp > than last call or timestamp == -1.
See Also:
Simple.getSteerHeading(long)

getTurretHeading

public double getTurretHeading(long timestamp)
Description copied from interface: SimpleN150
Get the current heading of the turret motor.
Specified by:
getTurretHeading in interface SimpleN150
Tags copied from interface: SimpleN150
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1.
Returns:
the turret heading in radians.
See Also:
SimpleN150.setTurretHeading(long, double), SimpleN150.resetTurretHeading(double)

resetTurretHeading

public void resetTurretHeading(double heading)
Description copied from interface: SimpleN150
Reset the turret odometry of the robot in global coordinates. This might be done when reliable sensor information provides a very good estimate of the robot's turret heading. Do this only if you are certain you're right!
Specified by:
resetTurretHeading in interface SimpleN150
Tags copied from interface: SimpleN150
Parameters:
heading - the new turret heading in radians.
See Also:
SimpleN150.getTurretHeading(long), SimpleN150.setTurretHeading(long, double)

setTurretHeading

public void setTurretHeading(long timestamp,
                             double heading)
Description copied from interface: SimpleN150
Set the desired heading for the turret motor.
Specified by:
setTurretHeading in interface SimpleN150
Tags copied from interface: SimpleN150
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1.
heading - the heading in radians.
See Also:
SimpleN150.getTurretHeading(long), SimpleN150.resetTurretHeading(double)

setSpeed

public void setSpeed(long timestamp,
                     double speed)
Description copied from interface: SimpleInterface
Set the desired speed for the robot (translation). The speed must be between 0 and 1; where 0 is stopped and 1.0 is "full blast". It will be clipped to whichever limit it exceeds. Also, underlying software will keep the actual speed at zero until the steering motor is close to the desired heading. Use setBaseSpeed to adjust the top speed.
Overrides:
setSpeed in class Simple
Tags copied from interface: SimpleInterface
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1.
speed - the desired speed from 0 to 1.0, where 1.0 is the base speed.
See Also:
Simple.setSteerHeading(long, double), Simple.setBaseSpeed(double)

setBaseSpeed

public void setBaseSpeed(double speed)
Description copied from interface: SimpleInterface
Set the base speed for the robot (translation) in meters per second. Base speed is how fast the robot will move when setSpeed(1.0) is called. The speed must be between 0 and MAX_TRANSLATION. It will be clipped to whichever limit it exceeds.
Overrides:
setBaseSpeed in class Simple
Tags copied from interface: SimpleInterface
Parameters:
speed - the desired speed from 0 to 1.0, where 1.0 is the base speed.
See Also:
Simple.setSpeed(long, double)

setGripperFingers

public void setGripperFingers(long timestamp,
                              double grip)
0 closed 1 open. -1 trigger mode.

getOpponents

public Vec2[] getOpponents(long timestamp)
Get an array of Vec2s that point egocentrically from the center of the robot to the opponents currently sensed by the robot
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1 .
Returns:
the sensed Opponents.

getPlayerNumber

public int getPlayerNumber(long timestamp)
Return an int represting the player's ID on the team. This value may not be valid if the simulation has not been "set up" yet. Do not use it during initialization.
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1 .
Returns:
the number.

getTeammates

public Vec2[] getTeammates(long timestamp)
Get an array of Vec2s that point egocentrically from the center of the robot to the teammates currently sensed by the robot.
Parameters:
timestamp - only get new information if timestamp > than last call or timestamp == -1 .
Returns:
the sensed teammates.

setKinMaxRange

public void setKinMaxRange(double range)
Set the maximum range at which a sensor reading should be considered kin. Beyond this range, the readings are ignored. Also used by opponent sensor. The default range on startup is 1 meter.
Parameters:
range - the range in meters.

getForegroundColor

public java.awt.Color getForegroundColor()
Description copied from interface: SimpleInterface
Gets the foreground color of the robot.
Overrides:
getForegroundColor in class Simple

getBackgroundColor

public java.awt.Color getBackgroundColor()
Description copied from interface: SimpleInterface
Gets the background color of the robot.
Overrides:
getBackgroundColor in class Simple

setGripperHeight

public void setGripperHeight(long timestamp,
                             double position)
NOT IMPLEMENTED

multicast

public void multicast(int[] ids,
                      Message m)
               throws CommunicationException

broadcast

public void broadcast(Message m)

unicast

public void unicast(int id,
                    Message m)
             throws CommunicationException

getReceiveChannel

public CircularBufferEnumeration getReceiveChannel()

setCommunicationMaxRange

public void setCommunicationMaxRange(double m)

receive

public void receive(Message m)
Description copied from interface: SimulatedObject
Receive a message. This is principally for robot to robot communication. Most objects can safely ignore this.
Specified by:
receive in interface SimulatedObject
Tags copied from interface: SimulatedObject
Parameters:
m - the message.

connected

public boolean connected()