C# Class BrickPi.Sensors.EV3IRSensor

Inheritance: INotifyPropertyChanged, ISensor
Afficher le fichier Open project: Ellerbach/BrickPi Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
OnPropertyChanged ( string name ) : void
StopTimerInternal ( ) : void

Method Details

EV3IRSensor() public méthode

Initialize an EV3 IR Sensor
public EV3IRSensor ( BrickPortSensor port ) : System
port BrickPortSensor Sensor port
Résultat System

EV3IRSensor() public méthode

Initializes an EV3 IS Sensor
public EV3IRSensor ( BrickPortSensor port, IRMode mode ) : System
port BrickPortSensor
mode IRMode IR mode
Résultat System

EV3IRSensor() public méthode

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
Résultat System

GetSensorName() public méthode

public GetSensorName ( ) : string
Résultat string

NumberOfModes() public méthode

public NumberOfModes ( ) : int
Résultat int

Read() public méthode

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
Résultat int

ReadAsString() public méthode

Reads the sensor value as a string.
public ReadAsString ( ) : string
Résultat string

ReadBeaconLocation() public méthode

Gets the beacon location. This will change the mode to seek
public ReadBeaconLocation ( ) : int
Résultat int

ReadDistance() public méthode

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

ReadRaw() public méthode

Read the sensor value
public ReadRaw ( ) : int
Résultat int

ReadRemoteCommand() public méthode

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

SelectNextMode() public méthode

public SelectNextMode ( ) : void
Résultat void

SelectPreviousMode() public méthode

public SelectPreviousMode ( ) : void
Résultat void

SelectedMode() public méthode

public SelectedMode ( ) : string
Résultat string

UpdateSensor() public méthode

Update the sensor and this will raised an event on the interface
public UpdateSensor ( object state ) : void
state object
Résultat void