public class RobocupServer extends Object
Trainer
is used for sending commands to RoboCup 3D simulation
soccer server with aim to set specific state on server.Modifier and Type | Field and Description |
---|---|
private RobocupServerAddress |
address |
private static Logger |
logger |
private static Map<String,RobocupServer> |
serverInstances |
private Socket |
socket |
Modifier | Constructor and Description |
---|---|
private |
RobocupServer(RobocupServerAddress address) |
Modifier and Type | Method and Description |
---|---|
static RobocupServer |
getServerInstance() |
static RobocupServer |
getServerInstance(RobocupServerAddress address) |
private void |
performCommand(RobocupServerCommand command) |
void |
setAgentPosition(AgentData agentData,
Point3D position) |
void |
setAgentPosition(String team,
int playerid,
Point3D position) |
void |
setBall(Point3D position,
Point3D velocity) |
void |
setBallPosition(Point3D position) |
void |
setBallVelocity(Point3D velocity) |
void |
setPlayMode(PlayMode mode) |
private static Logger logger
private RobocupServerAddress address
private Socket socket
private static Map<String,RobocupServer> serverInstances
private RobocupServer(RobocupServerAddress address) throws IOException
IOException
public static RobocupServer getServerInstance() throws IOException
IOException
public static RobocupServer getServerInstance(RobocupServerAddress address) throws IOException
IOException
private void performCommand(RobocupServerCommand command) throws IOException
IOException
public void setAgentPosition(AgentData agentData, Point3D position) throws IOException
IOException
public void setAgentPosition(String team, int playerid, Point3D position) throws IOException
IOException
public void setBallPosition(Point3D position) throws IOException
IOException
public void setBallVelocity(Point3D velocity) throws IOException
IOException
public void setBall(Point3D position, Point3D velocity) throws IOException
IOException
public void setPlayMode(PlayMode mode) throws IOException
IOException