Gocator API
GoControl.h
Go to the documentation of this file.
1 /**
2  * @file GoControl.h
3  * @brief Declares the GoControl class.
4  *
5  * @internal
6  * Copyright (C) 2016-2025 by LMI Technologies Inc.
7  * Licensed under the MIT License.
8  * Redistributed files must retain the above copyright notice.
9  */
10 #ifndef GO_SDK_CONTROL_H
11 #define GO_SDK_CONTROL_H
12 
13 #include <GoSdk/GoSdkDef.h>
14 #include <GoSdk/GoSensorInfo.h>
15 #include <kApi/Io/kSerializer.h>
16 #include <kApi/Io/kFile.h>
17 #include <kApi/Data/kString.h>
18 
19 /**
20  * @class GoControl
21  * @extends kObject
22  * @ingroup GoSdk-Internal
23  * @brief Represents a set of sensor command connections (control, upgrade).
24  */
25 typedef kObject GoControl;
26 
27 /**
28  * Constructs a GoControl object.
29  *
30  * @public @memberof GoControl
31  * @version Introduced in firmware 4.0.10.27
32  * @param control Receives constructed control object.
33  * @param allocator Memory allocator (or kNULL for default).
34  * @return Operation status.
35  */
36 GoFx(kStatus) GoControl_Construct(GoControl* control, kAlloc allocator);
37 
38 
39 /**
40  * Sets an I/O cancellation query handler for this control object.
41  *
42  * The I/O cancellation query handler will be polled periodically when I/O is blocked
43  * for a non-negligible amount of time. If the cancellation handler returns kERROR_ABORT,
44  * ongoing communication will be terminated.
45  *
46  * @public @memberof GoControl
47  * @version Introduced in firmware 4.0.10.27
48  * @param control Control object.
49  * @param function I/O cancellation callback function (or kNULL to unregister).
50  * @param receiver Receiver argument for callback.
51  * @return Operation status.
52  */
53 GoFx(kStatus) GoControl_SetCancelHandler(GoControl control, kCallbackFx function, kPointer receiver);
54 
55 /**
56  * Opens connections to the specified sensor IP address.
57  *
58  * The Open function immediately opens a control connection. Later, while in the
59  * open state, if an upgrade command is given, an upgrade connection will be established
60  * automatically at that time.
61  *
62  * @public @memberof GoControl
63  * @version Introduced in firmware 4.8.2.76
64  * @param control GoControl object.
65  * @param address Sensor IP address.
66  * @param controlPort Control Port
67  * @param upgradePort Upgrade Port
68  * @return Operation status.
69  */
70 GoFx(kStatus) GoControl_Open(GoControl control, kIpAddress address, k32u controlPort, k32u upgradePort);
71 
72 /**
73  * Closes all open command connections.
74  *
75  * @public @memberof GoControl
76  * @version Introduced in firmware 4.0.10.27
77  * @param control GoControl object.
78  * @return Operation status.
79  */
80 GoFx(kStatus) GoControl_Close(GoControl control);
81 
82 /**
83  * Reports whether the control object has been opened.
84  *
85  * @public @memberof GoControl
86  * @version Introduced in firmware 4.0.10.27
87  * @param control GoControl object.
88  * @return kTRUE if connected; kFALSE otherwise.
89  */
91 
92 /**
93  * Gets the connected sensor's protocol version.
94  *
95  * @public @memberof GoControl
96  * @version Introduced in firmware 4.0.10.27
97  * @param control GoControl object.
98  * @return Protocol version.
99  */
101 
102 /**
103  * Reports whether the GoControl object is compatible with the sensor firmware.
104  *
105  * Compatibility is determined by comparing the major protocol version reported
106  * by the sensor with the major protocol version supported by this library. If
107  * the major versions match, then compatibility is established.
108  *
109  * @public @memberof GoControl
110  * @version Introduced in firmware 4.0.10.27
111  * @param control GoControl object.
112  * @return kTRUE if compatible; kFALSE otherwise.
113  */
114 GoFx(kBool) GoControl_IsCompatible(GoControl control);
115 
116 /**
117  * Logs into the sensor using the specified user name and password.
118  *
119  * @public @memberof GoControl
120  * @version Introduced in firmware 4.0.10.27
121  * @param control GoControl object.
122  * @param user User account.
123  * @param password User password.
124  * @return Operation status.
125  */
126 GoFx(kStatus) GoControl_Login(GoControl control, GoUser user, const kChar* password);
127 
128 /**
129  * Changes the password associated with the specified user account.
130  *
131  * @public @memberof GoControl
132  * @version Introduced in firmware 4.0.10.27
133  * @param control GoControl object.
134  * @param user User account.
135  * @param password New password.
136  * @return Operation status.
137  */
138 GoFx(kStatus) GoControl_ChangePassword(GoControl control, GoUser user, const kChar* password);
139 
140 /**
141  * Gets current sensor state information.
142  *
143  * @public @memberof GoControl
144  * @version Introduced in firmware 4.0.10.27
145  * @param control GoControl object.
146  * @param localInfo Receives local sensor information.
147  * @param remoteInfoList Updates a list of remote sensor information.
148  * @return Operation status.
149  */
150 GoFx(kStatus) GoControl_GetSensorInfo(GoControl control, GoSensorInfo localInfo, kArrayList remoteInfoList);
151 
152 /**
153 * Gets current sensor state information.
154 *
155 * @public @memberof GoControl
156 * @version Introduced in firmware 4.6.4.70
157 * @param control GoControl object.
158 * @param localInfo Receives local sensor information.
159 * @param remoteInfoList Updates a list of remote sensor information.
160 * @param buddyInfoList Updates a list of buddy sensor information.
161 * @return Operation status.
162 */
163 GoFx(kStatus) GoControl_GetSensorInfoV2(GoControl control, GoSensorInfo localInfo, kArrayList remoteInfoList, kArrayList buddyInfoList);
164 
165 /**
166  * Gets the sensor's scan mode.
167  *
168  * @public @memberof GoControl
169  * @version Introduced in firmware 4.0.10.27
170  * @param control GoControl object.
171  * @param mode Receives the scan mode.
172  * @return Operation status.
173  */
174 GoFx(kStatus) GoControl_GetScanMode(GoControl control, GoMode* mode);
175 
176 /**
177  * Assigns or removes a buddy sensor.
178  *
179  * @public @memberof GoControl
180  * @version Introduced in firmware 4.0.10.27
181  * @param control GoControl object.
182  * @param add kTRUE to add; kFALSE to remove.
183  * @param buddyId Buddy device id.
184  * @return Operation status.
185  */
186 GoFx(kStatus) GoControl_ChangeBuddy(GoControl control, kBool add, k32u buddyId);
187 
188 /**
189 * Start assigning multiple buddy sensors. A zero count unassigns all buddies.
190 *
191 * @public @memberof GoControl
192 * @version Introduced in firmware 4.6.2.95
193 * @param control GoControl object.
194 * @param buddyIds Buddy device id array.
195 * @param count 0 to Unassign all buddies; ELSE Number of buddies to assign.
196 * @return Operation status.
197 */
198 GoFx(kStatus) GoControl_AssignBuddies(GoControl control, const k32u* buddyIds, kSize count);
199 
200 /**
201  * Remove multiple buddy sensors.
202  *
203  * @public @memberof GoControl
204  * @version Introduced in firmware 4.6.4.66
205  * @param control GoControl object.
206  * @param buddyIds List of buddy device id (serial number).
207  * @param count Number of buddies in the list to remove. Must have at least one buddy in the list.
208  * @return Operation status.
209  */
210 
211 GoFx(kStatus) GoControl_RemoveBuddiesById(GoControl control, const k32u* buddyIds, kSize count);
212 
213 /**
214  * Remove multiple buddy sensors.
215  *
216  * @public @memberof GoControl
217  * @version Introduced in firmware 4.6.2.95
218  * @param control GoControl object.
219  * @param buddyIndices List of indices into the buddy device list of buddy sensors to remove.
220  * @param count Number of buddies in the list to remove. Must have at least one buddy in the list.
221  * @return Operation status.
222  */
223 GoFx(kStatus) GoControl_RemoveBuddies(GoControl control, const k32u* buddyIndices, kSize count);
224 
225 /**
226  * Sends a start command to a sensor with the currently selected input source, but doesn't wait for the response.
227  *
228  * Use the GoControl_EndStart function to wait for the sensor's reply.
229  *
230  * @public @memberof GoControl
231  * @version Introduced in firmware 4.0.10.27
232  * @param control GoControl object.
233  * @return Operation status.
234  * @see GoControl_EndStart, GoControl_SetInputSource, GoControl_GetInputSource
235  */
236 GoFx(kStatus) GoControl_BeginStart(GoControl control);
237 
238 /**
239  * Waits for a start response from a sensor.
240  *
241  * Call this function sometime after calling BeginStart.
242  *
243  * @public @memberof GoControl
244  * @version Introduced in firmware 4.0.10.27
245  * @param control GoControl object.
246  * @return Operation status.
247  */
248 GoFx(kStatus) GoControl_EndStart(GoControl control);
249 
250 /**
251  * Sends a scheduled start command to a sensor with the currently selected input source, but doesn't wait for the response.
252  *
253  * Use the GoControl_EndScheduledStart function to wait for the sensor's reply.
254  *
255  * @public @memberof GoControl
256  * @version Introduced in firmware 4.1.3.106
257  * @param control GoControl object.
258  * @param value Scheduled start value (in uS for time trigger and ticks for encoder trigger)
259  * @return Operation status.
260  * @see GoControl_EndScheduledStart, GoControl_SetInputSource, GoControl_GetInputSource
261  */
263 
264 /**
265  * Waits for a scheduled start response from a sensor.
266  *
267  * Call this function sometime after calling BeginScheduledStart.
268  *
269  * @public @memberof GoControl
270  * @version Introduced in firmware 4.1.3.106
271  * @param control GoControl object.
272  * @return Operation status.
273  */
275 
276 /**
277  * Sends a stop command to a sensor, but doesn't wait for the response.
278  *
279  * Use the GoControl_EndStop function to wait for the sensor's reply.
280  *
281  * @public @memberof GoControl
282  * @version Introduced in firmware 4.0.10.27
283  * @param control GoControl object.
284  * @return Operation status.
285  * @see GoControl_EndStop
286  */
287 GoFx(kStatus) GoControl_BeginStop(GoControl control);
288 
289 /**
290  * Waits for a stop response from a sensor.
291  *
292  * Call this function sometime after calling BeginStop.
293  *
294  * @public @memberof GoControl
295  * @version Introduced in firmware 4.0.10.27
296  * @param control GoControl object.
297  * @return Operation status.
298  */
299 GoFx(kStatus) GoControl_EndStop(GoControl control);
300 
301 /**
302  * Sends a snapshot command to a sensor with the currently selected input source, but doesn't wait for the response.
303  *
304  * Use the GoControl_EndSnapshot function to wait for the sensor's reply.
305  *
306  * @public @memberof GoControl
307  * @version Introduced in firmware 5.2.1.x
308  * @param control GoControl object.
309  * @return Operation status.
310  * @see GoControl_EndSnapshot, GoControl_SetInputSource, GoControl_GetInputSource
311  */
313 
314 /**
315  * Waits for a snapshot response from a sensor.
316  *
317  * Call this function sometime after calling BeginSnapshot.
318  *
319  * @public @memberof GoControl
320  * @version Introduced in firmware 5.2.1.x
321  * @param control GoControl object.
322  * @return Operation status.
323  */
325 
326 /**
327  * Sends a alignment command to a sensor, but doesn't wait for the response.
328  *
329  * Use the GoControl_EndAlignment function to wait for the sensor's reply.
330  *
331  * @public @memberof GoControl
332  * @version Introduced in firmware 4.0.10.27
333  * @param control GoControl object.
334  * @return Operation status.
335  * @see GoControl_EndAlignment
336  */
338 
339 /**
340  * Waits for a alignment response from a sensor.
341  *
342  * Call this function sometime after calling BeginAlignment.
343  *
344  * @public @memberof GoControl
345  * @version Introduced in firmware 4.0.10.27
346  * @param control GoControl object.
347  * @return Operation status.
348  */
350 
351 /**
352  * Clears the sensor alignment.
353  *
354  * @public @memberof GoControl
355  * @version Introduced in firmware 4.1.3.106
356  * @param control GoControl object.
357  * @return Operation status.
358  */
360 
361 /**
362  * Sets the alignment reference for a sensor.
363  *
364  * @public @memberof GoControl
365  * @version Introduced in firmware 4.0.10.27
366  * @param control GoControl object.
367  * @param reference Alignment reference.
368  * @return Operation status.
369  */
371 
372 /**
373  * Gets the alignment reference for a sensor.
374  *
375  * @public @memberof GoControl
376  * @version Introduced in firmware 4.0.10.27
377  * @param control GoControl object.
378  * @param reference Alignment reference.
379  * @return Operation status.
380  */
382 
383 /**
384  * Sends an exposure auto set command to a sensor, but doesn't wait for the response.
385  *
386  * Use the GoControl_EndExposureAutoSet function to wait for the sensor's reply.
387  *
388  * @public @memberof GoControl
389  * @version Introduced in firmware 4.0.10.27
390  * @param control GoControl object.
391  * @param role Determines which device to apply changes to. Use GO_ROLE_MAIN or GOROLE_BUDDYIDX(buddyidx). See GoRole for more details.
392  * @return Operation status.
393  * @see GoControl_EndExposureAutoSet
394  */
396 
397 /**
398  * Waits for a exposure auto set response from a sensor.
399  *
400  * Call this function sometime after calling BeginExposureAutoSet.
401  *
402  * @public @memberof GoControl
403  * @version Introduced in firmware 4.0.10.27
404  * @param control GoControl object.
405  * @return Operation status.
406  */
408 
409 /**
410  * Reads the list of available sensor files.
411  *
412  * @public @memberof GoControl
413  * @version Introduced in firmware 4.0.10.27
414  * @param control GoControl object.
415  * @param files List to be populated with file names (kArrayList<kText64>).
416  * @param extensionFilter Can be used to filter the file list: "job", "rec" or null for all.
417  * @return Operation status.
418  */
419 GoFx(kStatus) GoControl_ReadFileList(GoControl control, kArrayList files, const kChar* extensionFilter);
420 
421 /**
422  * Reads a file from the connected sensor.
423  *
424  * @public @memberof GoControl
425  * @version Introduced in firmware 4.0.10.27
426  * @param control GoControl object.
427  * @param fileName Name of remote file to be read.
428  * @param data Receives a pointer to a buffer containing the file data.
429  * @param size Receives the size of the allocated buffer.
430  * @param allocator Memory allocator, used to allocate the file buffer (or kNULL for default).
431  * @return Operation status.
432  */
433 GoFx(kStatus) GoControl_ReadFile(GoControl control, const kChar* fileName, kByte** data, kSize* size, kAlloc allocator);
434 
435 /**
436  * Clears the sensor log file.
437  *
438  * @public @memberof GoControl
439  * @version Introduced in firmware 4.0.10.27
440  * @param control GoControl object.
441  * @return Operation status.
442  */
443 GoFx(kStatus) GoControl_ClearLog(GoControl control);
444 
445 /**
446  * Writes a file to the connected sensor.
447  *
448  * @public @memberof GoControl
449  * @version Introduced in firmware 4.0.10.27
450  * @param control GoControl object.
451  * @param fileName Name of remote file to be written.
452  * @param data Pointer to buffer containing the file data.
453  * @param size Size of the file.
454  * @return Operation status.
455  */
456 GoFx(kStatus) GoControl_WriteFile(GoControl control, const kChar* fileName, const kByte* data, kSize size);
457 
458 /**
459  * Copies a file within the connected sensor.
460  *
461  * @public @memberof GoControl
462  * @version Introduced in firmware 4.0.10.27
463  * @param control GoControl object.
464  * @param source Source name for the file to be copied.
465  * @param destination Destination name for the file (maximum 63 characters).
466  * @return Operation status.
467  */
468 GoFx(kStatus) GoControl_CopyFile(GoControl control, const kChar* source, const kChar* destination);
469 
470 /**
471  * Deletes a file within the connected sensor.
472  *
473  * @public @memberof GoControl
474  * @version Introduced in firmware 4.0.10.27
475  * @param control GoControl object.
476  * @param fileName Name of the file to be deleted.
477  * @return Operation status.
478  */
479 GoFx(kStatus) GoControl_DeleteFile(GoControl control, const kChar* fileName);
480 
481 /**
482  * Gets the available storage space remaining for user files.
483  *
484  * @public @memberof GoControl
485  * @version
486  * @param control GoControl object.
487  * @param spaceAvailable Storage space available.
488  * @return Operation status.
489  */
490 GoFx(kStatus) GoControl_GetUserStorageFree(GoControl control, k64u* spaceAvailable);
491 
492 /**
493  * Gets the storage space used for user files.
494  *
495  * @public @memberof GoControl
496  * @version
497  * @param control GoControl object.
498  * @param spaceUsed Storage space used.
499  * @return Operation status.
500  */
501 GoFx(kStatus) GoControl_GetUserStorageUsed(GoControl control, k64u* spaceUsed);
502 
503 /**
504  * Gets the name of the default job file to be loaded on boot.
505  *
506  * @public @memberof GoControl
507  * @version Introduced in firmware 4.0.10.27
508  * @param control GoControl object.
509  * @param fileName Receives name of the default job.
510  * @param capacity Name buffer capacity.
511  * @return Operation status.
512  */
513 GoFx(kStatus) GoControl_GetDefaultJob(GoControl control, kChar* fileName, kSize capacity);
514 
515 /**
516  * Sets a default job file to be loaded on boot.
517  *
518  * @public @memberof GoControl
519  * @version Introduced in firmware 4.0.10.27
520  * @param control GoControl object.
521  * @param fileName Name of the default file.
522  * @return Operation status.
523  */
524 GoFx(kStatus) GoControl_SetDefaultJob(GoControl control, const kChar* fileName);
525 
526 /**
527  * Gets the name of the loaded job file and whether it has been modified since loading.
528  *
529  * @public @memberof GoControl
530  * @version Introduced in firmware 4.0.10.27
531  * @param control GoControl object.
532  * @param fileName Receives name of the loaded file.
533  * @param capacity Name buffer capacity.
534  * @param isModified Receives the status of whether the loaded job has been modified.
535  * @return Operation status.
536  */
537 GoFx(kStatus) GoControl_GetLoadedJob(GoControl control, kChar* fileName, kSize capacity, kBool* isModified);
538 
539 /**
540  * Restores factory default settings.
541  *
542  * @public @memberof GoControl
543  * @version Introduced in firmware 4.0.10.27
544  * @param control GoControl object.
545  * @param restoreAddress kTRUE to restore the factory default IP address; kFALSE otherwise.
546  * @return Operation status.
547  */
548 GoFx(kStatus) GoControl_RestoreFactory(GoControl control, kBool restoreAddress);
549 
550 /**
551  * Reboots the main sensor and any connected buddy sensors.
552  *
553  * @public @memberof GoControl
554  * @version Introduced in firmware 4.0.10.27
555  * @param control GoControl object.
556  * @return Operation status.
557  */
558 GoFx(kStatus) GoControl_Reset(GoControl control);
559 
560 /**
561  * Resets the encoder value. NOTE: This is only possible with a direct encoder
562  * connection to a sensor. Resetting the encoder value when connected to a master
563  * will not work.
564  *
565  * @public @memberof GoControl
566  * @version Introduced in firmware 4.5.3.57
567  * @param control GoControl object.
568  * @return Operation status.
569  */
571 
572 /**
573  * Begins a sensor firmware upgrade.
574  *
575  * Use the GoControl_GetUpgradeStatus function to poll for upgrade completion.
576  *
577  * @public @memberof GoControl
578  * @version Introduced in firmware 4.0.10.27
579  * @param control GoControl object.
580  * @param data Pointer to buffer containing upgrade file.
581  * @param size Size of upgrade file.
582  * @return Operation status.
583  * @see GoControl_GetUpgradeStatus
584  */
585 GoFx(kStatus) GoControl_BeginUpgrade(GoControl control, void* data, kSize size);
586 
587 /**
588  * Polls for upgrade status.
589  *
590  * @public @memberof GoControl
591  * @version Introduced in firmware 4.0.10.27
592  * @param control GoControl object.
593  * @param complete Receives boolean indicating upgrade completion.
594  * @param succeeded If complete, receives boolean indicating whether upgrade was successful.
595  * @param progress If not complete, receives integer percentage indicating progress.
596  * @return Operation status.
597  */
598 GoFx(kStatus) GoControl_GetUpgradeStatus(GoControl control, kBool* complete, kBool* succeeded, k32s* progress);
599 
600 /**
601  * Gets the current time stamp value(common among all synchronized sensors).
602  *
603  * @public @memberof GoControl
604  * @version Introduced in firmware 4.0.10.27
605  * @param control GoControl object.
606  * @param time Receives the time stamp value.
607  * @return Operation status.
608  */
609 GoFx(kStatus) GoControl_GetTimestamp(GoControl control, k64u* time);
610 
611 /**
612  * Gets the current system encoder value.
613  *
614  * @public @memberof GoControl
615  * @version Introduced in firmware 4.0.10.27
616  * @param control GoControl object.
617  * @param encoder Receives encoder value.
618  * @return Operation status.
619  */
620 GoFx(kStatus) GoControl_GetEncoder(GoControl control, k64s* encoder);
621 
622 /**
623  * Sends a software trigger to the sensor.
624  *
625  * @public @memberof GoControl
626  * @version Introduced in firmware 4.0.10.27
627  * @param control GoControl object.
628  * @return Operation status.
629  */
630 GoFx(kStatus) GoControl_Trigger(GoControl control);
631 
632 /**
633  * Creates and downloads a backup of sensor files.
634  *
635  * @public @memberof GoControl
636  * @version Introduced in firmware 4.0.10.27
637  * @param control GoControl object.
638  * @param fileData Receives a pointer to a buffer containing the backup data.
639  * @param size Receives the size of the allocated buffer.
640  * @param allocator Memory allocator, used to allocate the backup buffer (or kNULL for default).
641  * @return Operation status.
642  */
643 GoFx(kStatus) GoControl_Backup(GoControl control, kByte** fileData, kSize* size, kAlloc allocator);
644 
645 /**
646  * Restores a backup of sensor files.
647  *
648  * @public @memberof GoControl
649  * @version Introduced in firmware 4.0.10.27
650  * @param control GoControl object.
651  * @param fileData Pointer to a buffer containing the backup data to be restored.
652  * @param size Size of the backup buffer.
653  * @return Operation status.
654  */
655 GoFx(kStatus) GoControl_Restore(GoControl control, const kByte* fileData, kSize size);
656 
657 /**
658  * Schedules a digital output.
659  *
660  * @public @memberof GoControl
661  * @version Introduced in firmware 4.0.10.27
662  * @param control GoControl object.
663  * @param index The digital output index.
664  * @param target The time or position target (uS or mm), depending on the configured domain. Ignored if
665  * scheduling disabled or pulsed mode enabled.
666  * @param value The value of scheduled output (0-Low or 1-High). Ignored if pulsed mode enabled.
667  * @return Operation status.
668  */
669 GoFx(kStatus) GoControl_ScheduleDigital(GoControl control, k16u index, k64s target, k8u value);
670 
671 /**
672  * Schedules an analog output.
673  *
674  * @public @memberof GoControl
675  * @version Introduced in firmware 4.0.10.27
676  * @param control GoControl object.
677  * @param index The analog output index.
678  * @param target The time or position target (uS or mm), depending on the configured domain. Ignored if
679  * scheduling disabled.
680  * @param value The value of the scheduled output (mA).
681  * @return Operation status.
682  */
683 GoFx(kStatus) GoControl_ScheduleAnalog(GoControl control, k16u index, k64s target, k32s value);
684 
685 /**
686  * Retrieves a set of various sensor states for the sensor associated with the control connection.
687  * Sends a command to the sensor.
688  * Thread safety is not guaranteed.
689  * Calling this from separate threads can cause concurrency issues.
690  *
691  * @public @memberof GoControl
692  * @version Introduced in firmware 4.0.10.27
693  * @param control GoControl object.
694  * @param states A struct of current sensor states.
695  * @return Operation status.
696  */
697 GoFx(kStatus) GoControl_GetStates(GoControl control, GoStates* states);
698 
699 /**
700  * Enables recording on the sensor.
701  *
702  * @public @memberof GoControl
703  * @version Introduced in firmware 4.0.10.27
704  * @param control GoControl object.
705  * @param enable Enable or disable recording.
706  * @return Operation status.
707  */
709 
710 /**
711  * Gets the sensor's recording state.
712  *
713  * @public @memberof GoControl
714  * @version Introduced in firmware 4.0.10.27
715  * @param control GoControl object.
716  * @param enabled Receives the recording state.
717  * @return Operation status.
718  */
719 GoFx(kStatus) GoControl_GetRecordingEnabled(GoControl control, kBool* enabled);
720 
721 /**
722  * Sets the sensor's data input source.
723  *
724  * @public @memberof GoControl
725  * @version Introduced in firmware 4.0.10.27
726  * @param control GoControl object.
727  * @param source The input source to set.
728  * @return Operation status.
729  */
731 
732 /**
733  * Gets the sensor's data input source.
734  *
735  * @public @memberof GoControl
736  * @version Introduced in firmware 4.0.10.27
737  * @param control GoControl object.
738  * @param source Receives the data source used by the sensor.
739  * @return Operation status.
740  */
742 
743 /**
744  * Clear the sensor's replay data.
745  *
746  * @public @memberof GoControl
747  * @version Introduced in firmware 4.0.10.27
748  * @param control GoControl object.
749  * @return Operation status.
750  */
752 
753 /**
754  * Simulate the current frame stored on the sensor's live replay buffer.
755  *
756  * @public @memberof GoControl
757  * @version Introduced in firmware 4.0.10.27
758  * @param control GoControl object.
759  * @param isBufferValid Represents whether the specified data input source contained valid data to simulate against.
760  * @return Operation status.
761  */
762 GoFx(kStatus) GoControl_Simulate(GoControl control, kBool* isBufferValid);
763 
764 /**
765  * Clear the sensor's measurement statistics.
766  *
767  * @public @memberof GoControl
768  * @version Introduced in firmware 4.0.10.27
769  * @param control GoControl object.
770  * @return Operation status.
771  */
773 
774 /**
775  * Seek to the specified frame position for a replay.
776  *
777  * @public @memberof GoControl
778  * @version Introduced in firmware 4.0.10.27
779  * @param control GoControl object.
780  * @param position Replay frame position.
781  * @return Operation status.
782  */
783 GoFx(kStatus) GoControl_PlaybackSeek(GoControl control, kSize position);
784 
785 /**
786  * Advance one frame in a replay.
787  *
788  * @public @memberof GoControl
789  * @version Introduced in firmware 4.0.10.27
790  * @param control GoControl object.
791  * @param direction The direction to seek.
792  * @return Operation status.
793  */
794 GoFx(kStatus) GoControl_PlaybackStep(GoControl control, GoSeekDirection direction);
795 
796 /**
797  * Get the current frame position in a replay.
798  *
799  * @public @memberof GoControl
800  * @version Introduced in firmware 4.0.10.27
801  * @param control GoControl object.
802  * @param position Replay frame position.
803  * @param count Replay frame count.
804  * @return Operation status.
805  */
806 GoFx(kStatus) GoControl_PlaybackPosition(GoControl control, kSize* position, kSize* count);
807 
808 /**
809  * Export an intensity bitmap file to local storage.
810  *
811  * @public @memberof GoControl
812  * @version Introduced in firmware 4.0.10.27
813  * @param control GoControl object.
814  * @param type The type of data to export.
815  * @param source The data source to obtain data from.
816  * @param dstFileName The destination file name.
817  * @return Operation status.
818  */
821  GoDataSource source,
822  const kChar* dstFileName);
823 
824 /**
825  * Export a CSV file to local storage.
826  *
827  * @public @memberof GoControl
828  * @version Introduced in firmware 4.0.10.27
829  * @param control GoControl object.
830  * @param dstFileName The destination file name.
831  * @return Operation status.
832  */
833 GoFx(kStatus) GoControl_ExportCsv(GoControl control, const kChar* dstFileName);
834 
835 /**
836  * Enable or disable sensor AutoStart.
837  *
838  * @public @memberof GoControl
839  * @version Introduced in firmware 4.0.10.27
840  * @param control GoControl object.
841  * @param enable kTRUE to enable AutoStart, kFALSE to disable it.
842  * @return Operation status.
843  */
845 
846 /**
847  * Returns the state of sensor AutoStart.
848  *
849  * @public @memberof GoControl
850  * @version Introduced in firmware 4.0.10.27
851  * @param control GoControl object.
852  * @param enabled A pointer to store the boolean state of sensor AutoStart. kTRUE if enabled and kFALSE if disabled.
853  * @return Operation status.
854  */
855 GoFx(kStatus) GoControl_GetAutoStartEnabled(GoControl control, kBool* enabled);
856 
857 /**
858 * Set sensor voltage settings (only on G3210)
859 *
860 * @public @memberof GoControl
861 * @version Introduced in firmware 4.7.5.25
862 * @param control GoControl object.
863 * @param voltage Either 48V or 24V operation
864 * @param cableLength When in 24V operation mode the cable length (millimeters) must also be supplied
865 * @return Operation status.
866 */
867 GoFx(kStatus) GoControl_SetVoltage(GoControl control, GoVoltageSetting voltage, k32u cableLength);
868 
869 /**
870 * Get the sensor voltage settings (only on G3210)
871 *
872 * @public @memberof GoControl
873 * @version Introduced in firmware 4.7.5.25
874 * @param control GoControl object.
875 * @param voltage Destination to store voltage (can be kNULL)
876 * @param cableLength Destination to store cable length (millimeters) (can be kNULL)
877 * @return Operation status.
878 */
879 GoFx(kStatus) GoControl_GetVoltage(GoControl control, GoVoltageSetting *voltage, k32u *cableLength);
880 
881 /**
882 * Enable or disable sensor Quick Edit.
883 *
884 * @public @memberof GoControl
885 * @version Introduced in firmware 4.7.11.5
886 * @param control GoControl object.
887 * @param enable kTRUE to enable Quick Edit, kFALSE to disable it.
888 * @return Operation status.
889 */
891 
892 /**
893 * Returns the state of sensor Quick Edit.
894 *
895 * @public @memberof GoControl
896 * @version Introduced in firmware4.7.11.5
897 * @param control GoControl object.
898 * @param enabled A pointer to store the boolean state of sensor Quick Edit. kTRUE if enabled and kFALSE if disabled.
899 * @return Operation status.
900 */
901 GoFx(kStatus) GoControl_GetQuickEditEnabled(GoControl control, kBool* enabled);
902 
903 /**
904 * Sets the control port number
905 *
906 * @public @memberof GoControl
907  * @version Introduced in firmware 4.8.2.76
908 * @param control GoControl object.
909 * @param port Port number for control channel
910 * @return Operation status.
911 */
912 GoFx(kStatus) GoControl_SetControlPort(GoControl control, k32u port);
913 
914 /**
915 * Returns the control port number
916 *
917 * @public @memberof GoControl
918  * @version Introduced in firmware 5.2.18.3
919 * @param control GoControl object.
920 * @return Control port number.
921 */
922 GoFx(k32u) GoControl_ControlPort(GoControl control);
923 
924 /**
925 * Sets the upgrade Port Number
926 *
927 * @public @memberof GoControl
928  * @version Introduced in firmware 4.8.2.76
929 * @param control GoControl object.
930 * @param port Port Number for upgrade channel
931 * @return Operation status.
932 */
933 GoFx(kStatus) GoControl_SetUpgradePort(GoControl control, k32u port);
934 
935 /**
936 * Returns the upgrade Port Number
937 *
938 * @public @memberof GoControl
939  * @version Introduced in firmware 5.2.18.3
940 * @param control GoControl object.
941 * @return Upgrade port number.
942 */
943 GoFx(k32u) GoControl_UpgradePort(GoControl control);
944 
945 /**
946  * Sets one or more runtime variables.
947  *
948  * @public @memberof GoControl
949  * @version Introduced in firmware 5.2.18.3
950  * @param control GoControl object.
951  * @param startIndex Index of the first variable to set.
952  * @param length Number of variables to set.
953  * @param values Array containing the values to set.
954  * @return Operation status.
955  */
956 GoFx(kStatus) GoControl_SetRuntimeVariables(GoControl control, kSize startIndex, kSize length, const k32s* values);
957 
958 /**
959  * Gets the number of available runtime variables.
960  *
961  * @public @memberof GoControl
962  * @version Introduced in firmware 5.2.18.3
963  * @param control GoControl object.
964  * @param count Receives variable count.
965  * @return Operation status.
966  */
968 
969 /**
970  * Gets one or more runtime variables.
971  *
972  * @public @memberof GoControl
973  * @version Introduced in firmware 5.2.18.3
974  * @param control GoControl object.
975  * @param startIndex Index of the first variable to get.
976  * @param length Number of variables to get.
977  * @param values Receives the variable values.
978  * @return Operation status.
979  */
980 GoFx(kStatus) GoControl_GetRuntimeVariables(GoControl control, kSize startIndex, kSize length, k32s* values);
981 
982 /**
983  * Sets a sensor flag value.
984  *
985  * @public @memberof GoControl
986  * @version Introduced in firmware 5.2.18.3
987  * @param control GoControl object.
988  * @param name Name of the flag.
989  * @param value Value of the flag (in text).
990  * @return Operation status.
991  */
992 GoFx(kStatus) GoControl_SetFlag(GoControl control, const kChar* name, const kChar* value);
993 
994 /**
995  * Gets a sensor flag value.
996  *
997  * @public @memberof GoControl
998  * @version Introduced in firmware 5.2.18.3
999  * @param control GoControl object.
1000  * @param name Name of the flag.
1001  * @param value String object to receive the value (in text).
1002  * @return Operation status.
1003  */
1004 GoFx(kStatus) GoControl_GetFlag(GoControl control, const kChar* name, kString value);
1005 
1006 #include <GoSdk/Internal/GoControl.x.h>
1007 
1008 #endif
Sensor state, login, alignment information, recording state, playback source, uptime, playback information, and auto-start setting state.
Definition: GoSdkDef.h:818
Represents a data input source.
Represents read-only sensor information.
kStatus GoControl_DeleteFile(GoControl control, const kChar *fileName)
Deletes a file within the connected sensor.
kStatus GoControl_SetDefaultJob(GoControl control, const kChar *fileName)
Sets a default job file to be loaded on boot.
Represents a playback seek direction.
kStatus GoControl_AssignBuddies(GoControl control, const k32u *buddyIds, kSize count)
Start assigning multiple buddy sensors.
kStatus GoControl_SetQuickEditEnabled(GoControl control, kBool enable)
Enable or disable sensor Quick Edit.
Represents the replay export source type.
kStatus GoControl_RuntimeVariableCount(GoControl control, kSize *count)
Gets the number of available runtime variables.
kStatus GoControl_GetUserStorageUsed(GoControl control, k64u *spaceUsed)
Gets the storage space used for user files.
Represents a set of sensor command connections (control, upgrade).
kStatus GoControl_ChangeBuddy(GoControl control, kBool add, k32u buddyId)
Assigns or removes a buddy sensor.
kStatus GoControl_PlaybackStep(GoControl control, GoSeekDirection direction)
Advance one frame in a replay.
kStatus GoControl_ExportCsv(GoControl control, const kChar *dstFileName)
Export a CSV file to local storage.
kStatus GoControl_ClearAlignment(GoControl control)
Clears the sensor alignment.
kStatus GoControl_BeginExposureAutoSet(GoControl control, GoRole role)
Sends an exposure auto set command to a sensor, but doesn't wait for the response.
kStatus GoControl_SetFlag(GoControl control, const kChar *name, const kChar *value)
Sets a sensor flag value.
Represents a user role. Use GO_ROLE_MAIN or GOROLE_BUDDYIDX(buddyidx)
kStatus GoControl_GetTimestamp(GoControl control, k64u *time)
Gets the current time stamp value(common among all synchronized sensors).
kStatus GoControl_GetAlignmentReference(GoControl control, GoAlignmentRef *reference)
Gets the alignment reference for a sensor.
kStatus GoControl_CopyFile(GoControl control, const kChar *source, const kChar *destination)
Copies a file within the connected sensor.
kStatus GoControl_Reset(GoControl control)
Reboots the main sensor and any connected buddy sensors.
Represents a data source.
kStatus GoControl_GetUpgradeStatus(GoControl control, kBool *complete, kBool *succeeded, k32s *progress)
Polls for upgrade status.
kStatus GoControl_GetSensorInfoV2(GoControl control, GoSensorInfo localInfo, kArrayList remoteInfoList, kArrayList buddyInfoList)
Gets current sensor state information.
kStatus GoControl_GetSensorInfo(GoControl control, GoSensorInfo localInfo, kArrayList remoteInfoList)
Gets current sensor state information.
kStatus GoControl_GetAutoStartEnabled(GoControl control, kBool *enabled)
Returns the state of sensor AutoStart.
Represents either 48V or 24V (with cable length) operation. Only relevant on G3210.
kStatus GoControl_GetQuickEditEnabled(GoControl control, kBool *enabled)
Returns the state of sensor Quick Edit.
kStatus GoControl_ResetEncoder(GoControl control)
Resets the encoder value.
kStatus GoControl_BeginScheduledStart(GoControl control, k64s value)
Sends a scheduled start command to a sensor with the currently selected input source, but doesn't wait for the response.
kStatus GoControl_EndAlignment(GoControl control)
Waits for a alignment response from a sensor.
kStatus GoControl_SetRuntimeVariables(GoControl control, kSize startIndex, kSize length, const k32s *values)
Sets one or more runtime variables.
kStatus GoControl_ClearReplayData(GoControl control)
Clear the sensor's replay data.
Declares the GoSensorInfo class.
kStatus GoControl_ReadFile(GoControl control, const kChar *fileName, kByte **data, kSize *size, kAlloc allocator)
Reads a file from the connected sensor.
kStatus GoControl_Login(GoControl control, GoUser user, const kChar *password)
Logs into the sensor using the specified user name and password.
kStatus GoControl_EndSnapshot(GoControl control)
Waits for a snapshot response from a sensor.
kStatus GoControl_GetStates(GoControl control, GoStates *states)
Retrieves a set of various sensor states for the sensor associated with the control connection...
kStatus GoControl_GetVoltage(GoControl control, GoVoltageSetting *voltage, k32u *cableLength)
Get the sensor voltage settings (only on G3210)
kStatus GoControl_Close(GoControl control)
Closes all open command connections.
kStatus GoControl_SetUpgradePort(GoControl control, k32u port)
Sets the upgrade Port Number.
kStatus GoControl_BeginAlignment(GoControl control)
Sends a alignment command to a sensor, but doesn't wait for the response.
kStatus GoControl_GetRuntimeVariables(GoControl control, kSize startIndex, kSize length, k32s *values)
Gets one or more runtime variables.
kStatus GoControl_EndExposureAutoSet(GoControl control)
Waits for a exposure auto set response from a sensor.
Essential SDK declarations.
kStatus GoControl_GetInputSource(GoControl control, GoInputSource *source)
Gets the sensor's data input source.
k32u GoControl_UpgradePort(GoControl control)
Returns the upgrade Port Number.
kStatus GoControl_EndScheduledStart(GoControl control)
Waits for a scheduled start response from a sensor.
kStatus GoControl_SetAlignmentReference(GoControl control, GoAlignmentRef reference)
Sets the alignment reference for a sensor.
k32u GoControl_ControlPort(GoControl control)
Returns the control port number.
kStatus GoControl_Trigger(GoControl control)
Sends a software trigger to the sensor.
kStatus GoControl_SetRecordingEnabled(GoControl control, kBool enable)
Enables recording on the sensor.
kStatus GoControl_BeginSnapshot(GoControl control)
Sends a snapshot command to a sensor with the currently selected input source, but doesn't wait for t...
kStatus GoControl_GetDefaultJob(GoControl control, kChar *fileName, kSize capacity)
Gets the name of the default job file to be loaded on boot.
kStatus GoControl_ScheduleAnalog(GoControl control, k16u index, k64s target, k32s value)
Schedules an analog output.
kStatus GoControl_ChangePassword(GoControl control, GoUser user, const kChar *password)
Changes the password associated with the specified user account.
kStatus GoControl_PlaybackSeek(GoControl control, kSize position)
Seek to the specified frame position for a replay.
kStatus GoControl_SetInputSource(GoControl control, GoInputSource source)
Sets the sensor's data input source.
kStatus GoControl_Open(GoControl control, kIpAddress address, k32u controlPort, k32u upgradePort)
Opens connections to the specified sensor IP address.
kStatus GoControl_GetFlag(GoControl control, const kChar *name, kString value)
Gets a sensor flag value.
kStatus GoControl_SetCancelHandler(GoControl control, kCallbackFx function, kPointer receiver)
Sets an I/O cancellation query handler for this control object.
kStatus GoControl_Construct(GoControl *control, kAlloc allocator)
Constructs a GoControl object.
Represents a user id.
kStatus GoControl_ReadFileList(GoControl control, kArrayList files, const kChar *extensionFilter)
Reads the list of available sensor files.
Represents an alignment reference.
kVersion GoControl_ProtocolVersion(GoControl control)
Gets the connected sensor's protocol version.
kStatus GoControl_GetLoadedJob(GoControl control, kChar *fileName, kSize capacity, kBool *isModified)
Gets the name of the loaded job file and whether it has been modified since loading.
kStatus GoControl_BeginUpgrade(GoControl control, void *data, kSize size)
Begins a sensor firmware upgrade.
kStatus GoControl_GetScanMode(GoControl control, GoMode *mode)
Gets the sensor's scan mode.
kStatus GoControl_GetRecordingEnabled(GoControl control, kBool *enabled)
Gets the sensor's recording state.
kStatus GoControl_SetVoltage(GoControl control, GoVoltageSetting voltage, k32u cableLength)
Set sensor voltage settings (only on G3210)
kStatus GoControl_RemoveBuddies(GoControl control, const k32u *buddyIndices, kSize count)
Remove multiple buddy sensors.
kStatus GoControl_SetAutoStartEnabled(GoControl control, kBool enable)
Enable or disable sensor AutoStart.
kStatus GoControl_Restore(GoControl control, const kByte *fileData, kSize size)
Restores a backup of sensor files.
kStatus GoControl_ClearMeasurementStats(GoControl control)
Clear the sensor's measurement statistics.
kStatus GoControl_ScheduleDigital(GoControl control, k16u index, k64s target, k8u value)
Schedules a digital output.
kBool GoControl_IsCompatible(GoControl control)
Reports whether the GoControl object is compatible with the sensor firmware.
kStatus GoControl_BeginStop(GoControl control)
Sends a stop command to a sensor, but doesn't wait for the response.
kBool GoControl_IsConnected(GoControl control)
Reports whether the control object has been opened.
kStatus GoControl_GetUserStorageFree(GoControl control, k64u *spaceAvailable)
Gets the available storage space remaining for user files.
kStatus GoControl_GetEncoder(GoControl control, k64s *encoder)
Gets the current system encoder value.
Represents a scan mode.
kStatus GoControl_EndStart(GoControl control)
Waits for a start response from a sensor.
kStatus GoControl_EndStop(GoControl control)
Waits for a stop response from a sensor.
kStatus GoControl_Backup(GoControl control, kByte **fileData, kSize *size, kAlloc allocator)
Creates and downloads a backup of sensor files.
kStatus GoControl_RestoreFactory(GoControl control, kBool restoreAddress)
Restores factory default settings.
kStatus GoControl_PlaybackPosition(GoControl control, kSize *position, kSize *count)
Get the current frame position in a replay.
kStatus GoControl_RemoveBuddiesById(GoControl control, const k32u *buddyIds, kSize count)
Remove multiple buddy sensors.
kStatus GoControl_SetControlPort(GoControl control, k32u port)
Sets the control port number.
kStatus GoControl_WriteFile(GoControl control, const kChar *fileName, const kByte *data, kSize size)
Writes a file to the connected sensor.
kStatus GoControl_Simulate(GoControl control, kBool *isBufferValid)
Simulate the current frame stored on the sensor's live replay buffer.
kStatus GoControl_ExportBitmap(GoControl control, GoReplayExportSourceType type, GoDataSource source, const kChar *dstFileName)
Export an intensity bitmap file to local storage.
kStatus GoControl_BeginStart(GoControl control)
Sends a start command to a sensor with the currently selected input source, but doesn't wait for the ...
kStatus GoControl_ClearLog(GoControl control)
Clears the sensor log file.