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  * @public @memberof GoSystem
160  * @version Introduced in firmware 4.0.10.27
161  * @param system GoSystem object.
162  * @return Operation status.
163  */
164 GoFx(kStatus) GoSystem_Refresh(GoSystem system);
165 
166 /**
167  * Reports the Gocator Protocol version implemented by this library.
168  *
169  * A Gocator Protocol version number has a major component and a minor component.
170  * If the major version implemented by this library is the same as the major
171  * version implemented by a sensor device, then communication can proceed. Otherwise,
172  * the sensor should be upgraded or a newer version of this library should be obtained.
173  * Sensors with incompatible major versions will be reported as being in the
174  * <em>incompatible</em> state upon connection.
175  *
176  * If major versions match, but the minor version implemented by this library
177  * is lower than the minor version implemented by the sensor, then some sensor features
178  * will not be accessible through this library.
179  *
180  * If major versions match, but the minor version implemented by this library
181  * is higher than the minor version implemented by the sensor, then some features
182  * exposed by this library may be unimplemented by the sensor.
183  *
184  * This method is thread-safe.
185  *
186  * @public @memberof GoSystem
187  * @version Introduced in firmware 4.0.10.27
188  * @return Protocol version implemented by this library.
189  * @see GoSensor_ProtocolVersion, GoSensor_State
190  */
192 
193 /**
194  * Reports the Gocator firmware version that was built alongside this library.
195  *
196  * A Gocator SDK version number has a major component and a minor component.
197  * If the major version implemented by this library is the same as the major
198  * version implemented by a sensor device, then communication can proceed. Otherwise,
199  * the sensor should be upgraded or a version of this library matching the sensor
200  * should be obtained.
201  *
202  * When it comes to the matter of mismatched SDK and firmware versions, so long
203  * as the protocol versions match up, they should be compatible.
204  *
205  * @public @memberof GoSystem
206  * @version Introduced in firmware 4.0.10.27
207  * @return Firmware version that was built alongside this library.
208  * @see GoSensor_FirmwareVersion, GoSystem_ProtocolVersion
209  */
211 
212 /**
213  * Sets a callback function that can be used to receive sensor data messages asynchronously.
214  *
215  * Sensor data messages can be received synchronously using the GoSystem_ReceiveData function
216  * or asynchronously by registering a callback function. If a callback function is registered,
217  * a background thread will be created to perform notifications.
218  *
219  * To unregister a previously-registered data handler, call this function using kNULL in place
220  * of the callback function argument.
221  *
222  * @public @memberof GoSystem
223  * @version Introduced in firmware 4.0.10.27
224  * @param system GoSystem object.
225  * @param function Data callback function (or kNULL to unregister).
226  * @param receiver Receiver argument for callback.
227  * @return Operation status.
228  * @see GoDataFx, GoSystem_ReceiveData, GoSystem_SetDataCapacity, GoSystem_EnableData
229  */
230 GoFx(kStatus) GoSystem_SetDataHandler(GoSystem system, GoDataFx function, kPointer receiver);
231 
232 /**
233  * Sets the maximum amount of memory that can be used to buffer received data messages.
234  *
235  * Received data messages are enqueued until they are accepted by the caller. This function
236  * determines the maximum size, in bytes, of enqueued messages. The default maximum size is 50 MB.
237  *
238  * @public @memberof GoSystem
239  * @version Introduced in firmware 4.0.10.27
240  * @param system GoSystem object.
241  * @param capacity Data queue capacity, in bytes.
242  * @return Operation status.
243  * @see GoSystem_DataCapacity
244  */
245 GoFx(kStatus) GoSystem_SetDataCapacity(GoSystem system, kSize capacity);
246 
247 /**
248  * Reports that maximum amount of memory that can be used to buffer received data messages.
249  *
250  * @public @memberof GoSystem
251  * @version Introduced in firmware 4.0.10.27
252  * @param system GoSystem object.
253  * @return Data queue capacity, in bytes.
254  * @see GoSystem_SetDataCapacity
255  */
256 GoFx(kSize) GoSystem_DataCapacity(GoSystem system);
257 
258 /**
259  * Establishes data connections to all connected sensors currently in the <em>ready</em> or <em>running</em> states.
260  *
261  * Data connections are not automatically established when sensor control connection are established.
262  * Use this function (or GoSensor_EnableData) to enable/disable data connections.
263  *
264  * @public @memberof GoSystem
265  * @version Introduced in firmware 4.0.10.27
266  * @param system GoSystem object.
267  * @param enable kTRUE to enable data connections; kFALSE to disable.
268  * @return Operation status.
269  * @see GoSystem_ReceiveData, GoSensor_EnableData
270  */
271 GoFx(kStatus) GoSystem_EnableData(GoSystem system, kBool enable);
272 
273 /**
274  * Clears any buffered data messages.
275  *
276  * When stopping and then restarting a system, it may be desirable to ensure that no messages from
277  * the previous session remain in any buffers. The GoSystem_ClearData function closes any open data
278  * channels, destroys any received messages, and then reopens data channels.
279  *
280  * @public @memberof GoSystem
281  * @version Introduced in firmware 4.0.10.27
282  * @param system GoSystem object.
283  * @return Operation status.
284  */
285 GoFx(kStatus) GoSystem_ClearData(GoSystem system);
286 
287 /**
288  * Receives a set of sensor data messages.
289  *
290  * Sensor data messages can be received synchronously using this function or asynchronously by
291  * registering a callback with the GoSystem_SetDataHandler function.
292  *
293  * NOTE: Data received with this function must be destroyed after use,
294  * otherwise a memory leak will result.
295  *
296  * @public @memberof GoSystem
297  * @version Introduced in firmware 4.0.10.27
298  * @param system GoSystem object.
299  * @param data Set of sensor data messages.
300  * @param timeout Duration to wait for messages, in microseconds.
301  * @return Operation status.
302  * @see GoDestroy, GoSystem_SetDataHandler, GoSystem_SetDataCapacity, GoSystem_EnableData
303  */
304 GoFx(kStatus) GoSystem_ReceiveData(GoSystem system, GoDataSet* data, k64u timeout);
305 
306 /**
307  * Sets a callback function that can be used to receive sensor health messages asynchronously.
308  *
309  * Sensor health messages can be received synchronously using the GoSystem_ReceiveHealth function
310  * or asynchronously by registering a callback function. If a callback function is registered,
311  * a background thread will be created to perform notifications.
312  *
313  * To unregister a previously-registered health handler, call this function using kNULL in place
314  * of the callback function argument.
315  *
316  * @public @memberof GoSystem
317  * @version Introduced in firmware 4.0.10.27
318  * @param system GoSystem object.
319  * @param function Health callback function (or kNULL to unregister).
320  * @param receiver Receiver argument, passed to callback.
321  * @return Operation status.
322  * @see GoDataFx, GoSystem_ReceiveHealth, GoSystem_SetDataCapacity, GoSystem_EnableData
323  */
324 GoFx(kStatus) GoSystem_SetHealthHandler(GoSystem system, GoDataFx function, kPointer receiver);
325 
326 /**
327  * Receives a set of sensor health messages.
328  *
329  * Sensor health messages can be received synchronously using this function or asynchronously by
330  * registering a callback with the GoSystem_SetHealthHandler function.
331  *
332  * @public @memberof GoSystem
333  * @version Introduced in firmware 4.0.10.27
334  * @param system GoSystem object.
335  * @param data Set of sensor health messages.
336  * @param timeout Duration to wait for messages, in microseconds.
337  * @return Operation status.
338  * @see GoSystem_SetHealthHandler
339  */
340 GoFx(kStatus) GoSystem_ReceiveHealth(GoSystem system, GoDataSet* data, k64u timeout);
341 
342 /**
343  * Clears any buffered health messages.
344  *
345  * @public @memberof GoSystem
346  * @version Introduced in firmware 4.0.10.27
347  * @param system GoSystem object.
348  * @return Operation status.
349  */
350 GoFx(kStatus) GoSystem_ClearHealth(GoSystem system);
351 
352 /**
353  * Starts all sensors that are currently in the <em>ready</em> state.
354  *
355  * @public @memberof GoSystem
356  * @version Introduced in firmware 4.0.10.27
357  * @param system GoSystem object.
358  * @return Operation status.
359  * @see GoSystem_Stop, GoSensor_Start, GoSensor_Stop
360  */
361 GoFx(kStatus) GoSystem_Start(GoSystem system);
362 
363 /**
364  * Starts all sensors that are currently in the <em>ready</em> state at a scheduled value.
365  *
366  * NOTE: The value specified is the target value to start at, not a relative
367  * offset from the current value. The typical usage is to obtain the current
368  * value first, add an offset to it, and start at that value.
369  *
370  * @public @memberof GoSystem
371  * @version Introduced in firmware 4.1.3.106
372  * @param system GoSystem object.
373  * @param value The value at which to start the sensor. It is in uS when time triggered and ticks when encoder triggered.
374  * @return Operation status.
375  * @see GoSystem_Stop, GoSensor_ScheduledStart, GoSensor_Stop, GoSetup_SetTriggerSource, GoSetup_TriggerSource
376  */
377 GoFx(kStatus) GoSystem_ScheduledStart(GoSystem system, k64s value);
378 
379 /**
380  * Performs alignment for sensors in the <em>ready</em> state.
381  *
382  * NOTE: This operation will result in sensor starts for the duration of the
383  * alignment. It can be canceled via GoSystem_Stop. This function's operation
384  * status does not correspond to the actual alignment result. In order to
385  * retrieve the alignment result, you must enable the data channel before calling
386  * this function, receive an alignment data message and then check its status.
387  *
388  * @public @memberof GoSystem
389  * @version Introduced in firmware 4.0.10.27
390  * @param system GoSystem object.
391  * @return Operation status.
392  * @see GoSystem_EnableData, GoSystem_ReceiveData, GoSystem_Stop
393  * @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.
394  */
395 GoFx(kStatus) GoSystem_StartAlignment(GoSystem system);
396 
397 /**
398  * Performs exposure auto set for sensors in the <em>ready</em> state.
399  *
400  * NOTE: This operation will result in sensor starts for the duration of the
401  * exposure AutoSet. A successful operation status does NOT modify the configuration.
402  * You must retrieve the resulting exposure values and set it for the appropriate
403  * exposure setting. This involves enabling the data connection prior to running
404  * exposure auto set and then receiving an exposure auto set message, which
405  * you can then use to query the status and access the resulting value.
406  *
407  * @public @memberof GoSystem
408  * @version Introduced in firmware 4.0.10.27
409  * @param system GoSystem object.
410  * @return Operation status.
411  * @see GoSystem_EnableData, GoSystem_ReceiveData
412  */
413 GoFx(kStatus) GoSystem_StartExposureAutoSet(GoSystem system);
414 
415 /**
416  * Stops all connected sensors.
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_Start, GoSensor_Start, GoSensor_Stop
423  */
424 GoFx(kStatus) GoSystem_Stop(GoSystem system);
425 
426 
427 /**
428  * Reboots all connected sensors.
429  *
430  * @public @memberof GoSystem
431  * @version Introduced in firmware 4.0.10.27
432  * @param system GoSystem object.
433  * @param wait kTRUE to wait for reboot complete; kFALSE to return immediately.
434  * @return Operation status.
435  */
436 GoFx(kStatus) GoSystem_Reset(GoSystem system, kBool wait);
437 
438 /**
439  * Aborts ongoing sensor communication.
440  *
441  * This method asynchronously aborts ongoing communication; the next time that any
442  * I/O operation blocks for an extended period of time, it will be terminated. This method
443  * is thread-safe.
444  *
445  * In order to resume communication, call GoSystem_Refresh or GoSystem_Connect.
446  *
447  * @public @memberof GoSystem
448  * @version Introduced in firmware 4.0.10.27
449  * @param system GoSystem object.
450  * @return Operation status.
451  */
452 GoFx(kStatus) GoSystem_Cancel(GoSystem system);
453 
454 /**
455  * Gets the Discovery channel information for the given device ID (if the device is present and the command is supported)
456  *
457  * @public @memberof GoSensor
458  * @version Introduced in firmware 4.3.3.124
459  * @param system GoSystem object.
460  * @param deviceId The ID of the device with which to retrieve Discovery channel information.
461  * @param info A handled to the sensor's constructed discovery information.
462  * @param allocator Memory allocator (or kNULL for the default).
463  * @see GoDestroy
464  */
465 GoFx(kStatus) GoSystem_GetExtendedDiscoveryInfo(GoSystem system, k32u deviceId, GoDiscoveryExtInfo* info, kAlloc allocator);
466 
467 /**
468  * Gets the number of sensors in the system.
469  *
470  * @public @memberof GoSystem
471  * @version Introduced in firmware 4.0.10.27
472  * @param system GoSystem object.
473  * @return Count of sensors in the system.
474  * @see GoSystem_SensorAt
475  */
476 GoFx(kSize) GoSystem_SensorCount(GoSystem system);
477 
478 /**
479  * Gets the sensor object at the specified index.
480  *
481  * @public @memberof GoSystem
482  * @version Introduced in firmware 4.0.10.27
483  * @param system GoSystem object.
484  * @param index Sensor index.
485  * @return Sensor object.
486  * @see GoSystem_SensorCount
487  */
488 GoFx(GoSensor) GoSystem_SensorAt(GoSystem system, kSize index);
489 
490 /**
491  * Gets the sensor object with the specified device id (serial number).
492  *
493  * @public @memberof GoSystem
494  * @version Introduced in firmware 4.0.10.27
495  * @param system GoSystem object.
496  * @param id Device identifier.
497  * @param sensor Receives sensor object.
498  * @return Operation status (kERROR_NOT_FOUND if sensor not found).
499  * @see GoSystem_SensorCount, GoSystem_SensorAt
500  */
501 GoFx(kStatus) GoSystem_FindSensorById(GoSystem system, k32u id, GoSensor* sensor);
502 
503 /**
504  * Gets the sensor object with the specified IP address.
505  *
506  * @public @memberof GoSystem
507  * @version Introduced in firmware 4.0.10.27
508  * @param system GoSystem object.
509  * @param address Pointer to sensor IP address.
510  * @param sensor Receives sensor object.
511  * @return Operation status (kERROR_NOT_FOUND if sensor not found).
512  * @see GoSystem_SensorCount, GoSystem_SensorAt
513  */
514 GoFx(kStatus) GoSystem_FindSensorByIpAddress(GoSystem system, const kIpAddress* address, GoSensor* sensor);
515 
516 /**
517  * Gets the current time stamp from the sensor network.
518  *
519  * @public @memberof GoSystem
520  * @version Introduced in firmware 4.0.10.27
521  * @param system GoSystem object.
522  * @param time Receives current time stamp(microseconds).
523  * @return Operation status (kERROR_NOT_FOUND if no sensors available).
524  * @see GoSystem_GetEncoder
525  */
526 GoFx(kStatus) GoSystem_Timestamp(GoSystem system, k64u* time);
527 
528 /**
529  * Gets the current encoder value from the sensor network.
530  *
531  * @public @memberof GoSystem
532  * @version Introduced in firmware 4.0.10.27
533  * @param system GoSystem object.
534  * @param encoder Receives current encoder value (ticks).
535  * @return Operation status (kERROR_NOT_FOUND if no sensors available).
536  * @see GoSystem_GetTime
537  */
538 GoFx(kStatus) GoSystem_Encoder(GoSystem system, k64s* encoder);
539 
540 
541 /// @cond (Gocator_1x00 || Gocator_2x00)
542 
543 /**
544  * Gets the current multiplex bank count.
545  *
546  * @public @memberof GoSystem
547  * @version Introduced in firmware 4.0.10.27
548  * @param system GoSystem object.
549  * @return The current number of defined multiplex banks.
550  */
551 GoFx(kSize) GoSystem_MultiplexBankCount(GoSystem system);
552 
553 /**
554  * Gets a multiplex bank corresponding to the given index.
555  *
556  * @public @memberof GoSystem
557  * @version Introduced in firmware 4.0.10.27
558  * @param system GoSystem object.
559  * @param index The index of the multiplex bank to retrieve.
560  * @return The multiplex bank at the given index or kNULL if an invalid index is given.
561  */
562 GoFx(GoMultiplexBank) GoSystem_MultiplexBankAt(GoSystem system, kSize index);
563 
564 /**
565  * Adds a multiplex bank with a unique ID to the system.
566  *
567  * @public @memberof GoSystem
568  * @version Introduced in firmware 4.0.10.27
569  * @param system GoSystem object.
570  * @param bank A pointer to the newly created GoMultiplexBank object.
571  * @return Operation status.
572  */
573 GoFx(kStatus) GoSystem_AddMultiplexBank(GoSystem system, GoMultiplexBank* bank);
574 
575 /**
576  * Removes a multiplex bank at the given index.
577  *
578  * @public @memberof GoSystem
579  * @version Introduced in firmware 4.0.10.27
580  * @param system GoSystem object.
581  * @param index The index of the multiplex bank to remove.
582  * @return Operation status.
583  */
584 GoFx(kStatus) GoSystem_RemoveMultiplexBank(GoSystem system, kSize index);
585 
586 /**
587  * Removes all multiplex banks.
588  *
589  * @public @memberof GoSystem
590  * @version Introduced in firmware 4.0.10.27
591  * @param system GoSystem object.
592  * @return Operation status.
593  */
594 GoFx(kStatus) GoSystem_ClearMultiplexBanks(GoSystem system);
595 
596 /**
597  * Gets the maximum sensor exposure duration in the given multiplex bank.
598  *
599  * @public @memberof GoSystem
600  * @version Introduced in firmware 4.0.10.27
601  * @param system GoSystem object.
602  * @param bank The multiplex bank to check.
603  * @return The maximum sensor exposure duration contained in the multiplexing bank.
604  */
605 GoFx(k64f) GoSystem_MaxBankExposureDuration(GoSystem system, GoMultiplexBank bank);
606 
607 /**
608  * Automatically update the single multiplexing delay and period configuration for all sensors contained in all defined multiplex banks.
609  *
610  * @public @memberof GoSystem
611  * @version Introduced in firmware 4.0.10.27
612  * @param system GoSystem object.
613  * @param period The exposure period to set among all multiplexed sensors. A value of 0.0 will result in automatic period determination.
614  * @return Operation status.
615  */
616 GoFx(kStatus) GoSystem_UpdateAllMultiplexParameters(GoSystem system, k64f period);
617 
618 /**
619  * Automatically update the multiplexing single delay configuration for all sensors contained in all defined multiplex banks.
620  *
621  * @public @memberof GoSystem
622  * @version Introduced in firmware 4.0.10.27
623  * @param system GoSystem object.
624  * @return Operation status.
625  */
626 GoFx(kStatus) GoSystem_UpdateMultiplexDelay(GoSystem system);
627 
628 /**
629  * Returns the maximum value of all multiplexed sensor's minimum multiplexing periods.
630  *
631  * @public @memberof GoSystem
632  * @version Introduced in firmware 4.0.10.27
633  * @param system GoSystem object.
634  * @return Operation status.
635  */
636 GoFx(k64f) GoSystem_MaxMinimumMultiplexPeriod(GoSystem system);
637 
638 /**
639  * Automatically update the multiplexing single period configuration for all sensors contained in all defined multiplex banks.
640  *
641  * @public @memberof GoSystem
642  * @version Introduced in firmware 4.0.10.27
643  * @param system GoSystem object.
644  * @param period The exposure period to set among all multiplexed sensors. A value of 0.0 will result in automatic period determination.
645  * @return Operation status.
646  */
647 GoFx(kStatus) GoSystem_UpdateMultiplexPeriod(GoSystem system, k64f period);
648 
649 /**
650 * Enable or disable running the Gocator Discovery Protocol over the specified
651 * host interface which the given address.
652 *
653 * @public @memberof GoSystem
654 * @version Introduced in firmware 4.6.7.157
655 * @param system GoSystem object.
656 * @param address IP address of interface over which the discovery protocol is or is not allowed to run.
657 * @param enable Select whether to enable or disable the interface.
658 * @return Operation status.
659 */
660 GoFx(kStatus) GoSystem_SetOneDiscoveryInterface(GoSystem system, kIpAddress* address, kBool enable);
661 
662 /**
663 * Enable or disable running the Gocator Discovery Protocol over all the host interfaces.
664 *
665 * @public @memberof GoSystem
666 * @version Introduced in firmware 4.6.7.157
667 * @param system GoSystem object.
668 * @param enable Select whether to enable or disable the interface(s).
669 * @return Operation status.
670 */
671 GoFx(kStatus) GoSystem_SetAllDiscoveryInterface(GoSystem system, kBool enable);
672 
673 /**
674 * Start running the Gocator Discovery Protocol to discover sensors. The protocol
675 * will run over the interfaces which have enabled to run the protocol.
676 *
677 * @public @memberof GoSystem
678 * @version Introduced in firmware 4.6.7.157
679 * @param system GoSystem object.
680 * @return Operation status.
681 */
682 GoFx(kStatus) GoSystem_StartDiscovery(GoSystem system);
683 
684 /// @endcond
685 
686 kEndHeader()
687 #include <GoSdk/GoSystem.x.h>
688 
689 #endif
Ports used from a source device.
Definition: GoSdkDef.h:718
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_ClearHealth(GoSystem system)
Clears any buffered health messages.
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:704
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...