MonoBrick EV3 Firmware
Public Member Functions | Properties | List of all members
MonoBrickFirmware.Sensors.EV3IRSensor Class Reference

Class for the EV3 IR sensor More...

Inheritance diagram for MonoBrickFirmware.Sensors.EV3IRSensor:
MonoBrickFirmware.Sensors.UartSensor MonoBrickFirmware.Sensors.ISensor

Public Member Functions

 EV3IRSensor (SensorPort port)
 Initializes a new instance of the MonoBrick.EV3.IRSensor class. More...
 
 EV3IRSensor (SensorPort port, IRMode mode)
 Initializes a new instance of the MonoBrick.EV3.IRSensor class. More...
 
override string ReadAsString ()
 Reads the sensor value as a string. More...
 
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. More...
 
int ReadDistance ()
 Read the distance of the sensor in CM (0-100). This will change mode to proximity More...
 
byte ReadRemoteCommand ()
 Reads commands from the IR-Remote. This will change mode to remote More...
 
BeaconLocation ReadBeaconLocation ()
 Gets the beacon location. This will change the mode to seek More...
 
override string GetSensorName ()
 Gets the name of the sensor. More...
 
override void SelectNextMode ()
 Selects the next mode. More...
 
override void SelectPreviousMode ()
 Selects the previous mode. More...
 
override int NumberOfModes ()
 Numbers the of modes. More...
 
override string SelectedMode ()
 .m.-, More...
 
- Public Member Functions inherited from MonoBrickFirmware.Sensors.UartSensor
 UartSensor (SensorPort port)
 

Properties

IRMode Mode [get, set]
 Gets or sets the IR mode. More...
 
IRChannel Channel [get, set]
 Gets or sets the IR channel used for reading remote commands or beacon location More...
 
- Properties inherited from MonoBrickFirmware.Sensors.UartSensor
UARTMode uartMode [get, set]
 
SensorPort Port [get]
 
- Properties inherited from MonoBrickFirmware.Sensors.ISensor
SensorPort Port [get]
 Sensor port More...
 

Additional Inherited Members

- Protected Member Functions inherited from MonoBrickFirmware.Sensors.UartSensor
void Reset ()
 
byte[] GetSensorInfo ()
 Gets the sensor info based on the mode More...
 
bool Initialise (UARTMode mode)
 
bool SetMode (UARTMode mode)
 
byte ReadByte ()
 
byte[] ReadBytes (int length)
 
- Protected Attributes inherited from MonoBrickFirmware.Sensors.UartSensor
const int NumberOfSensorPorts = SensorManager.NumberOfSensorPorts
 
SensorPort port
 

Detailed Description

Class for the EV3 IR sensor

Constructor & Destructor Documentation

MonoBrickFirmware.Sensors.EV3IRSensor.EV3IRSensor ( SensorPort  port)
inline

Initializes a new instance of the MonoBrick.EV3.IRSensor class.

MonoBrickFirmware.Sensors.EV3IRSensor.EV3IRSensor ( SensorPort  port,
IRMode  mode 
)
inline

Initializes a new instance of the MonoBrick.EV3.IRSensor class.

Parameters
modeMode.

Member Function Documentation

override string MonoBrickFirmware.Sensors.EV3IRSensor.GetSensorName ( )
inlinevirtual

Gets the name of the sensor.

Returns
The sensor name.

Implements MonoBrickFirmware.Sensors.UartSensor.

override int MonoBrickFirmware.Sensors.EV3IRSensor.NumberOfModes ( )
inlinevirtual

Numbers the of modes.

Returns
The number of modes

Implements MonoBrickFirmware.Sensors.UartSensor.

int MonoBrickFirmware.Sensors.EV3IRSensor.Read ( )
inline

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.

override string MonoBrickFirmware.Sensors.EV3IRSensor.ReadAsString ( )
inlinevirtual

Reads the sensor value as a string.

Returns
The value as a string

Implements MonoBrickFirmware.Sensors.UartSensor.

BeaconLocation MonoBrickFirmware.Sensors.EV3IRSensor.ReadBeaconLocation ( )
inline

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

Returns
The beacon location.
int MonoBrickFirmware.Sensors.EV3IRSensor.ReadDistance ( )
inline

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

byte MonoBrickFirmware.Sensors.EV3IRSensor.ReadRemoteCommand ( )
inline

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

Returns
The remote command.
override string MonoBrickFirmware.Sensors.EV3IRSensor.SelectedMode ( )
inlinevirtual

.m.-,

Returns
The mode.

Implements MonoBrickFirmware.Sensors.UartSensor.

override void MonoBrickFirmware.Sensors.EV3IRSensor.SelectNextMode ( )
inlinevirtual

Selects the next mode.

Implements MonoBrickFirmware.Sensors.UartSensor.

override void MonoBrickFirmware.Sensors.EV3IRSensor.SelectPreviousMode ( )
inlinevirtual

Selects the previous mode.

Implements MonoBrickFirmware.Sensors.UartSensor.

Property Documentation

IRChannel MonoBrickFirmware.Sensors.EV3IRSensor.Channel
getset

Gets or sets the IR channel used for reading remote commands or beacon location

The channel.

IRMode MonoBrickFirmware.Sensors.EV3IRSensor.Mode
getset

Gets or sets the IR mode.

The mode.


The documentation for this class was generated from the following file: