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 * @param accelerator GoAccelerator object.
114 * @param function Connection update callback function (or kNULL to unregister).
115 * @param receiver Receiver argument for callback.
116 * @return Operation status.
117 */
118 GoFx(kStatus) GoAccelerator_SetAcceleratorUpdateHandler(GoAccelerator accelerator, kCallbackFx function, kPointer receiver);
119
120 /**
121 * Sets the IP address to use for the accelerator.
122 *
123 * @public @memberof GoAccelerator
124 * @version Introduced in firmware 4.5.3.57
125 * @param accelerator GoAccelerator object.
126 * @param address IP address to use for the accelerator web server.
127 * @return Operation status.
128 */
129 GoFx(kStatus) GoAccelerator_SetIpAddress(GoAccelerator accelerator, kIpAddress address);
130
131 /**
132 * Gets the IP address used for the accelerator.
133 *
134 * @public @memberof GoAccelerator
135 * @version Introduced in firmware 4.5.3.57
136 * @param accelerator GoAccelerator object.
137 * @return IP address used for the accelerator web server.
138 */
139 GoFx(kIpAddress) GoAccelerator_IpAddress(GoAccelerator accelerator);
140
141 /**
142 * Sets the control port to use for the accelerator.
143 *
144 * @public @memberof GoAccelerator
145 * @version Introduced in firmware 4.5.3.57
146 * @param accelerator GoAccelerator object.
147 * @param port Port to use for accelerator control.
148 * @return Operation status.
149 */
150 GoFx(kStatus) GoAccelerator_SetControlPort(GoAccelerator accelerator, k32u port);
151
152 /**
153 * Gets the control port used for the accelerator.
154 *
155 * @public @memberof GoAccelerator
156 * @version Introduced in firmware 4.5.3.57
157 * @param accelerator GoAccelerator object.
158 * @return Port used for accelerator control.
159 */
160 GoFx(k32u) GoAccelerator_ControlPort(GoAccelerator accelerator);
161
162 /**
163 * Sets the health port to use for the accelerator.
164 *
165 * @public @memberof GoAccelerator
166 * @version Introduced in firmware 4.5.3.57
167 * @param accelerator GoAccelerator object.
168 * @param port Port to use for accelerator health.
169 * @return Operation status.
170 */
171 GoFx(kStatus) GoAccelerator_SetHealthPort(GoAccelerator accelerator, k32u port);
172
173 /**
174 * Gets the health port used for the accelerator.
175 *
176 * @public @memberof GoAccelerator
177 * @version Introduced in firmware 4.5.3.57
178 * @param accelerator GoAccelerator object.
179 * @return Port used for accelerator health.
180 */
181 GoFx(k32u) GoAccelerator_HealthPort(GoAccelerator accelerator);
182
183 /**
184 * Sets the upgrade port to use for the accelerator.
185 *
186 * @public @memberof GoAccelerator
187 * @version Introduced in firmware 4.5.3.57
188 * @param accelerator GoAccelerator object.
189 * @param port Port to use for accelerator upgrades.
190 * @return Operation status.
191 */
192 GoFx(kStatus) GoAccelerator_SetUpgradePort(GoAccelerator accelerator, k32u port);
193
194 /**
195 * Gets the upgrade port used for the accelerator.
196 *
197 * @public @memberof GoAccelerator
198 * @version Introduced in firmware 4.5.3.57
199 * @param accelerator GoAccelerator object.
200 * @return Port used for accelerator upgrades.
201 */
202 GoFx(k32u) GoAccelerator_UpgradePort(GoAccelerator accelerator);
203
204 /**
205 * Sets the web server port to use for the accelerator.
206 *
207 * @public @memberof GoAccelerator
208 * @version Introduced in firmware 4.5.3.57
209 * @param accelerator GoAccelerator object.
210 * @param port Port to use for the accelerator web server.
211 * @return Operation status.
212 */
213 GoFx(kStatus) GoAccelerator_SetWebPort(GoAccelerator accelerator, k32u port);
214
215 /**
216 * Gets the web server port used for the accelerator.
217 *
218 * @public @memberof GoAccelerator
219 * @version Introduced in firmware 4.5.3.57
220 * @param accelerator GoAccelerator object.
221 * @return Port used for the accelerator web server.
222 */
223 GoFx(k32u) GoAccelerator_WebPort(GoAccelerator accelerator);
224
225 /**
226 * Sets the private data port to use for the accelerator.
227 *
228 * @public @memberof GoAccelerator
229 * @version Introduced in firmware 4.5.3.57
230 * @param accelerator GoAccelerator object.
231 * @param port Port to use for accelerator private data.
232 * @return Operation status.
233 */
234 GoFx(kStatus) GoAccelerator_SetPrivateDataPort(GoAccelerator accelerator, k32u port);
235
236 /**
237 * Gets the private data port used for the accelerator.
238 *
239 * @public @memberof GoAccelerator
240 * @version Introduced in firmware 4.5.3.57
241 * @param accelerator GoAccelerator object.
242 * @return Port used for accelerator private data.
243 */
244 GoFx(k32u) GoAccelerator_PrivateDataPort(GoAccelerator accelerator);
245
246 /**
247 * Sets the public data port to use for the accelerator.
248 *
249 * @public @memberof GoAccelerator
250 * @version Introduced in firmware 4.5.3.57
251 * @param accelerator GoAccelerator object.
252 * @param port Port to use for accelerator public data.
253 * @return Operation status.
254 */
255 GoFx(kStatus) GoAccelerator_SetPublicDataPort(GoAccelerator accelerator, k32u port);
256
257 /**
258 * Gets the public data port used for the accelerator.
259 *
260 * @public @memberof GoAccelerator
261 * @version Introduced in firmware 4.5.3.57
262 * @param accelerator GoAccelerator object.
263 * @return Port used for accelerator public data.
264 */
265 GoFx(k32u) GoAccelerator_PublicDataPort(GoAccelerator accelerator);
266
267 kEndHeader()
268 #include <GoSdk/GoAccelerator.x.h>
269
270 #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.