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