khepera
Class TestConnection
java.lang.Object
|
+--khepera.KheperaConnection
|
+--khepera.TestConnection
- public class TestConnection
- extends KheperaConnection
This class only exists for test purposes. It will simulate a Khepera by making the motors react to commands
sending data back trough the motion sensors (ie. the controller can see how the Khepera think it moves). It will
also use a sin/cos function to simulate dummy sensor input. The current state of the simulated Khepera is presented
in the connection window (which will close the connection if closed):

Note
Currently no extension turrets are supported.
- Version:
- 0.8
- Author:
- Pär Spjuth
|
Constructor Summary |
TestConnection()
Creates a new dummy Khepera connection used for testing software functionality. |
|
Method Summary |
void |
close()
Closes the connection and the status window. |
void |
open(java.lang.String robotName)
Opens the connection and displays the status window. |
java.lang.String |
send(java.lang.String command)
Parses the command and sends back useful simulated responses. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestConnection
public TestConnection()
- Creates a new dummy Khepera connection used for testing software functionality.
open
public void open(java.lang.String robotName)
throws KheperaException
- Opens the connection and displays the status window.
- Overrides:
open in class KheperaConnection
- Parameters:
robotName - Name of your simulated robot.- Throws:
KheperaException - Never thrown since the Khepera is only simulated.
close
public void close()
throws KheperaException
- Closes the connection and the status window. The connection can be reopened using
open(String)
- Overrides:
close in class KheperaConnection
- Throws:
KheperaException - Never thrown since the Khepera is only simulated.
send
public java.lang.String send(java.lang.String command)
throws KheperaException
- Parses the command and sends back useful simulated responses.
- Overrides:
send in class KheperaConnection
- Parameters:
command - Robot control command. Not all of the Khepera commands are supported.- Throws:
KheperaException - If an invalid command is sent or the command is not supported.