Gocator API

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