ActiveSensor Class

Definition

Interface that all active elements implement

public class ActiveSensor : Iot.Device.BuildHat.Sensors.Sensor
type ActiveSensor = class
    inherit Sensor
Public Class ActiveSensor
Inherits Sensor
Inheritance
ActiveSensor
Derived

Constructors

ActiveSensor(Brick, SensorPort, SensorType)

Creates an active element.

Properties

BaudRate

Baud rate the sensor is connected

CombiModes

Gets the possible combi modes. Note, is will be empty if none.

HardwareVersion

Hardware version

IsConnected

Gets true if the sensor is connected.

(Inherited from Sensor)
ModeDetails

Gets the mode details of the sensor.

NumberOfModes

Numbers the of modes.

Port

Gets the Sensor port

(Inherited from Sensor)
PositionPid

Gets the recommended Speed PID settings

SensorName

Gets the name of the sensor.

SensorType

Gets the sensor type

(Inherited from Sensor)
SoftwareVersion

Software version

SpeedPid

Gets the recommended Speed PID settings

ValuesAsString

Property to return the raw value of the sensort as a string. It will contains as the first elements PxCy. x = the port number, y = 0 for continuous reading, 1 for single reading. The rest are the measures.

Methods

OnPropertyChanged(String)

Raises the on property changed event.

(Inherited from Sensor)
OnPropertyUpdated(String)

Raises the on property updated event.

(Inherited from Sensor)
SelectCombiModesAndRead(Int32[], Boolean)

Returned the name of the selectd mode

SelectModeAndRead(Int32, Boolean)

Returned the name of the selectd mode

StopReading()

Stop reading continuous data from a specific sensor.

SwitchOff(SensorPort)

Switches a sensor off.

SwitchOn()

Switches a sensor on.

WriteBytes(ReadOnlySpan<Byte>, Boolean)

Writes directly to the sensor. The bytes to the current port, the first one or two bytes being header bytes. The message is padded if necessary, and length and checksum fields are automatically populated.

Events

PropertyChanged

To notify a property has changed. It means the value has changed.

(Inherited from Sensor)
PropertyUpdated

To notify a property has been updated. It means the property has been updated regardeless of a change in its value.

(Inherited from Sensor)

Applies to