Skip to main content

Class SimulatedCurrentSensor

Represents a simulated current sensor

Assembly: Meadow.Foundation.dll
View Source
Declaration
public class SimulatedCurrentSensor : SimulatedSamplingSensorBase<Current>, ISimulatedSensor, ICurrentSensor, ISamplingSensor<Current>, ISensor<Current>, ISensor, ISamplingSensor

Inheritance: System.Object -> Meadow.Foundation.Sensors.SimulatedSensorBase

Implements:
Meadow.Peripherals.Sensors.ISimulatedSensor, Meadow.Peripherals.Sensors.ICurrentSensor, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Current>, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Current>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor

Properties

Current

Last value read from the Current sensor.

View Source
Declaration
public Current? Current { get; }

SupportedBehaviors

Gets an array of supported simulation behaviors for the sensor.

View Source
Declaration
public override SimulationBehavior[] SupportedBehaviors { get; }

ValueType

Gets the type of the sensor's value.

View Source
Declaration
public override Type ValueType { get; }

Methods

SetSensorValue(object)

Sets the simulated value for the sensor.

View Source
Declaration
public override void SetSensorValue(object value)
Parameters
TypeNameDescription
System.ObjectvalueThe value to set for the sensor.

GenerateSimulatedValue(SimulationBehavior)

Generates a value based on the provided behavior

View Source
Declaration
protected override Current GenerateSimulatedValue(SimulationBehavior behavior)
Returns

Meadow.Units.Current

Parameters
TypeNameDescription
Meadow.Peripherals.Sensors.SimulationBehaviorbehaviorThe behavior to use when generating a value

Implements

  • Meadow.Peripherals.Sensors.ISimulatedSensor
  • Meadow.Peripherals.Sensors.ICurrentSensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Current>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Current>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor