MockStreaming
public static class MockStreamingStatic convenience class for accessing MockStream without direct instance management.
Methods
Section titled “Methods”
Register(Action<MockDataPoint[]>)
Section titled “Register(Action<MockDataPoint[]>)”public static void Register(Action<MockDataPoint[]> listener)Register a listener to receive data.
Parameters
| Name | Type |
|---|---|
listener | System.Action{MockMagic.MockDataPoint[]} |
Unregister(Action<MockDataPoint[]>)
Section titled “Unregister(Action<MockDataPoint[]>)”public static void Unregister(Action<MockDataPoint[]> listener)Unregister a listener.
Parameters
| Name | Type |
|---|---|
listener | System.Action{MockMagic.MockDataPoint[]} |
Start(float, StreamRhythm)
Section titled “Start(float, StreamRhythm)”public static void Start(float interval = 1, StreamRhythm rhythm = StreamRhythm.Constant)Start streaming with default settings.
Parameters
| Name | Type |
|---|---|
interval | System.Single |
rhythm | MockMagic.StreamRhythm |
Stop()
Section titled “Stop()”public static void Stop()Stop streaming.
EmitOnce()
Section titled “EmitOnce()”public static void EmitOnce()Emit data once.
Configure(SeriesPattern, float, float, float, int, LabelPreset, string[])
Section titled “Configure(SeriesPattern, float, float, float, int, LabelPreset, string[])”public static void Configure(SeriesPattern pattern = SeriesPattern.Random, float min = 0, float max = 100, float noise = 0.1, int pointsPerEmission = 1, LabelPreset labelPreset = LabelPreset.Numeric, string[] customLabels = null)Configure the stream pattern.
Parameters
| Name | Type |
|---|---|
pattern | MockMagic.SeriesPattern |
min | System.Single |
max | System.Single |
noise | System.Single |
pointsPerEmission | System.Int32 |
labelPreset | MockMagic.LabelPreset |
customLabels | System.String[] |
Configure(string, SeriesPattern, float, float, float, int, LabelPreset, string[])
Section titled “Configure(string, SeriesPattern, float, float, float, int, LabelPreset, string[])”public static void Configure(string localeId, SeriesPattern pattern = SeriesPattern.Random, float min = 0, float max = 100, float noise = 0.1, int pointsPerEmission = 1, LabelPreset labelPreset = LabelPreset.Numeric, string[] customLabels = null)Configure the stream pattern and pending data locale without changing a running stream’s captured locale.
Parameters
| Name | Type |
|---|---|
localeId | System.String |
pattern | MockMagic.SeriesPattern |
min | System.Single |
max | System.Single |
noise | System.Single |
pointsPerEmission | System.Int32 |
labelPreset | MockMagic.LabelPreset |
customLabels | System.String[] |
Properties
Section titled “Properties”
Stream
Section titled “Stream”public static MockStream Stream { get; }Get the MockStream instance.
Returns
MockMagic.MockStream
IsRunning
Section titled “IsRunning”public static bool IsRunning { get; }Check if streaming is active.
Returns
System.Boolean