blob: 4e36641e7200ede9dedcb0767415a551c04c66d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
using RealTimeGraphX.EventArguments;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace RealTimeGraphX
{
/// <summary>
/// Represents a graph controller.
/// </summary>
/// <seealso cref="RealTimeGraphX.IGraphComponent" />
public interface IGraphController : IGraphComponent
{
#region Events
/// <summary>
/// Occurs when the current effective minimum/maximum values have changed.
/// </summary>
event EventHandler<RangeChangedEventArgs> EffectiveRangeChanged;
/// <summary>
/// Occurs when the current virtual (effective minimum/maximum after transformation) minimum/maximum values have changed.
/// </summary>
event EventHandler<RangeChangedEventArgs> VirtualRangeChanged;
#endregion
#region Properties
/// <summary>
/// Gets or sets the controller refresh rate.
/// Higher rate requires more CPU time.
/// </summary>
TimeSpan RefreshRate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to pause the rendering.
/// </summary>
bool IsPaused { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to disable the rendering of data.
/// </summary>
bool DisableRendering { get; set; }
/// <summary>
/// Gets the current effective x-axis minimum.
/// </summary>
GraphDataPoint EffectiveMinimumX { get; }
/// <summary>
/// Gets the current effective x-axis maximum.
/// </summary>
GraphDataPoint EffectiveMaximumX { get; }
/// <summary>
/// Gets the current effective y-axis minimum.
/// </summary>
GraphDataPoint EffectiveMinimumY { get; }
/// <summary>
/// Gets the current effective y-axis maximum.
/// </summary>
GraphDataPoint EffectiveMaximumY { get; }
/// <summary>
/// Gets the current virtual (effective minimum/maximum after transformation) x-axis minimum.
/// </summary>
GraphDataPoint VirtualMinimumX { get; }
/// <summary>
/// Gets the current virtual (effective minimum/maximum after transformation) x-axis maximum.
/// </summary>
GraphDataPoint VirtualMaximumX { get; }
/// <summary>
/// Gets the current virtual (effective minimum/maximum after transformation) y-axis minimum.
/// </summary>
GraphDataPoint VirtualMinimumY { get; }
/// <summary>
/// Gets the current virtual (effective minimum/maximum after transformation) y-axis maximum.
/// </summary>
GraphDataPoint VirtualMaximumY { get; }
/// <summary>
/// Clears all data points from this controller.
/// </summary>
void Clear();
#endregion
#region Commands
/// <summary>
/// Gets the clear command.
/// </summary>
GraphCommand ClearCommand { get; }
#endregion
#region Methods
/// <summary>
/// Requests the controller to invoke a virtual range change event.
/// </summary>
void RequestVirtualRangeChange();
#endregion
}
/// <summary>
/// Represents a graph controller capable of pushing data points to it's associated <see cref="IGraphRenderer{TDataSeries}">Graph Renderer</see>
/// and rendering them to it's associated <see cref="IGraphSurface{TDataSeries}">Graph Surface</see>.
/// </summary>
/// <typeparam name="TDataSeries">The type of the data series.</typeparam>
/// <seealso cref="RealTimeGraphX.IGraphComponent" />
public interface IGraphController<TDataSeries> : IGraphController where TDataSeries : IGraphDataSeries
{
#region Properties
/// <summary>
/// Gets the data series collection.
/// </summary>
ObservableCollection<TDataSeries> DataSeriesCollection { get; }
/// <summary>
/// Gets or sets the graph renderer.
/// </summary>
IGraphRenderer<TDataSeries> Renderer { get; set; }
/// <summary>
/// Gets or sets the graph surface.
/// </summary>
IGraphSurface<TDataSeries> Surface { get; set; }
#endregion
}
/// <summary>
/// Represents a graph controller capable of pushing data points to it's associated <see cref="IGraphRenderer{TDataSeries}">Graph Renderer</see>
/// and rendering them to it's associated <see cref="IGraphSurface{TDataSeries}">Graph Surface</see>.
/// </summary>
/// <typeparam name="TDataSeries">The type of the data series.</typeparam>
/// <typeparam name="TXDataPoint">The type of the x data point.</typeparam>
/// <typeparam name="TYDataPoint">The type of the y data point.</typeparam>
/// <seealso cref="RealTimeGraphX.IGraphComponent" />
public interface IGraphController<TDataSeries, TXDataPoint, TYDataPoint> : IGraphController<TDataSeries>
where TXDataPoint : GraphDataPoint
where TYDataPoint : GraphDataPoint
where TDataSeries : IGraphDataSeries
{
#region Properties
/// <summary>
/// Gets or sets the graph range (data point boundaries).
/// </summary>
GraphRange<TXDataPoint, TYDataPoint> Range { get; set; }
#endregion
#region Methods
/// <summary>
/// Submits the specified x and y data points.
/// If the controller has more than one data series the data points will be duplicated.
/// </summary>
/// <param name="x">X data point.</param>
/// <param name="y">Y data point.</param>
void PushData(TXDataPoint x, TYDataPoint y);
/// <summary>
/// Submits the specified collections of x and y data points.
/// If the controller has more than one data series the data points will be distributed evenly.
/// </summary>
/// <param name="xx">X data point collection.</param>
/// <param name="yy">Y data point collection.</param>
void PushData(IEnumerable<TXDataPoint> xx, IEnumerable<TYDataPoint> yy);
/// <summary>
/// Submits a matrix of x and y data points. Meaning each data series should process a single collection of x/y data points.
/// </summary>
/// <param name="xxxx">X matrix.</param>
/// <param name="yyyy">Y matrix.</param>
void PushData(IEnumerable<IEnumerable<TXDataPoint>> xxxx, IEnumerable<IEnumerable<TYDataPoint>> yyyy);
#endregion
}
}
|