Gocator API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
GoEthernet.h
Go to the documentation of this file.
1 /**
2  * @file GoEthernet.h
3  * @brief Declares the GoEthernet 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_ETHERNET_H
11 #define GO_SDK_ETHERNET_H
12 
13 #include <GoSdk/GoSdkDef.h>
14 kBeginHeader()
15 
16 
17 /**
18  * @class GoEthernet
19  * @extends kObject
20  * @ingroup GoSdk-Ethernet
21  * @brief Represents Ethernet output settings.
22  */
23 typedef kObject GoEthernet;
24 
25 /**
26  * Indicates whether the ethernet connection timeout is enabled. If it is
27  * enabled, the configured timeout value will be used.
28  *
29  * @public @memberof GoEthernet
30  * @param ethernet GoEthernet object.
31  * @return kTRUE if enabled and kFALSE otherwise.
32  * @see GoEthernet_Timeout, GoEthernet_SetTimeout
33  */
34 GoFx(kBool) GoEthernet_TimeoutEnabled(GoEthernet ethernet);
35 
36 /**
37  * Enables or disables the ethernet connection timeout.
38  *
39  * @public @memberof GoEthernet
40  * @param ethernet GoEthernet object.
41  * @param value kTRUE to enable the connection timeout and
42  * kFALSE to disable it.
43  * @return Operation status.
44  */
45 GoFx(kStatus) GoEthernet_EnableTimeout(GoEthernet ethernet, kBool value);
46 
47 /**
48  * Returns the connection timeout value in minutes.
49  *
50  * @public @memberof GoEthernet
51  * @param ethernet GoEthernet object.
52  * @return Connection timeout value in minutes.
53  */
54 GoFx(k64f) GoEthernet_Timeout(GoEthernet ethernet);
55 
56 /**
57  * Sets the connection timeout value.
58  *
59  * @public @memberof GoEthernet
60  * @param ethernet GoEthernet object.
61  * @param value The timeout value (in minutes).
62  * @return Operation status.
63  */
64 GoFx(kStatus) GoEthernet_SetTimeout(GoEthernet ethernet, k64f value);
65 
66 /**
67  * Gets the number of source options for the specified output type.
68  *
69  * @public @memberof GoEthernet
70  * @version Introduced in firmware 4.0.10.27
71  * @param ethernet GoEthernet object.
72  * @param type Output source type.
73  * @return Count of source options.
74  */
75 GoFx(kSize) GoEthernet_OptionCount(GoEthernet ethernet, GoOutputSource type);
76 
77 /**
78  * Gets the source option at the specified index.
79  *
80  * @public @memberof GoEthernet
81  * @version Introduced in firmware 4.0.10.27
82  * @param ethernet GoEthernet object.
83  * @param type Output source type.
84  * @param index Source option index.
85  * @return Source option.
86  */
87 GoFx(k32u) GoEthernet_OptionAt(GoEthernet ethernet, GoOutputSource type, kSize index);
88 
89 /**
90  * Gets the number of sources of the specified output type that are currently selected for transmission.
91  *
92  * @public @memberof GoEthernet
93  * @version Introduced in firmware 4.0.10.27
94  * @param ethernet GoEthernet object.
95  * @param type Output source type.
96  * @return Count of selected sources.
97  */
98 GoFx(kSize) GoEthernet_SourceCount(GoEthernet ethernet, GoOutputSource type);
99 
100 /**
101  * Gets the identifier of the selected output at the specified index.
102  *
103  * @public @memberof GoEthernet
104  * @version Introduced in firmware 4.0.10.27
105  * @param ethernet GoEthernet object.
106  * @param type Output source type.
107  * @param index Selected source index.
108  * @return Source identifier.
109  */
110 GoFx(k32u) GoEthernet_SourceAt(GoEthernet ethernet, GoOutputSource type, kSize index);
111 
112 /**
113  * Selects the specified source for transmission.
114  *
115  * @public @memberof GoEthernet
116  * @version Introduced in firmware 4.0.10.27
117  * @param ethernet GoEthernet object.
118  * @param type Output source type.
119  * @param sourceId Output source identifier.
120  * @return Operation status.
121  */
122 GoFx(kStatus) GoEthernet_AddSource(GoEthernet ethernet, GoOutputSource type, k32u sourceId);
123 
124 /**
125  * Removes (deselects) the source at the specified index.
126  *
127  * @public @memberof GoEthernet
128  * @version Introduced in firmware 4.0.10.27
129  * @param ethernet GoEthernet object.
130  * @param type Output source type.
131  * @param index Index of the source to be removed.
132  * @return Operation status.
133  */
134 GoFx(kStatus) GoEthernet_RemoveSource(GoEthernet ethernet, GoOutputSource type, kSize index);
135 
136 /**
137  * Removes (deselects) all selected sources for the specified output type.
138  *
139  * @public @memberof GoEthernet
140  * @version Introduced in firmware 4.0.10.27
141  * @param ethernet GoEthernet object.
142  * @param type Output source type.
143  * @return Operation status.
144  */
145 GoFx(kStatus) GoEthernet_ClearSources(GoEthernet ethernet, GoOutputSource type);
146 
147 /**
148  * Removes (deselects) all selected sources for all possible ethernet output types.
149  *
150  * @public @memberof GoEthernet
151  * @version Introduced in firmware 4.0.10.27
152  * @param ethernet GoEthernet object.
153  * @return Operation status.
154  */
155 GoFx(kStatus) GoEthernet_ClearAllSources(GoEthernet ethernet);
156 
157 /**
158  * Gets the protocol that the ethernet utilizes for output.
159  *
160  * @public @memberof GoEthernet
161  * @version Introduced in firmware 4.0.10.27
162  * @param ethernet GoEthernet object.
163  * @return The ethernet protocol.
164  */
165 GoFx(GoEthernetProtocol) GoEthernet_Protocol(GoEthernet ethernet);
166 
167 /**
168  * Sets the protocol which will be output via ethernet.
169  *
170  * @public @memberof GoEthernet
171  * @version Introduced in firmware 4.0.10.27
172  * @param ethernet GoEthernet object.
173  * @param protocol The selected ethernet protocol.
174  * @return Operation status.
175  */
176 GoFx(kStatus) GoEthernet_SetProtocol(GoEthernet ethernet, GoEthernetProtocol protocol);
177 
178 /**
179  * Gets the ASCII protocol operational mode.
180  *
181  * @public @memberof GoEthernet
182  * @version Introduced in firmware 4.0.10.27
183  * @param ethernet GoEthernet object.
184  * @return Operation mode.
185  */
186 GoFx(GoAsciiOperation) GoEthernet_AsciiOperation(GoEthernet ethernet);
187 
188 /**
189  * Sets the ASCII operation mode.
190  *
191  * @public @memberof GoEthernet
192  * @version Introduced in firmware 4.0.10.27
193  * @param ethernet GoEthernet object.
194  * @param mode The selected ASCII operation mode.
195  * @return Operation status.
196  */
197 GoFx(kStatus) GoEthernet_SetAsciiOperation(GoEthernet ethernet, GoAsciiOperation mode);
198 
199 /**
200  * Gets the ASCII protocol control channel port number.
201  *
202  * @public @memberof GoEthernet
203  * @version Introduced in firmware 4.0.10.27
204  * @param ethernet GoEthernet object.
205  * @return Control channel port number.
206  */
207 GoFx(k32u) GoEthernet_AsciiControlPort(GoEthernet ethernet);
208 
209 /**
210  * Sets the port number of the ASCII control port.
211  *
212  * @public @memberof GoEthernet
213  * @version Introduced in firmware 4.0.10.27
214  * @param ethernet GoEthernet object.
215  * @param port The selected ASCII control port value.
216  * @return Operation status.
217  */
218 GoFx(kStatus) GoEthernet_SetAsciiControlPort(GoEthernet ethernet, k32u port);
219 
220 /**
221  * Gets the ASCII protocol health channel port number.
222  *
223  * @public @memberof GoEthernet
224  * @version Introduced in firmware 4.0.10.27
225  * @param ethernet GoEthernet object.
226  * @return Health channel port number.
227  */
228 GoFx(k32u) GoEthernet_AsciiHealthPort(GoEthernet ethernet);
229 
230 /**
231  * Sets the port number of the ASCII health port.
232  *
233  * @public @memberof GoEthernet
234  * @version Introduced in firmware 4.0.10.27
235  * @param ethernet GoEthernet object.
236  * @param port The selected ASCII health port value.
237  * @return Operation status.
238  */
239 GoFx(kStatus) GoEthernet_SetAsciiHealthPort(GoEthernet ethernet, k32u port);
240 
241 /**
242  * Gets the ASCII protocol data channel port number.
243  *
244  * @public @memberof GoEthernet
245  * @version Introduced in firmware 4.0.10.27
246  * @param ethernet GoEthernet object.
247  * @return Data channel port number.
248  */
249 GoFx(k32u) GoEthernet_AsciiDataPort(GoEthernet ethernet);
250 
251 /**
252  * Sets the port number of the ASCII data port.
253  *
254  * @public @memberof GoEthernet
255  * @version Introduced in firmware 4.0.10.27
256  * @param ethernet GoEthernet object.
257  * @param port The selected ASCII data port value.
258  * @return Operation status.
259  */
260 GoFx(kStatus) GoEthernet_SetAsciiDataPort(GoEthernet ethernet, k32u port);
261 
262 /**
263  * Gets the ASCII protocol output delimiter string.
264  *
265  * @public @memberof GoEthernet
266  * @version Introduced in firmware 4.0.10.27
267  * @param ethernet GoEthernet object.
268  * @return A pointer to the string representing the ASCII protocol output delimiter.
269  */
270 GoFx(kChar*) GoEthernet_AsciiDelimiter(GoEthernet ethernet);
271 
272 /**
273  * Sets the ASCII protocol output delimiter string.
274  *
275  * @public @memberof GoEthernet
276  * @version Introduced in firmware 4.0.10.27
277  * @param ethernet GoEthernet object.
278  * @param string A pointer to the string representing the ASCII protocol output delimiter.
279  * @return Operation status.
280  */
281 GoFx(kStatus) GoEthernet_SetAsciiDelimiter(GoEthernet ethernet, const kChar* string);
282 
283 /**
284  * Gets the ASCII protocol output terminator string.
285  *
286  * @public @memberof GoEthernet
287  * @version Introduced in firmware 4.0.10.27
288  * @param ethernet GoEthernet object.
289  * @return A pointer to the terminator representing the ASCII protocol output delimiter.
290  */
291 GoFx(kChar*) GoEthernet_AsciiTerminator(GoEthernet ethernet);
292 
293 /**
294  * Sets the ASCII protocol output terminator string.
295  *
296  * @public @memberof GoEthernet
297  * @version Introduced in firmware 4.0.10.27
298  * @param ethernet GoEthernet object.
299  * @param string A pointer to the string representing the ASCII protocol output terminator.
300  * @return Operation status.
301  */
302 GoFx(kStatus) GoEthernet_SetAsciiTerminator(GoEthernet ethernet, const kChar* string);
303 
304 /**
305  * Gets the ASCII protocol output invalid value string.
306  *
307  * @public @memberof GoEthernet
308  * @version Introduced in firmware 4.0.10.27
309  * @param ethernet GoEthernet object.
310  * @return A pointer to the string representing the ASCII protocol output invalid value.
311  */
312 GoFx(kChar*) GoEthernet_AsciiInvalidValue(GoEthernet ethernet);
313 
314 /**
315  * Sets the ASCII protocol output invalid value string.
316  *
317  * @public @memberof GoEthernet
318  * @version Introduced in firmware 4.0.10.27
319  * @param ethernet GoEthernet object.
320  * @param string A pointer to the string representing the ASCII protocol output invalid value.
321  * @return Operation status.
322  */
323 GoFx(kStatus) GoEthernet_SetAsciiInvalidValue(GoEthernet ethernet, const kChar* string);
324 
325 /**
326  * Gets the ASCII protocol output custom data format string.
327  *
328  * @public @memberof GoEthernet
329  * @version Introduced in firmware 4.0.10.27
330  * @param ethernet GoEthernet object.
331  * @return A pointer to the string representing the ASCII protocol output custom data format.
332  */
333 GoFx(kChar*) GoEthernet_AsciiCustomDataFormat(GoEthernet ethernet);
334 
335 /**
336  * Sets the ASCII protocol output custom data format string.
337  *
338  * @public @memberof GoEthernet
339  * @version Introduced in firmware 4.0.10.27
340  * @param ethernet GoEthernet object.
341  * @param string A pointer to the string representing the ASCII protocol output custom data format.
342  * @return Operation status.
343  */
344 GoFx(kStatus) GoEthernet_SetAsciiCustomDataFormat(GoEthernet ethernet, const kChar* string);
345 
346 /**
347  * Enables or disables the ASCII protocol output custom data format.
348  *
349  * @public @memberof GoEthernet
350  * @version Introduced in firmware 4.0.10.27
351  * @param ethernet GoEthernet object.
352  * @param enabled kTRUE to enable custom data format output. kFALSE to use the default output format.
353  * @return Operation status.
354  */
355 GoFx(kStatus) GoEthernet_EnableAsciiCustomFormat(GoEthernet ethernet, kBool enabled);
356 
357 /**
358  * Returns the value of whether the ASCII protocol custom data format is enabled or disabled.
359  *
360  * @public @memberof GoEthernet
361  * @version Introduced in firmware 4.0.10.27
362  * @param ethernet GoEthernet object.
363  * @return kTRUE if the custom data format is enabled. kFALSE otherwise.
364  */
365 GoFx(kBool) GoEthernet_AsciiCustomFormatEnabled(GoEthernet ethernet);
366 
367 /**
368  * Enables or disables EthernetIP protocol output buffering.
369  *
370  * @public @memberof GoEthernet
371  * @version Introduced in firmware 4.0.10.27
372  * @param ethernet GoEthernet object.
373  * @param enabled kTRUE to enable buffering. kFALSE to disable it.
374  * @return Operation status.
375  */
376 GoFx(kStatus) GoEthernet_SetEIPBufferingEnabled(GoEthernet ethernet, kBool enabled);
377 
378 /**
379  * Returns the value of whether the EthernetIP protocol output buffering is enabled or disabled.
380  *
381  * @public @memberof GoEthernet
382  * @version Introduced in firmware 4.0.10.27
383  * @param ethernet GoEthernet object.
384  * @return kTRUE if buffering is enabled. kFALSE otherwise.
385  */
386 GoFx(kBool) GoEthernet_EIPBufferingEnabled(GoEthernet ethernet);
387 
388 /**
389  * Sets the EthernetIP protocol endian output type.
390  *
391  * @public @memberof GoEthernet
392  * @version Introduced in firmware 4.1.3.106
393  * @param ethernet GoEthernet object.
394  * @param type The endian output type to set.
395  * @return Operation status.
396  */
397 GoFx(kStatus) GoEthernet_SetEIPEndianOutputType(GoEthernet ethernet, GoEndianType type);
398 
399 /**
400  * Returns the value of the EthernetIP protocol endian output type.
401  *
402  * @public @memberof GoEthernet
403  * @version Introduced in firmware 4.1.3.106
404  * @param ethernet GoEthernet object.
405  * @return Endian output type.
406  */
407 GoFx(kBool) GoEthernet_EIPEndianOutputType(GoEthernet ethernet);
408 
409 /**
410  * Sets the EthernetIP protocol implicit trigger override.
411  *
412  * @public @memberof GoEthernet
413  * @version Introduced in firmware 4.2.4.7
414  * @param ethernet GoEthernet object.
415  * @param value The implicit trigger override value to set.
416  * @return Operation status.
417  */
419 
420 /**
421  * Returns the value of the EthernetIP protocol implicit trigger override.
422  *
423  * @public @memberof GoEthernet
424  * @version Introduced in firmware 4.2.4.7
425  * @param ethernet GoEthernet object.
426  * @return Implicit trigger override value.
427  */
429 
430 /**
431  * Enables or disables Modbus protocol output buffering.
432  *
433  * @public @memberof GoEthernet
434  * @version Introduced in firmware 4.0.10.27
435  * @param ethernet GoEthernet object.
436  * @param enabled kTRUE to enable buffering. kFALSE to disable it.
437  * @return Operation status.
438  */
439 GoFx(kStatus) GoEthernet_SetModbusBufferingEnabled(GoEthernet ethernet, kBool enabled);
440 
441 /**
442  * Returns the value of whether Modbus protocol output buffering is enabled or disabled.
443  *
444  * @public @memberof GoEthernet
445  * @version Introduced in firmware 4.0.10.27
446  * @param ethernet GoEthernet object.
447  * @return kTRUE if buffering is enabled. kFALSE otherwise.
448  */
449 GoFx(kBool) GoEthernet_ModbusBufferingEnabled(GoEthernet ethernet);
450 
451 kEndHeader()
452 #include <GoSdk/Outputs/GoEthernet.x.h>
453 
454 #endif
kStatus GoEthernet_ClearAllSources(GoEthernet ethernet)
Removes (deselects) all selected sources for all possible ethernet output types.
kStatus GoEthernet_SetEIPImplicitTriggerOverride(GoEthernet ethernet, GoImplicitTriggerOverride value)
Sets the EthernetIP protocol implicit trigger override.
kChar * GoEthernet_AsciiCustomDataFormat(GoEthernet ethernet)
Gets the ASCII protocol output custom data format string.
kBool GoEthernet_ModbusBufferingEnabled(GoEthernet ethernet)
Returns the value of whether Modbus protocol output buffering is enabled or disabled.
kStatus GoEthernet_RemoveSource(GoEthernet ethernet, GoOutputSource type, kSize index)
Removes (deselects) the source at the specified index.
k32u GoEthernet_AsciiDataPort(GoEthernet ethernet)
Gets the ASCII protocol data channel port number.
k32u GoEthernet_AsciiControlPort(GoEthernet ethernet)
Gets the ASCII protocol control channel port number.
kStatus GoEthernet_SetProtocol(GoEthernet ethernet, GoEthernetProtocol protocol)
Sets the protocol which will be output via ethernet.
kStatus GoEthernet_SetAsciiHealthPort(GoEthernet ethernet, k32u port)
Sets the port number of the ASCII health port.
kStatus GoEthernet_SetAsciiDelimiter(GoEthernet ethernet, const kChar *string)
Sets the ASCII protocol output delimiter string.
Represents a ethernet output protocol.
kBool GoEthernet_TimeoutEnabled(GoEthernet ethernet)
Indicates whether the ethernet connection timeout is enabled.
Represents an endian output type.
GoImplicitTriggerOverride GoEthernet_EIPImplicitTriggerOverride(GoEthernet ethernet)
Returns the value of the EthernetIP protocol implicit trigger override.
kChar * GoEthernet_AsciiDelimiter(GoEthernet ethernet)
Gets the ASCII protocol output delimiter string.
kStatus GoEthernet_SetAsciiCustomDataFormat(GoEthernet ethernet, const kChar *string)
Sets the ASCII protocol output custom data format string.
kStatus GoEthernet_SetAsciiInvalidValue(GoEthernet ethernet, const kChar *string)
Sets the ASCII protocol output invalid value string.
k64f GoEthernet_Timeout(GoEthernet ethernet)
Returns the connection timeout value in minutes.
kStatus GoEthernet_SetAsciiControlPort(GoEthernet ethernet, k32u port)
Sets the port number of the ASCII control port.
GoAsciiOperation GoEthernet_AsciiOperation(GoEthernet ethernet)
Gets the ASCII protocol operational mode.
kStatus GoEthernet_AddSource(GoEthernet ethernet, GoOutputSource type, k32u sourceId)
Selects the specified source for transmission.
Essential SDK declarations.
kStatus GoEthernet_EnableTimeout(GoEthernet ethernet, kBool value)
Enables or disables the ethernet connection timeout.
k32u GoEthernet_AsciiHealthPort(GoEthernet ethernet)
Gets the ASCII protocol health channel port number.
Represents an EthernetIP implicit messaging trigger override.
kStatus GoEthernet_ClearSources(GoEthernet ethernet, GoOutputSource type)
Removes (deselects) all selected sources for the specified output type.
kStatus GoEthernet_SetTimeout(GoEthernet ethernet, k64f value)
Sets the connection timeout value.
Represents output sources.
kStatus GoEthernet_EnableAsciiCustomFormat(GoEthernet ethernet, kBool enabled)
Enables or disables the ASCII protocol output custom data format.
GoEthernetProtocol GoEthernet_Protocol(GoEthernet ethernet)
Gets the protocol that the ethernet utilizes for output.
Represents an ASCII protocol operational type.
kStatus GoEthernet_SetEIPBufferingEnabled(GoEthernet ethernet, kBool enabled)
Enables or disables EthernetIP protocol output buffering.
k32u GoEthernet_OptionAt(GoEthernet ethernet, GoOutputSource type, kSize index)
Gets the source option at the specified index.
kStatus GoEthernet_SetAsciiTerminator(GoEthernet ethernet, const kChar *string)
Sets the ASCII protocol output terminator string.
kStatus GoEthernet_SetAsciiOperation(GoEthernet ethernet, GoAsciiOperation mode)
Sets the ASCII operation mode.
k32u GoEthernet_SourceAt(GoEthernet ethernet, GoOutputSource type, kSize index)
Gets the identifier of the selected output at the specified index.
kStatus GoEthernet_SetModbusBufferingEnabled(GoEthernet ethernet, kBool enabled)
Enables or disables Modbus protocol output buffering.
kBool GoEthernet_EIPEndianOutputType(GoEthernet ethernet)
Returns the value of the EthernetIP protocol endian output type.
kStatus GoEthernet_SetEIPEndianOutputType(GoEthernet ethernet, GoEndianType type)
Sets the EthernetIP protocol endian output type.
kStatus GoEthernet_SetAsciiDataPort(GoEthernet ethernet, k32u port)
Sets the port number of the ASCII data port.
Represents Ethernet output settings.
kBool GoEthernet_EIPBufferingEnabled(GoEthernet ethernet)
Returns the value of whether the EthernetIP protocol output buffering is enabled or disabled...
kSize GoEthernet_SourceCount(GoEthernet ethernet, GoOutputSource type)
Gets the number of sources of the specified output type that are currently selected for transmission...
kSize GoEthernet_OptionCount(GoEthernet ethernet, GoOutputSource type)
Gets the number of source options for the specified output type.
kBool GoEthernet_AsciiCustomFormatEnabled(GoEthernet ethernet)
Returns the value of whether the ASCII protocol custom data format is enabled or disabled.
kChar * GoEthernet_AsciiTerminator(GoEthernet ethernet)
Gets the ASCII protocol output terminator string.
kChar * GoEthernet_AsciiInvalidValue(GoEthernet ethernet)
Gets the ASCII protocol output invalid value string.