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