Gocator API

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