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, unexportObject
protected RMIRemoteMotorPort(java.lang.String portName) throws java.rmi.RemoteException
java.rmi.RemoteException
public void controlMotor(int power, int mode) throws java.rmi.RemoteException
RMIMotorPort
controlMotor
in interface RMIMotorPort
power
- power from 0-100mode
- defined in BasicMotorPort
. 1=forward, 2=backward, 3=stop, 4=float.java.rmi.RemoteException
BasicMotorPort.FORWARD
,
BasicMotorPort.BACKWARD
,
BasicMotorPort.FLOAT
,
BasicMotorPort.STOP
public int getTachoCount() throws java.rmi.RemoteException
RMIMotorPort
getTachoCount
in interface RMIMotorPort
java.rmi.RemoteException
public void resetTachoCount() throws java.rmi.RemoteException
RMIMotorPort
resetTachoCount
in interface RMIMotorPort
java.rmi.RemoteException
public void close() throws java.rmi.RemoteException
close
in interface RMIMotorPort
java.rmi.RemoteException
public void setPWMMode(int mode) throws java.rmi.RemoteException
setPWMMode
in interface RMIMotorPort
java.rmi.RemoteException