khepera
Class KheperaConnection
java.lang.Object
|
+--khepera.KheperaConnection
- Direct Known Subclasses:
- RoboWorldConnection, SerialConnection, TestConnection
- public abstract class KheperaConnection
- extends java.lang.Object
This abstract class is the foundation of the interface between a Khepera, in any form, and
the Khepera class.
- Version:
- 1.1
- Author:
- Pär Spjuth
|
Method Summary |
abstract void |
close()
Should be implemented to close the connection. |
abstract void |
open(java.lang.String robotName)
Should be implemented to open the connection. |
abstract java.lang.String |
send(java.lang.String command)
Should be implemented to send the command (which do not include line-feed) and
wait for the robot response returning it without the trailing line-feed. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KheperaConnection
public KheperaConnection()
open
public abstract void open(java.lang.String robotName)
throws KheperaException
- Should be implemented to open the connection.
- Parameters:
robotName - The name of the robot.- Throws:
KheperaCommunicationException - When a communications error occurs.
close
public abstract void close()
throws KheperaException
- Should be implemented to close the connection.
- Throws:
KheperaCommunicationException - When a communications error occurs.
send
public abstract java.lang.String send(java.lang.String command)
throws KheperaException
- Should be implemented to send the command (which do not include line-feed) and
wait for the robot response returning it without the trailing line-feed.
- Returns:
- The robot response.
- Throws:
KheperaCommunicationException - When a communications error occurs.