Skip to main content

Class SimulatedAccelerometer

Represents a simulated accelerometer

Assembly: Meadow.Foundation.dll
View Source
Declaration
public class SimulatedAccelerometer : SimulatedSamplingSensorBase<Acceleration3D>, ISimulatedSensor, IAccelerometer, ISamplingSensor<Acceleration3D>, ISensor<Acceleration3D>, ISensor, ISamplingSensor

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

Implements:
Meadow.Peripherals.Sensors.ISimulatedSensor, Meadow.Peripherals.Sensors.Motion.IAccelerometer, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Acceleration3D>, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Acceleration3D>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor

Properties

Acceleration3D

Last value read from the sensor.

View Source
Declaration
public Acceleration3D? Acceleration3D { 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 Acceleration3D GenerateSimulatedValue(SimulationBehavior behavior)
Returns

Meadow.Units.Acceleration3D

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

Implements

  • Meadow.Peripherals.Sensors.ISimulatedSensor
  • Meadow.Peripherals.Sensors.Motion.IAccelerometer
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Acceleration3D>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Acceleration3D>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor