public class RMIRemoteMotorPort extends java.rmi.server.UnicastRemoteObject implements RMIMotorPort
| Modifier | Constructor and Description |
|---|---|
protected |
RMIRemoteMotorPort(java.lang.String portName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
controlMotor(int power,
int mode)
Low-level method to control a motor.
|
int |
getTachoCount()
returns tachometer count
|
void |
resetTachoCount()
resets the tachometer count to 0;
|
void |
setPWMMode(int mode) |
clone, exportObject, exportObject, exportObject, unexportObjectprotected RMIRemoteMotorPort(java.lang.String portName)
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic void controlMotor(int power,
int mode)
throws java.rmi.RemoteException
RMIMotorPortcontrolMotor in interface RMIMotorPortpower - power from 0-100mode - defined in BasicMotorPort. 1=forward, 2=backward, 3=stop, 4=float.java.rmi.RemoteExceptionBasicMotorPort.FORWARD,
BasicMotorPort.BACKWARD,
BasicMotorPort.FLOAT,
BasicMotorPort.STOPpublic int getTachoCount()
throws java.rmi.RemoteException
RMIMotorPortgetTachoCount in interface RMIMotorPortjava.rmi.RemoteExceptionpublic void resetTachoCount()
throws java.rmi.RemoteException
RMIMotorPortresetTachoCount in interface RMIMotorPortjava.rmi.RemoteExceptionpublic void close()
throws java.rmi.RemoteException
close in interface RMIMotorPortjava.rmi.RemoteExceptionpublic void setPWMMode(int mode)
throws java.rmi.RemoteException
setPWMMode in interface RMIMotorPortjava.rmi.RemoteException