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-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  */
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  */
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  * WARNING! This operation writes to flash storage.
385  * Review the user manual for implications.
386  *
387  * NOTE: This operation will result in sensor starts for the duration of the
388  * alignment. It can be canceled via GoSystem_Stop. This function's operation
389  * status does not correspond to the actual alignment result. In order to
390  * retrieve the alignment result, you must enable the data channel before calling
391  * this function, receive an alignment data message and then check its status.
392  *
393  * @public @memberof GoSystem
394  * @version Introduced in firmware 4.0.10.27
395  * @param system GoSystem object.
396  * @return Operation status.
397  * @see GoSystem_EnableData, GoSystem_ReceiveData, GoSystem_Stop
398  * @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.
399  */
400 GoFx(kStatus) GoSystem_StartAlignment(GoSystem system);
401 
402 /**
403  * Performs exposure auto set for sensors in the <em>ready</em> state.
404  *
405  * NOTE: This operation will result in sensor starts for the duration of the
406  * exposure AutoSet. A successful operation status does NOT modify the configuration.
407  * You must retrieve the resulting exposure values and set it for the appropriate
408  * exposure setting. This involves enabling the data connection prior to running
409  * exposure auto set and then receiving an exposure auto set message, which
410  * you can then use to query the status and access the resulting value.
411  *
412  * @public @memberof GoSystem
413  * @version Introduced in firmware 4.0.10.27
414  * @param system GoSystem object.
415  * @return Operation status.
416  * @see GoSystem_EnableData, GoSystem_ReceiveData
417  */
418 GoFx(kStatus) GoSystem_StartExposureAutoSet(GoSystem system);
419 
420 /**
421  * Stops all connected sensors.
422  *
423  * @public @memberof GoSystem
424  * @version Introduced in firmware 4.0.10.27
425  * @param system GoSystem object.
426  * @return Operation status.
427  * @see GoSystem_Start, GoSensor_Start, GoSensor_Stop
428  */
429 GoFx(kStatus) GoSystem_Stop(GoSystem system);
430 
431 
432 /**
433  * Reboots all connected sensors.
434  *
435  * @public @memberof GoSystem
436  * @version Introduced in firmware 4.0.10.27
437  * @param system GoSystem object.
438  * @param wait kTRUE to wait for reboot complete; kFALSE to return immediately.
439  * @return Operation status.
440  */
441 GoFx(kStatus) GoSystem_Reset(GoSystem system, kBool wait);
442 
443 /**
444  * Aborts ongoing sensor communication.
445  *
446  * This method asynchronously aborts ongoing communication; the next time that any
447  * I/O operation blocks for an extended period of time, it will be terminated. This method
448  * is thread-safe.
449  *
450  * In order to resume communication, call GoSystem_Refresh or GoSystem_Connect.
451  *
452  * @public @memberof GoSystem
453  * @version Introduced in firmware 4.0.10.27
454  * @param system GoSystem object.
455  * @return Operation status.
456  */
457 GoFx(kStatus) GoSystem_Cancel(GoSystem system);
458 
459 /**
460  * Gets the Discovery channel information for the given device ID (if the device is present and the command is supported)
461  *
462  * @public @memberof GoSensor
463  * @version Introduced in firmware 4.3.3.124
464  * @param system GoSystem object.
465  * @param deviceId The ID of the device with which to retrieve Discovery channel information.
466  * @param info A handled to the sensor's constructed discovery information.
467  * @param allocator Memory allocator (or kNULL for the default).
468  * @see GoDestroy
469  */
470 GoFx(kStatus) GoSystem_GetExtendedDiscoveryInfo(GoSystem system, k32u deviceId, GoDiscoveryExtInfo* info, kAlloc allocator);
471 
472 /**
473  * Gets the number of sensors in the system.
474  *
475  * @public @memberof GoSystem
476  * @version Introduced in firmware 4.0.10.27
477  * @param system GoSystem object.
478  * @return Count of sensors in the system.
479  * @see GoSystem_SensorAt
480  */
481 GoFx(kSize) GoSystem_SensorCount(GoSystem system);
482 
483 /**
484  * Gets the sensor object at the specified index.
485  *
486  * @public @memberof GoSystem
487  * @version Introduced in firmware 4.0.10.27
488  * @param system GoSystem object.
489  * @param index Sensor index.
490  * @return Sensor object.
491  * @see GoSystem_SensorCount
492  */
493 GoFx(GoSensor) GoSystem_SensorAt(GoSystem system, kSize index);
494 
495 /**
496  * Gets the sensor object with the specified device id (serial number).
497  *
498  * @public @memberof GoSystem
499  * @version Introduced in firmware 4.0.10.27
500  * @param system GoSystem object.
501  * @param id Device identifier.
502  * @param sensor Receives sensor object.
503  * @return Operation status (kERROR_NOT_FOUND if sensor not found).
504  * @see GoSystem_SensorCount, GoSystem_SensorAt
505  */
506 GoFx(kStatus) GoSystem_FindSensorById(GoSystem system, k32u id, GoSensor* sensor);
507 
508 /**
509  * Gets the sensor object with the specified IP address.
510  *
511  * @public @memberof GoSystem
512  * @version Introduced in firmware 4.0.10.27
513  * @param system GoSystem object.
514  * @param address Pointer to sensor IP address.
515  * @param sensor Receives sensor object.
516  * @return Operation status (kERROR_NOT_FOUND if sensor not found).
517  * @see GoSystem_SensorCount, GoSystem_SensorAt
518  */
519 GoFx(kStatus) GoSystem_FindSensorByIpAddress(GoSystem system, const kIpAddress* address, GoSensor* sensor);
520 
521 /**
522  * Gets the current time stamp from the sensor network.
523  *
524  * @public @memberof GoSystem
525  * @version Introduced in firmware 4.0.10.27
526  * @param system GoSystem object.
527  * @param time Receives current time stamp(microseconds).
528  * @return Operation status (kERROR_NOT_FOUND if no sensors available).
529  * @see GoSystem_GetEncoder
530  */
531 GoFx(kStatus) GoSystem_Timestamp(GoSystem system, k64u* time);
532 
533 /**
534  * Gets the current encoder value from the sensor network.
535  *
536  * @public @memberof GoSystem
537  * @version Introduced in firmware 4.0.10.27
538  * @param system GoSystem object.
539  * @param encoder Receives current encoder value (ticks).
540  * @return Operation status (kERROR_NOT_FOUND if no sensors available).
541  * @see GoSystem_GetTime
542  */
543 GoFx(kStatus) GoSystem_Encoder(GoSystem system, k64s* encoder);
544 
545 
546 /// @cond (Gocator_1x00 || Gocator_2x00)
547 
548 /**
549  * Gets the current multiplex bank count.
550  *
551  * @public @memberof GoSystem
552  * @version Introduced in firmware 4.0.10.27
553  * @param system GoSystem object.
554  * @return The current number of defined multiplex banks.
555  */
556 GoFx(kSize) GoSystem_MultiplexBankCount(GoSystem system);
557 
558 /**
559  * Gets a multiplex bank corresponding to the given index.
560  *
561  * @public @memberof GoSystem
562  * @version Introduced in firmware 4.0.10.27
563  * @param system GoSystem object.
564  * @param index The index of the multiplex bank to retrieve.
565  * @return The multiplex bank at the given index or kNULL if an invalid index is given.
566  */
567 GoFx(GoMultiplexBank) GoSystem_MultiplexBankAt(GoSystem system, kSize index);
568 
569 /**
570  * Adds a multiplex bank with a unique ID to the system.
571  *
572  * @public @memberof GoSystem
573  * @version Introduced in firmware 4.0.10.27
574  * @param system GoSystem object.
575  * @param bank A pointer to the newly created GoMultiplexBank object.
576  * @return Operation status.
577  */
578 GoFx(kStatus) GoSystem_AddMultiplexBank(GoSystem system, GoMultiplexBank* bank);
579 
580 /**
581  * Removes a multiplex bank at the given index.
582  *
583  * @public @memberof GoSystem
584  * @version Introduced in firmware 4.0.10.27
585  * @param system GoSystem object.
586  * @param index The index of the multiplex bank to remove.
587  * @return Operation status.
588  */
589 GoFx(kStatus) GoSystem_RemoveMultiplexBank(GoSystem system, kSize index);
590 
591 /**
592  * Removes all multiplex banks.
593  *
594  * @public @memberof GoSystem
595  * @version Introduced in firmware 4.0.10.27
596  * @param system GoSystem object.
597  * @return Operation status.
598  */
599 GoFx(kStatus) GoSystem_ClearMultiplexBanks(GoSystem system);
600 
601 /**
602  * Gets the maximum sensor exposure duration in the given multiplex bank.
603  *
604  * @public @memberof GoSystem
605  * @version Introduced in firmware 4.0.10.27
606  * @param system GoSystem object.
607  * @param bank The multiplex bank to check.
608  * @return The maximum sensor exposure duration contained in the multiplexing bank.
609  */
610 GoFx(k64f) GoSystem_MaxBankExposureDuration(GoSystem system, GoMultiplexBank bank);
611 
612 /**
613  * Automatically update the single multiplexing delay and period configuration for all sensors contained in all defined multiplex banks.
614  *
615  * @public @memberof GoSystem
616  * @version Introduced in firmware 4.0.10.27
617  * @param system GoSystem object.
618  * @param period The exposure period to set among all multiplexed sensors. A value of 0.0 will result in automatic period determination.
619  * @return Operation status.
620  */
621 GoFx(kStatus) GoSystem_UpdateAllMultiplexParameters(GoSystem system, k64f period);
622 
623 /**
624  * Automatically update the multiplexing single delay configuration for all sensors contained in all defined multiplex banks.
625  *
626  * @public @memberof GoSystem
627  * @version Introduced in firmware 4.0.10.27
628  * @param system GoSystem object.
629  * @return Operation status.
630  */
631 GoFx(kStatus) GoSystem_UpdateMultiplexDelay(GoSystem system);
632 
633 /**
634  * Returns the maximum value of all multiplexed sensor's minimum multiplexing periods.
635  *
636  * @public @memberof GoSystem
637  * @version Introduced in firmware 4.0.10.27
638  * @param system GoSystem object.
639  * @return Operation status.
640  */
641 GoFx(k64f) GoSystem_MaxMinimumMultiplexPeriod(GoSystem system);
642 
643 /**
644  * Automatically update the multiplexing single period configuration for all sensors contained in all defined multiplex banks.
645  *
646  * @public @memberof GoSystem
647  * @version Introduced in firmware 4.0.10.27
648  * @param system GoSystem object.
649  * @param period The exposure period to set among all multiplexed sensors. A value of 0.0 will result in automatic period determination.
650  * @return Operation status.
651  */
652 GoFx(kStatus) GoSystem_UpdateMultiplexPeriod(GoSystem system, k64f period);
653 
654 /**
655 * Enable or disable running the Gocator Discovery Protocol over the specified
656 * host interface which the given address.
657 *
658 * @public @memberof GoSystem
659 * @version Introduced in firmware 4.6.7.157
660 * @param system GoSystem object.
661 * @param address IP address of interface over which the discovery protocol is or is not allowed to run.
662 * @param enable Select whether to enable or disable the interface.
663 * @return Operation status.
664 */
665 GoFx(kStatus) GoSystem_SetOneDiscoveryInterface(GoSystem system, kIpAddress* address, kBool enable);
666 
667 /**
668 * Enable or disable running the Gocator Discovery Protocol over all the host interfaces.
669 *
670 * @public @memberof GoSystem
671 * @version Introduced in firmware 4.6.7.157
672 * @param system GoSystem object.
673 * @param enable Select whether to enable or disable the interface(s).
674 * @return Operation status.
675 */
676 GoFx(kStatus) GoSystem_SetAllDiscoveryInterface(GoSystem system, kBool enable);
677 
678 /**
679 * Enable or disable compatibility mode for the discovery service.
680 *
681 * Compatibility mode can discover older firwmare (4.2 or earlier). However
682 * the discovery traffic over the network is doubled. Compatibility mode is
683 * on by default.
684 *
685 * @public @memberof GoSystem
686  * @version Introduced in firmware 5.2.18.3
687 * @param system GoSystem object.
688 * @param enable Enable or disable compatibility mode.
689 * @return Operation status.
690 */
691 GoFx(kStatus) GoSystem_EnableDiscoveryCompatibility(GoSystem system, kBool enable);
692 
693 /**
694 * Returns whether or not compatibility mode is enabled.
695 *
696 * @public @memberof GoSystem
697  * @version Introduced in firmware 5.2.18.3
698 * @param system GoSystem object.
699 * @return Compatibility enable flag.
700 */
701 GoFx(kBool) GoSystem_DiscoveryCompatibilityEnabled(GoSystem system);
702 
703 /**
704 * Start running the Gocator Discovery Protocol to discover sensors. The protocol
705 * will run over the interfaces which have enabled to run the protocol.
706 *
707 * @public @memberof GoSystem
708 * @version Introduced in firmware 4.6.7.157
709 * @param system GoSystem object.
710 * @return Operation status.
711 */
712 GoFx(kStatus) GoSystem_StartDiscovery(GoSystem system);
713 
714 /**
715 * Lock the system state to ensure thread safety while reading/modifying the GoSystem
716 * class's list of sensors. Call this to lock the state before retrieving and using
717 * sensor object handles to ensure the sensor object is not deleted because another
718 * thread refreshed the system.
719 * Used in multi-threaded SDK applications.
720 *
721 * @public @memberof GoSystem
722  * @version Introduced in firmware 5.2.18.3
723 * @param system GoSystem object.
724 * @return Operation status.
725 */
726 GoFx(kStatus) GoSystem_LockState(GoSystem system);
727 
728 /**
729 * Unlock the system state to allow other threads to read/modify the GoSystem
730 * class's list of sensors.
731 * Used in multi-threaded SDK applications.
732 *
733 * @public @memberof GoSystem
734  * @version Introduced in firmware 5.2.18.3
735 * @param system GoSystem object.
736 * @return Operation status.
737 */
738 GoFx(kStatus) GoSystem_UnlockState(GoSystem system);
739 
740 
741 /// @endcond
742 
743 kEndHeader()
744 #include <GoSdk/GoSystem.x.h>
745 
746 #endif
Ports used from a source device.
Definition: GoSdkDef.h:757
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 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(kCall * GoDataFx)(kPointer context, GoSensor system, GoDataSet data)
Defines the signature for a GoSystem data/health handler.
Definition: GoSystem.h:54
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 which the ...
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_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:743
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...