public class AgentProxy extends AbstractKernelComponent
Constructor and Description |
---|
AgentProxy(java.lang.String name,
Entity e,
Connection c)
Construct an agent.
|
Modifier and Type | Method and Description |
---|---|
protected void |
commandReceived(Command c)
Register an agent command received.
|
java.util.Collection<Command> |
getAgentCommands(int timestep)
Get all agent commands at a particular time.
|
Entity |
getControlledEntity()
Get the entity controlled by this agent.
|
void |
sendPerceptionUpdate(int time,
ChangeSet visible,
java.util.Collection<? extends Command> heard)
Notify the of a perception update.
|
java.lang.String |
toString() |
getConnection, getName, send, send, shutdown
public AgentProxy(java.lang.String name, Entity e, Connection c)
name
- The name of the controlling agent.e
- The entity controlled by the agent.c
- The connection to the agent.public java.lang.String toString()
toString
in class java.lang.Object
public Entity getControlledEntity()
public java.util.Collection<Command> getAgentCommands(int timestep)
timestep
- The current timestep.public void sendPerceptionUpdate(int time, ChangeSet visible, java.util.Collection<? extends Command> heard)
time
- The current timestep.visible
- The set of visible changes.heard
- The set of communication messages that the agent heard.protected void commandReceived(Command c)
c
- The command that was received.