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