roomba.roombanetwork.server
Class ErrorHandler
java.lang.Object
roomba.roombanetwork.server.ErrorHandler
public class ErrorHandler
- extends java.lang.Object
Handles any messages that produce an error
- Author:
- Drew Housten
|
Method Summary |
void |
handleMessage(java.lang.String messageType,
int errorCode,
java.lang.String[] messageComponents)
Handles an incoming message |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERROR_OK
public static final int ERROR_OK
- See Also:
- Constant Field Values
ERROR_INVALIDMESSAGE
public static final int ERROR_INVALIDMESSAGE
- See Also:
- Constant Field Values
ERROR_NUMBERFORMAT
public static final int ERROR_NUMBERFORMAT
- See Also:
- Constant Field Values
ERROR_UNKNOWNMESSAGETYPE
public static final int ERROR_UNKNOWNMESSAGETYPE
- See Also:
- Constant Field Values
ERROR_INCORRECTPROTOCOLVERSION
public static final int ERROR_INCORRECTPROTOCOLVERSION
- See Also:
- Constant Field Values
ERROR_INVALIDNUMBEROFFIELDS
public static final int ERROR_INVALIDNUMBEROFFIELDS
- See Also:
- Constant Field Values
ERROR_DISCONNECTEDCLIENT
public static final int ERROR_DISCONNECTEDCLIENT
- See Also:
- Constant Field Values
ERROR_UNKNOWNSENDER
public static final int ERROR_UNKNOWNSENDER
- See Also:
- Constant Field Values
ERROR_INVALIDNUMBEROFSENSORS
public static final int ERROR_INVALIDNUMBEROFSENSORS
- See Also:
- Constant Field Values
ERROR_UNEXPECTEDMESSAGE
public static final int ERROR_UNEXPECTEDMESSAGE
- See Also:
- Constant Field Values
ERROR_INVALIDNUMBEROFACTUATORS
public static final int ERROR_INVALIDNUMBEROFACTUATORS
- See Also:
- Constant Field Values
ERROR_INVALIDSENDERID
public static final int ERROR_INVALIDSENDERID
- See Also:
- Constant Field Values
ErrorHandler
public ErrorHandler(RoombaNetworkServer rns)
- Constructor
- Parameters:
rns - The Roomba Network Server that should be used to send
outgoing messages
handleMessage
public void handleMessage(java.lang.String messageType,
int errorCode,
java.lang.String[] messageComponents)
- Handles an incoming message
- Parameters:
messageType - The message type of the message. If the message
type can not be determined, a type of "Unknown" should be usederrorCode - The error code that has been reportedmessageComponents - The incoming message components