Gocator API

- Home
- Types
- Files

All Classes Files Functions Variables Typedefs Macros Modules Pages
GoAccelerator.h
Go to the documentation of this file.
1 /**
2 * @file GoAccelerator.h
3 * @brief Declares the GoAccelerator class.
4 *
5 * @internal
6 * Copyright (C) 2016-2018 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef GO_ACCELERATOR_H
11 #define GO_ACCELERATOR_H
12
13 #include <GoSdk/GoSdkDef.h>
14 #include <GoSdk/GoSensor.h>
15
16 kBeginHeader()
17
18 /**
19 * @class GoAccelerator
20 * @extends kObject
21 * @ingroup GoSdk
22 * @brief Represents an GoAccelerator instance.
23 */
24 typedef kObject GoAccelerator;
25
26 /**
27 * Constructs the accelerator object
28 *
29 * @public @memberof GoAccelerator
30 * @version Introduced in firmware 4.5.3.57
31 * @param accelerator Address of uninitialized accelerator object
32 * @param allocator Allocator object (kNULL for fallback allocator)
33 * @return Operation status.
34 */
35 GoFx(kStatus) GoAccelerator_Construct(GoAccelerator* accelerator, kAlloc allocator);
36
37 /**
38 * Starts the accelerator service.
39 *
40 * @public @memberof GoAccelerator
41 * @version Introduced in firmware 4.5.3.57
42 * @param accelerator GoAccelerator object.
43 * @return Operation status.
44 */
45 GoFx(kStatus) GoAccelerator_Start(GoAccelerator accelerator);
46
47 /**
48 * Attaches the accelerator to a sensor.
49 *
50 * Note that subsequent operations on the GoSensor instance will be routed through the accelerator.
51 *
52 * @public @memberof GoAccelerator
53 * @version Introduced in firmware 4.5.3.57
54 * @param accelerator GoAccelerator object.
55 * @param sensor GoSensor object.
56 * @return Operation status.
57 */
58 GoFx(kStatus) GoAccelerator_Attach(GoAccelerator accelerator, GoSensor sensor);
59
60 /**
61 * Detaches a sensor from the accelerator.
62 *
63 * Note that subsequent operations on the GoSensor instance will no longer be routed through the accelerator.
64 *
65 * @public @memberof GoAccelerator
66 * @version Introduced in firmware 4.5.3.57
67 * @param accelerator GoAccelerator object.
68 * @param sensor GoSensor object.
69 * @return Operation status.
70 */
71 GoFx(kStatus) GoAccelerator_Detach(GoAccelerator accelerator, GoSensor sensor);
72
73 /**
74 * Stops the accelerator service.
75 *
76 * Note that all attached GoSensor instances should be detached before stopping the accelerator.
77 *
78 * @public @memberof GoAccelerator
79 * @version Introduced in firmware 4.5.3.57
80 * @param accelerator GoAccelerator object.
81 * @return Operation status.
82 */
83 GoFx(kStatus) GoAccelerator_Stop(GoAccelerator accelerator);
84
85 /**
86 * Reports whether or not the accelerator has been started.
87 *
88 * @public @memberof GoAccelerator
89 * @version Introduced in firmware 4.5.3.57
90 * @param accelerator GoAccelerator object.
91 * @return kTRUE if running, kFALSE otherwise.
92 */
93 GoFx(kBool) GoAccelerator_IsRunning(GoAccelerator accelerator);
94
95 /**
96 * Reports whether or not the specified sensor is attached to this accelerator.
97 *
98 * @public @memberof GoAccelerator
99 * @version Introduced in firmware 4.5.3.57
100 * @param accelerator GoAccelerator object.
101 * @param sensor GoSensor object.
102 * @return kTRUE if attached, kFALSE otherwise.
103 */
104 GoFx(kBool) GoAccelerator_IsAttached(GoAccelerator accelerator, GoSensor sensor);
105
106 /**
107 * Gets the accelerated GoSensor handle specified by index.
108 *
109 * @public @memberof GoAccelerator
110 * @version Introduced in firmware 4.5.3.57
111 * @param accelerator GoAccelerator object.
112 * @param index Index of the list of accelerated GoSensor objects.
113 * @return GoSensor object.
114 */
115 GoFx(GoSensor) GoAccelerator_Sensor(GoAccelerator accelerator, kSize index);
116
117 /**
118 * Sets a handler for Accelerated sensor connect/disconnect updates for this object.
119 *
120 * This handler will be called if the accelerator loses or regains connection to an
121 * attached sensor.
122 *
123 * @public @memberof GoAccelerator
124 * @version Introduced in firmware 4.6.4.66
125 * @param accelerator GoAccelerator object.
126 * @param function Connection update callback function (or kNULL to unregister).
127 * @param receiver Receiver argument for callback.
128 * @return Operation status.
129 */
130 GoFx(kStatus) GoAccelerator_SetAcceleratorUpdateHandler(GoAccelerator accelerator, kCallbackFx function, kPointer receiver);
131
132 /**
133 * Sets the IP address to use for the accelerator.
134 *
135 * @public @memberof GoAccelerator
136 * @version Introduced in firmware 4.5.3.57
137 * @param accelerator GoAccelerator object.
138 * @param address IP address to use for the accelerator web server.
139 * @return Operation status.
140 */
141 GoFx(kStatus) GoAccelerator_SetIpAddress(GoAccelerator accelerator, kIpAddress address);
142
143 /**
144 * Gets the IP address used for the accelerator.
145 *
146 * @public @memberof GoAccelerator
147 * @version Introduced in firmware 4.5.3.57
148 * @param accelerator GoAccelerator object.
149 * @return IP address used for the accelerator web server.
150 */
151 GoFx(kIpAddress) GoAccelerator_IpAddress(GoAccelerator accelerator);
152
153 /**
154 * Sets the control port to use for the accelerator.
155 *
156 * @public @memberof GoAccelerator
157 * @version Introduced in firmware 4.5.3.57
158 * @param accelerator GoAccelerator object.
159 * @param port Port to use for accelerator control.
160 * @return Operation status.
161 */
162 GoFx(kStatus) GoAccelerator_SetControlPort(GoAccelerator accelerator, k32u port);
163
164 /**
165 * Gets the control port used for the accelerator.
166 *
167 * @public @memberof GoAccelerator
168 * @version Introduced in firmware 4.5.3.57
169 * @param accelerator GoAccelerator object.
170 * @return Port used for accelerator control.
171 */
172 GoFx(k32u) GoAccelerator_ControlPort(GoAccelerator accelerator);
173
174 /**
175 * Sets the health port to use for the accelerator.
176 *
177 * @public @memberof GoAccelerator
178 * @version Introduced in firmware 4.5.3.57
179 * @param accelerator GoAccelerator object.
180 * @param port Port to use for accelerator health.
181 * @return Operation status.
182 */
183 GoFx(kStatus) GoAccelerator_SetHealthPort(GoAccelerator accelerator, k32u port);
184
185 /**
186 * Gets the health port used for the accelerator.
187 *
188 * @public @memberof GoAccelerator
189 * @version Introduced in firmware 4.5.3.57
190 * @param accelerator GoAccelerator object.
191 * @return Port used for accelerator health.
192 */
193 GoFx(k32u) GoAccelerator_HealthPort(GoAccelerator accelerator);
194
195 /**
196 * Sets the upgrade port to use for the accelerator.
197 *
198 * @public @memberof GoAccelerator
199 * @version Introduced in firmware 4.5.3.57
200 * @param accelerator GoAccelerator object.
201 * @param port Port to use for accelerator upgrades.
202 * @return Operation status.
203 */
204 GoFx(kStatus) GoAccelerator_SetUpgradePort(GoAccelerator accelerator, k32u port);
205
206 /**
207 * Gets the upgrade port used for the accelerator.
208 *
209 * @public @memberof GoAccelerator
210 * @version Introduced in firmware 4.5.3.57
211 * @param accelerator GoAccelerator object.
212 * @return Port used for accelerator upgrades.
213 */
214 GoFx(k32u) GoAccelerator_UpgradePort(GoAccelerator accelerator);
215
216 /**
217 * Sets the web server port to use for the accelerator.
218 *
219 * @public @memberof GoAccelerator
220 * @version Introduced in firmware 4.5.3.57
221 * @param accelerator GoAccelerator object.
222 * @param port Port to use for the accelerator web server.
223 * @return Operation status.
224 */
225 GoFx(kStatus) GoAccelerator_SetWebPort(GoAccelerator accelerator, k32u port);
226
227 /**
228 * Gets the web server port used for the accelerator.
229 *
230 * @public @memberof GoAccelerator
231 * @version Introduced in firmware 4.5.3.57
232 * @param accelerator GoAccelerator object.
233 * @return Port used for the accelerator web server.
234 */
235 GoFx(k32u) GoAccelerator_WebPort(GoAccelerator accelerator);
236
237 /**
238 * Sets the private data port to use for the accelerator.
239 *
240 * @public @memberof GoAccelerator
241 * @version Introduced in firmware 4.5.3.57
242 * @param accelerator GoAccelerator object.
243 * @param port Port to use for accelerator private data.
244 * @return Operation status.
245 */
246 GoFx(kStatus) GoAccelerator_SetPrivateDataPort(GoAccelerator accelerator, k32u port);
247
248 /**
249 * Gets the private data port used for the accelerator.
250 *
251 * @public @memberof GoAccelerator
252 * @version Introduced in firmware 4.5.3.57
253 * @param accelerator GoAccelerator object.
254 * @return Port used for accelerator private data.
255 */
256 GoFx(k32u) GoAccelerator_PrivateDataPort(GoAccelerator accelerator);
257
258 /**
259 * Sets the public data port to use for the accelerator.
260 *
261 * @public @memberof GoAccelerator
262 * @version Introduced in firmware 4.5.3.57
263 * @param accelerator GoAccelerator object.
264 * @param port Port to use for accelerator public data.
265 * @return Operation status.
266 */
267 GoFx(kStatus) GoAccelerator_SetPublicDataPort(GoAccelerator accelerator, k32u port);
268
269 /**
270 * Gets the public data port used for the accelerator.
271 *
272 * @public @memberof GoAccelerator
273 * @version Introduced in firmware 4.5.3.57
274 * @param accelerator GoAccelerator object.
275 * @return Port used for accelerator public data.
276 */
277 GoFx(k32u) GoAccelerator_PublicDataPort(GoAccelerator accelerator);
278
279 kEndHeader()
280 #include <GoSdk/GoAccelerator.x.h>
281
282 #endif
k32u
GoAccelerator::GoAccelerator_PublicDataPort
k32u GoAccelerator_PublicDataPort(GoAccelerator accelerator)
Gets the public data port used for the accelerator.
kPointer
GoAccelerator::GoAccelerator_Start
kStatus GoAccelerator_Start(GoAccelerator accelerator)
Starts the accelerator service.
GoAccelerator::GoAccelerator_IsRunning
kBool GoAccelerator_IsRunning(GoAccelerator accelerator)
Reports whether or not the accelerator has been started.
kSize
kAlloc
GoAccelerator::GoAccelerator_ControlPort
k32u GoAccelerator_ControlPort(GoAccelerator accelerator)
Gets the control port used for the accelerator.
GoSensor.h
Declares the GoSensor class.
kIpAddress
GoAccelerator::GoAccelerator_PrivateDataPort
k32u GoAccelerator_PrivateDataPort(GoAccelerator accelerator)
Gets the private data port used for the accelerator.
GoAccelerator::GoAccelerator_SetPrivateDataPort
kStatus GoAccelerator_SetPrivateDataPort(GoAccelerator accelerator, k32u port)
Sets the private data port to use for the accelerator.
GoAccelerator::GoAccelerator_IsAttached
kBool GoAccelerator_IsAttached(GoAccelerator accelerator, GoSensor sensor)
Reports whether or not the specified sensor is attached to this accelerator.
GoAccelerator::GoAccelerator_SetIpAddress
kStatus GoAccelerator_SetIpAddress(GoAccelerator accelerator, kIpAddress address)
Sets the IP address to use for the accelerator.
GoAccelerator::GoAccelerator_SetAcceleratorUpdateHandler
kStatus GoAccelerator_SetAcceleratorUpdateHandler(GoAccelerator accelerator, kCallbackFx function, kPointer receiver)
Sets a handler for Accelerated sensor connect/disconnect updates for this object. ...
GoAccelerator::GoAccelerator_IpAddress
kIpAddress GoAccelerator_IpAddress(GoAccelerator accelerator)
Gets the IP address used for the accelerator.
GoSdkDef.h
Essential SDK declarations.
GoAccelerator::GoAccelerator_Construct
kStatus GoAccelerator_Construct(GoAccelerator *accelerator, kAlloc allocator)
Constructs the accelerator object.
GoAccelerator::GoAccelerator_HealthPort
k32u GoAccelerator_HealthPort(GoAccelerator accelerator)
Gets the health port used for the accelerator.
GoAccelerator::GoAccelerator_Attach
kStatus GoAccelerator_Attach(GoAccelerator accelerator, GoSensor sensor)
Attaches the accelerator to a sensor.
GoAccelerator::GoAccelerator_UpgradePort
k32u GoAccelerator_UpgradePort(GoAccelerator accelerator)
Gets the upgrade port used for the accelerator.
kObject
kStatus
GoAccelerator
Represents an GoAccelerator instance.
GoAccelerator::GoAccelerator_SetPublicDataPort
kStatus GoAccelerator_SetPublicDataPort(GoAccelerator accelerator, k32u port)
Sets the public data port to use for the accelerator.
GoAccelerator::GoAccelerator_WebPort
k32u GoAccelerator_WebPort(GoAccelerator accelerator)
Gets the web server port used for the accelerator.
GoAccelerator::GoAccelerator_SetUpgradePort
kStatus GoAccelerator_SetUpgradePort(GoAccelerator accelerator, k32u port)
Sets the upgrade port to use for the accelerator.
GoAccelerator::GoAccelerator_SetWebPort
kStatus GoAccelerator_SetWebPort(GoAccelerator accelerator, k32u port)
Sets the web server port to use for the accelerator.
GoAccelerator::GoAccelerator_Detach
kStatus GoAccelerator_Detach(GoAccelerator accelerator, GoSensor sensor)
Detaches a sensor from the accelerator.
GoAccelerator::GoAccelerator_Sensor
GoSensor GoAccelerator_Sensor(GoAccelerator accelerator, kSize index)
Gets the accelerated GoSensor handle specified by index.
kBool
GoAccelerator::GoAccelerator_SetHealthPort
kStatus GoAccelerator_SetHealthPort(GoAccelerator accelerator, k32u port)
Sets the health port to use for the accelerator.
GoAccelerator::GoAccelerator_SetControlPort
kStatus GoAccelerator_SetControlPort(GoAccelerator accelerator, k32u port)
Sets the control port to use for the accelerator.
GoSensor
Represents a Gocator sensor.
GoAccelerator::GoAccelerator_Stop
kStatus GoAccelerator_Stop(GoAccelerator accelerator)
Stops the accelerator service.