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) 2015 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  * Gets the ASCII protocol output delimiter string.
290  *
291  * @public @memberof GoSerial
292  * @version Introduced in firmware 4.0.10.27
293  * @param serial GoSerial object.
294  * @return A pointer to the string representing the ASCII protocol output delimiter.
295  */
296 GoFx(kChar*) GoSerial_AsciiDelimiter(GoSerial serial);
297 
298 /**
299  * Sets the ASCII protocol output delimiter string.
300  *
301  * @public @memberof GoSerial
302  * @version Introduced in firmware 4.0.10.27
303  * @param serial GoSerial object.
304  * @param string A pointer to the string representing the ASCII protocol output delimiter.
305  * @return Operation status.
306  */
307 GoFx(kStatus) GoSerial_SetAsciiDelimiter(GoSerial serial, const kChar* string);
308 
309 /**
310  * Gets the ASCII protocol output terminator 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 terminator representing the ASCII protocol output delimiter.
316  */
317 GoFx(kChar*) GoSerial_AsciiTerminator(GoSerial serial);
318 
319 /**
320  * Sets the ASCII protocol output terminator 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 terminator.
326  * @return Operation status.
327  */
328 GoFx(kStatus) GoSerial_SetAsciiTerminator(GoSerial serial, const kChar* string);
329 
330 /**
331  * Gets the ASCII protocol output invalid value 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 string representing the ASCII protocol output invalid value.
337  */
338 GoFx(kChar*) GoSerial_AsciiInvalidValue(GoSerial serial);
339 
340 /**
341  * Sets the ASCII protocol output invalid value 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 invalid value.
347  * @return Operation status.
348  */
349 GoFx(kStatus) GoSerial_SetAsciiInvalidValue(GoSerial serial, const kChar* string);
350 
351 /**
352  * Gets the ASCII protocol output custom data format 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  */
359 GoFx(kChar*) GoSerial_AsciiCustomDataFormat(GoSerial serial);
360 
361 /**
362  * Sets the ASCII protocol output custom data format.
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 custom data format.
368  * @return Operation status.
369  */
370 GoFx(kStatus) GoSerial_SetAsciiCustomDataFormat(GoSerial serial, const kChar* string);
371 
372 /**
373  * Sets the enabled state of the ASCII protocol custom data format.
374  *
375  * @public @memberof GoSerial
376  * @version Introduced in firmware 4.0.10.27
377  * @param serial GoSerial object.
378  * @param enabled kTRUE to enable and kFALSE to disable.
379  * @return Operation status.
380  */
381 GoFx(kStatus) GoSerial_EnableAsciiCustomFormat(GoSerial serial, kBool enabled);
382 
383 /**
384  * Gets the enabled state of the ASCII protocol custom data format.
385  *
386  * @public @memberof GoSerial
387  * @version Introduced in firmware 4.0.10.27
388  * @param serial GoSerial object.
389  * @return kTRUE if enabled and kFALSE otherwise.
390  */
391 GoFx(kBool) GoSerial_AsciiCustomFormatEnabled(GoSerial serial);
392 
393 kEndHeader()
394 #include <GoSdk/Outputs/GoSerial.x.h>
395 
396 #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...
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.
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.