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