Gocator API
 All Classes Files Functions Variables Typedefs Macros Groups 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) 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_ETHERNET_H
11 #define GO_SDK_ETHERNET_H
12 
13 #include <GoSdk/GoSdkDef.h>
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  * Gets the number of source options for the specified output type.
27  *
28  * @public @memberof GoEthernet
29  * @param ethernet GoEthernet object.
30  * @param type Output source type.
31  * @return Count of source options.
32  */
33 GoFx(kSize) GoEthernet_OptionCount(GoEthernet ethernet, GoOutputSource type);
34 
35 /**
36  * Gets the source option at the specified index.
37  *
38  * @public @memberof GoEthernet
39  * @param ethernet GoEthernet object.
40  * @param type Output source type.
41  * @param index Source option index.
42  * @return Source option.
43  */
44 GoFx(k32u) GoEthernet_OptionAt(GoEthernet ethernet, GoOutputSource type, kSize index);
45 
46 /**
47  * Gets the number of sources of the specified output type that are currently selected for transmission.
48  *
49  * @public @memberof GoEthernet
50  * @param ethernet GoEthernet object.
51  * @param type Output source type.
52  * @return Count of selected sources.
53  */
54 GoFx(kSize) GoEthernet_SourceCount(GoEthernet ethernet, GoOutputSource type);
55 
56 /**
57  * Gets the identifier of the selected output at the specified index.
58  *
59  * @public @memberof GoEthernet
60  * @param ethernet GoEthernet object.
61  * @param type Output source type.
62  * @param index Selected source index.
63  * @return Source identifier.
64  */
65 GoFx(k32u) GoEthernet_SourceAt(GoEthernet ethernet, GoOutputSource type, kSize index);
66 
67 /**
68  * Selects the specified source for transmission.
69  *
70  * @public @memberof GoEthernet
71  * @param ethernet GoEthernet object.
72  * @param type Output source type.
73  * @param sourceId Output source identifier.
74  * @return Operation status.
75  */
76 GoFx(kStatus) GoEthernet_AddSource(GoEthernet ethernet, GoOutputSource type, k32u sourceId);
77 
78 /**
79  * Removes (deselects) the source at the specified index.
80  *
81  * @public @memberof GoEthernet
82  * @param ethernet GoEthernet object.
83  * @param type Output source type.
84  * @param index Index of the source to be removed.
85  * @return Operation status.
86  */
87 GoFx(kStatus) GoEthernet_RemoveSource(GoEthernet ethernet, GoOutputSource type, kSize index);
88 
89 /**
90  * Removes (deselects) all selected sources for the specified output type.
91  *
92  * @public @memberof GoEthernet
93  * @param ethernet GoEthernet object.
94  * @param type Output source type.
95  * @return Operation status.
96  */
97 GoFx(kStatus) GoEthernet_ClearSources(GoEthernet ethernet, GoOutputSource type);
98 
99 /**
100  * Removes (deselects) all selected sources for all possible ethernet output types.
101  *
102  * @public @memberof GoEthernet
103  * @param ethernet GoEthernet object.
104  * @return Operation status.
105  */
106 GoFx(kStatus) GoEthernet_ClearAllSources(GoEthernet ethernet);
107 
108 /**
109  * Gets the protocol that the ethernet utilizes for output.
110  *
111  * @public @memberof GoEthernet
112  * @param ethernet GoEthernet object.
113  * @return The ethernet protocol.
114  */
115 GoFx(GoEthernetProtocol) GoEthernet_Protocol(GoEthernet ethernet);
116 
117 /**
118  * Sets the protocol which will be output via ethernet.
119  *
120  * @public @memberof GoEthernet
121  * @param ethernet GoEthernet object.
122  * @param protocol The selected ethernet protocol.
123  * @return Operation status.
124  */
125 GoFx(kStatus) GoEthernet_SetProtocol(GoEthernet ethernet, GoEthernetProtocol protocol);
126 
127 /**
128  * Gets the ASCII protocol operational mode.
129  *
130  * @public @memberof GoEthernet
131  * @param ethernet GoEthernet object.
132  * @return Operation mode.
133  */
134 GoFx(GoAsciiOperation) GoEthernet_AsciiOperation(GoEthernet ethernet);
135 
136 /**
137  * Sets the ASCII operation mode.
138  *
139  * @public @memberof GoEthernet
140  * @param ethernet GoEthernet object.
141  * @param mode The selected ASCII operation mode.
142  * @return Operation status.
143  */
144 GoFx(kStatus) GoEthernet_SetAsciiOperation(GoEthernet ethernet, GoAsciiOperation mode);
145 
146 /**
147  * Gets the ASCII protocol control channel port number.
148  *
149  * @public @memberof GoEthernet
150  * @param ethernet GoEthernet object.
151  * @return Control channel port number.
152  */
153 GoFx(k32u) GoEthernet_AsciiControlPort(GoEthernet ethernet);
154 
155 /**
156  * Sets the port number of the ASCII control port.
157  *
158  * @public @memberof GoEthernet
159  * @param ethernet GoEthernet object.
160  * @param port The selected ASCII control port value.
161  * @return Operation status.
162  */
163 GoFx(kStatus) GoEthernet_SetAsciiControlPort(GoEthernet ethernet, k32u port);
164 
165 /**
166  * Gets the ASCII protocol health channel port number.
167  *
168  * @public @memberof GoEthernet
169  * @param ethernet GoEthernet object.
170  * @return Health channel port number.
171  */
172 GoFx(k32u) GoEthernet_AsciiHealthPort(GoEthernet ethernet);
173 
174 /**
175  * Sets the port number of the ASCII health port.
176  *
177  * @public @memberof GoEthernet
178  * @param ethernet GoEthernet object.
179  * @param port The selected ASCII health port value.
180  * @return Operation status.
181  */
182 GoFx(kStatus) GoEthernet_SetAsciiHealthPort(GoEthernet ethernet, k32u port);
183 
184 /**
185  * Gets the ASCII protocol data channel port number.
186  *
187  * @public @memberof GoEthernet
188  * @param ethernet GoEthernet object.
189  * @return Data channel port number.
190  */
191 GoFx(k32u) GoEthernet_AsciiDataPort(GoEthernet ethernet);
192 
193 /**
194  * Sets the port number of the ASCII data port.
195  *
196  * @public @memberof GoEthernet
197  * @param ethernet GoEthernet object.
198  * @param port The selected ASCII data port value.
199  * @return Operation status.
200  */
201 GoFx(kStatus) GoEthernet_SetAsciiDataPort(GoEthernet ethernet, k32u port);
202 
203 /**
204  * Gets the ASCII protocol output delimiter string.
205  *
206  * @public @memberof GoEthernet
207  * @param ethernet GoEthernet object.
208  * @return A pointer to the string representing the ASCII protocol output delimiter.
209  */
210 GoFx(kChar*) GoEthernet_AsciiDelimiter(GoEthernet ethernet);
211 
212 /**
213  * Sets the ASCII protocol output delimiter string.
214  *
215  * @public @memberof GoEthernet
216  * @param ethernet GoEthernet object.
217  * @param string A pointer to the string representing the ASCII protocol output delimiter.
218  * @return Operation status.
219  */
220 GoFx(kStatus) GoEthernet_SetAsciiDelimiter(GoEthernet ethernet, const kChar* string);
221 
222 /**
223  * Gets the ASCII protocol output terminator string.
224  *
225  * @public @memberof GoEthernet
226  * @param ethernet GoEthernet object.
227  * @return A pointer to the terminator representing the ASCII protocol output delimiter.
228  */
229 GoFx(kChar*) GoEthernet_AsciiTerminator(GoEthernet ethernet);
230 
231 /**
232  * Sets the ASCII protocol output terminator string.
233  *
234  * @public @memberof GoEthernet
235  * @param ethernet GoEthernet object.
236  * @param string A pointer to the string representing the ASCII protocol output terminator.
237  * @return Operation status.
238  */
239 GoFx(kStatus) GoEthernet_SetAsciiTerminator(GoEthernet ethernet, const kChar* string);
240 
241 /**
242  * Gets the ASCII protocol output invalid value string.
243  *
244  * @public @memberof GoEthernet
245  * @param ethernet GoEthernet object.
246  * @return A pointer to the string representing the ASCII protocol output invalid value.
247  */
248 GoFx(kChar*) GoEthernet_AsciiInvalidValue(GoEthernet ethernet);
249 
250 /**
251  * Sets the ASCII protocol output invalid value string.
252  *
253  * @public @memberof GoEthernet
254  * @param ethernet GoEthernet object.
255  * @param string A pointer to the string representing the ASCII protocol output invalid value.
256  * @return Operation status.
257  */
258 GoFx(kStatus) GoEthernet_SetAsciiInvalidValue(GoEthernet ethernet, const kChar* string);
259 
260 /**
261  * Gets the ASCII protocol output custom data format string.
262  *
263  * @public @memberof GoEthernet
264  * @param ethernet GoEthernet object.
265  * @return A pointer to the string representing the ASCII protocol output custom data format.
266  */
267 GoFx(kChar*) GoEthernet_AsciiCustomDataFormat(GoEthernet ethernet);
268 
269 /**
270  * Sets the ASCII protocol output custom data format string.
271  *
272  * @public @memberof GoEthernet
273  * @param ethernet GoEthernet object.
274  * @param string A pointer to the string representing the ASCII protocol output custom data format.
275  * @return Operation status.
276  */
277 GoFx(kStatus) GoEthernet_SetAsciiCustomDataFormat(GoEthernet ethernet, const kChar* string);
278 
279 /**
280  * Enables or disables the ASCII protocol output custom data format.
281  *
282  * @public @memberof GoEthernet
283  * @param ethernet GoEthernet object.
284  * @param enabled kTRUE to enable custom data format output. kFALSE to use the default output format.
285  * @return Operation status.
286  */
287 GoFx(kStatus) GoEthernet_EnableAsciiCustomFormat(GoEthernet ethernet, kBool enabled);
288 
289 /**
290  * Returns the value of whether the ASCII protocol custom data format is enabled or disabled.
291  *
292  * @public @memberof GoEthernet
293  * @param ethernet GoEthernet object.
294  * @return kTRUE if the custom data format is enabled. kFALSE otherwise.
295  */
296 GoFx(kBool) GoEthernet_AsciiCustomFormatEnabled(GoEthernet ethernet);
297 
298 /**
299  * Enables or disables EthernetIP protocol output buffering.
300  *
301  * @public @memberof GoEthernet
302  * @param ethernet GoEthernet object.
303  * @param enabled kTRUE to enable buffering. kFALSE to disable it.
304  * @return Operation status.
305  */
306 GoFx(kStatus) GoEthernet_SetEIPBufferingEnabled(GoEthernet ethernet, kBool enabled);
307 
308 /**
309  * Returns the value of whether the EthernetIP protocol output buffering is enabled or disabled.
310  *
311  * @public @memberof GoEthernet
312  * @param ethernet GoEthernet object.
313  * @return kTRUE if buffering is enabled. kFALSE otherwise.
314  */
315 GoFx(kBool) GoEthernet_EIPBufferingEnabled(GoEthernet ethernet);
316 
317 /**
318  * Enables or disables Modbus protocol output buffering.
319  *
320  * @public @memberof GoEthernet
321  * @param ethernet GoEthernet object.
322  * @param enabled kTRUE to enable buffering. kFALSE to disable it.
323  * @return Operation status.
324  */
325 GoFx(kStatus) GoEthernet_SetModbusBufferingEnabled(GoEthernet ethernet, kBool enabled);
326 
327 /**
328  * Returns the value of whether Modbus protocol output buffering is enabled or disabled.
329  *
330  * @public @memberof GoEthernet
331  * @param ethernet GoEthernet object.
332  * @return kTRUE if buffering is enabled. kFALSE otherwise.
333  */
334 GoFx(kBool) GoEthernet_ModbusBufferingEnabled(GoEthernet ethernet);
335 
336 kEndHeader()
337 #include <GoSdk/Outputs/GoEthernet.x.h>
338 
339 #endif
kBool GoEthernet_ModbusBufferingEnabled(GoEthernet ethernet)
Returns the value of whether Modbus protocol output buffering is enabled or disabled.
kStatus GoEthernet_ClearAllSources(GoEthernet ethernet)
Removes (deselects) all selected sources for all possible ethernet output types.
kStatus GoEthernet_AddSource(GoEthernet ethernet, GoOutputSource type, k32u sourceId)
Selects the specified source for transmission.
kSize GoEthernet_OptionCount(GoEthernet ethernet, GoOutputSource type)
Gets the number of source options for the specified output type.
kStatus GoEthernet_SetAsciiTerminator(GoEthernet ethernet, const kChar *string)
Sets the ASCII protocol output terminator string.
kStatus GoEthernet_SetAsciiDelimiter(GoEthernet ethernet, const kChar *string)
Sets the ASCII protocol output delimiter string.
kBool GoEthernet_EIPBufferingEnabled(GoEthernet ethernet)
Returns the value of whether the EthernetIP protocol output buffering is enabled or disabled...
kStatus GoEthernet_SetAsciiDataPort(GoEthernet ethernet, k32u port)
Sets the port number of the ASCII data port.
GoEthernetProtocol GoEthernet_Protocol(GoEthernet ethernet)
Gets the protocol that the ethernet utilizes for output.
kStatus GoEthernet_SetAsciiHealthPort(GoEthernet ethernet, k32u port)
Sets the port number of the ASCII health port.
kStatus GoEthernet_ClearSources(GoEthernet ethernet, GoOutputSource type)
Removes (deselects) all selected sources for the specified output type.
Represents a ethernet output protocol.
k32u GoEthernet_AsciiHealthPort(GoEthernet ethernet)
Gets the ASCII protocol health channel port number.
kStatus GoEthernet_RemoveSource(GoEthernet ethernet, GoOutputSource type, kSize index)
Removes (deselects) the source at the specified index.
kStatus GoEthernet_SetProtocol(GoEthernet ethernet, GoEthernetProtocol protocol)
Sets the protocol which will be output via ethernet.
kStatus GoEthernet_EnableAsciiCustomFormat(GoEthernet ethernet, kBool enabled)
Enables or disables the ASCII protocol output custom data format.
k32u GoEthernet_SourceAt(GoEthernet ethernet, GoOutputSource type, kSize index)
Gets the identifier of the selected output at the specified index.
Essential SDK declarations.
kStatus GoEthernet_SetModbusBufferingEnabled(GoEthernet ethernet, kBool enabled)
Enables or disables Modbus protocol output buffering.
Represents output sources.
k32u GoEthernet_AsciiControlPort(GoEthernet ethernet)
Gets the ASCII protocol control channel port number.
kChar * GoEthernet_AsciiTerminator(GoEthernet ethernet)
Gets the ASCII protocol output terminator string.
Represents an ASCII protocol operational type.
kSize GoEthernet_SourceCount(GoEthernet ethernet, GoOutputSource type)
Gets the number of sources of the specified output type that are currently selected for transmission...
kBeginHeader() kStatus GoSdk_Construct(kAssembly *assembly)
Constructs the Gocator SDK library.
kStatus GoEthernet_SetAsciiCustomDataFormat(GoEthernet ethernet, const kChar *string)
Sets the ASCII protocol output custom data format string.
kStatus GoEthernet_SetAsciiOperation(GoEthernet ethernet, GoAsciiOperation mode)
Sets the ASCII operation mode.
kStatus GoEthernet_SetAsciiControlPort(GoEthernet ethernet, k32u port)
Sets the port number of the ASCII control port.
kBool GoEthernet_AsciiCustomFormatEnabled(GoEthernet ethernet)
Returns the value of whether the ASCII protocol custom data format is enabled or disabled.
GoAsciiOperation GoEthernet_AsciiOperation(GoEthernet ethernet)
Gets the ASCII protocol operational mode.
kStatus GoEthernet_SetEIPBufferingEnabled(GoEthernet ethernet, kBool enabled)
Enables or disables EthernetIP protocol output buffering.
Represents Ethernet output settings.
Definition: GoEthernet.h:14
kChar * GoEthernet_AsciiInvalidValue(GoEthernet ethernet)
Gets the ASCII protocol output invalid value string.
k32u GoEthernet_OptionAt(GoEthernet ethernet, GoOutputSource type, kSize index)
Gets the source option at the specified index.
kChar * GoEthernet_AsciiDelimiter(GoEthernet ethernet)
Gets the ASCII protocol output delimiter string.
kChar * GoEthernet_AsciiCustomDataFormat(GoEthernet ethernet)
Gets the ASCII protocol output custom data format string.
k32u GoEthernet_AsciiDataPort(GoEthernet ethernet)
Gets the ASCII protocol data channel port number.
kStatus GoEthernet_SetAsciiInvalidValue(GoEthernet ethernet, const kChar *string)
Sets the ASCII protocol output invalid value string.