forked from jperson2000/GPS.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EventArguments.cs
263 lines (249 loc) · 9.94 KB
/
EventArguments.cs
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
using System;
namespace GeoFramework.Gps
{
/// <summary>
/// Represents information about the method used to obtain a fix when a fix-related event is raised.
/// </summary>
/// <remarks>This object is used primarily by the <see cref="Receiver.FixMethodChanged">FixMethodChanged</see>
/// event of the <see cref="Receiver">Receiver</see> class to provide notification when
/// updated fix method information has been received from the GPS device.</remarks>
/// <example>This example demonstrates how to use this class when raising an event.
/// <code lang="VB">
/// ' Declare a new event
/// Dim MyFixMethodEvent As EventHandler
/// ' Create a FixMethod signifying a 3-D fix (both position and altitude)
/// Dim MyFixMethod As FixMethod = FixMethod.Fix3D
///
/// Sub Main()
/// ' Raise our custom event
/// RaiseEvent MyFixMethodEvent(Me, New FixMethodEventArgs(MyFixMethod))
/// End Sub
/// </code>
/// <code lang="C#">
/// // Declare a new event
/// EventHandler MyFixMethodEvent;
/// // Create a FixMethod signifying a 3-D fix (both position and altitude)
/// FixMethod MyFixMethod = FixMethod.Fix3D;
///
/// void Main()
/// {
/// // Raise our custom event
/// MyFixMethodEvent(this, New FixMethodEventArgs(MyFixMethod));
/// }
/// </code>
/// </example>
/// <seealso cref="Receiver.FixMethod">FixMethod Property (Receiver Class)</seealso>
/// <seealso cref="Receiver">Receiver Class</seealso>
public sealed class FixMethodEventArgs : EventArgs
{
private FixMethod _FixMethod;
/// <summary>
/// Creates a new instance with the specified fix method.
/// </summary>
/// <param name="fixMethod">A value from the <strong>FixMethod</strong> enumeration.</param>
/// <remarks></remarks>
public FixMethodEventArgs(FixMethod fixMethod)
{
_FixMethod = fixMethod;
}
/// <summary>
/// Indicates if the GPS device has no fix, a 2-D fix, or a 3-D fix.
/// </summary>
/// <value>A value from the <strong>FixMethod</strong> enumeration.</value>
/// <remarks>A device is considered to have a "2-D" fix if there are three satellites
/// involved in the fix. A 2-D fix means that position information is available, but not
/// altitude. If at least four satellites are fixed, both position and altitude are known,
/// and the fix is considered 3-D.</remarks>
/// <seealso cref="Receiver.FixMethod">FixMethod Property (Receiver Class)</seealso>
public FixMethod FixMethod
{
get
{
return _FixMethod;
}
}
}
/// <summary>
/// Represents information about the likelihood that a fix will be sustained (or obtained) when a when a fix-related event is raised.
/// </summary>
/// <remarks>This object is used primarily by the <see cref="Receiver.FixLikelihoodChanged">FixLikelihoodChanged</see>
/// event of the <see cref="Receiver">Receiver</see> class to provide notification when
/// combined satellite radio signal strength has changed.</remarks>
/// <example>This example demonstrates how to use this class when raising an event.
/// <code lang="VB">
/// ' Declare a new event
/// Dim MyFixLikelihoodEvent As FixLikelihoodEventHandler
/// ' Create a FixLikelihood signifying a 3-D fix (both position and altitude)
/// Dim MyFixLikelihood As FixLikelihood = FixLikelihood.Fix3D
///
/// Sub Main()
/// ' Raise our custom event
/// RaiseEvent MyFixLikelihoodEvent(Me, New FixLikelihoodEventArgs(MyFixLikelihood))
/// End Sub
/// </code>
/// <code lang="C#">
/// // Declare a new event
/// FixLikelihoodEventHandler MyFixLikelihoodEvent;
/// // Create a FixLikelihood signifying a 3-D fix (both position and altitude)
/// FixLikelihood MyFixLikelihood = FixLikelihood.Fix3D;
///
/// void Main()
/// {
/// // Raise our custom event
/// MyFixLikelihoodEvent(this, New FixLikelihoodEventArgs(MyFixLikelihood));
/// }
/// </code>
/// </example>
/// <seealso cref="Receiver.FixLikelihood">FixLikelihood Property (Receiver Class)</seealso>
/// <seealso cref="Receiver">Receiver Class</seealso>
public sealed class FixLikelihoodEventArgs : EventArgs
{
private FixLikelihood _FixLikelihood;
/// <summary>
/// Creates a new instance with the specified fix Likelihood.
/// </summary>
/// <param name="fixLikelihood">A value from the <strong>FixLikelihood</strong> enumeration.</param>
/// <remarks></remarks>
public FixLikelihoodEventArgs(FixLikelihood fixLikelihood)
{
_FixLikelihood = fixLikelihood;
}
/// <summary>
/// Indicates if the GPS device has no fix, a 2-D fix, or a 3-D fix.
/// </summary>
/// <value>A value from the <strong>FixLikelihood</strong> enumeration.</value>
/// <remarks>A device is considered to have a "2-D" fix if there are three satellites
/// involved in the fix. A 2-D fix means that position information is available, but not
/// altitude. If at least four satellites are fixed, both position and altitude are known,
/// and the fix is considered 3-D.</remarks>
/// <seealso cref="Receiver.FixLikelihood">FixLikelihood Property (Receiver Class)</seealso>
public FixLikelihood FixLikelihood
{
get
{
return _FixLikelihood;
}
}
}
/// <summary>
/// Represents information about whether the fix method is chosen automatically when a fix-related event is raised.
/// </summary>
/// <remarks>This object is used primarily by the <see cref="Receiver.FixModeChanged">FixModeChanged</see>
/// event of the <see cref="Receiver">Receiver</see> class to provide notification when
/// the receiver switches fix modes from <strong>Automatic</strong> to <strong>Manual</strong> or vice-versa.</remarks>
/// <example>This example demonstrates how to use this class when raising an event.
/// <code lang="VB">
/// ' Declare a new event
/// Dim MyFixModeEvent As EventHandler
/// ' Create a FixMode signifying that the fix method is being chosen automatically
/// Dim MyFixMode As FixMode = FixMode.Automatic
///
/// Sub Main()
/// ' Raise our custom event
/// RaiseEvent MyFixModeEvent(Me, New FixModeEventArgs(MyFixMode))
/// End Sub
/// </code>
/// <code lang="C#">
/// // Declare a new event
/// EventHandler MyFixModeEvent;
/// // Create a FixMode signifying that the fix method is being chosen automatically
/// FixMode MyFixMode = FixMode.Automatic;
///
/// void Main()
/// {
/// // Raise our custom event
/// MyFixModeEvent(this, New FixModeEventArgs(MyFixMode));
/// }
/// </code>
/// </example>
/// <seealso cref="Receiver.FixMethod">FixMethod Property (Receiver Class)</seealso>
/// <seealso cref="Receiver">Receiver Class</seealso>
public sealed class FixModeEventArgs : EventArgs
{
private FixMode _FixMode;
/// <summary>
/// Creates a new instance with the specified fix method.
/// </summary>
/// <param name="fixMode">A value from the <strong>FixMode</strong> enumeration.</param>
/// <remarks></remarks>
public FixModeEventArgs(FixMode fixMode)
{
_FixMode = fixMode;
}
/// <summary>
/// Indicates if the GPS device is choosing the <see cref="FixMethod">fix method</see> automatically.
/// </summary>
/// <value>A value from the <strong>FixMode</strong> enumeration.</value>
/// <remarks>A vast majority of GPS devices calculate the fix mode automatically. This is because
/// the process of determining the fix mode is a simple process: if there are three fixed satellites,
/// a 2-D fix is obtained; if there are four or more fixed satellites, a 3-D fix is in progress. Any
/// less than three satellites means that no fix is possible.
/// </remarks>
/// <seealso cref="Receiver.FixMode">FixMode Property (Receiver Class)</seealso>
public FixMode FixMode
{
get
{
return _FixMode;
}
}
}
/// <summary>
/// Represents information about the type of fix obtained when fix-related event is raised.
/// </summary>
/// <remarks>This object is used primarily by the <see cref="Receiver.FixQualityChanged">FixQualityChanged</see>
/// event of the <see cref="Receiver">Receiver</see> class to provide notification when
/// the receiver switches fix modes from <strong>Automatic</strong> to <strong>Manual</strong> or vice-versa.</remarks>
/// <example>This example demonstrates how to use this class when raising an event.
/// <code lang="VB">
/// ' Declare a new event
/// Dim MyFixQualityEvent As EventHandler
/// ' Create a FixQuality signifying that a differential GPS fix is obtained
/// Dim MyFixQuality As FixQuality = FixQuality.DifferentialGpsFix
///
/// Sub Main()
/// ' Raise our custom event
/// RaiseEvent MyFixQualityEvent(Me, New FixQualityEventArgs(MyFixQuality))
/// End Sub
/// </code>
/// <code lang="C#">
/// // Declare a new event
/// EventHandler MyFixQualityEvent;
/// // Create a FixQuality signifying that a differential GPS fix is obtained
/// FixQuality MyFixQuality = FixQuality.DifferentialGpsFix;
///
/// void Main()
/// {
/// // Raise our custom event
/// MyFixQualityEvent(this, New FixQualityEventArgs(MyFixQuality));
/// }
/// </code>
/// </example>
/// <seealso cref="Receiver.FixMethod">FixMethod Property (Receiver Class)</seealso>
/// <seealso cref="Receiver">Receiver Class</seealso>
public sealed class FixQualityEventArgs : EventArgs
{
private FixQuality _FixQuality;
/// <summary>
/// Creates a new instance with the specified fix quality measurement.
/// </summary>
/// <param name="fixQuality">A value from the <strong>FixQuality</strong> enumeration.</param>
/// <remarks></remarks>
public FixQualityEventArgs(FixQuality fixQuality)
{
_FixQuality = fixQuality;
}
/// <summary>
/// Indicates whether the current fix involves satellites and/or DGPS/WAAS ground stations.
/// </summary>
/// <value>A value from the <strong>FixQuality</strong> enumeration.</value>
/// <remarks></remarks>
public FixQuality FixQuality
{
get
{
return _FixQuality;
}
}
}
}