jp.digitalmuseum.mr.resource
クラス DifferentialWheelsAbstractImpl

java.lang.Object
  上位を拡張 jp.digitalmuseum.mr.entity.ResourceAbstractImpl
      上位を拡張 jp.digitalmuseum.mr.entity.PhysicalResourceAbstractImpl
          上位を拡張 jp.digitalmuseum.mr.resource.DifferentialWheelsAbstractImpl
すべての実装されたインタフェース:
java.io.Serializable, ExclusiveResource, Resource, DifferentialWheels, DifferentialWheelsController, Wheels, WheelsController
直系の既知のサブクラス:
MindstormsNXT.MindstormsNXTDifferentialWheels, Mini.MiniWheels, NetTansor.NetTansorDriver, Noopy2.NoopyWheels, Roomba.RoombaDriver

public abstract class DifferentialWheelsAbstractImpl
extends PhysicalResourceAbstractImpl
implements DifferentialWheelsController
関連項目:
直列化された形式

入れ子のクラスの概要
 
インタフェース jp.digitalmuseum.mr.resource.Wheels から継承された入れ子のクラス/インタフェース
Wheels.Spin, Wheels.WheelsStatus
 
コンストラクタの概要
DifferentialWheelsAbstractImpl(Connector connector)
           
DifferentialWheelsAbstractImpl(PhysicalRobotAbstractImpl robot)
           
 
メソッドの概要
 void curve(Wheels.Spin spin, int innerSpeed)
          Go forward and rotate left/right.
 void curveLeft(int innerSpeed)
          Go forward and rotate left.
 void curveRight(int innerSpeed)
          Go forward and rotate right.
protected abstract  boolean doDrive(int leftPower, int rightPower)
           
protected abstract  boolean doStopWheels()
           
 boolean drive(int leftPower, int rightPower)
          Drive two wheels with given set of power.
 int getLeftWheelPower()
          Get the current power of the left motor.
 int getRightWheelPower()
          Get the current power of the right motor.
 int getRotationSpeed()
          Get the current power of the motor to rotate.
 int getSpeed()
          Get the current power of the motor.
 Wheels.WheelsStatus getStatus()
          Get status of the wheels.
 void goBackward()
          Go backward.
 void goForward()
          Go forward.
protected  void initialize()
           
protected  void onFree()
          Called when disposing this resource.
Caution: This method should not be called outside this class.
 boolean setRotationSpeed(int rotationSpeed)
          Change the power of the motor to rotate.
 boolean setSpeed(int speed)
          Change the power of the motor.
protected  void setStatus(Wheels.WheelsStatus status)
           
 void spin(Wheels.Spin spin)
          Spin left/right.
 void spinLeft()
          Spin left.
 void spinRight()
          Spin right.
 void stopWheels()
          Stop.
 
クラス jp.digitalmuseum.mr.entity.PhysicalResourceAbstractImpl から継承されたメソッド
getConnector, setConnector
 
クラス jp.digitalmuseum.mr.entity.ResourceAbstractImpl から継承されたメソッド
getConfigurationComponent, getReaders, getRobot, getWriter, isWritable, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース jp.digitalmuseum.mr.resource.DifferentialWheels から継承されたメソッド
getRecommendedRotationSpeed, getRecommendedSpeed
 
インタフェース jp.digitalmuseum.mr.entity.ExclusiveResource から継承されたメソッド
getWriter, isWritable
 
インタフェース jp.digitalmuseum.mr.entity.Resource から継承されたメソッド
getConfigurationComponent, getReaders, getRobot
 
コンストラクタの詳細

DifferentialWheelsAbstractImpl

public DifferentialWheelsAbstractImpl(PhysicalRobotAbstractImpl robot)

DifferentialWheelsAbstractImpl

public DifferentialWheelsAbstractImpl(Connector connector)
メソッドの詳細

initialize

protected void initialize()

onFree

protected void onFree()
クラス ResourceAbstractImpl の記述:
Called when disposing this resource.
Caution: This method should not be called outside this class.
オーバーライド:
クラス ResourceAbstractImpl 内の onFree
関連項目:
ResourceAbstractImpl.free(Object)

getStatus

public Wheels.WheelsStatus getStatus()
インタフェース Wheels の記述:
Get status of the wheels.
定義:
インタフェース Wheels 内の getStatus

setStatus

protected void setStatus(Wheels.WheelsStatus status)

getSpeed

public int getSpeed()
インタフェース DifferentialWheels の記述:
Get the current power of the motor.
定義:
インタフェース DifferentialWheels 内の getSpeed

setSpeed

public boolean setSpeed(int speed)
インタフェース DifferentialWheelsController の記述:
Change the power of the motor.
定義:
インタフェース DifferentialWheelsController 内の setSpeed

getRotationSpeed

public int getRotationSpeed()
インタフェース DifferentialWheels の記述:
Get the current power of the motor to rotate.
定義:
インタフェース DifferentialWheels 内の getRotationSpeed

setRotationSpeed

public boolean setRotationSpeed(int rotationSpeed)
インタフェース DifferentialWheelsController の記述:
Change the power of the motor to rotate.
定義:
インタフェース DifferentialWheelsController 内の setRotationSpeed

getLeftWheelPower

public int getLeftWheelPower()
インタフェース DifferentialWheels の記述:
Get the current power of the left motor.
定義:
インタフェース DifferentialWheels 内の getLeftWheelPower

getRightWheelPower

public int getRightWheelPower()
インタフェース DifferentialWheels の記述:
Get the current power of the right motor.
定義:
インタフェース DifferentialWheels 内の getRightWheelPower

goForward

public void goForward()
インタフェース WheelsController の記述:
Go forward.
定義:
インタフェース WheelsController 内の goForward

goBackward

public void goBackward()
インタフェース WheelsController の記述:
Go backward.
定義:
インタフェース WheelsController 内の goBackward

spin

public void spin(Wheels.Spin spin)
インタフェース WheelsController の記述:
Spin left/right.
定義:
インタフェース WheelsController 内の spin

spinLeft

public void spinLeft()
インタフェース WheelsController の記述:
Spin left.
定義:
インタフェース WheelsController 内の spinLeft

spinRight

public void spinRight()
インタフェース WheelsController の記述:
Spin right.
定義:
インタフェース WheelsController 内の spinRight

curve

public void curve(Wheels.Spin spin,
                  int innerSpeed)
インタフェース DifferentialWheelsController の記述:
Go forward and rotate left/right.
定義:
インタフェース DifferentialWheelsController 内の curve

curveLeft

public void curveLeft(int innerSpeed)
インタフェース DifferentialWheelsController の記述:
Go forward and rotate left.
定義:
インタフェース DifferentialWheelsController 内の curveLeft

curveRight

public void curveRight(int innerSpeed)
インタフェース DifferentialWheelsController の記述:
Go forward and rotate right.
定義:
インタフェース DifferentialWheelsController 内の curveRight

stopWheels

public void stopWheels()
インタフェース WheelsController の記述:
Stop.
定義:
インタフェース WheelsController 内の stopWheels

drive

public boolean drive(int leftPower,
                     int rightPower)
インタフェース DifferentialWheelsController の記述:
Drive two wheels with given set of power.
定義:
インタフェース DifferentialWheelsController 内の drive

doDrive

protected abstract boolean doDrive(int leftPower,
                                   int rightPower)

doStopWheels

protected abstract boolean doStopWheels()


Copyright by Jun KATO (arc@dmz) at https://mr.digitalmuseum.jp/