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