C# Class BrickPi.Sensors.EV3UltraSonicSensor

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

Méthodes publiques

Méthode Description
EV3UltraSonicSensor ( BrickPortSensor port ) : System

Initialize an EV3 Ulrasonic sensor

EV3UltraSonicSensor ( BrickPortSensor port, UltraSonicMode usmode ) : System

Initialize an EV3 Ultrasonic sensor

EV3UltraSonicSensor ( BrickPortSensor port, UltraSonicMode usmode, int timeout ) : System

Initialize an EV3 Ultrasonic Sensor

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

Read the sensor value. Result depends on the mode

ReadAsString ( ) : string

Reads the sensor value as a string.

ReadRaw ( ) : int

Read the sensor value

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
GetEV3Type ( UltraSonicMode usmode ) : BrickSensorType
OnPropertyChanged ( string name ) : void
StopTimerInternal ( ) : void

Method Details

EV3UltraSonicSensor() public méthode

Initialize an EV3 Ulrasonic sensor
public EV3UltraSonicSensor ( BrickPortSensor port ) : System
port BrickPortSensor Sensor port
Résultat System

EV3UltraSonicSensor() public méthode

Initialize an EV3 Ultrasonic sensor
public EV3UltraSonicSensor ( BrickPortSensor port, UltraSonicMode usmode ) : System
port BrickPortSensor Sensor mode
usmode UltraSonicMode Ultrasonic mode
Résultat System

EV3UltraSonicSensor() public méthode

Initialize an EV3 Ultrasonic Sensor
public EV3UltraSonicSensor ( BrickPortSensor port, UltraSonicMode usmode, int timeout ) : System
port BrickPortSensor Sensor port
usmode UltraSonicMode Ultrasonic 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. Result depends on the mode
public Read ( ) : int
Résultat int

ReadAsString() public méthode

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

ReadRaw() public méthode

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

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