C# 클래스 BrickPi.Sensors.EV3IRSensor

상속: INotifyPropertyChanged, ISensor
파일 보기 프로젝트 열기: Ellerbach/BrickPi 1 사용 예제들

공개 메소드들

메소드 설명
EV3IRSensor ( BrickPortSensor port ) : System

Initialize an EV3 IR Sensor

EV3IRSensor ( BrickPortSensor port, IRMode mode ) : System

Initializes an EV3 IS Sensor

EV3IRSensor ( BrickPortSensor port, IRMode mode, int timeout ) : System

Initialize an EV3 IR Sensor

GetSensorName ( ) : string
NumberOfModes ( ) : int
Read ( ) : int

Read the sensor value. The returned value depends on the mode. Distance in proximity mode. Remote command number in remote mode. Beacon location in seek mode.

ReadAsString ( ) : string

Reads the sensor value as a string.

ReadBeaconLocation ( ) : int

Gets the beacon location. This will change the mode to seek

ReadDistance ( ) : int

Read the distance of the sensor in CM (0-100). This will change mode to proximity

ReadRaw ( ) : int

Read the sensor value

ReadRemoteCommand ( ) : byte

Reads commands from the IR-Remote. This will change mode to remote

SelectNextMode ( ) : void
SelectPreviousMode ( ) : void
SelectedMode ( ) : string
UpdateSensor ( object state ) : void

Update the sensor and this will raised an event on the interface

비공개 메소드들

메소드 설명
OnPropertyChanged ( string name ) : void
StopTimerInternal ( ) : void

메소드 상세

EV3IRSensor() 공개 메소드

Initialize an EV3 IR Sensor
public EV3IRSensor ( BrickPortSensor port ) : System
port BrickPortSensor Sensor port
리턴 System

EV3IRSensor() 공개 메소드

Initializes an EV3 IS Sensor
public EV3IRSensor ( BrickPortSensor port, IRMode mode ) : System
port BrickPortSensor
mode IRMode IR mode
리턴 System

EV3IRSensor() 공개 메소드

Initialize an EV3 IR Sensor
public EV3IRSensor ( BrickPortSensor port, IRMode mode, int timeout ) : System
port BrickPortSensor Sensor port
mode IRMode IR mode
timeout int Period in millisecond to check sensor value changes
리턴 System

GetSensorName() 공개 메소드

public GetSensorName ( ) : string
리턴 string

NumberOfModes() 공개 메소드

public NumberOfModes ( ) : int
리턴 int

Read() 공개 메소드

Read the sensor value. The returned value depends on the mode. Distance in proximity mode. Remote command number in remote mode. Beacon location in seek mode.
public Read ( ) : int
리턴 int

ReadAsString() 공개 메소드

Reads the sensor value as a string.
public ReadAsString ( ) : string
리턴 string

ReadBeaconLocation() 공개 메소드

Gets the beacon location. This will change the mode to seek
public ReadBeaconLocation ( ) : int
리턴 int

ReadDistance() 공개 메소드

Read the distance of the sensor in CM (0-100). This will change mode to proximity
public ReadDistance ( ) : int
리턴 int

ReadRaw() 공개 메소드

Read the sensor value
public ReadRaw ( ) : int
리턴 int

ReadRemoteCommand() 공개 메소드

Reads commands from the IR-Remote. This will change mode to remote
public ReadRemoteCommand ( ) : byte
리턴 byte

SelectNextMode() 공개 메소드

public SelectNextMode ( ) : void
리턴 void

SelectPreviousMode() 공개 메소드

public SelectPreviousMode ( ) : void
리턴 void

SelectedMode() 공개 메소드

public SelectedMode ( ) : string
리턴 string

UpdateSensor() 공개 메소드

Update the sensor and this will raised an event on the interface
public UpdateSensor ( object state ) : void
state object
리턴 void