Gocator API
 All Classes Files Functions Variables Typedefs Macros Groups 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) 2014 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>
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 number of source options.
26  *
27  * @public @memberof GoSerial
28  * @param serial GoSerial object.
29  * @return Source option.
30  */
31 GoFx(kSize) GoSerial_OptionCount(GoSerial serial);
32 
33 /**
34  * Gets the source option at the specified index.
35  *
36  * @public @memberof GoSerial
37  * @param serial GoSerial object.
38  * @param index Source option index.
39  * @return Source option.
40  */
41 GoFx(k32u) GoSerial_OptionAt(GoSerial serial, kSize index);
42 
43 /**
44  * Gets the number of sources of the specified output type that are currently selected for transmission.
45  *
46  * @public @memberof GoSerial
47  * @param serial GoSerial object.
48  * @return Count of selected sources.
49  */
50 GoFx(kSize) GoSerial_SourceCount(GoSerial serial);
51 
52 /**
53  * Gets the identifier of the selected output source at the specified index.
54  *
55  * @public @memberof GoSerial
56  * @param serial GoSerial object.
57  * @param index Selected source index.
58  * @return Source identifier.
59  */
60 GoFx(k32u) GoSerial_SourceAt(GoSerial serial, kSize index);
61 
62 /**
63  * Selects the specified source for transmission.
64  *
65  * @public @memberof GoSerial
66  * @param serial GoSerial object.
67  * @param sourceId Source identifier.
68  * @return Operation status.
69  */
70 GoFx(kStatus) GoSerial_AddSource(GoSerial serial, k32u sourceId);
71 
72 /**
73  * Removes (de-selects) the source at the specified index.
74  *
75  * @public @memberof GoSerial
76  * @param serial GoSerial object.
77  * @param index Index of the source to be removed.
78  * @return Operation status.
79  */
80 GoFx(kStatus) GoSerial_RemoveSource(GoSerial serial, kSize index);
81 
82 /**
83  * Removes all selected sources for the specified output type.
84  *
85  * @public @memberof GoSerial
86  * @param serial GoSerial object.
87  * @return Operation status.
88  */
89 GoFx(kStatus) GoSerial_ClearSources(GoSerial serial);
90 
91 /**
92  * Sets the Selcom protocol output rate.
93  *
94  * @public @memberof GoSerial
95  * @param serial GoSerial object.
96  * @param rate The Selcom rate to use.
97  * @return Operation status.
98  * @see GoSerial_SelcomRateOptionCount, GoSerial_SelcomRateOptionAt
99  */
100 GoFx(kStatus) GoSerial_SetSelcomRate(GoSerial serial, k32u rate);
101 
102 /**
103  * Gets the index of the currently selected Selcom output rate.
104  *
105  * @public @memberof GoSerial
106  * @param serial GoSerial object.
107  * @return An integer corresponding to the current Selcom output rate.
108  */
109 GoFx(k32u) GoSerial_SelcomRate(GoSerial serial);
110 
111 /**
112  * Gets the list of Selcom rate options.
113  *
114  * @public @memberof GoSerial
115  * @param serial GoSerial object.
116  * @return An array list of Selcom rate options.
117  */
118 GoFx(kArrayList) GoSerial_SelcomRateOptionList(GoSerial serial);
119 
120 /**
121  * Returns the count of available Selcom protocol output rate options.
122  *
123  * @public @memberof GoSerial
124  * @param serial GoSerial object.
125  * @return Count of available Selcom protocol output rate options.
126  */
127 GoFx(kSize) GoSerial_SelcomRateOptionCount(GoSerial serial);
128 
129 /**
130  * Gets the Selcom rate option at the specified index.
131  *
132  * @public @memberof GoSerial
133  * @param serial GoSerial object.
134  * @param index Selcom rate option index.
135  * @return Selcom rate option value.
136  */
137 GoFx(k32u) GoSerial_SelcomRateOptionAt(GoSerial serial, kSize index);
138 
139 /**
140  * Sets the Selcom protocol output format.
141  *
142  * @public @memberof GoSerial
143  * @param serial GoSerial object.
144  * @param format The output format to set.
145  * @return Operation status.
146  */
147 GoFx(kStatus) GoSerial_SetSelcomFormat(GoSerial serial, GoSelcomFormat format);
148 
149 /**
150  * Gets the current Selcom output format.
151  *
152  * @public @memberof GoSerial
153  * @param serial GoSerial object.
154  * @return The current Selcom output format.
155  */
156 GoFx(GoSelcomFormat) GoSerial_SelcomFormat(GoSerial serial);
157 
158 /**
159  * Gets the list of Selcom format options.
160  *
161  * @public @memberof GoSerial
162  * @param serial GoSerial object.
163  * @return An array list of Selcom format options.
164  */
165 GoFx(kArrayList) GoSerial_SelcomFormatOptionList(GoSerial serial);
166 
167 /**
168  * Returns the count of available Selcom protocol output format options.
169  *
170  * @public @memberof GoSerial
171  * @param serial GoSerial object.
172  * @return The count of available Selcom protocol output format options.
173  */
174 GoFx(kSize) GoSerial_SelcomFormatOptionCount(GoSerial serial);
175 
176 /**
177  * Gets the Selcom format option at the specified index.
178  *
179  * @public @memberof GoSerial
180  * @param serial GoSerial object.
181  * @param index Selcom format option index.
182  * @return Selcom format option value.
183  */
184 GoFx(GoSelcomFormat) GoSerial_SelcomFormatOptionAt(GoSerial serial, kSize index);
185 
186 /**
187  * Sets the Selcom protocol maximum data scale value.
188  *
189  * @public @memberof GoSerial
190  * @param serial GoSerial object.
191  * @param value Maximum data scale value to set.
192  * @return Operation status.
193  */
194 GoFx(kStatus) GoSerial_SetSelcomDataScaleMax(GoSerial serial, k64f value);
195 
196 /**
197  * Gets the Selcom protocol data scale maximum value.
198  *
199  * @public @memberof GoSerial
200  * @param serial GoSerial object.
201  * @return Maximum data scale value.
202  */
203 GoFx(k64f) GoSerial_SelcomDataScaleMax(GoSerial serial);
204 
205 /**
206  * Sets the Selcom protocol minimum data scale value.
207  *
208  * @public @memberof GoSerial
209  * @param serial GoSerial object.
210  * @param value Minimum data scale value to set.
211  * @return Operation status.
212  */
213 GoFx(kStatus) GoSerial_SetSelcomDataScaleMin(GoSerial serial, k64f value);
214 
215 /**
216  * Gets the Selcom protocol data scale minimum value.
217  *
218  * @public @memberof GoSerial
219  * @param serial GoSerial object.
220  * @return Minimum data scale value.
221  */
222 GoFx(k64f) GoSerial_SelcomDataScaleMin(GoSerial serial);
223 
224 /**
225  * Gets the ASCII protocol output delimiter string.
226  *
227  * @public @memberof GoSerial
228  * @param serial GoSerial object.
229  * @return A pointer to the string representing the ASCII protocol output delimiter.
230  */
231 GoFx(kChar*) GoSerial_AsciiDelimiter(GoSerial serial);
232 
233 /**
234  * Sets the ASCII protocol output delimiter string.
235  *
236  * @public @memberof GoSerial
237  * @param serial GoSerial object.
238  * @param string A pointer to the string representing the ASCII protocol output delimiter.
239  * @return Operation status.
240  */
241 GoFx(kStatus) GoSerial_SetAsciiDelimiter(GoSerial serial, const kChar* string);
242 
243 /**
244  * Gets the ASCII protocol output terminator string.
245  *
246  * @public @memberof GoSerial
247  * @param serial GoSerial object.
248  * @return A pointer to the terminator representing the ASCII protocol output delimiter.
249  */
250 GoFx(kChar*) GoSerial_AsciiTerminator(GoSerial serial);
251 
252 /**
253  * Sets the ASCII protocol output terminator string.
254  *
255  * @public @memberof GoSerial
256  * @param serial GoSerial object.
257  * @param string A pointer to the string representing the ASCII protocol output terminator.
258  * @return Operation status.
259  */
260 GoFx(kStatus) GoSerial_SetAsciiTerminator(GoSerial serial, const kChar* string);
261 
262 /**
263  * Gets the ASCII protocol output invalid value string.
264  *
265  * @public @memberof GoSerial
266  * @param serial GoSerial object.
267  * @return A pointer to the string representing the ASCII protocol output invalid value.
268  */
269 GoFx(kChar*) GoSerial_AsciiInvalidValue(GoSerial serial);
270 
271 /**
272  * Sets the ASCII protocol output invalid value string.
273  *
274  * @public @memberof GoSerial
275  * @param serial GoSerial object.
276  * @param string A pointer to the string representing the ASCII protocol output invalid value.
277  * @return Operation status.
278  */
279 GoFx(kStatus) GoSerial_SetAsciiInvalidValue(GoSerial serial, const kChar* string);
280 
281 /**
282  * Gets the ASCII protocol output custom data format string.
283  *
284  * @public @memberof GoSerial
285  * @param serial GoSerial object.
286  * @return A pointer to the string representing the ASCII protocol output invalid value.
287  */
288 GoFx(kChar*) GoSerial_AsciiCustomDataFormat(GoSerial serial);
289 
290 /**
291  * Sets the ASCII protocol output custom data format.
292  *
293  * @public @memberof GoSerial
294  * @param serial GoSerial object.
295  * @param string A pointer to the string representing the ASCII protocol output custom data format.
296  * @return Operation status.
297  */
298 GoFx(kStatus) GoSerial_SetAsciiCustomDataFormat(GoSerial serial, const kChar* string);
299 
300 /**
301  * Sets the enabled state of the ASCII protocol custom data format.
302  *
303  * @public @memberof GoSerial
304  * @param serial GoSerial object.
305  * @param enabled kTRUE to enable and kFALSE to disable.
306  * @return Operation status.
307  */
308 GoFx(kStatus) GoSerial_EnableAsciiCustomFormat(GoSerial serial, kBool enabled);
309 
310 /**
311  * Gets the enabled state of the ASCII protocol custom data format.
312  *
313  * @public @memberof GoSerial
314  * @param serial GoSerial object.
315  * @return kTRUE if enabled and kFALSE otherwise.
316  */
317 GoFx(kBool) GoSerial_AsciiCustomFormatEnabled(GoSerial serial);
318 
319 kEndHeader()
320 #include <GoSdk/Outputs/GoSerial.x.h>
321 
322 #endif
k32u GoSerial_SelcomRateOptionAt(GoSerial serial, kSize index)
Gets the Selcom rate option at the specified index.
kBool GoSerial_AsciiCustomFormatEnabled(GoSerial serial)
Gets the enabled state of the ASCII protocol custom data format.
kChar * GoSerial_AsciiTerminator(GoSerial serial)
Gets the ASCII protocol output terminator string.
k64f GoSerial_SelcomDataScaleMax(GoSerial serial)
Gets the Selcom protocol data scale maximum value.
kSize GoSerial_SourceCount(GoSerial serial)
Gets the number of sources of the specified output type that are currently selected for transmission...
kStatus GoSerial_SetAsciiCustomDataFormat(GoSerial serial, const kChar *string)
Sets the ASCII protocol output custom data format.
kStatus GoSerial_SetSelcomDataScaleMax(GoSerial serial, k64f value)
Sets the Selcom protocol maximum data scale value.
kArrayList GoSerial_SelcomFormatOptionList(GoSerial serial)
Gets the list of Selcom format options.
GoSelcomFormat GoSerial_SelcomFormat(GoSerial serial)
Gets the current Selcom output format.
kChar * GoSerial_AsciiDelimiter(GoSerial serial)
Gets the ASCII protocol output delimiter string.
kStatus GoSerial_EnableAsciiCustomFormat(GoSerial serial, kBool enabled)
Sets the enabled state of the ASCII protocol custom data format.
Essential SDK declarations.
kStatus GoSerial_SetAsciiTerminator(GoSerial serial, const kChar *string)
Sets the ASCII protocol output terminator string.
k32u GoSerial_SelcomRate(GoSerial serial)
Gets the index of the currently selected Selcom output rate.
kStatus GoSerial_SetAsciiInvalidValue(GoSerial serial, const kChar *string)
Sets the ASCII protocol output invalid value string.
Represents Serial output settings.
Definition: GoSerial.h:14
kChar * GoSerial_AsciiCustomDataFormat(GoSerial serial)
Gets the ASCII protocol output custom data format string.
kStatus GoSerial_ClearSources(GoSerial serial)
Removes all selected sources for the specified output type.
k32u GoSerial_OptionAt(GoSerial serial, kSize index)
Gets the source option at the specified index.
GoSelcomFormat GoSerial_SelcomFormatOptionAt(GoSerial serial, kSize index)
Gets the Selcom format option at the specified index.
kSize GoSerial_SelcomFormatOptionCount(GoSerial serial)
Returns the count of available Selcom protocol output format options.
kStatus GoSerial_SetAsciiDelimiter(GoSerial serial, const kChar *string)
Sets the ASCII protocol output delimiter string.
k64f GoSerial_SelcomDataScaleMin(GoSerial serial)
Gets the Selcom protocol data scale minimum value.
kStatus GoSerial_AddSource(GoSerial serial, k32u sourceId)
Selects the specified source for transmission.
kBeginHeader() kStatus GoSdk_Construct(kAssembly *assembly)
Constructs the Gocator SDK library.
kSize GoSerial_OptionCount(GoSerial serial)
Gets the number of source options.
k32u GoSerial_SourceAt(GoSerial serial, kSize index)
Gets the identifier of the selected output source at the specified index.
kArrayList GoSerial_SelcomRateOptionList(GoSerial serial)
Gets the list of Selcom rate options.
kSize GoSerial_SelcomRateOptionCount(GoSerial serial)
Returns the count of available Selcom protocol output rate options.
kChar * GoSerial_AsciiInvalidValue(GoSerial serial)
Gets the ASCII protocol output invalid value string.
Represents the selcom format followed on the serial output.
kStatus GoSerial_SetSelcomDataScaleMin(GoSerial serial, k64f value)
Sets the Selcom protocol minimum data scale value.
kStatus GoSerial_SetSelcomFormat(GoSerial serial, GoSelcomFormat format)
Sets the Selcom protocol output format.
kStatus GoSerial_RemoveSource(GoSerial serial, kSize index)
Removes (de-selects) the source at the specified index.
kStatus GoSerial_SetSelcomRate(GoSerial serial, k32u rate)
Sets the Selcom protocol output rate.