Gocator API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
GoSerial.h
Go to the documentation of this file.
1 /**
2  * @file GoSerial.h
3  * @brief Declares the GoSerial class.
4  *
5  * @internal
6  * Copyright (C) 2016 by LMI Technologies Inc.
7  * Licensed under the MIT License.
8  * Redistributed files must retain the above copyright notice.
9  */
10 #ifndef GO_SDK_SERIAL_H
11 #define GO_SDK_SERIAL_H
12 
13 #include <GoSdk/GoSdkDef.h>
14 kBeginHeader()
15 
16 /**
17  * @class GoSerial
18  * @extends kObject
19  * @ingroup GoSdk-Serial
20  * @brief Represents Serial output settings.
21  */
22 typedef kObject GoSerial;
23 
24 /**
25  * Gets the count of serial protocol options.
26  *
27  * @public @memberof GoSerial
28  * @version Introduced in firmware 4.1.3.106
29  * @param serial GoSerial object.
30  * @return Protocol option.
31  */
32 GoFx(kSize) GoSerial_ProtocolOptionCount(GoSerial serial);
33 
34 /**
35  * Gets the serial protocol option at the specified index.
36  *
37  * @public @memberof GoSerial
38  * @version Introduced in firmware 4.1.3.106
39  * @param serial GoSerial object.
40  * @param index Protocol option index.
41  * @return Protocol option.
42  */
43 GoFx(k32u) GoSerial_ProtocolOptionAt(GoSerial serial, kSize index);
44 
45 /**
46  * Sets the Serial output protocol.
47  *
48  * @public @memberof GoSerial
49  * @version Introduced in firmware 4.1.3.106
50  * @param serial GoSerial object.
51  * @param protocol Protocol option value;
52  * @return Operation status.
53  * @see GoSerial_ProtocolOptionCount, GoSerial_ProtocolOptionAt
54  */
55 GoFx(kStatus) GoSerial_SetProtocol(GoSerial serial, k32u protocol);
56 
57 /**
58  * Returns the current Serial output protocol value.
59  *
60  * @public @memberof GoSerial
61  * @version Introduced in firmware 4.1.3.106
62  * @param serial GoSerial object.
63  * @return An integer corresponding to the current Serial output protocol.
64  */
65 GoFx(k32u) GoSerial_Protocol(GoSerial serial);
66 
67 /**
68  * Gets the number of source options.
69  *
70  * @public @memberof GoSerial
71  * @version Introduced in firmware 4.0.10.27
72  * @param serial GoSerial object.
73  * @return Source option.
74  */
75 GoFx(kSize) GoSerial_OptionCount(GoSerial serial);
76 
77 /**
78  * Gets the source option at the specified index.
79  *
80  * @public @memberof GoSerial
81  * @version Introduced in firmware 4.0.10.27
82  * @param serial GoSerial object.
83  * @param index Source option index.
84  * @return Source option.
85  */
86 GoFx(k32u) GoSerial_OptionAt(GoSerial serial, kSize index);
87 
88 /**
89  * Gets the number of sources of the specified output type that are currently selected for transmission.
90  *
91  * @public @memberof GoSerial
92  * @version Introduced in firmware 4.0.10.27
93  * @param serial GoSerial object.
94  * @return Count of selected sources.
95  */
96 GoFx(kSize) GoSerial_SourceCount(GoSerial serial);
97 
98 /**
99  * Gets the identifier of the selected output source at the specified index.
100  *
101  * @public @memberof GoSerial
102  * @version Introduced in firmware 4.0.10.27
103  * @param serial GoSerial object.
104  * @param index Selected source index.
105  * @return Source identifier.
106  */
107 GoFx(k32u) GoSerial_SourceAt(GoSerial serial, kSize index);
108 
109 /**
110  * Selects the specified source for transmission.
111  *
112  * @public @memberof GoSerial
113  * @version Introduced in firmware 4.0.10.27
114  * @param serial GoSerial object.
115  * @param sourceId Source identifier.
116  * @return Operation status.
117  */
118 GoFx(kStatus) GoSerial_AddSource(GoSerial serial, k32u sourceId);
119 
120 /**
121  * Removes (de-selects) the source at the specified index.
122  *
123  * @public @memberof GoSerial
124  * @version Introduced in firmware 4.0.10.27
125  * @param serial GoSerial object.
126  * @param index Index of the source to be removed.
127  * @return Operation status.
128  */
129 GoFx(kStatus) GoSerial_RemoveSource(GoSerial serial, kSize index);
130 
131 /**
132  * Removes all selected sources for the specified output type.
133  *
134  * @public @memberof GoSerial
135  * @version Introduced in firmware 4.0.10.27
136  * @param serial GoSerial object.
137  * @return Operation status.
138  */
139 GoFx(kStatus) GoSerial_ClearSources(GoSerial serial);
140 
141 /**
142  * Sets the Selcom protocol output rate.
143  *
144  * @public @memberof GoSerial
145  * @version Introduced in firmware 4.0.10.27
146  * @param serial GoSerial object.
147  * @param rate The Selcom rate to use.
148  * @return Operation status.
149  * @see GoSerial_SelcomRateOptionCount, GoSerial_SelcomRateOptionAt
150  */
151 GoFx(kStatus) GoSerial_SetSelcomRate(GoSerial serial, k32u rate);
152 
153 /**
154  * Gets the index of the currently selected Selcom output rate.
155  *
156  * @public @memberof GoSerial
157  * @version Introduced in firmware 4.0.10.27
158  * @param serial GoSerial object.
159  * @return An integer corresponding to the current Selcom output rate.
160  */
161 GoFx(k32u) GoSerial_SelcomRate(GoSerial serial);
162 
163 /**
164  * Gets the list of Selcom rate options.
165  *
166  * @public @memberof GoSerial
167  * @version Introduced in firmware 4.0.10.27
168  * @param serial GoSerial object.
169  * @return An array list of Selcom rate options.
170  */
171 GoFx(kArrayList) GoSerial_SelcomRateOptionList(GoSerial serial);
172 
173 /**
174  * Returns the count of available Selcom protocol output rate options.
175  *
176  * @public @memberof GoSerial
177  * @version Introduced in firmware 4.0.10.27
178  * @param serial GoSerial object.
179  * @return Count of available Selcom protocol output rate options.
180  */
181 GoFx(kSize) GoSerial_SelcomRateOptionCount(GoSerial serial);
182 
183 /**
184  * Gets the Selcom rate option at the specified index.
185  *
186  * @public @memberof GoSerial
187  * @version Introduced in firmware 4.0.10.27
188  * @param serial GoSerial object.
189  * @param index Selcom rate option index.
190  * @return Selcom rate option value.
191  */
192 GoFx(k32u) GoSerial_SelcomRateOptionAt(GoSerial serial, kSize index);
193 
194 /**
195  * Sets the Selcom protocol output format.
196  *
197  * @public @memberof GoSerial
198  * @version Introduced in firmware 4.0.10.27
199  * @param serial GoSerial object.
200  * @param format The output format to set.
201  * @return Operation status.
202  */
203 GoFx(kStatus) GoSerial_SetSelcomFormat(GoSerial serial, GoSelcomFormat format);
204 
205 /**
206  * Gets the current Selcom output format.
207  *
208  * @public @memberof GoSerial
209  * @version Introduced in firmware 4.0.10.27
210  * @param serial GoSerial object.
211  * @return The current Selcom output format.
212  */
213 GoFx(GoSelcomFormat) GoSerial_SelcomFormat(GoSerial serial);
214 
215 /**
216  * Gets the list of Selcom format options.
217  *
218  * @public @memberof GoSerial
219  * @version Introduced in firmware 4.0.10.27
220  * @param serial GoSerial object.
221  * @return An array list of Selcom format options.
222  */
223 GoFx(kArrayList) GoSerial_SelcomFormatOptionList(GoSerial serial);
224 
225 /**
226  * Returns the count of available Selcom protocol output format options.
227  *
228  * @public @memberof GoSerial
229  * @version Introduced in firmware 4.0.10.27
230  * @param serial GoSerial object.
231  * @return The count of available Selcom protocol output format options.
232  */
233 GoFx(kSize) GoSerial_SelcomFormatOptionCount(GoSerial serial);
234 
235 /**
236  * Gets the Selcom format option at the specified index.
237  *
238  * @public @memberof GoSerial
239  * @version Introduced in firmware 4.0.10.27
240  * @param serial GoSerial object.
241  * @param index Selcom format option index.
242  * @return Selcom format option value.
243  */
244 GoFx(GoSelcomFormat) GoSerial_SelcomFormatOptionAt(GoSerial serial, kSize index);
245 
246 /**
247  * Sets the Selcom protocol maximum data scale value.
248  *
249  * @public @memberof GoSerial
250  * @version Introduced in firmware 4.0.10.27
251  * @param serial GoSerial object.
252  * @param value Maximum data scale value to set.
253  * @return Operation status.
254  */
255 GoFx(kStatus) GoSerial_SetSelcomDataScaleMax(GoSerial serial, k64f value);
256 
257 /**
258  * Gets the Selcom protocol data scale maximum value.
259  *
260  * @public @memberof GoSerial
261  * @version Introduced in firmware 4.0.10.27
262  * @param serial GoSerial object.
263  * @return Maximum data scale value.
264  */
265 GoFx(k64f) GoSerial_SelcomDataScaleMax(GoSerial serial);
266 
267 /**
268  * Sets the Selcom protocol minimum data scale value.
269  *
270  * @public @memberof GoSerial
271  * @version Introduced in firmware 4.0.10.27
272  * @param serial GoSerial object.
273  * @param value Minimum data scale value to set.
274  * @return Operation status.
275  */
276 GoFx(kStatus) GoSerial_SetSelcomDataScaleMin(GoSerial serial, k64f value);
277 
278 /**
279  * Gets the Selcom protocol data scale minimum value.
280  *
281  * @public @memberof GoSerial
282  * @version Introduced in firmware 4.0.10.27
283  * @param serial GoSerial object.
284  * @return Minimum data scale value.
285  */
286 GoFx(k64f) GoSerial_SelcomDataScaleMin(GoSerial serial);
287 
288 /**
289  * Sets the delay from exposure until output is triggered, in units based on GoDomain.
290  * mm units when GoDomain is distance, uS units when GoDomain is time.
291  *
292  * @public @memberof GoSerial
293  * @version Introduced in firmware 4.4.4.14
294  * @param serial GoSerial object.
295  * @param delay k64s object.
296  * @return Operation status.
297  */
298 GoFx(kStatus) GoSerial_SetSelcomDelay(GoSerial serial, k64u delay);
299 
300 /**
301  * Gets the output delay.
302  *
303  * @public @memberof GoSerial
304  * @version Introduced in firmware 4.4.4.14
305  * @param serial GoSerial object.
306  * @return The output delay (us or mm).
307  */
308 GoFx(k64u) GoSerial_SelcomDelay(GoSerial serial);
309 
310 /**
311  * Gets the ASCII protocol output delimiter string.
312  *
313  * @public @memberof GoSerial
314  * @version Introduced in firmware 4.0.10.27
315  * @param serial GoSerial object.
316  * @return A pointer to the string representing the ASCII protocol output delimiter.
317  */
318 GoFx(kChar*) GoSerial_AsciiDelimiter(GoSerial serial);
319 
320 /**
321  * Sets the ASCII protocol output delimiter string.
322  *
323  * @public @memberof GoSerial
324  * @version Introduced in firmware 4.0.10.27
325  * @param serial GoSerial object.
326  * @param string A pointer to the string representing the ASCII protocol output delimiter.
327  * @return Operation status.
328  */
329 GoFx(kStatus) GoSerial_SetAsciiDelimiter(GoSerial serial, const kChar* string);
330 
331 /**
332  * Gets the ASCII protocol output terminator string.
333  *
334  * @public @memberof GoSerial
335  * @version Introduced in firmware 4.0.10.27
336  * @param serial GoSerial object.
337  * @return A pointer to the terminator representing the ASCII protocol output delimiter.
338  */
339 GoFx(kChar*) GoSerial_AsciiTerminator(GoSerial serial);
340 
341 /**
342  * Sets the ASCII protocol output terminator string.
343  *
344  * @public @memberof GoSerial
345  * @version Introduced in firmware 4.0.10.27
346  * @param serial GoSerial object.
347  * @param string A pointer to the string representing the ASCII protocol output terminator.
348  * @return Operation status.
349  */
350 GoFx(kStatus) GoSerial_SetAsciiTerminator(GoSerial serial, const kChar* string);
351 
352 /**
353  * Gets the ASCII protocol output invalid value string.
354  *
355  * @public @memberof GoSerial
356  * @version Introduced in firmware 4.0.10.27
357  * @param serial GoSerial object.
358  * @return A pointer to the string representing the ASCII protocol output invalid value.
359  */
360 GoFx(kChar*) GoSerial_AsciiInvalidValue(GoSerial serial);
361 
362 /**
363  * Sets the ASCII protocol output invalid value string.
364  *
365  * @public @memberof GoSerial
366  * @version Introduced in firmware 4.0.10.27
367  * @param serial GoSerial object.
368  * @param string A pointer to the string representing the ASCII protocol output invalid value.
369  * @return Operation status.
370  */
371 GoFx(kStatus) GoSerial_SetAsciiInvalidValue(GoSerial serial, const kChar* string);
372 
373 /**
374  * Gets the ASCII protocol output custom data format string.
375  *
376  * @public @memberof GoSerial
377  * @version Introduced in firmware 4.0.10.27
378  * @param serial GoSerial object.
379  * @return A pointer to the string representing the ASCII protocol output invalid value.
380  */
381 GoFx(kChar*) GoSerial_AsciiCustomDataFormat(GoSerial serial);
382 
383 /**
384  * Sets the ASCII protocol output custom data format.
385  *
386  * @public @memberof GoSerial
387  * @version Introduced in firmware 4.0.10.27
388  * @param serial GoSerial object.
389  * @param string A pointer to the string representing the ASCII protocol output custom data format.
390  * @return Operation status.
391  */
392 GoFx(kStatus) GoSerial_SetAsciiCustomDataFormat(GoSerial serial, const kChar* string);
393 
394 /**
395  * Sets the enabled state of the ASCII protocol custom data format.
396  *
397  * @public @memberof GoSerial
398  * @version Introduced in firmware 4.0.10.27
399  * @param serial GoSerial object.
400  * @param enabled kTRUE to enable and kFALSE to disable.
401  * @return Operation status.
402  */
403 GoFx(kStatus) GoSerial_EnableAsciiCustomFormat(GoSerial serial, kBool enabled);
404 
405 /**
406  * Gets the enabled state of the ASCII protocol custom data format.
407  *
408  * @public @memberof GoSerial
409  * @version Introduced in firmware 4.0.10.27
410  * @param serial GoSerial object.
411  * @return kTRUE if enabled and kFALSE otherwise.
412  */
413 GoFx(kBool) GoSerial_AsciiCustomFormatEnabled(GoSerial serial);
414 
415 kEndHeader()
416 #include <GoSdk/Outputs/GoSerial.x.h>
417 
418 #endif
GoSelcomFormat GoSerial_SelcomFormatOptionAt(GoSerial serial, kSize index)
Gets the Selcom format option at the specified index.
kBool GoSerial_AsciiCustomFormatEnabled(GoSerial serial)
Gets the enabled state of the ASCII protocol custom data format.
kChar * GoSerial_AsciiCustomDataFormat(GoSerial serial)
Gets the ASCII protocol output custom data format string.
kStatus GoSerial_SetAsciiCustomDataFormat(GoSerial serial, const kChar *string)
Sets the ASCII protocol output custom data format.
kSize GoSerial_SourceCount(GoSerial serial)
Gets the number of sources of the specified output type that are currently selected for transmission...
k64u GoSerial_SelcomDelay(GoSerial serial)
Gets the output delay.
kChar * GoSerial_AsciiDelimiter(GoSerial serial)
Gets the ASCII protocol output delimiter string.
k64f GoSerial_SelcomDataScaleMin(GoSerial serial)
Gets the Selcom protocol data scale minimum value.
kStatus GoSerial_RemoveSource(GoSerial serial, kSize index)
Removes (de-selects) the source at the specified index.
kStatus GoSerial_EnableAsciiCustomFormat(GoSerial serial, kBool enabled)
Sets the enabled state of the ASCII protocol custom data format.
k32u GoSerial_Protocol(GoSerial serial)
Returns the current Serial output protocol value.
kStatus GoSerial_SetProtocol(GoSerial serial, k32u protocol)
Sets the Serial output protocol.
kSize GoSerial_ProtocolOptionCount(GoSerial serial)
Gets the count of serial protocol options.
kStatus GoSerial_SetSelcomDataScaleMax(GoSerial serial, k64f value)
Sets the Selcom protocol maximum data scale value.
k32u GoSerial_OptionAt(GoSerial serial, kSize index)
Gets the source option at the specified index.
k32u GoSerial_ProtocolOptionAt(GoSerial serial, kSize index)
Gets the serial protocol option at the specified index.
kArrayList GoSerial_SelcomRateOptionList(GoSerial serial)
Gets the list of Selcom rate options.
kStatus GoSerial_SetSelcomDataScaleMin(GoSerial serial, k64f value)
Sets the Selcom protocol minimum data scale value.
kArrayList GoSerial_SelcomFormatOptionList(GoSerial serial)
Gets the list of Selcom format options.
kStatus GoSerial_AddSource(GoSerial serial, k32u sourceId)
Selects the specified source for transmission.
kSize GoSerial_OptionCount(GoSerial serial)
Gets the number of source options.
Essential SDK declarations.
kSize GoSerial_SelcomRateOptionCount(GoSerial serial)
Returns the count of available Selcom protocol output rate options.
k32u GoSerial_SelcomRate(GoSerial serial)
Gets the index of the currently selected Selcom output rate.
kChar * GoSerial_AsciiTerminator(GoSerial serial)
Gets the ASCII protocol output terminator string.
Represents Serial output settings.
GoSelcomFormat GoSerial_SelcomFormat(GoSerial serial)
Gets the current Selcom output format.
kChar * GoSerial_AsciiInvalidValue(GoSerial serial)
Gets the ASCII protocol output invalid value string.
k32u GoSerial_SelcomRateOptionAt(GoSerial serial, kSize index)
Gets the Selcom rate option at the specified index.
k32u GoSerial_SourceAt(GoSerial serial, kSize index)
Gets the identifier of the selected output source at the specified index.
kStatus GoSerial_SetSelcomFormat(GoSerial serial, GoSelcomFormat format)
Sets the Selcom protocol output format.
kStatus GoSerial_SetSelcomRate(GoSerial serial, k32u rate)
Sets the Selcom protocol output rate.
kStatus GoSerial_SetAsciiTerminator(GoSerial serial, const kChar *string)
Sets the ASCII protocol output terminator string.
kStatus GoSerial_SetAsciiDelimiter(GoSerial serial, const kChar *string)
Sets the ASCII protocol output delimiter string.
kSize GoSerial_SelcomFormatOptionCount(GoSerial serial)
Returns the count of available Selcom protocol output format options.
kStatus GoSerial_ClearSources(GoSerial serial)
Removes all selected sources for the specified output type.
kStatus GoSerial_SetSelcomDelay(GoSerial serial, k64u delay)
Sets the delay from exposure until output is triggered, in units based on GoDomain.
Represents the selcom format followed on the serial output.
k64f GoSerial_SelcomDataScaleMax(GoSerial serial)
Gets the Selcom protocol data scale maximum value.
kStatus GoSerial_SetAsciiInvalidValue(GoSerial serial, const kChar *string)
Sets the ASCII protocol output invalid value string.