Package lejos.remote.ev3
Class RMIRemoteMotorPort
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- lejos.remote.ev3.RMIRemoteMotorPort
-
- All Implemented Interfaces:
java.io.Serializable,java.rmi.Remote,RMIMotorPort
public class RMIRemoteMotorPort extends java.rmi.server.UnicastRemoteObject implements RMIMotorPort
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRMIRemoteMotorPort(java.lang.String portName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcontrolMotor(int power, int mode)Low-level method to control a motor.intgetTachoCount()returns tachometer countvoidresetTachoCount()resets the tachometer count to 0;voidsetPWMMode(int mode)-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
-
-
-
Method Detail
-
controlMotor
public void controlMotor(int power, int mode) throws java.rmi.RemoteExceptionDescription copied from interface:RMIMotorPortLow-level method to control a motor.- Specified by:
controlMotorin interfaceRMIMotorPort- Parameters:
power- power from 0-100mode- defined inBasicMotorPort. 1=forward, 2=backward, 3=stop, 4=float.- Throws:
java.rmi.RemoteException- See Also:
BasicMotorPort.FORWARD,BasicMotorPort.BACKWARD,BasicMotorPort.FLOAT,BasicMotorPort.STOP
-
getTachoCount
public int getTachoCount() throws java.rmi.RemoteExceptionDescription copied from interface:RMIMotorPortreturns tachometer count- Specified by:
getTachoCountin interfaceRMIMotorPort- Throws:
java.rmi.RemoteException
-
resetTachoCount
public void resetTachoCount() throws java.rmi.RemoteExceptionDescription copied from interface:RMIMotorPortresets the tachometer count to 0;- Specified by:
resetTachoCountin interfaceRMIMotorPort- Throws:
java.rmi.RemoteException
-
close
public void close() throws java.rmi.RemoteException- Specified by:
closein interfaceRMIMotorPort- Throws:
java.rmi.RemoteException
-
setPWMMode
public void setPWMMode(int mode) throws java.rmi.RemoteException- Specified by:
setPWMModein interfaceRMIMotorPort- Throws:
java.rmi.RemoteException
-
-