Gocator API

- Home
- Types
- Files

All Classes Files Functions Variables Typedefs Macros Modules Pages
GoSystem.h
Go to the documentation of this file.
1 /**
2 * @file GoSystem.h
3 * @brief Declares the GoSystem 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_SDK_SYSTEM_H
11 #define GO_SDK_SYSTEM_H
12
13 #include <GoSdk/GoSdkDef.h>
14 #include <GoSdk/GoSensor.h>
15 #include <GoSdk/GoMultiplexBank.h>
16
17 kBeginHeader()
18
19 /**
20 * @class GoSystem
21 * @extends kObject
22 * @ingroup GoSdk
23 * @brief Represents a system of Gocator devices.
24 *
25 * During construction, a GoSystem object uses Gocator Discovery Protocol to locate devices
26 * (if the autodiscovery capability is selected).
27 * Subsequently, the list of detected devices can be accessed using GoSystem_SensorCount and
28 * GoSystem_SensorAt.
29 *
30 * Immediately after construction, all sensor objects are in the <em>online</em> state. This state
31 * indicates that a sensor has been detected, but that the client has not yet established a control
32 * connection to the sensor. The only sensor functions than can be used in this state are GoSensor_State,
33 * GoSensor_Address, and GoSensor_SetAddress.
34 *
35 * Because Gocator Discovery Protocol works <em>across</em> subnets, but Gocator Control Protocol
36 * does not, it is possible for a sensor to be successfully detected but for subsequent connection
37 * attempts to fail. In this case, the GoSensor_SetAddress function can be used to reconfigure the
38 * sensor to operate on the same subnet as the client.
39 *
40 * If the client and device are configured to operate on the same subnet, the GoSystem_Connect or
41 * GoSensor_Connect functions can be used to establish control connections.
42 *
43 * @see GoSystem_Construct, GoSystem_Connect, GoSensor_State, GoSensor_Address, GoSensor_SetAddress.
44 */
45 typedef kObject GoSystem;
46
47 /** Defines the signature for a GoSystem data/health handler.
48 *
49 * NOTE: The GoDataSet received by this function must be destroyed after use,
50 * otherwise a memory leak will result.
51 *
52 * @see GoDestroy
53 */
54 typedef kStatus (kCall* GoDataFx)(kPointer context, GoSensor system, GoDataSet data);
55
56 /**
57 * Constructs a GoSystem object.
58 *
59 * During construction, a GoSystem object uses Gocator Discovery Protocol to locate sensors.
60 * The list of detected sensors can be accessed using the GoSystem_SensorCount and GoSystem_SensorAt
61 * functions.
62 *
63 * @public @memberof GoSystem
64 * @version Introduced in firmware 4.0.10.27
65 * @param system Receives constructed system object.
66 * @param allocator Memory allocator (or kNULL for default)
67 * @return Operation status.
68 */
69 GoFx(kStatus) GoSystem_Construct(GoSystem* system, kAlloc allocator);
70
71 /**
72 * Constructs a GoSystem object.
73 *
74 * During construction, a GoSystem object does not automatically locate sensors
75 * using the Gocator Discovery Protocol. Sensor discovery must be explicitly
76 * enabled by the following steps:
77 * 1. Specify which interface(s) on which the protocol is allowed run by calling
78 * GoSystem_EnableDiscoveryInterface() API.,
79 * By default, the discovery protocol cannot use any interface.
80 * To allow the protocol to run on all interfaces, call the API
81 * GoSystem_EnableDiscoveryInterfaceAll().
82 * 2. Start the discovery protocol with the API GoSystem_StartDiscovery().
83 *
84 * @public @memberof GoSystem
85 * @version Introduced in firmware 4.6.7.157
86 * @param system Receives constructed system object.
87 * @param allocator Memory allocator (or kNULL for default)
88 * @return Operation status.
89 */
90 GoFx(kStatus) GoSystem_ConstructEx(GoSystem* system, kAlloc allocator);
91
92 /**
93 * Establishes control connections to all sensors.
94 *
95 * A control connection is required before calling any sensor function except GoSensor_State,
96 * GoSensor_Address, or GoSensor_SetAddress.
97 *
98 * @public @memberof GoSystem
99 * @version Introduced in firmware 4.0.10.27
100 * @param system GoSystem object.
101 * @return Operation status.
102 */
103 GoFx(kStatus) GoSystem_Connect(GoSystem system);
104
105 /**
106 * Terminates control connections to all sensors.
107 *
108 * @public @memberof GoSystem
109 * @version Introduced in firmware 4.0.10.27
110 * @param system GoSystem object.
111 * @return Operation status.
112 */
113 GoFx(kStatus) GoSystem_Disconnect(GoSystem system);
114
115 /**
116 * Adds a sensor by passing a custom address and port info, this doesnt require discovery
117 *
118 * @public @memberof GoSystem
119 * @version Introduced in firmware 4.8.2.76
120 * @param system GoSystem object.
121 * @param addressInfo GoAddressInfo object containing IP to connnect on.
122 * @param portInfo GoPortInfo object containing custom port values.
123 * @param sensor point to a GoSensor object to return newly created sensor.
124 * @return A status.
125 */
126 GoFx(kStatus) GoSystem_AddSensor(GoSystem system, const GoAddressInfo* addressInfo, const GoPortInfo* portInfo, GoSensor* sensor);
127
128 /**
129 * Reports whether the system has changes that require a refresh.
130 *
131 * Sensors can undergo autonomous state changes that require client state to be refreshed
132 * (e.g. sensor goes offline). The GoSystem_HasChanges function can be used to determine
133 * if such changes have occurred.
134 *
135 * The GoSystem_HasChanges function does not perform communication, and consequently, will not
136 * require the caller to block for a long duration. If changes are detected, the GoSystem_Refresh
137 * function can be called to resolve the changes.
138 *
139 * This method is thread-safe.
140 *
141 * @public @memberof GoSystem
142 * @version Introduced in firmware 4.0.10.27
143 * @param system GoSystem object.
144 * @return kTRUE if the system has changes.
145 */
146 GoFx(kBool) GoSystem_HasChanges(GoSystem system);
147
148 /**
149 * Updates client state to reflect any changes that have occurred in the sensor network.
150 *
151 * Sensors can undergo autonomous state changes that require client state to be refreshed
152 * (e.g. sensor goes offline). The GoSystem_Refresh function resynchronizes client state
153 * with the current state of the sensor network.
154 *
155 * Calling this function may destroy or modify local sensor objects. The GoSystem_HasChanges
156 * function can be used prior to calling GoSystem_Refresh, to determine whether a refresh is
157 * needed.
158 *
159 * This call is thread-safe with regards to modifying this class's set of sensors.
160 *
161 * @public @memberof GoSystem
162 * @version Introduced in firmware 4.0.10.27
163 * @param system GoSystem object.
164 * @return Operation status.
165 */
166 GoFx(kStatus) GoSystem_Refresh(GoSystem system);
167
168 /**
169 * Reports the Gocator Protocol version implemented by this library.
170 *
171 * A Gocator Protocol version number has a major component and a minor component.
172 * If the major version implemented by this library is the same as the major
173 * version implemented by a sensor device, then communication can proceed. Otherwise,
174 * the sensor should be upgraded or a newer version of this library should be obtained.
175 * Sensors with incompatible major versions will be reported as being in the
176 * <em>incompatible</em> state upon connection.
177 *
178 * If major versions match, but the minor version implemented by this library
179 * is lower than the minor version implemented by the sensor, then some sensor features
180 * will not be accessible through this library.
181 *
182 * If major versions match, but the minor version implemented by this library
183 * is higher than the minor version implemented by the sensor, then some features
184 * exposed by this library may be unimplemented by the sensor.
185 *
186 * This method is thread-safe.
187 *
188 * @public @memberof GoSystem
189 * @version Introduced in firmware 4.0.10.27
190 * @return Protocol version implemented by this library.
191 * @see GoSensor_ProtocolVersion, GoSensor_State
192 */
193 GoFx(kVersion) GoSystem_ProtocolVersion();
194
195 /**
196 * Reports the Gocator firmware version that was built alongside this library.
197 *
198 * A Gocator SDK version number has a major component and a minor component.
199 * If the major version implemented by this library is the same as the major
200 * version implemented by a sensor device, then communication can proceed. Otherwise,
201 * the sensor should be upgraded or a version of this library matching the sensor
202 * should be obtained.
203 *
204 * When it comes to the matter of mismatched SDK and firmware versions, so long
205 * as the protocol versions match up, they should be compatible.
206 *
207 * @public @memberof GoSystem
208 * @version Introduced in firmware 4.0.10.27
209 * @return Firmware version that was built alongside this library.
210 * @see GoSensor_FirmwareVersion, GoSystem_ProtocolVersion
211 */
212 GoFx(kVersion) GoSystem_SdkVersion();
213
214 /**
215 * Sets a callback function that can be used to receive sensor data messages asynchronously.
216 *
217 * Sensor data messages can be received synchronously using the GoSystem_ReceiveData function
218 * or asynchronously by registering a callback function. If a callback function is registered,
219 * a background thread will be created to perform notifications.
220 *
221 * To unregister a previously-registered data handler, call this function using kNULL in place
222 * of the callback function argument.
223 *
224 * @public @memberof GoSystem
225 * @version Introduced in firmware 4.0.10.27
226 * @param system GoSystem object.
227 * @param function Data callback function (or kNULL to unregister).
228 * @param receiver Receiver argument for callback.
229 * @return Operation status.
230 * @see GoDataFx, GoSystem_ReceiveData, GoSystem_SetDataCapacity, GoSystem_EnableData
231 */
232 GoFx(kStatus) GoSystem_SetDataHandler(GoSystem system, GoDataFx function, kPointer receiver);
233
234 /**
235 * Sets the maximum amount of memory that can be used to buffer received data messages.
236 *
237 * Received data messages are enqueued until they are accepted by the caller. This function
238 * determines the maximum size, in bytes, of enqueued messages. The default maximum size is 50 MB.
239 *
240 * @public @memberof GoSystem
241 * @version Introduced in firmware 4.0.10.27
242 * @param system GoSystem object.
243 * @param capacity Data queue capacity, in bytes.
244 * @return Operation status.
245 * @see GoSystem_DataCapacity
246 */
247 GoFx(kStatus) GoSystem_SetDataCapacity(GoSystem system, kSize capacity);
248
249 /**
250 * Reports that maximum amount of memory that can be used to buffer received data messages.
251 *
252 * @public @memberof GoSystem
253 * @version Introduced in firmware 4.0.10.27
254 * @param system GoSystem object.
255 * @return Data queue capacity, in bytes.
256 * @see GoSystem_SetDataCapacity
257 */
258 GoFx(kSize) GoSystem_DataCapacity(GoSystem system);
259
260 /**
261 * Establishes data connections to all connected sensors currently in the <em>ready</em> or <em>running</em> states.
262 *
263 * Data connections are not automatically established when sensor control connection are established.
264 * Use this function (or GoSensor_EnableData) to enable/disable data connections.
265 *
266 * @public @memberof GoSystem
267 * @version Introduced in firmware 4.0.10.27
268 * @param system GoSystem object.
269 * @param enable kTRUE to enable data connections; kFALSE to disable.
270 * @return Operation status.
271 * @see GoSystem_ReceiveData, GoSensor_EnableData
272 */
273 GoFx(kStatus) GoSystem_EnableData(GoSystem system, kBool enable);
274
275 /**
276 * Clears any buffered data messages.
277 *
278 * When stopping and then restarting a system, it may be desirable to ensure that no messages from
279 * the previous session remain in any buffers. The GoSystem_ClearData function closes any open data
280 * channels, destroys any received messages, and then reopens data channels.
281 *
282 * @public @memberof GoSystem
283 * @version Introduced in firmware 4.0.10.27
284 * @param system GoSystem object.
285 * @return Operation status.
286 */
287 GoFx(kStatus) GoSystem_ClearData(GoSystem system);
288
289 /**
290 * Receives a set of sensor data messages.
291 *
292 * Sensor data messages can be received synchronously using this function or asynchronously by
293 * registering a callback with the GoSystem_SetDataHandler function.
294 *
295 * NOTE: Data received with this function must be destroyed after use,
296 * otherwise a memory leak will result.
297 *
298 * @public @memberof GoSystem
299 * @version Introduced in firmware 4.0.10.27
300 * @param system GoSystem object.
301 * @param data Set of sensor data messages.
302 * @param timeout Duration to wait for messages, in microseconds.
303 * @return Operation status.
304 * @see GoDestroy, GoSystem_SetDataHandler, GoSystem_SetDataCapacity, GoSystem_EnableData
305 */
306 GoFx(kStatus) GoSystem_ReceiveData(GoSystem system, GoDataSet* data, k64u timeout);
307
308 /**
309 * Sets a callback function that can be used to receive sensor health messages asynchronously.
310 *
311 * Sensor health messages can be received synchronously using the GoSystem_ReceiveHealth function
312 * or asynchronously by registering a callback function. If a callback function is registered,
313 * a background thread will be created to perform notifications.
314 *
315 * To unregister a previously-registered health handler, call this function using kNULL in place
316 * of the callback function argument.
317 *
318 * @public @memberof GoSystem
319 * @version Introduced in firmware 4.0.10.27
320 * @param system GoSystem object.
321 * @param function Health callback function (or kNULL to unregister).
322 * @param receiver Receiver argument, passed to callback.
323 * @return Operation status.
324 * @see GoDataFx, GoSystem_ReceiveHealth, GoSystem_SetDataCapacity, GoSystem_EnableData
325 */
326 GoFx(kStatus) GoSystem_SetHealthHandler(GoSystem system, GoDataFx function, kPointer receiver);
327
328 /**
329 * Receives a set of sensor health messages.
330 *
331 * Sensor health messages can be received synchronously using this function or asynchronously by
332 * registering a callback with the GoSystem_SetHealthHandler function.
333 *
334 * @public @memberof GoSystem
335 * @version Introduced in firmware 4.0.10.27
336 * @param system GoSystem object.
337 * @param data Set of sensor health messages.
338 * @param timeout Duration to wait for messages, in microseconds.
339 * @return Operation status.
340 * @see GoSystem_SetHealthHandler
341 */
342 GoFx(kStatus) GoSystem_ReceiveHealth(GoSystem system, GoDataSet* data, k64u timeout);
343
344 /**
345 * Clears any buffered health messages.
346 *
347 * @public @memberof GoSystem
348 * @version Introduced in firmware 4.0.10.27
349 * @param system GoSystem object.
350 * @return Operation status.
351 */
352 GoFx(kStatus) GoSystem_ClearHealth(GoSystem system);
353
354 /**
355 * Starts all sensors that are currently in the <em>ready</em> state.
356 *
357 * @public @memberof GoSystem
358 * @version Introduced in firmware 4.0.10.27
359 * @param system GoSystem object.
360 * @return Operation status.
361 * @see GoSystem_Stop, GoSensor_Start, GoSensor_Stop
362 */
363 GoFx(kStatus) GoSystem_Start(GoSystem system);
364
365 /**
366 * Starts all sensors that are currently in the <em>ready</em> state at a scheduled value.
367 *
368 * NOTE: The value specified is the target value to start at, not a relative
369 * offset from the current value. The typical usage is to obtain the current
370 * value first, add an offset to it, and start at that value.
371 *
372 * @public @memberof GoSystem
373 * @version Introduced in firmware 4.1.3.106
374 * @param system GoSystem object.
375 * @param value The value at which to start the sensor. It is in uS when time triggered and ticks when encoder triggered.
376 * @return Operation status.
377 * @see GoSystem_Stop, GoSensor_ScheduledStart, GoSensor_Stop, GoSetup_SetTriggerSource, GoSetup_TriggerSource
378 */
379 GoFx(kStatus) GoSystem_ScheduledStart(GoSystem system, k64s value);
380
381 /**
382 * Performs alignment for sensors in the <em>ready</em> state.
383 *
384 * NOTE: This operation will result in sensor starts for the duration of the
385 * alignment. It can be canceled via GoSystem_Stop. This function's operation
386 * status does not correspond to the actual alignment result. In order to
387 * retrieve the alignment result, you must enable the data channel before calling
388 * this function, receive an alignment data message and then check its status.
389 *
390 * @public @memberof GoSystem
391 * @version Introduced in firmware 4.0.10.27
392 * @param system GoSystem object.
393 * @return Operation status.
394 * @see GoSystem_EnableData, GoSystem_ReceiveData, GoSystem_Stop
395 * @remark Calling this function will result in writing operations to flash storage. Should the process be disrupted due to power loss or other factors, the sensor may enter Rescue mode.
396 */
397 GoFx(kStatus) GoSystem_StartAlignment(GoSystem system);
398
399 /**
400 * Performs exposure auto set for sensors in the <em>ready</em> state.
401 *
402 * NOTE: This operation will result in sensor starts for the duration of the
403 * exposure AutoSet. A successful operation status does NOT modify the configuration.
404 * You must retrieve the resulting exposure values and set it for the appropriate
405 * exposure setting. This involves enabling the data connection prior to running
406 * exposure auto set and then receiving an exposure auto set message, which
407 * you can then use to query the status and access the resulting value.
408 *
409 * @public @memberof GoSystem
410 * @version Introduced in firmware 4.0.10.27
411 * @param system GoSystem object.
412 * @return Operation status.
413 * @see GoSystem_EnableData, GoSystem_ReceiveData
414 */
415 GoFx(kStatus) GoSystem_StartExposureAutoSet(GoSystem system);
416
417 /**
418 * Stops all connected sensors.
419 *
420 * @public @memberof GoSystem
421 * @version Introduced in firmware 4.0.10.27
422 * @param system GoSystem object.
423 * @return Operation status.
424 * @see GoSystem_Start, GoSensor_Start, GoSensor_Stop
425 */
426 GoFx(kStatus) GoSystem_Stop(GoSystem system);
427
428
429 /**
430 * Reboots all connected sensors.
431 *
432 * @public @memberof GoSystem
433 * @version Introduced in firmware 4.0.10.27
434 * @param system GoSystem object.
435 * @param wait kTRUE to wait for reboot complete; kFALSE to return immediately.
436 * @return Operation status.
437 */
438 GoFx(kStatus) GoSystem_Reset(GoSystem system, kBool wait);
439
440 /**
441 * Aborts ongoing sensor communication.
442 *
443 * This method asynchronously aborts ongoing communication; the next time that any
444 * I/O operation blocks for an extended period of time, it will be terminated. This method
445 * is thread-safe.
446 *
447 * In order to resume communication, call GoSystem_Refresh or GoSystem_Connect.
448 *
449 * @public @memberof GoSystem
450 * @version Introduced in firmware 4.0.10.27
451 * @param system GoSystem object.
452 * @return Operation status.
453 */
454 GoFx(kStatus) GoSystem_Cancel(GoSystem system);
455
456 /**
457 * Gets the Discovery channel information for the given device ID (if the device is present and the command is supported)
458 *
459 * @public @memberof GoSensor
460 * @version Introduced in firmware 4.3.3.124
461 * @param system GoSystem object.
462 * @param deviceId The ID of the device with which to retrieve Discovery channel information.
463 * @param info A handled to the sensor's constructed discovery information.
464 * @param allocator Memory allocator (or kNULL for the default).
465 * @see GoDestroy
466 */
467 GoFx(kStatus) GoSystem_GetExtendedDiscoveryInfo(GoSystem system, k32u deviceId, GoDiscoveryExtInfo* info, kAlloc allocator);
468
469 /**
470 * Gets the number of sensors in the system.
471 *
472 * @public @memberof GoSystem
473 * @version Introduced in firmware 4.0.10.27
474 * @param system GoSystem object.
475 * @return Count of sensors in the system.
476 * @see GoSystem_SensorAt
477 */
478 GoFx(kSize) GoSystem_SensorCount(GoSystem system);
479
480 /**
481 * Gets the sensor object at the specified index.
482 *
483 * @public @memberof GoSystem
484 * @version Introduced in firmware 4.0.10.27
485 * @param system GoSystem object.
486 * @param index Sensor index.
487 * @return Sensor object.
488 * @see GoSystem_SensorCount
489 */
490 GoFx(GoSensor) GoSystem_SensorAt(GoSystem system, kSize index);
491
492 /**
493 * Gets the sensor object with the specified device id (serial number).
494 *
495 * @public @memberof GoSystem
496 * @version Introduced in firmware 4.0.10.27
497 * @param system GoSystem object.
498 * @param id Device identifier.
499 * @param sensor Receives sensor object.
500 * @return Operation status (kERROR_NOT_FOUND if sensor not found).
501 * @see GoSystem_SensorCount, GoSystem_SensorAt
502 */
503 GoFx(kStatus) GoSystem_FindSensorById(GoSystem system, k32u id, GoSensor* sensor);
504
505 /**
506 * Gets the sensor object with the specified IP address.
507 *
508 * @public @memberof GoSystem
509 * @version Introduced in firmware 4.0.10.27
510 * @param system GoSystem object.
511 * @param address Pointer to sensor IP address.
512 * @param sensor Receives sensor object.
513 * @return Operation status (kERROR_NOT_FOUND if sensor not found).
514 * @see GoSystem_SensorCount, GoSystem_SensorAt
515 */
516 GoFx(kStatus) GoSystem_FindSensorByIpAddress(GoSystem system, const kIpAddress* address, GoSensor* sensor);
517
518 /**
519 * Gets the current time stamp from the sensor network.
520 *
521 * @public @memberof GoSystem
522 * @version Introduced in firmware 4.0.10.27
523 * @param system GoSystem object.
524 * @param time Receives current time stamp(microseconds).
525 * @return Operation status (kERROR_NOT_FOUND if no sensors available).
526 * @see GoSystem_GetEncoder
527 */
528 GoFx(kStatus) GoSystem_Timestamp(GoSystem system, k64u* time);
529
530 /**
531 * Gets the current encoder value from the sensor network.
532 *
533 * @public @memberof GoSystem
534 * @version Introduced in firmware 4.0.10.27
535 * @param system GoSystem object.
536 * @param encoder Receives current encoder value (ticks).
537 * @return Operation status (kERROR_NOT_FOUND if no sensors available).
538 * @see GoSystem_GetTime
539 */
540 GoFx(kStatus) GoSystem_Encoder(GoSystem system, k64s* encoder);
541
542
543 /// @cond (Gocator_1x00 || Gocator_2x00)
544
545 /**
546 * Gets the current multiplex bank count.
547 *
548 * @public @memberof GoSystem
549 * @version Introduced in firmware 4.0.10.27
550 * @param system GoSystem object.
551 * @return The current number of defined multiplex banks.
552 */
553 GoFx(kSize) GoSystem_MultiplexBankCount(GoSystem system);
554
555 /**
556 * Gets a multiplex bank corresponding to the given index.
557 *
558 * @public @memberof GoSystem
559 * @version Introduced in firmware 4.0.10.27
560 * @param system GoSystem object.
561 * @param index The index of the multiplex bank to retrieve.
562 * @return The multiplex bank at the given index or kNULL if an invalid index is given.
563 */
564 GoFx(GoMultiplexBank) GoSystem_MultiplexBankAt(GoSystem system, kSize index);
565
566 /**
567 * Adds a multiplex bank with a unique ID to the system.
568 *
569 * @public @memberof GoSystem
570 * @version Introduced in firmware 4.0.10.27
571 * @param system GoSystem object.
572 * @param bank A pointer to the newly created GoMultiplexBank object.
573 * @return Operation status.
574 */
575 GoFx(kStatus) GoSystem_AddMultiplexBank(GoSystem system, GoMultiplexBank* bank);
576
577 /**
578 * Removes a multiplex bank at the given index.
579 *
580 * @public @memberof GoSystem
581 * @version Introduced in firmware 4.0.10.27
582 * @param system GoSystem object.
583 * @param index The index of the multiplex bank to remove.
584 * @return Operation status.
585 */
586 GoFx(kStatus) GoSystem_RemoveMultiplexBank(GoSystem system, kSize index);
587
588 /**
589 * Removes all multiplex banks.
590 *
591 * @public @memberof GoSystem
592 * @version Introduced in firmware 4.0.10.27
593 * @param system GoSystem object.
594 * @return Operation status.
595 */
596 GoFx(kStatus) GoSystem_ClearMultiplexBanks(GoSystem system);
597
598 /**
599 * Gets the maximum sensor exposure duration in the given multiplex bank.
600 *
601 * @public @memberof GoSystem
602 * @version Introduced in firmware 4.0.10.27
603 * @param system GoSystem object.
604 * @param bank The multiplex bank to check.
605 * @return The maximum sensor exposure duration contained in the multiplexing bank.
606 */
607 GoFx(k64f) GoSystem_MaxBankExposureDuration(GoSystem system, GoMultiplexBank bank);
608
609 /**
610 * Automatically update the single multiplexing delay and period configuration for all sensors contained in all defined multiplex banks.
611 *
612 * @public @memberof GoSystem
613 * @version Introduced in firmware 4.0.10.27
614 * @param system GoSystem object.
615 * @param period The exposure period to set among all multiplexed sensors. A value of 0.0 will result in automatic period determination.
616 * @return Operation status.
617 */
618 GoFx(kStatus) GoSystem_UpdateAllMultiplexParameters(GoSystem system, k64f period);
619
620 /**
621 * Automatically update the multiplexing single delay configuration for all sensors contained in all defined multiplex banks.
622 *
623 * @public @memberof GoSystem
624 * @version Introduced in firmware 4.0.10.27
625 * @param system GoSystem object.
626 * @return Operation status.
627 */
628 GoFx(kStatus) GoSystem_UpdateMultiplexDelay(GoSystem system);
629
630 /**
631 * Returns the maximum value of all multiplexed sensor's minimum multiplexing periods.
632 *
633 * @public @memberof GoSystem
634 * @version Introduced in firmware 4.0.10.27
635 * @param system GoSystem object.
636 * @return Operation status.
637 */
638 GoFx(k64f) GoSystem_MaxMinimumMultiplexPeriod(GoSystem system);
639
640 /**
641 * Automatically update the multiplexing single period configuration for all sensors contained in all defined multiplex banks.
642 *
643 * @public @memberof GoSystem
644 * @version Introduced in firmware 4.0.10.27
645 * @param system GoSystem object.
646 * @param period The exposure period to set among all multiplexed sensors. A value of 0.0 will result in automatic period determination.
647 * @return Operation status.
648 */
649 GoFx(kStatus) GoSystem_UpdateMultiplexPeriod(GoSystem system, k64f period);
650
651 /**
652 * Enable or disable running the Gocator Discovery Protocol over the specified
653 * host interface which the given address.
654 *
655 * @public @memberof GoSystem
656 * @version Introduced in firmware 4.6.7.157
657 * @param system GoSystem object.
658 * @param address IP address of interface over which the discovery protocol is or is not allowed to run.
659 * @param enable Select whether to enable or disable the interface.
660 * @return Operation status.
661 */
662 GoFx(kStatus) GoSystem_SetOneDiscoveryInterface(GoSystem system, kIpAddress* address, kBool enable);
663
664 /**
665 * Enable or disable running the Gocator Discovery Protocol over all the host interfaces.
666 *
667 * @public @memberof GoSystem
668 * @version Introduced in firmware 4.6.7.157
669 * @param system GoSystem object.
670 * @param enable Select whether to enable or disable the interface(s).
671 * @return Operation status.
672 */
673 GoFx(kStatus) GoSystem_SetAllDiscoveryInterface(GoSystem system, kBool enable);
674
675 /**
676 * Enable or disable compatibility mode for the discovery service.
677 *
678 * Compatibility mode can discover older firwmare (4.2 or earlier). However
679 * the discovery traffic over the network is doubled. Compatibility mode is
680 * on by default.
681 *
682 * @public @memberof GoSystem
683 * @version Introduced in firmware 5.1.6.0
684 * @param system GoSystem object.
685 * @param enable Enable or disable compatibility mode.
686 * @return Operation status.
687 */
688 GoFx(kStatus) GoSystem_EnableDiscoveryCompatibility(GoSystem system, kBool enable);
689
690 /**
691 * Returns whether or not compatibility mode is enabled.
692 *
693 * @public @memberof GoSystem
694 * @version Introduced in firmware 5.1.6.0
695 * @param system GoSystem object.
696 * @return Compatibility enable flag.
697 */
698 GoFx(kBool) GoSystem_DiscoveryCompatibilityEnabled(GoSystem system);
699
700 /**
701 * Start running the Gocator Discovery Protocol to discover sensors. The protocol
702 * will run over the interfaces which have enabled to run the protocol.
703 *
704 * @public @memberof GoSystem
705 * @version Introduced in firmware 4.6.7.157
706 * @param system GoSystem object.
707 * @return Operation status.
708 */
709 GoFx(kStatus) GoSystem_StartDiscovery(GoSystem system);
710
711 /**
712 * Lock the system state to ensure thread safety while reading/modifying the GoSystem
713 * class's list of sensors. Call this to lock the state before retrieving and using
714 * sensor object handles to ensure the sensor object is not deleted because another
715 * thread refreshed the system.
716 *
717 * @public @memberof GoSystem
718 * @version Introduced in firmware 5.1.6.0
719 * @param system GoSystem object.
720 * @return Operation status.
721 */
722 GoFx(kStatus) GoSystem_LockState(GoSystem system);
723
724 /**
725 * Unlock the system state to allow other threads to read/modify the GoSystem
726 * class's list of sensors.
727 *
728 * @public @memberof GoSystem
729 * @version Introduced in firmware 5.1.6.0
730 * @param system GoSystem object.
731 * @return Operation status.
732 */
733 GoFx(kStatus) GoSystem_UnlockState(GoSystem system);
734
735
736 /// @endcond
737
738 kEndHeader()
739 #include <GoSdk/GoSystem.x.h>
740
741 #endif
k32u
GoPortInfo
Ports used from a source device.
Definition: GoSdkDef.h:757
GoSystem::GoSystem_Disconnect
kStatus GoSystem_Disconnect(GoSystem system)
Terminates control connections to all sensors.
GoSystem
Represents a system of Gocator devices.
GoSystem::GoSystem_EnableData
kStatus GoSystem_EnableData(GoSystem system, kBool enable)
Establishes data connections to all connected sensors currently in the ready or running states...
GoSystem::GoSystem_Start
kStatus GoSystem_Start(GoSystem system)
Starts all sensors that are currently in the ready state.
GoSystem::GoSystem_AddSensor
kStatus GoSystem_AddSensor(GoSystem system, const GoAddressInfo *addressInfo, const GoPortInfo *portInfo, GoSensor *sensor)
Adds a sensor by passing a custom address and port info, this doesnt require discovery.
GoSystem::GoSystem_StartExposureAutoSet
kStatus GoSystem_StartExposureAutoSet(GoSystem system)
Performs exposure auto set for sensors in the ready state.
k64u
GoSystem::GoSystem_Stop
kStatus GoSystem_Stop(GoSystem system)
Stops all connected sensors.
GoSystem::GoSystem_ClearData
kStatus GoSystem_ClearData(GoSystem system)
Clears any buffered data messages.
GoSystem::GoSystem_ReceiveHealth
kStatus GoSystem_ReceiveHealth(GoSystem system, GoDataSet *data, k64u timeout)
Receives a set of sensor health messages.
GoSystem::GoSystem_ReceiveData
kStatus GoSystem_ReceiveData(GoSystem system, GoDataSet *data, k64u timeout)
Receives a set of sensor data messages.
kPointer
GoSystem::GoSystem_Reset
kStatus GoSystem_Reset(GoSystem system, kBool wait)
Reboots all connected sensors.
GoSystem::GoSystem_ClearHealth
kStatus GoSystem_ClearHealth(GoSystem system)
Clears any buffered health messages.
GoSystem::GoSystem_StartAlignment
kStatus GoSystem_StartAlignment(GoSystem system)
Performs alignment for sensors in the ready state.
kSize
kAlloc
GoSystem::GoSystem_SensorAt
GoSensor GoSystem_SensorAt(GoSystem system, kSize index)
Gets the sensor object at the specified index.
GoSensor.h
Declares the GoSensor class.
kIpAddress
GoSystem::GoSystem_ConstructEx
kStatus GoSystem_ConstructEx(GoSystem *system, kAlloc allocator)
Constructs a GoSystem object.
GoSystem::GoSystem_SdkVersion
kVersion GoSystem_SdkVersion()
Reports the Gocator firmware version that was built alongside this library.
GoSdkDef.h
Essential SDK declarations.
GoSystem::GoSystem_Cancel
kStatus GoSystem_Cancel(GoSystem system)
Aborts ongoing sensor communication.
GoSystem::GoSystem_HasChanges
kBool GoSystem_HasChanges(GoSystem system)
Reports whether the system has changes that require a refresh.
GoDataSet
Represents a collection of data channel or health channel messages.
GoSensor::GoSystem_GetExtendedDiscoveryInfo
kStatus GoSystem_GetExtendedDiscoveryInfo(GoSystem system, k32u deviceId, GoDiscoveryExtInfo *info, kAlloc allocator)
Gets the Discovery channel information for the given device ID (if the device is present and the comm...
GoSystem::GoSystem_ScheduledStart
kStatus GoSystem_ScheduledStart(GoSystem system, k64s value)
Starts all sensors that are currently in the ready state at a scheduled value.
GoSystem::GoSystem_SensorCount
kSize GoSystem_SensorCount(GoSystem system)
Gets the number of sensors in the system.
GoSystem::GoSystem_ProtocolVersion
kVersion GoSystem_ProtocolVersion()
Reports the Gocator Protocol version implemented by this library.
GoSystem::GoSystem_SetHealthHandler
kStatus GoSystem_SetHealthHandler(GoSystem system, GoDataFx function, kPointer receiver)
Sets a callback function that can be used to receive sensor health messages asynchronously.
k64s
GoDataFx
kStatus(kCall * GoDataFx)(kPointer context, GoSensor system, GoDataSet data)
Defines the signature for a GoSystem data/health handler.
Definition: GoSystem.h:54
GoSystem::GoSystem_SetDataCapacity
kStatus GoSystem_SetDataCapacity(GoSystem system, kSize capacity)
Sets the maximum amount of memory that can be used to buffer received data messages.
GoSystem::GoSystem_Construct
kStatus GoSystem_Construct(GoSystem *system, kAlloc allocator)
Constructs a GoSystem object.
GoSystem::GoSystem_FindSensorById
kStatus GoSystem_FindSensorById(GoSystem system, k32u id, GoSensor *sensor)
Gets the sensor object with the specified device id (serial number).
GoSystem::GoSystem_DataCapacity
kSize GoSystem_DataCapacity(GoSystem system)
Reports that maximum amount of memory that can be used to buffer received data messages.
kObject
kVersion
kStatus
GoSystem::GoSystem_FindSensorByIpAddress
kStatus GoSystem_FindSensorByIpAddress(GoSystem system, const kIpAddress *address, GoSensor *sensor)
Gets the sensor object with the specified IP address.
GoSystem::GoSystem_Encoder
kStatus GoSystem_Encoder(GoSystem system, k64s *encoder)
Gets the current encoder value from the sensor network.
GoDiscoveryExtInfo
Represents an extended Discovery Information object.
k64f
GoSystem::GoSystem_Timestamp
kStatus GoSystem_Timestamp(GoSystem system, k64u *time)
Gets the current time stamp from the sensor network.
kBool
GoSensor
Represents a Gocator sensor.
GoSystem::GoSystem_Refresh
kStatus GoSystem_Refresh(GoSystem system)
Updates client state to reflect any changes that have occurred in the sensor network.
GoSystem::GoSystem_SetDataHandler
kStatus GoSystem_SetDataHandler(GoSystem system, GoDataFx function, kPointer receiver)
Sets a callback function that can be used to receive sensor data messages asynchronously.
GoAddressInfo
Sensor network address settings.
Definition: GoSdkDef.h:743
GoSystem::GoSystem_Connect
kStatus GoSystem_Connect(GoSystem system)
Establishes control connections to all sensors.