C# Class BrickPi.Sensors.NXTLightSensor

Inheritance: INotifyPropertyChanged, ISensor
Datei anzeigen Open project: Ellerbach/BrickPi Class Usage Examples

Public Methods

Method Description
GetSensorName ( ) : string
NXTLightSensor ( BrickPortSensor port ) : System

Initialize a NXT Light Sensor

NXTLightSensor ( BrickPortSensor port, LightMode mode ) : System

Initialize a NXT Light Sensor

NXTLightSensor ( BrickPortSensor port, LightMode mode, int timeout ) : System

Initialize a NXT Light Sensor

NumberOfModes ( ) : int
ReadAsString ( ) : string
ReadRaw ( ) : int
SelectNextMode ( ) : void
SelectPreviousMode ( ) : void
SelectedMode ( ) : string
UpdateSensor ( object state ) : void

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

Private Methods

Method Description
OnPropertyChanged ( string name ) : void
StopTimerInternal ( ) : void

Method Details

GetSensorName() public method

public GetSensorName ( ) : string
return string

NXTLightSensor() public method

Initialize a NXT Light Sensor
public NXTLightSensor ( BrickPortSensor port ) : System
port BrickPortSensor Sensor port
return System

NXTLightSensor() public method

Initialize a NXT Light Sensor
public NXTLightSensor ( BrickPortSensor port, LightMode mode ) : System
port BrickPortSensor Sensor port
mode LightMode Light mode
return System

NXTLightSensor() public method

Initialize a NXT Light Sensor
public NXTLightSensor ( BrickPortSensor port, LightMode mode, int timeout ) : System
port BrickPortSensor Sensor port
mode LightMode Light mode
timeout int Period in millisecond to check sensor value changes
return System

NumberOfModes() public method

public NumberOfModes ( ) : int
return int

ReadAsString() public method

public ReadAsString ( ) : string
return string

ReadRaw() public method

public ReadRaw ( ) : int
return int

SelectNextMode() public method

public SelectNextMode ( ) : void
return void

SelectPreviousMode() public method

public SelectPreviousMode ( ) : void
return void

SelectedMode() public method

public SelectedMode ( ) : string
return string

UpdateSensor() public method

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