Gocator API

GoExtTool.h
Go to the documentation of this file.
1 /**
2 * @file GoExtTool.h
3 * @brief Declares the base GoExtTool class.
4 *
5 * @internal
6 * Copyright (C) 2016-2020 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef GO_EXT_TOOL_H
11 #define GO_EXT_TOOL_H
12
13 #include <GoSdk/GoSdkDef.h>
14 #include <GoSdk/Tools/GoTool.h>
15 #include <GoSdk/Tools/GoExtParams.h>
16 #include <GoSdk/Tools/GoExtToolDataOutput.h>
17 #include <kApi/Data/kXml.h>
18
19 kBeginHeader()
20
21 /**
22 * @class GoExtTool
23 * @extends GoTool
24 * @ingroup GoSdk-Tools
25 * @brief Represents an extensible tool.
26 */
27 typedef GoTool GoExtTool;
28
29 /**
30 * Returns the tool configuration version string.
31 *
32 * @public @memberof GoExtTool
33 * @version Introduced in firmware 4.4.4.14
34 * @param tool GoExtTool object.
35 * @return The tool configuration version string.
36 */
37 GoFx(const kChar*) GoExtTool_Version(GoExtTool tool);
38
39 /**
40 * Sets the data stream. Note that stream validation will only occur if tool
41 * is in the tool options list.
42 *
43 * @public @memberof GoExtTool
44 * @version Introduced in firmware 5.2.29.2
45 * @param tool GoExtTool object.
46 * @param stream GoDataStream value.
47 * @return Operation status.
48 * @see GoExtTool_StreamOptionCount, GoExtTool_StreamOptionAt
49 */
50 GoFx(kStatus) GoExtTool_SetStream(GoExtTool tool, GoDataStream stream);
51
52 /**
53 * Gets the data stream.
54 *
55 * @public @memberof GoExtTool
56 * @version Introduced in firmware 5.2.29.2
57 * @param tool GoExtTool object.
58 * @return The current Ext tool data stream value.
59 */
60 GoFx(GoDataStream) GoExtTool_Stream(GoExtTool tool);
61
62 /**
63 * Gets the data stream option list count.
64 *
65 * @public @memberof GoExtTool
66 * @version Introduced in firmware 5.2.29.2
67 * @param tool GoExtTool object.
68 * @return The current Ext tool data stream option list count.
69 */
70 GoFx(kSize) GoExtTool_StreamOptionCount(GoExtTool tool);
71
72 /**
73 * Gets the data stream option at the given index.
74 *
75 * @public @memberof GoExtTool
76 * @version Introduced in firmware 5.2.29.2
77 * @param tool GoExtTool object.
78 * @param index The index of the option list to access.
79 * @return The Ext tool data stream option at the given index, or k32U_MAX if an invalid index is given.
80 */
81 GoFx(GoDataStream) GoExtTool_StreamOptionAt(GoExtTool tool, kSize index);
82
83 /**
84 * Returns the measurement count.
85 *
86 * @public @memberof GoExtTool
87 * @version Introduced in firmware 4.4.4.14
88 * @param tool GoExtTool object.
89 * @return The measurement count.
90 */
91 GoFx(kSize) GoExtTool_MeasurementCount(GoExtTool tool);
92
93 /**
94 * Retrieves the measurement at the given index.
95 *
96 * @public @memberof GoExtTool
97 * @version Introduced in firmware 4.4.4.14
98 * @param tool GoExtTool object.
99 * @param index The index of the measurement.
100 * @return The measurement at the given index or kNULL if an invalid index is provided.
101 */
102 GoFx(GoMeasurement) GoExtTool_MeasurementAt(GoExtTool tool, kSize index);
103
104 /**
105 * Sets the name of the tool.
106 *
107 * @public @memberof GoExtTool
108 * @version Introduced in firmware 4.4.4.14
109 * @param tool GoExtTool object.
110 * @param name The name to be set for the tool.
111 * @return Operation status.
112 */
113 GoFx(kStatus) GoExtTool_SetDisplayName(GoExtTool tool, const kChar* name);
114
115 /**
116 * Retrieves the display name of the tool.
117 *
118 * @public @memberof GoExtTool
119 * @version Introduced in firmware 4.4.4.14
120 * @param tool GoExtTool object.
121 * @return The tool display name.
122 */
123 GoFx(const kChar*) GoExtTool_DisplayName(GoExtTool tool);
124
125 /**
126 * Retrieves the type of the tool.
127 *
128 * @public @memberof GoExtTool
129 * @version Introduced in firmware 4.4.4.14
130 * @param tool GoExtTool object.
131 * @return The tool type as a character array.
132 */
133 GoFx(const kChar*) GoExtTool_Type(GoExtTool tool);
134
135 /**
136 * Sets the data source.
137 *
138 * @public @memberof GoExtTool
139 * @version Introduced in firmware 4.4.4.14
140 * @param tool GoExtTool object.
141 * @param source GoDataSource object.
142 * @return Operation status.
143 * @see GoExtTool_IntensitySupportEnabled
144 */
145 GoFx(kStatus) GoExtTool_SetSource(GoExtTool tool, GoDataSource source);
146
147 /**
148 * Gets the data source.
149 *
150 * @public @memberof GoExtTool
151 * @version Introduced in firmware 4.4.4.14
152 * @param tool GoExtTool object.
153 * @return The data source.
154 */
155 GoFx(GoDataSource) GoExtTool_Source(GoExtTool tool);
156
157 /**
158 * Gets the data source option list count.
159 *
160 * @public @memberof GoExtTool
161 * @version Introduced in firmware 4.4.4.14
162 * @param tool GoExtTool object.
163 * @return The current tool data source option list count.
164 */
165 GoFx(kSize) GoExtTool_SourceOptionCount(GoExtTool tool);
166
167 /**
168 * Gets the data source option at the given index.
169 *
170 * @public @memberof GoExtTool
171 * @version Introduced in firmware 4.4.4.14
172 * @param tool GoExtTool object.
173 * @param index The index of the option list to access.
174 * @return The tool data source option at the given index, or k32U_MAX if an invalid index is given.
175 */
176 GoFx(k32u) GoExtTool_SourceOptionAt(GoExtTool tool, kSize index);
177
178 /**
179 * Returns a boolean value representing whether the tool supports x anchoring.
180 *
181 * @public @memberof GoExtTool
182 * @version Introduced in firmware 4.4.4.14
183 * @param tool GoExtTool object.
184 * @return kTRUE if supported, kFALSE if not.
185 */
186 GoFx(kBool) GoExtTool_XAnchorSupportEnabled(GoExtTool tool);
187
188 /**
189 * Gets the X-anchoring option list count.
190 *
191 * @public @memberof GoExtTool
192 * @version Introduced in firmware 4.4.4.14
193 *
194 * @param tool GoExtTool object.
195 * @return The X-anchoring option list count.
196 */
197 GoFx(kSize) GoExtTool_XAnchorOptionCount(GoExtTool tool);
198
199 /**
200 * Gets the X-anchoring option at the given index.
201 *
202 * @public @memberof GoExtTool
203 * @version Introduced in firmware 4.4.4.14
204 *
205 * @param tool GoExtTool object.
206 * @param index The index of the option list to access.
207 * @return The X-anchoring option at the given index or k32U_MAX if invalid.
208 */
209 GoFx(k32u) GoExtTool_XAnchorOptionAt(GoExtTool tool, kSize index);
210
211 /**
212 * Gets the current X-anchoring source.
213 *
214 * @public @memberof GoExtTool
215 * @version Introduced in firmware 4.4.4.14
216 *
217 * @param tool GoExtTool object.
218 * @return The X-anchoring source or -1 if no source is currently set.
219 */
220 GoFx(k32s) GoExtTool_XAnchor(GoExtTool tool);
221
222 /**
223 * Sets the X-anchoring source.
224 *
225 * @public @memberof GoExtTool
226 * @version Introduced in firmware 4.4.4.14
227 *
228 * @param tool GoExtTool object.
229 * @param id The measurement ID of a valid X-anchoring source.
230 * @return Operation status.
231 * @see GoExtTool_AnchorSupportEnabled
232 */
233 GoFx(kStatus) GoExtTool_SetXAnchor(GoExtTool tool, k32s id);
234
235 /**
236 * Returns a boolean value representing whether or not a valid X-anchoring source has been set for X-anchoring.
237 *
238 * @public @memberof GoExtTool
239 * @version Introduced in firmware 4.4.4.14
240 *
241 * @param tool GoExtTool object.
242 * @return kTRUE if a valid anchoring source is currently set and kFALSE otherwise.
243 * @see GoExtTool_AnchorSupportEnabled
244 */
245 GoFx(kBool) GoExtTool_XAnchorEnabled(GoExtTool tool);
246
247 ///@cond (Gocator_3x00)
248
249 /**
250 * Returns a boolean value representing whether the tool supports y anchoring.
251 *
252 * @public @memberof GoExtTool
253 * @version Introduced in firmware 4.6.3.95
254 * @param tool GoExtTool object.
255 * @return kTRUE if supported, kFALSE if not.
256 */
257 GoFx(kBool) GoExtTool_YAnchorSupportEnabled(GoExtTool tool);
258
259 /**
260 * Gets the Y-anchoring option list count.
261 *
262 * @public @memberof GoExtTool
263 * @version Introduced in firmware 4.4.4.14
264 *
265 * @param tool GoExtTool object.
266 * @return The Y-anchoring option list count.
267 */
268 GoFx(kSize) GoExtTool_YAnchorOptionCount(GoExtTool tool);
269
270 /**
271 * Gets the Y-anchoring option at the given index.
272 *
273 * @public @memberof GoExtTool
274 * @version Introduced in firmware 4.4.4.14
275 *
276 * @param tool GoExtTool object.
277 * @param index The index of the option list to access.
278 * @return The Y-anchoring option at the given index or k32U_MAX if invalid.
279 */
280 GoFx(k32u) GoExtTool_YAnchorOptionAt(GoExtTool tool, kSize index);
281
282 /**
283 * Gets the current Y-anchoring source.
284 *
285 * @public @memberof GoExtTool
286 * @version Introduced in firmware 4.4.4.14
287 *
288 * @param tool GoExtTool object.
289 * @return The Y-anchoring source or -1 if no source is currently set.
290 */
291 GoFx(k32s) GoExtTool_YAnchor(GoExtTool tool);
292
293 /**
294 * Sets the Y-anchoring source.
295 *
296 * @public @memberof GoExtTool
297 * @version Introduced in firmware 4.4.4.14
298 * @param tool GoExtTool object.
299 * @param id The measurement ID of a valid Y-anchoring source.
300 * @return Operation status.
301 * @see GoExtTool_AnchorSupportEnabled, GoExtTool_Type
302 */
303 GoFx(kStatus) GoExtTool_SetYAnchor(GoExtTool tool, k32s id);
304
305 /**
306 * Returns a boolean value representing whether or not a valid Y-anchoring source has been set for Y-anchoring.
307 *
308 * @public @memberof GoExtTool
309 * @version Introduced in firmware 4.4.4.14
310 * @param tool GoExtTool object.
311 * @return kTRUE if a valid anchoring source is currently set and kFALSE otherwise.
312 * @see GoExtTool_AnchorSupportEnabled, GoExtTool_Type
313 */
314 GoFx(kBool) GoExtTool_YAnchorEnabled(GoExtTool tool);
315
316 ///@endcond
317
318 ///@cond (Gocator_2x00 || Gocator_3x00)
319
320 /**
321 * Returns a boolean value representing whether the tool supports z anchoring.
322 *
323 * @public @memberof GoExtTool
324 * @version Introduced in firmware 4.6.3.95
325 * @param tool GoExtTool object.
326 * @return kTRUE if supported, kFALSE if not.
327 */
328 GoFx(kBool) GoExtTool_ZAnchorSupportEnabled(GoExtTool tool);
329
330 /**
331 * Gets the Z-anchoring option list count.
332 *
333 * @public @memberof GoExtTool
334 * @version Introduced in firmware 4.4.4.14
335 * @param tool GoExtTool object.
336 * @return The X-anchoring option list count.
337 */
338 GoFx(kSize) GoExtTool_ZAnchorOptionCount(GoExtTool tool);
339
340 /**
341 * Gets the Z-anchoring option at the given index.
342 *
343 * @public @memberof GoExtTool
344 * @version Introduced in firmware 4.4.4.14
345 * @param tool GoExtTool object.
346 * @param index The index of the option list to access.
347 * @return The Z-anchoring option at the given index or k32U_MAX if invalid.
348 */
349 GoFx(k32u) GoExtTool_ZAnchorOptionAt(GoExtTool tool, kSize index);
350
351 /**
352 * Gets the current Z-anchoring source.
353 *
354 * @public @memberof GoExtTool
355 * @version Introduced in firmware 4.4.4.14
356 * @param tool GoExtTool object.
357 * @return The Z-anchoring source or -1 if no source is currently set.
358 */
359 GoFx(k32s) GoExtTool_ZAnchor(GoExtTool tool);
360
361 /**
362 * Sets the Z-anchoring source.
363 *
364 * @public @memberof GoExtTool
365 * @version Introduced in firmware 4.4.4.14
366 * @param tool GoExtTool object.
367 * @param id The measurement ID of a valid Z-anchoring source.
368 * @return Operation status.
369 * @see GoExtTool_AnchorSupportEnabled, GoExtTool_Type
370 */
371 GoFx(kStatus) GoExtTool_SetZAnchor(GoExtTool tool, k32s id);
372
373 /**
374 * Returns a boolean value representing whether or not a valid Z-anchoring source has been set for Z-anchoring.
375 *
376 * @public @memberof GoExtTool
377 * @version Introduced in firmware 4.4.4.14
378 * @param tool GoExtTool object.
379 * @return kTRUE if a valid anchoring source is currently set and kFALSE otherwise.
380 * @see GoExtTool_AnchorSupportEnabled, GoExtTool_Type
381 */
382 GoFx(kBool) GoExtTool_ZAnchorEnabled(GoExtTool tool);
383
384 ///@endcond
385
386 ///@cond (Gocator_2x00 || Gocator_3x00)
387
388 /**
389 * Returns a boolean value representing whether the tool supports z angle anchoring.
390 *
391 * @public @memberof GoExtTool
392 * @version Introduced in firmware 4.6.3.95
393 * @param tool GoExtTool object.
394 * @return kTRUE if supported, kFALSE if not.
395 */
396 GoFx(kBool) GoExtTool_ZAngleAnchorSupportEnabled(GoExtTool tool);
397
398 /**
399 * Gets the ZAngle-anchoring option list count.
400 *
401 * @public @memberof GoExtTool
402 * @version Introduced in firmware 4.6.2.133
403 * @param tool GoExtTool object.
404 * @return The ZAngle-anchoring option list count.
405 */
406 GoFx(kSize) GoExtTool_ZAngleAnchorOptionCount(GoExtTool tool);
407
408 /**
409 * Gets the ZAngle-anchoring option at the given index.
410 *
411 * @public @memberof GoExtTool
412 * @version Introduced in firmware 4.6.2.133
413 * @param tool GoExtTool object.
414 * @param index The index of the option list to access.
415 * @return The ZAngle-anchoring option at the given index or k32U_MAX if invalid.
416 */
417 GoFx(k32u) GoExtTool_ZAngleAnchorOptionAt(GoExtTool tool, kSize index);
418
419 /**
420 * Gets the current Z-anchoring source.
421 *
422 * @public @memberof GoExtTool
423 * @version Introduced in firmware 4.6.2.133
424 * @param tool GoExtTool object.
425 * @return The ZAngle-anchoring source or -1 if no source is currently set.
426 */
427 GoFx(k32s) GoExtTool_ZAngleAnchor(GoExtTool tool);
428
429 /**
430 * Sets the Z-anchoring source.
431 *
432 * @public @memberof GoExtTool
433 * @version Introduced in firmware 4.6.2.133
434 * @param tool GoExtTool object.
435 * @param id The measurement ID of a valid Z-anchoring source.
436 * @return Operation status.
437 * @see GoExtTool_AngleAnchorSupportEnabled, GoExtTool_Type
438 */
439 GoFx(kStatus) GoExtTool_SetZAngleAnchor(GoExtTool tool, k32s id);
440
441 /**
442 * Returns a boolean value representing whether or not a valid Z-anchoring source has been set for Z-anchoring.
443 *
444 * @public @memberof GoExtTool
445 * @version Introduced in firmware 4.6.2.133
446 * @param tool GoExtTool object.
447 * @return kTRUE if a valid anchoring source is currently set and kFALSE otherwise.
448 * @see GoExtTool_AngleAnchorSupportEnabled, GoExtTool_Type
449 */
450 GoFx(kBool) GoExtTool_ZAngleAnchorEnabled(GoExtTool tool);
451
452 ///@endcond
453
454 /**
455 * Retrieves the first found instance of a measurement for a given enumeration type.
456 *
457 * @public @memberof GoExtTool
458 * @version Introduced in firmware 4.4.4.14
459 * @param tool GoExtTool object.
460 * @param name The name of the measurement to retrieve.
461 * @return A measurement object if one is found, otherwise kNULL.
462 */
463 GoFx(GoMeasurement) GoExtTool_FindMeasurementByName(GoExtTool tool, const kChar* name);
464
465 /**
466 * Returns the number of parameters available for the given tool.
467 *
468 * @public @memberof GoExtTool
469 * @version Introduced in firmware 4.4.4.14
470 * @param tool GoExtTool object.
471 * @return Parameter count.
472 */
473 GoFx(kSize) GoExtTool_ParameterCount(GoExtTool tool);
474
475 /**
476 * Returns the parameter at the given index.
477 *
478 * @public @memberof GoExtTool
479 * @version Introduced in firmware 4.4.4.14
480 * @param tool GoExtTool object.
481 * @param index The index of the parameter to retrieve.
482 * @return The custom tool parameter object.
483 */
484 GoFx(GoExtParam) GoExtTool_ParameterAt(GoExtTool tool, kSize index);
485
486 /**
487 * Returns the parameter which matches the given label.
488 *
489 * @public @memberof GoExtTool
490 * @version Introduced in firmware 4.4.4.14
491 * @param tool GoExtTool object.
492 * @param label The label of the parameter to retrieve.
493 * @return The parameter matching the label or kNULL if no match is found.
494 * @remark The search is case sensitive.
495 */
496 GoFx(GoExtParam) GoExtTool_FindParameterById(GoExtTool tool, const kChar* label);
497
498 /**
499 * Returns the number of tool data outputs available for the given tool.
500 *
501 * @public @memberof GoExtTool
502 * @version Introduced in firmware 4.7.3.97
503 * @param tool GoExtTool object.
504 * @return Tool data output count.
505 */
506 GoFx(kSize) GoExtTool_ToolDataOutputCount(GoExtTool tool);
507
508 /**
509 * Returns the tool data output item at the given index.
510 *
511 * @public @memberof GoExtTool
512 * @version Introduced in firmware 4.7.3.97
513 * @param tool GoExtTool object.
514 * @param index The index of the tool data output item to retrieve.
515 * @return The custom tool data output object or kNULL if no such entry.
516 */
517 GoFx(GoExtToolDataOutput) GoExtTool_ToolDataOutputAt(GoExtTool tool, kSize index);
518
519 /**
520 * Compares the tool with a specific tool type.
521 *
522 * @public @memberof GoExtTool
523 * @version Introduced in firmware 5.2.13.12
524 * @param tool GoExtTool object.
525 * @param toolType tool type to compare the tool object to.
526 * @return kTrue if tool object eaquals to toolType, otherwise kFalse.
527 */
528 GoFx(kBool) GoExtTool_Equals(GoExtTool tool, kString toolType);
529
530 kEndHeader()
531 #include <GoSdk/Tools/GoExtTool.x.h>
532
533 #endif
GoExtTool::GoExtTool_ToolDataOutputCount
kSize GoExtTool_ToolDataOutputCount(GoExtTool tool)
Returns the number of tool data outputs available for the given tool.
k32u
GoTool.h
Declares the base GoTool class.
GoExtTool::GoExtTool_ParameterAt
GoExtParam GoExtTool_ParameterAt(GoExtTool tool, kSize index)
Returns the parameter at the given index.
GoMeasurement
Represents the base class for a tool measurement or script output.
GoExtTool::GoExtTool_FindParameterById
GoExtParam GoExtTool_FindParameterById(GoExtTool tool, const kChar *label)
Returns the parameter which matches the given label.
GoExtTool::GoExtTool_XAnchorOptionAt
k32u GoExtTool_XAnchorOptionAt(GoExtTool tool, kSize index)
Gets the X-anchoring option at the given index.
GoExtTool::GoExtTool_Equals
kBool GoExtTool_Equals(GoExtTool tool, kString toolType)
Compares the tool with a specific tool type.
GoExtTool::GoExtTool_SetSource
kStatus GoExtTool_SetSource(GoExtTool tool, GoDataSource source)
Sets the data source.
GoExtTool::GoExtTool_StreamOptionAt
GoDataStream GoExtTool_StreamOptionAt(GoExtTool tool, kSize index)
Gets the data stream option at the given index.
kSize
GoExtTool::GoExtTool_Source
GoDataSource GoExtTool_Source(GoExtTool tool)
Gets the data source.
GoDataStream
Represents a data stream which consists of a data step and ID.
Definition: GoSdkDef.h:1193
GoDataSource
Represents a data source.
kChar
GoExtTool::GoExtTool_ParameterCount
kSize GoExtTool_ParameterCount(GoExtTool tool)
Returns the number of parameters available for the given tool.
GoExtTool::GoExtTool_MeasurementCount
kSize GoExtTool_MeasurementCount(GoExtTool tool)
Returns the measurement count.
GoExtToolDataOutput.h
Declares the GoExtToolDataOutput class.
GoExtTool::GoExtTool_StreamOptionCount
kSize GoExtTool_StreamOptionCount(GoExtTool tool)
Gets the data stream option list count.
GoExtTool::GoExtTool_SetXAnchor
kStatus GoExtTool_SetXAnchor(GoExtTool tool, k32s id)
Sets the X-anchoring source.
GoExtTool::GoExtTool_Version
const kChar * GoExtTool_Version(GoExtTool tool)
Returns the tool configuration version string.
GoSdkDef.h
Essential SDK declarations.
GoExtTool::GoExtTool_SourceOptionCount
kSize GoExtTool_SourceOptionCount(GoExtTool tool)
Gets the data source option list count.
GoTool
Represents the base tool class.
GoExtTool::GoExtTool_SetDisplayName
kStatus GoExtTool_SetDisplayName(GoExtTool tool, const kChar *name)
Sets the name of the tool.
GoExtTool::GoExtTool_ToolDataOutputAt
GoExtToolDataOutput GoExtTool_ToolDataOutputAt(GoExtTool tool, kSize index)
Returns the tool data output item at the given index.
k32s
GoExtTool::GoExtTool_Type
const kChar * GoExtTool_Type(GoExtTool tool)
Retrieves the type of the tool.
GoExtTool::GoExtTool_DisplayName
const kChar * GoExtTool_DisplayName(GoExtTool tool)
Retrieves the display name of the tool.
GoExtTool
Represents an extensible tool.
GoExtToolDataOutput
Represents the base class for a tool data output.
kString
GoExtTool::GoExtTool_FindMeasurementByName
GoMeasurement GoExtTool_FindMeasurementByName(GoExtTool tool, const kChar *name)
Retrieves the first found instance of a measurement for a given enumeration type.
GoExtTool::GoExtTool_XAnchorOptionCount
kSize GoExtTool_XAnchorOptionCount(GoExtTool tool)
Gets the X-anchoring option list count.
GoExtTool::GoExtTool_MeasurementAt
GoMeasurement GoExtTool_MeasurementAt(GoExtTool tool, kSize index)
Retrieves the measurement at the given index.
kStatus
GoExtTool::GoExtTool_XAnchorEnabled
kBool GoExtTool_XAnchorEnabled(GoExtTool tool)
Returns a boolean value representing whether or not a valid X-anchoring source has been set for X-anc...
kXml.h
GoExtTool::GoExtTool_Stream
GoDataStream GoExtTool_Stream(GoExtTool tool)
Gets the data stream.
GoExtTool::GoExtTool_XAnchorSupportEnabled
kBool GoExtTool_XAnchorSupportEnabled(GoExtTool tool)
Returns a boolean value representing whether the tool supports x anchoring.
kBool
GoExtTool::GoExtTool_XAnchor
k32s GoExtTool_XAnchor(GoExtTool tool)
Gets the current X-anchoring source.
GoExtTool::GoExtTool_SetStream
kStatus GoExtTool_SetStream(GoExtTool tool, GoDataStream stream)
Sets the data stream.
GoExtTool::GoExtTool_SourceOptionAt
k32u GoExtTool_SourceOptionAt(GoExtTool tool, kSize index)
Gets the data source option at the given index.