C# Класс BrickPi.Sensors.EV3IRSensor

Наследование: INotifyPropertyChanged, ISensor
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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