C# 클래스 CyrusBuilt.MonoPi.Components.Motors.MotorBase

Base class for motor abstraction components.
상속: ComponentBase, IMotor
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
Forward ( ) : void

Tells the motor to move forward.

Forward ( Int32 millis ) : void

Tells the motor to move forward for the specified amount of time.

IsState ( MotorState state ) : System.Boolean

Determines whether the motor's current state is the specified state.

Reverse ( ) : void

Tells the motor to reverse direction.

Reverse ( Int32 millis ) : void

Tells the motor to reverse direction for the specified amount of time.

Stop ( ) : void

Stops the motor's movement.

보호된 메소드들

메소드 설명
MotorBase ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Motors.MotorBase class. This is the default constructor.

OnMotorStateChanged ( MotorStateChangeEventArgs e ) : void

Raises the motor state changed event.

메소드 상세

Forward() 공개 메소드

Tells the motor to move forward.
public Forward ( ) : void
리턴 void

Forward() 공개 메소드

Tells the motor to move forward for the specified amount of time.
public Forward ( Int32 millis ) : void
millis System.Int32 /// The number of milliseconds to continue moving forward for. ///
리턴 void

IsState() 공개 메소드

Determines whether the motor's current state is the specified state.
public IsState ( MotorState state ) : System.Boolean
state MotorState /// The state to check for. ///
리턴 System.Boolean

MotorBase() 보호된 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Motors.MotorBase class. This is the default constructor.
protected MotorBase ( ) : System
리턴 System

OnMotorStateChanged() 보호된 메소드

Raises the motor state changed event.
protected OnMotorStateChanged ( MotorStateChangeEventArgs e ) : void
e MotorStateChangeEventArgs /// The event arguments. ///
리턴 void

Reverse() 공개 메소드

Tells the motor to reverse direction.
public Reverse ( ) : void
리턴 void

Reverse() 공개 메소드

Tells the motor to reverse direction for the specified amount of time.
public Reverse ( Int32 millis ) : void
millis System.Int32 /// The number of milliseconds to continue moving in reverse for. ///
리턴 void

Stop() 공개 메소드

Stops the motor's movement.
public Stop ( ) : void
리턴 void