Skip to main content

Class SimulatedDigitalSignalAnalyzer

A simulated digital signal analyzer that can track and report a signal's frequency, duty cycle, and pulse count for testing purposes.

Assembly: Meadow.Foundation.dll
View Source
Declaration
public class SimulatedDigitalSignalAnalyzer : IDigitalSignalAnalyzer

Implements:
Meadow.Hardware.IDigitalSignalAnalyzer

Methods

SetDutyCycle(double)

Sets the simulated duty cycle for the analyzer.

View Source
Declaration
public void SetDutyCycle(double dutyCycle)
Parameters
TypeNameDescription
System.DoubledutyCycleThe duty cycle to simulate, typically between 0.0 and 1.0.

GetDutyCycle()

Gets the current simulated duty cycle.

View Source
Declaration
public double GetDutyCycle()
Returns

System.Double: A System.Double representing the duty cycle (0.0 to 1.0).### SetFrequency(Frequency) Sets the simulated frequency for the analyzer.

View Source
Declaration
public void SetFrequency(Frequency frequency)
Parameters
TypeNameDescription
Meadow.Units.FrequencyfrequencyThe Meadow.Units.Frequency value to simulate.

GetFrequency()

Gets the current simulated frequency.

View Source
Declaration
public Frequency GetFrequency()
Returns

Meadow.Units.Frequency: The Meadow.Units.Frequency currently set in the simulation.### GetMeanFrequency() Gets the mean frequency of the simulated signal.

View Source
Declaration
public Frequency GetMeanFrequency()
Returns

Meadow.Units.Frequency: The Meadow.Units.Frequency representing the average frequency. In this simulation, it returns the same frequency set by Meadow.Foundation.Sensors.SimulatedDigitalSignalAnalyzer.SetFrequency(Meadow.Units.Frequency).### SetCount(ulong) Sets the pulse count (or edge count) for the simulated signal.

View Source
Declaration
public void SetCount(ulong count)
Parameters
TypeNameDescription
System.UInt64countThe System.UInt64 value representing the total pulses counted.

GetCount()

Gets the total pulse count (or edge count) from the simulation.

View Source
Declaration
public ulong GetCount()
Returns

System.UInt64: A System.UInt64 representing the total number of pulses.

Implements

  • Meadow.Hardware.IDigitalSignalAnalyzer