Gocator API
 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-2021 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  */
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  */
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. After using GoSystem_SetDataHandler function,
226  * SDK application is responsible for disposing of the GoDataSet objects that hold the data received from
227  * the sensor on the data connection.
228  *
229  * To unregister a previously-registered data handler, call this function using kNULL in place
230  * of the callback function argument.
231  *
232  * @public @memberof GoSystem
233  * @version Introduced in firmware 4.0.10.27
234  * @param system GoSystem object.
235  * @param function Data callback function (or kNULL to unregister).
236  * @param receiver Receiver argument for callback.
237  * @return Operation status.
238  * @see GoDataFx, GoSystem_ReceiveData, GoSystem_SetDataCapacity, GoSystem_EnableData
239  */
240 GoFx(kStatus) GoSystem_SetDataHandler(GoSystem system, GoDataFx function, kPointer receiver);
241 
242 /**
243  * Sets the maximum amount of memory that can be used to buffer received data messages.
244  *
245  * Received data messages are enqueued until they are accepted by the caller. This function
246  * determines the maximum size, in bytes, of enqueued messages. The default maximum size is 50 MB.
247  *
248  * @public @memberof GoSystem
249  * @version Introduced in firmware 4.0.10.27
250  * @param system GoSystem object.
251  * @param capacity Data queue capacity, in bytes.
252  * @return Operation status.
253  * @see GoSystem_DataCapacity
254  */
255 GoFx(kStatus) GoSystem_SetDataCapacity(GoSystem system, kSize capacity);
256 
257 /**
258  * Reports that maximum amount of memory that can be used to buffer received data messages.
259  *
260  * @public @memberof GoSystem
261  * @version Introduced in firmware 4.0.10.27
262  * @param system GoSystem object.
263  * @return Data queue capacity, in bytes.
264  * @see GoSystem_SetDataCapacity
265  */
266 GoFx(kSize) GoSystem_DataCapacity(GoSystem system);
267 
268 /**
269  * Establishes data connections to all connected sensors currently in the <em>ready</em> or <em>running</em> states.
270  *
271  * Data connections are not automatically established when sensor control connection are established.
272  * Use this function (or GoSensor_EnableData) to enable/disable data connections. After using GoSystem_EnableData function,
273  * SDK application is responsible for disposing of the GoDataSet objects that hold the data received from the sensor on the data connection.
274  *
275  * @public @memberof GoSystem
276  * @version Introduced in firmware 4.0.10.27
277  * @param system GoSystem object.
278  * @param enable kTRUE to enable data connections; kFALSE to disable.
279  * @return Operation status.
280  * @see GoSystem_ReceiveData, GoSensor_EnableData
281  */
282 GoFx(kStatus) GoSystem_EnableData(GoSystem system, kBool enable);
283 
284 /**
285  * Clears any buffered data messages.
286  *
287  * When stopping and then restarting a system, it may be desirable to ensure that no messages from
288  * the previous session remain in any buffers. The GoSystem_ClearData function closes any open data
289  * channels, destroys any received messages, and then reopens data channels.
290  *
291  * @public @memberof GoSystem
292  * @version Introduced in firmware 4.0.10.27
293  * @param system GoSystem object.
294  * @return Operation status.
295  */
296 GoFx(kStatus) GoSystem_ClearData(GoSystem system);
297 
298 /**
299  * Receives a set of sensor data messages.
300  *
301  * Sensor data messages can be received synchronously using this function or asynchronously by
302  * registering a callback with the GoSystem_SetDataHandler function.
303  *
304  * NOTE: Data received with this function must be destroyed after use,
305  * otherwise a memory leak will result.
306  *
307  * @public @memberof GoSystem
308  * @version Introduced in firmware 4.0.10.27
309  * @param system GoSystem object.
310  * @param data Set of sensor data messages.
311  * @param timeout Duration to wait for messages, in microseconds.
312  * @return Operation status.
313  * @see GoDestroy, GoSystem_SetDataHandler, GoSystem_SetDataCapacity, GoSystem_EnableData
314  */
315 GoFx(kStatus) GoSystem_ReceiveData(GoSystem system, GoDataSet* data, k64u timeout);
316 
317 /**
318  * Sets a callback function that can be used to receive sensor health messages asynchronously.
319  *
320  * Sensor health messages can be received synchronously using the GoSystem_ReceiveHealth function
321  * or asynchronously by registering a callback function. If a callback function is registered,
322  * a background thread will be created to perform notifications.
323  *
324  * To unregister a previously-registered health handler, call this function using kNULL in place
325  * of the callback function argument.
326  *
327  * @public @memberof GoSystem
328  * @version Introduced in firmware 4.0.10.27
329  * @param system GoSystem object.
330  * @param function Health callback function (or kNULL to unregister).
331  * @param receiver Receiver argument, passed to callback.
332  * @return Operation status.
333  * @see GoDataFx, GoSystem_ReceiveHealth, GoSystem_SetDataCapacity, GoSystem_EnableData
334  */
335 GoFx(kStatus) GoSystem_SetHealthHandler(GoSystem system, GoDataFx function, kPointer receiver);
336 
337 /**
338  * Receives a set of sensor health messages.
339  *
340  * Sensor health messages can be received synchronously using this function or asynchronously by
341  * registering a callback with the GoSystem_SetHealthHandler function.
342  *
343  * @public @memberof GoSystem
344  * @version Introduced in firmware 4.0.10.27
345  * @param system GoSystem object.
346  * @param data Set of sensor health messages.
347  * @param timeout Duration to wait for messages, in microseconds.
348  * @return Operation status.
349  * @see GoSystem_SetHealthHandler
350  */
351 GoFx(kStatus) GoSystem_ReceiveHealth(GoSystem system, GoDataSet* data, k64u timeout);
352 
353 /**
354  * Clears any buffered health messages.
355  *
356  * @public @memberof GoSystem
357  * @version Introduced in firmware 4.0.10.27
358  * @param system GoSystem object.
359  * @return Operation status.
360  */
362 
363 /**
364  * Starts all sensors that are currently in the <em>ready</em> state.
365  *
366  * @public @memberof GoSystem
367  * @version Introduced in firmware 4.0.10.27
368  * @param system GoSystem object.
369  * @return Operation status.
370  * @see GoSystem_Stop, GoSensor_Start, GoSensor_Stop
371  */
372 GoFx(kStatus) GoSystem_Start(GoSystem system);
373 
374 /**
375  * Starts all sensors that are currently in the <em>ready</em> state at a scheduled value.
376  *
377  * NOTE: The value specified is the target value to start at, not a relative
378  * offset from the current value. The typical usage is to obtain the current
379  * value first, add an offset to it, and start at that value.
380  *
381  * @public @memberof GoSystem
382  * @version Introduced in firmware 4.1.3.106
383  * @param system GoSystem object.
384  * @param value The value at which to start the sensor. It is in uS when time triggered and ticks when encoder triggered.
385  * @return Operation status.
386  * @see GoSystem_Stop, GoSensor_ScheduledStart, GoSensor_Stop, GoSetup_SetTriggerSource, GoSetup_TriggerSource
387  */
388 GoFx(kStatus) GoSystem_ScheduledStart(GoSystem system, k64s value);
389 
390 /**
391  * Performs alignment for sensors in the <em>ready</em> state.
392  *
393  * WARNING! This operation writes to flash storage.
394  * Review the user manual for implications.
395  *
396  * NOTE: This operation will result in sensor starts for the duration of the
397  * alignment. It can be canceled via GoSystem_Stop. This function's operation
398  * status does not correspond to the actual alignment result. In order to
399  * retrieve the alignment result, you must enable the data channel before calling
400  * this function, receive an alignment data message and then check its status.
401  *
402  * @public @memberof GoSystem
403  * @version Introduced in firmware 4.0.10.27
404  * @param system GoSystem object.
405  * @return Operation status.
406  * @see GoSystem_EnableData, GoSystem_ReceiveData, GoSystem_Stop
407  * @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.
408  */
410 
411 /**
412  * Performs exposure auto set for sensors in the <em>ready</em> state.
413  *
414  * NOTE: This operation will result in sensor starts for the duration of the
415  * exposure AutoSet. A successful operation status does NOT modify the configuration.
416  * You must retrieve the resulting exposure values and set it for the appropriate
417  * exposure setting. This involves enabling the data connection prior to running
418  * exposure auto set and then receiving an exposure auto set message, which
419  * you can then use to query the status and access the resulting value.
420  *
421  * @public @memberof GoSystem
422  * @version Introduced in firmware 4.0.10.27
423  * @param system GoSystem object.
424  * @return Operation status.
425  * @see GoSystem_EnableData, GoSystem_ReceiveData
426  */
428 
429 /**
430  * Stops all connected sensors.
431  *
432  * @public @memberof GoSystem
433  * @version Introduced in firmware 4.0.10.27
434  * @param system GoSystem object.
435  * @return Operation status.
436  * @see GoSystem_Start, GoSensor_Start, GoSensor_Stop
437  */
438 GoFx(kStatus) GoSystem_Stop(GoSystem system);
439 
440 
441 /**
442  * Reboots all connected sensors.
443  *
444  * @public @memberof GoSystem
445  * @version Introduced in firmware 4.0.10.27
446  * @param system GoSystem object.
447  * @param wait kTRUE to wait for reboot complete; kFALSE to return immediately.
448  * @return Operation status.
449  */
450 GoFx(kStatus) GoSystem_Reset(GoSystem system, kBool wait);
451 
452 /**
453  * Aborts ongoing sensor communication.
454  *
455  * This method asynchronously aborts ongoing communication; the next time that any
456  * I/O operation blocks for an extended period of time, it will be terminated. This method
457  * is thread-safe.
458  *
459  * In order to resume communication, call GoSystem_Refresh or GoSystem_Connect.
460  *
461  * @public @memberof GoSystem
462  * @version Introduced in firmware 4.0.10.27
463  * @param system GoSystem object.
464  * @return Operation status.
465  */
466 GoFx(kStatus) GoSystem_Cancel(GoSystem system);
467 
468 /**
469  * Gets the Discovery channel information for the given device ID (if the device is present and the command is supported)
470  *
471  * @public @memberof GoSensor
472  * @version Introduced in firmware 4.3.3.124
473  * @param system GoSystem object.
474  * @param deviceId The ID of the device with which to retrieve Discovery channel information.
475  * @param info A handled to the sensor's constructed discovery information.
476  * @param allocator Memory allocator (or kNULL for the default).
477  * @see GoDestroy
478  */
479 GoFx(kStatus) GoSystem_GetExtendedDiscoveryInfo(GoSystem system, k32u deviceId, GoDiscoveryExtInfo* info, kAlloc allocator);
480 
481 /**
482  * Gets the number of sensors in the system.
483  *
484  * @public @memberof GoSystem
485  * @version Introduced in firmware 4.0.10.27
486  * @param system GoSystem object.
487  * @return Count of sensors in the system.
488  * @see GoSystem_SensorAt
489  */
490 GoFx(kSize) GoSystem_SensorCount(GoSystem system);
491 
492 /**
493  * Gets the sensor object at the specified index.
494  *
495  * @public @memberof GoSystem
496  * @version Introduced in firmware 4.0.10.27
497  * @param system GoSystem object.
498  * @param index Sensor index.
499  * @return Sensor object.
500  * @see GoSystem_SensorCount
501  */
502 GoFx(GoSensor) GoSystem_SensorAt(GoSystem system, kSize index);
503 
504 /**
505  * Gets the sensor object with the specified device id (serial number).
506  *
507  * @public @memberof GoSystem
508  * @version Introduced in firmware 4.0.10.27
509  * @param system GoSystem object.
510  * @param id Device identifier.
511  * @param sensor Receives sensor object.
512  * @return Operation status (kERROR_NOT_FOUND if sensor not found).
513  * @see GoSystem_SensorCount, GoSystem_SensorAt
514  */
515 GoFx(kStatus) GoSystem_FindSensorById(GoSystem system, k32u id, GoSensor* sensor);
516 
517 /**
518  * Gets the sensor object with the specified IP address.
519  *
520  * @public @memberof GoSystem
521  * @version Introduced in firmware 4.0.10.27
522  * @param system GoSystem object.
523  * @param address Pointer to sensor IP address.
524  * @param sensor Receives sensor object.
525  * @return Operation status (kERROR_NOT_FOUND if sensor not found).
526  * @see GoSystem_SensorCount, GoSystem_SensorAt
527  */
528 GoFx(kStatus) GoSystem_FindSensorByIpAddress(GoSystem system, const kIpAddress* address, GoSensor* sensor);
529 
530 /**
531  * Gets the current time stamp 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 time Receives current time stamp(microseconds).
537  * @return Operation status (kERROR_NOT_FOUND if no sensors available).
538  * @see GoSystem_GetEncoder
539  */
540 GoFx(kStatus) GoSystem_Timestamp(GoSystem system, k64u* time);
541 
542 /**
543  * Gets the current encoder value from the sensor network.
544  *
545  * @public @memberof GoSystem
546  * @version Introduced in firmware 4.0.10.27
547  * @param system GoSystem object.
548  * @param encoder Receives current encoder value (ticks).
549  * @return Operation status (kERROR_NOT_FOUND if no sensors available).
550  * @see GoSystem_GetTime
551  */
552 GoFx(kStatus) GoSystem_Encoder(GoSystem system, k64s* encoder);
553 
554 /**
555  * Gets the current multiplex bank count.
556  *
557  * @public @memberof GoSystem
558  * @note Supported with G1, G2
559  * @version Introduced in firmware 4.0.10.27
560  * @param system GoSystem object.
561  * @return The current number of defined multiplex banks.
562  */
564 
565 /**
566  * Gets a multiplex bank corresponding to the given index.
567  *
568  * @public @memberof GoSystem
569  * @note Supported with G1, G2
570  * @version Introduced in firmware 4.0.10.27
571  * @param system GoSystem object.
572  * @param index The index of the multiplex bank to retrieve.
573  * @return The multiplex bank at the given index or kNULL if an invalid index is given.
574  */
576 
577 /**
578  * Adds a multiplex bank with a unique ID to the system.
579  *
580  * @public @memberof GoSystem
581  * @note Supported with G1, G2
582  * @version Introduced in firmware 4.0.10.27
583  * @param system GoSystem object.
584  * @param bank A pointer to the newly created GoMultiplexBank object.
585  * @return Operation status.
586  */
588 
589 /**
590  * Removes a multiplex bank at the given index.
591  *
592  * @public @memberof GoSystem
593  * @note Supported with G1, G2
594  * @version Introduced in firmware 4.0.10.27
595  * @param system GoSystem object.
596  * @param index The index of the multiplex bank to remove.
597  * @return Operation status.
598  */
600 
601 /**
602  * Removes all multiplex banks.
603  *
604  * @public @memberof GoSystem
605  * @note Supported with G1, G2
606  * @version Introduced in firmware 4.0.10.27
607  * @param system GoSystem object.
608  * @return Operation status.
609  */
611 
612 /**
613  * Gets the maximum sensor exposure duration in the given multiplex bank.
614  *
615  * @public @memberof GoSystem
616  * @note Supported with G1, G2
617  * @version Introduced in firmware 4.0.10.27
618  * @param system GoSystem object.
619  * @param bank The multiplex bank to check.
620  * @return The maximum sensor exposure duration contained in the multiplexing bank.
621  */
623 
624 /**
625  * Automatically update the single multiplexing delay and period configuration for all sensors contained in all defined multiplex banks.
626  *
627  * @public @memberof GoSystem
628  * @note Supported with G1, G2
629  * @version Introduced in firmware 4.0.10.27
630  * @param system GoSystem object.
631  * @param period The exposure period to set among all multiplexed sensors. A value of 0.0 will result in automatic period determination.
632  * @return Operation status.
633  */
635 
636 /**
637  * Automatically update the multiplexing single delay configuration for all sensors contained in all defined multiplex banks.
638  *
639  * @public @memberof GoSystem
640  * @note Supported with G1, G2
641  * @version Introduced in firmware 4.0.10.27
642  * @param system GoSystem object.
643  * @return Operation status.
644  */
646 
647 /**
648  * Returns the maximum value of all multiplexed sensor's minimum multiplexing periods.
649  *
650  * @public @memberof GoSystem
651  * @note Supported with G1, G2
652  * @version Introduced in firmware 4.0.10.27
653  * @param system GoSystem object.
654  * @return Operation status.
655  */
657 
658 /**
659  * Automatically update the multiplexing single period configuration for all sensors contained in all defined multiplex banks.
660  *
661  * @public @memberof GoSystem
662  * @note Supported with G1, G2
663  * @version Introduced in firmware 4.0.10.27
664  * @param system GoSystem object.
665  * @param period The exposure period to set among all multiplexed sensors. A value of 0.0 will result in automatic period determination.
666  * @return Operation status.
667  */
669 
670 /**
671 * Enable or disable running the Gocator Discovery Protocol over the specified
672 * host interface with the given address.
673 *
674 * @public @memberof GoSystem
675 * @version Introduced in firmware 4.6.7.157
676 * @param system GoSystem object.
677 * @param address IP address of interface over which the discovery protocol is or is not allowed to run.
678 * @param enable Select whether to enable or disable the interface.
679 * @return Operation status.
680 * @see GoSystem_StartDiscovery, GoSystem_ConstructEx
681 */
682 GoFx(kStatus) GoSystem_SetOneDiscoveryInterface(GoSystem system, kIpAddress* address, kBool enable);
683 
684 /**
685 * Enable or disable running the Gocator Discovery Protocol over all the host interfaces.
686 *
687 * @public @memberof GoSystem
688 * @version Introduced in firmware 4.6.7.157
689 * @param system GoSystem object.
690 * @param enable Select whether to enable or disable the interface(s).
691 * @return Operation status.
692 * @see GoSystem_StartDiscovery, GoSystem_ConstructEx
693 */
695 
696 /**
697 * Enable or disable compatibility mode for the discovery service.
698 *
699 * Compatibility mode can discover older firwmare (4.2 or earlier). However
700 * the discovery traffic over the network is doubled. Compatibility mode is
701 * off by default. GoSystem_Refresh () function must explicitly called in order
702 * to update the new sensor list after this function.
703 *
704 * @public @memberof GoSystem
705 * @version Introduced in firmware 5.2.18.3
706 * @param system GoSystem object.
707 * @param enable Enable or disable compatibility mode.
708 * @return Operation status.
709 */
711 
712 /**
713 * Returns whether or not compatibility mode is enabled.
714 *
715 * @public @memberof GoSystem
716 * @version Introduced in firmware 5.2.18.3
717 * @param system GoSystem object.
718 * @return Compatibility enable flag.
719 */
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 * @version Introduced in firmware 4.6.7.157
728 * @param system GoSystem object.
729 * @return Operation status.
730 */
732 
733 /**
734 * Lock the system state to ensure thread safety while reading/modifying the GoSystem
735 * class's list of sensors. Call this to lock the state before retrieving and using
736 * sensor object handles to ensure the sensor object is not deleted because another
737 * thread refreshed the system.
738 * Used in multi-threaded SDK applications.
739 *
740 * @public @memberof GoSystem
741 * @version Introduced in firmware 5.2.18.3
742 * @param system GoSystem object.
743 * @return Operation status.
744 */
745 GoFx(kStatus) GoSystem_LockState(GoSystem system);
746 
747 /**
748 * Unlock the system state to allow other threads to read/modify the GoSystem
749 * class's list of sensors.
750 * Used in multi-threaded SDK applications.
751 *
752 * @public @memberof GoSystem
753 * @version Introduced in firmware 5.2.18.3
754 * @param system GoSystem object.
755 * @return Operation status.
756 */
758 
759 /**
760 * Enable PTP on the system
761 *
762 * @public @memberof GoSystem
763 * @note Supported with G1, G2
764 * @version Introduced in firmware ?
765 * @param system GoSystem object.
766 * @return Operation status.
767 */
768 GoFx(kStatus) GoSystem_EnablePtp(GoSystem system);
769 
770 #include <GoSdk/GoSystem.x.h>
771 
772 #endif
Ports used from a source device.
Definition: GoSdkDef.h:802
kStatus GoSystem_UnlockState(GoSystem system)
Unlock the system state to allow other threads to read/modify the GoSystem class's list of sensors...
kStatus GoSystem_Disconnect(GoSystem system)
Terminates control connections to all sensors.
Represents a system of Gocator devices.
kStatus GoSystem_EnableData(GoSystem system, kBool enable)
Establishes data connections to all connected sensors currently in the ready or running states...
kStatus GoSystem_Start(GoSystem system)
Starts all sensors that are currently in the ready state.
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.
kStatus GoSystem_UpdateMultiplexPeriod(GoSystem system, k64f period)
Automatically update the multiplexing single period configuration for all sensors contained in all de...
kStatus GoSystem_StartExposureAutoSet(GoSystem system)
Performs exposure auto set for sensors in the ready state.
kStatus GoSystem_Stop(GoSystem system)
Stops all connected sensors.
kStatus GoSystem_ClearData(GoSystem system)
Clears any buffered data messages.
kStatus GoSystem_ReceiveHealth(GoSystem system, GoDataSet *data, k64u timeout)
Receives a set of sensor health messages.
kStatus GoSystem_ReceiveData(GoSystem system, GoDataSet *data, k64u timeout)
Receives a set of sensor data messages.
kStatus GoSystem_Reset(GoSystem system, kBool wait)
Reboots all connected sensors.
kStatus GoSystem_EnableDiscoveryCompatibility(GoSystem system, kBool enable)
Enable or disable compatibility mode for the discovery service.
kBool GoSystem_DiscoveryCompatibilityEnabled(GoSystem system)
Returns whether or not compatibility mode is enabled.
kStatus GoSystem_ClearHealth(GoSystem system)
Clears any buffered health messages.
kStatus GoSystem_LockState(GoSystem system)
Lock the system state to ensure thread safety while reading/modifying the GoSystem class's list of se...
kStatus GoSystem_StartAlignment(GoSystem system)
Performs alignment for sensors in the ready state.
GoSensor GoSystem_SensorAt(GoSystem system, kSize index)
Gets the sensor object at the specified index.
Declares the GoSensor class.
kStatus GoSystem_StartDiscovery(GoSystem system)
Start running the Gocator Discovery Protocol to discover sensors.
GoMultiplexBank GoSystem_MultiplexBankAt(GoSystem system, kSize index)
Gets a multiplex bank corresponding to the given index.
kStatus GoSystem_ConstructEx(GoSystem *system, kAlloc allocator)
Constructs a GoSystem object.
k64f GoSystem_MaxMinimumMultiplexPeriod(GoSystem system)
Returns the maximum value of all multiplexed sensor's minimum multiplexing periods.
Represents a bank of related sensors to be used in multiplexing.
kVersion GoSystem_SdkVersion()
Reports the Gocator firmware version that was built alongside this library.
kStatus GoSystem_ClearMultiplexBanks(GoSystem system)
Removes all multiplex banks.
Essential SDK declarations.
kStatus GoSystem_Cancel(GoSystem system)
Aborts ongoing sensor communication.
kBool GoSystem_HasChanges(GoSystem system)
Reports whether the system has changes that require a refresh.
Represents a collection of data channel or health channel messages.
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...
kStatus GoSystem_ScheduledStart(GoSystem system, k64s value)
Starts all sensors that are currently in the ready state at a scheduled value.
kSize GoSystem_SensorCount(GoSystem system)
Gets the number of sensors in the system.
kSize GoSystem_MultiplexBankCount(GoSystem system)
Gets the current multiplex bank count.
kStatus GoSystem_RemoveMultiplexBank(GoSystem system, kSize index)
Removes a multiplex bank at the given index.
kVersion GoSystem_ProtocolVersion()
Reports the Gocator Protocol version implemented by this library.
kStatus(kCall * GoDataFx)(kPointer context, GoSystem system, GoDataSet data)
Defines the signature for a GoSystem data/health handler.
Definition: GoSystem.h:62
kStatus GoSystem_SetHealthHandler(GoSystem system, GoDataFx function, kPointer receiver)
Sets a callback function that can be used to receive sensor health messages asynchronously.
kStatus GoSystem_UpdateAllMultiplexParameters(GoSystem system, k64f period)
Automatically update the single multiplexing delay and period configuration for all sensors contained...
kStatus GoSystem_SetDataCapacity(GoSystem system, kSize capacity)
Sets the maximum amount of memory that can be used to buffer received data messages.
kStatus GoSystem_Construct(GoSystem *system, kAlloc allocator)
Constructs a GoSystem object.
Declares the GoMultiplexBank class.
kStatus GoSystem_FindSensorById(GoSystem system, k32u id, GoSensor *sensor)
Gets the sensor object with the specified device id (serial number).
kSize GoSystem_DataCapacity(GoSystem system)
Reports that maximum amount of memory that can be used to buffer received data messages.
kStatus GoSystem_AddMultiplexBank(GoSystem system, GoMultiplexBank *bank)
Adds a multiplex bank with a unique ID to the system.
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...
kStatus GoSystem_FindSensorByIpAddress(GoSystem system, const kIpAddress *address, GoSensor *sensor)
Gets the sensor object with the specified IP address.
k64f GoSystem_MaxBankExposureDuration(GoSystem system, GoMultiplexBank bank)
Gets the maximum sensor exposure duration in the given multiplex bank.
kStatus GoSystem_Encoder(GoSystem system, k64s *encoder)
Gets the current encoder value from the sensor network.
Represents an extended Discovery Information object.
kStatus GoSystem_EnablePtp(GoSystem system)
Enable PTP on the system.
kStatus GoSystem_Timestamp(GoSystem system, k64u *time)
Gets the current time stamp from the sensor network.
Represents a Gocator sensor.
kStatus GoSystem_Refresh(GoSystem system)
Updates client state to reflect any changes that have occurred in the sensor network.
kStatus GoSystem_SetDataHandler(GoSystem system, GoDataFx function, kPointer receiver)
Sets a callback function that can be used to receive sensor data messages asynchronously.
kStatus GoSystem_SetAllDiscoveryInterface(GoSystem system, kBool enable)
Enable or disable running the Gocator Discovery Protocol over all the host interfaces.
Sensor network address settings.
Definition: GoSdkDef.h:788
kStatus GoSystem_Connect(GoSystem system)
Establishes control connections to all sensors.
kStatus GoSystem_UpdateMultiplexDelay(GoSystem system)
Automatically update the multiplexing single delay configuration for all sensors contained in all def...