Gocator API

- Home
- Categories
- Types
- Files

All Classes Files Functions Variables Typedefs Macros Groups Pages
GoSensor.h
Go to the documentation of this file.
1 /**
2 * @file GoSensor.h
3 * @brief Declares the GoSensor class.
4 *
5 * @internal
6 * Copyright (C) 2014 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef GO_SENSOR_H
11 #define GO_SENSOR_H
12
13 #include <GoSdk/GoSdkDef.h>
14 #include <GoSdk/Messages/GoDataSet.h>
15 #include <GoSdk/Outputs/GoOutput.h>
16 #include <GoSdk/GoSetup.h>
17 #include <GoSdk/Tools/GoTools.h>
18 #include <GoSdk/GoTransform.h>
19 #include <GoSdk/GoSensorInfo.h>
20
21 kBeginHeader()
22
23 #define GO_SENSOR_LIVE_JOB_NAME "_live.job" //<<< Represents the active live job on the sensor
24
25 /**
26 * @class GoSensor
27 * @extends kObject
28 * @ingroup GoSdk
29 * @brief Represents a Gocator sensor.
30 */
31 typedef kObject GoSensor;
32
33 /**
34 * Configures a sensor's network address settings.
35 *
36 * This function uses UDP broadcasts for sensor configuration; the sensor does not need to
37 * be connected, and can be on a different subnet than the client.
38 *
39 * The sensor will automatically reboot if the address is successfully changed.
40 *
41 * @public @memberof GoSensor
42 * @param sensor GoSensor object.
43 * @param info New address settings.
44 * @param wait Should this function block until the sensor finishes rebooting?
45 * @return Operation status.
46 */
47 GoFx(kStatus) GoSensor_SetAddress(GoSensor sensor, const GoAddressInfo* info, kBool wait);
48
49 /**
50 * Retrieves the sensor's network address settings.
51 *
52 * @public @memberof GoSensor
53 * @param sensor GoSensor object.
54 * @param info Receives current address configuration.
55 * @return Operation status.
56 */
57 GoFx(kStatus) GoSensor_Address(GoSensor sensor, GoAddressInfo* info);
58
59 /**
60 * Creates a connection to the sensor.
61 *
62 * @public @memberof GoSensor
63 * @param sensor GoSensor object.
64 * @return Operation status.
65 */
66 GoFx(kStatus) GoSensor_Connect(GoSensor sensor);
67
68 /**
69 * Disconnects from the sensor.
70 *
71 * @public @memberof GoSensor
72 * @param sensor GoSensor object.
73 * @return Operation status.
74 */
75 GoFx(kStatus) GoSensor_Disconnect(GoSensor sensor);
76
77 /**
78 * Reports whether the the sensor is currently connected.
79 *
80 * @public @memberof GoSensor
81 * @param sensor GoSensor object.
82 * @return kTRUE if the sensor is connected; kFALSE otherwise.
83 */
84 GoFx(kBool) GoSensor_IsConnected(GoSensor sensor);
85
86 /**
87 * Refreshes sensor state.
88 *
89 * Unresponsive sensors will be disconnected, and canceled sensors will be reconnected.
90 * Sensors in any other state will discard all locally-cached information.
91 *
92 * This function should be used to update sensors in the GO_SENSOR_INCONSISTENT state. This
93 * state can arise due to buddy changes performed by remote sensors (e.g. a main sensor boots
94 * and claims ownership of a buddy sensor, but the buddy sensor has already been detected and
95 * loaded as a main sensor by the client).
96 *
97 * @public @memberof GoSensor
98 * @param sensor GoSensor object.
99 * @return kTRUE if the sensor is connected; kFALSE otherwise.
100 */
101 GoFx(kStatus) GoSensor_Refresh(GoSensor sensor);
102
103 /**
104 * Assigns a buddy sensor.
105 *
106 * NOTE: The provided buddy sensor handle must already be connected.
107 *
108 * @public @memberof GoSensor
109 * @param sensor GoSensor object.
110 * @param buddy Sensor to be assigned as buddy.
111 * @return Operation status.
112 * @see GoSensor_Connect
113 */
114 GoFx(kStatus) GoSensor_AddBuddy(GoSensor sensor, GoSensor buddy);
115
116 /**
117 * Removes the current buddy sensor.
118 *
119 * @public @memberof GoSensor
120 * @param sensor GoSensor object.
121 * @return Operation status.
122 */
123 GoFx(kStatus) GoSensor_RemoveBuddy(GoSensor sensor);
124
125 /**
126 * Reports whether a buddy had been assigned.
127 *
128 * @public @memberof GoSensor
129 * @param sensor GoSensor object.
130 * @return kTRUE if sensor has a buddy; kFALSE otherwise.
131 */
132 GoFx(kBool) GoSensor_HasBuddy(GoSensor sensor);
133
134 /**
135 * Gets the buddy sensor.
136 *
137 * @public @memberof GoSensor
138 * @param sensor GoSensor object.
139 * @return Buddy sensor (or kNULL if not assigned or not online).
140 */
141 GoFx(GoSensor) GoSensor_Buddy(GoSensor sensor);
142
143 /**
144 * Gets the buddy sensor's device ID.
145 *
146 * @public @memberof GoSensor
147 * @param sensor GoSensor object.
148 * @return Buddy device ID (or k32U_NULL if not assigned).
149 */
150 GoFx(k32u) GoSensor_BuddyId(GoSensor sensor);
151
152 /**
153 * Gets the sensor's scan mode.
154 *
155 * @public @memberof GoSensor
156 * @param sensor GoSensor object.
157 * @return Scan mode.
158 */
159 GoFx(GoMode) GoSensor_ScanMode(GoSensor sensor);
160
161 /**
162 * Enables or disables the sensor's data channel.
163 *
164 * @public @memberof GoSensor
165 * @param sensor GoSensor object.
166 * @param enable kTRUE to enable, or kFALSE to disable.
167 * @return Operation status.
168 */
169 GoFx(kStatus) GoSensor_EnableData(GoSensor sensor, kBool enable);
170
171 /**
172 * Starts the sensor.
173 *
174 * @public @memberof GoSensor
175 * @param sensor GoSensor object.
176 * @return Operation status.
177 */
178 GoFx(kStatus) GoSensor_Start(GoSensor sensor);
179
180 /**
181 * Stops the sensor.
182 *
183 * @public @memberof GoSensor
184 * @param sensor GoSensor object.
185 * @return Operation status.
186 */
187 GoFx(kStatus) GoSensor_Stop(GoSensor sensor);
188
189 /**
190 * Perform alignment using the configured alignment type and target.
191 *
192 * NOTE: This operation will result in a sensor start for the duration of the
193 * alignment. It can be canceled via GoSensor_Stop. This function's operation
194 * status does not correspond to the actual alignment result. In order to
195 * retrieve the alignment result, you must enable the data channel before calling
196 * this function, receive an alignment data message and then check its status.
197 *
198 * @public @memberof GoSensor
199 * @param sensor GoSensor object.
200 * @return Operation status.
201 * @see GoSensor_EnableData, GoSystem_ReceiveData, GoSetup_AlignmentType, GoSetup_AlignmentMovingTarget, GoSetup_AlignmentStationaryTarget, GoAlignMsg_Status, GoSensor_Stop
202 */
203 GoFx(kStatus) GoSensor_Align(GoSensor sensor);
204
205 /**
206 * Perform an exposure auto set.
207 *
208 * NOTE: This operation will result in a sensor start for the duration of the
209 * exposure AutoSet. A successful operation status does NOT modify the configuration.
210 * You must retrieve the resulting exposure value and set it for the appropriate
211 * exposure setting. This involves enabling the data connection prior to running
212 * exposure auto set and then receiving an exposure auto set message, which
213 * you can then use to query the status and access the resulting value.
214 *
215 * @public @memberof GoSensor
216 * @param sensor GoSensor object.
217 * @param role The role of the device to auto set.
218 * @return Operation status.
219 * @see GoRole, GoSensor_EnableData, GoSystem_ReceiveData, GoExposureCalMsg_Status, GoExposureCalMsg_Exposure
220 */
221 GoFx(kStatus) GoSensor_ExposureAutoSet(GoSensor sensor, GoRole role);
222
223 /**
224 * Gets the alignment state of the sensor.
225 *
226 * @public @memberof GoSensor
227 * @param sensor GoSensor object.
228 * @return A GoAlignmentState.
229 */
230 GoFx(GoAlignmentState) GoSensor_AlignmentState(GoSensor sensor);
231
232
233 /**
234 * Sets the alignment reference of the sensor.
235 *
236 * @public @memberof GoSensor
237 * @param sensor GoSensor object.
238 * @param reference The alignment reference value to set.
239 * @return Operation status.
240 */
241 GoFx(kStatus) GoSensor_SetAlignmentReference(GoSensor sensor, GoAlignmentRef reference);
242
243 /**
244 * Gets the alignment reference of the sensor.
245 *
246 * @public @memberof GoSensor
247 * @param sensor GoSensor object.
248 * @param reference A pointer that will hold the current alignment reference value.
249 * @return Operation status.
250 */
251 GoFx(kStatus) GoSensor_AlignmentReference(GoSensor sensor, GoAlignmentRef* reference);
252
253 /**
254 * Reboots the main sensor and any connected buddy sensors.
255 *
256 * @public @memberof GoSensor
257 * @param sensor GoSensor object.
258 * @param wait kTRUE to wait for reboot and then reconnect.
259 * @return Operation status.
260 */
261 GoFx(kStatus) GoSensor_Reset(GoSensor sensor, kBool wait);
262
263 /**
264 * Aborts ongoing sensor communication.
265 *
266 * This method asynchronously aborts ongoing communication; the next time that any
267 * I/O operation blocks for an extended period of time, it will be terminated. This method
268 * is thread-safe.
269 *
270 * In order to resume communication, call GoSensor_Refresh or GoSensor_Connect.
271 *
272 * @public @memberof GoSensor
273 * @param sensor GoSensor object.
274 * @return Operation status.
275 */
276 GoFx(kStatus) GoSensor_Cancel(GoSensor sensor);
277
278 /**
279 * Gets the current time stamp (common among all synchronized sensors).
280 *
281 * @public @memberof GoSensor
282 * @param sensor GoSensor object.
283 * @param time Receives the current time stamp(us).
284 * @return Operation status.
285 */
286 GoFx(kStatus) GoSensor_Timestamp(GoSensor sensor, k64u* time);
287
288 /**
289 * Gets the current encoder count.
290 *
291 * @public @memberof GoSensor
292 * @param sensor GoSensor object.
293 * @param encoder Receives the encoder count (ticks).
294 * @return Operation status.
295 */
296 GoFx(kStatus) GoSensor_Encoder(GoSensor sensor, k64s* encoder);
297
298 /**
299 * Sends a software trigger to the sensor.
300 *
301 * This method is used in conjunction with sensors that are configured to accept
302 * software triggers.
303 *
304 * @public @memberof GoSensor
305 * @param sensor GoSensor object.
306 * @return Operation status.
307 * @see GoSetup_TriggerSource, GoSetup_SetTriggerSource
308 */
309 GoFx(kStatus) GoSensor_Trigger(GoSensor sensor);
310
311 /**
312 * Schedules a digital output.
313 *
314 * This method requires that the output is configured to trigger on software control.
315 *
316 * @public @memberof GoSensor
317 * @param sensor GoSensor object.
318 * @param index The digital output index.
319 * @param target The time or position target (us or mm), depending on GoDomain. Ignored if
320 * GoDigital_ScheduleEnabled is false or GoDigital_SignalType is pulsed.
321 * @param value The value of scheduled output (0-Low or 1-High). Ignored if output
322 * GoDigital_SignalType is pulsed.
323 * @return Operation status.
324 */
325 GoFx(kStatus) GoSensor_EmitDigital(GoSensor sensor, k16u index, k64s target, k8u value);
326
327 /**
328 * Schedules an analog output.
329 *
330 * This method requires that the output be configured to trigger on software control.
331 *
332 * @public @memberof GoSensor
333 * @param sensor GoSensor object.
334 * @param index The analog output index.
335 * @param target The time or position target (us or mm), depending on GoDomain. Ignored if
336 * GoAnalog_ScheduleEnabled is false.
337 * @param value The value of the scheduled output (mA).
338 * @return Operation status.
339 */
340 GoFx(kStatus) GoSensor_EmitAnalog(GoSensor sensor, k16u index, k64s target, k32s value);
341
342 /**
343 * Gets the number of files available from the connected sensor.
344 *
345 * @public @memberof GoSensor
346 * @param sensor GoSensor object.
347 * @return File count.
348 */
349 GoFx(kSize) GoSensor_FileCount(GoSensor sensor);
350
351 /**
352 * Gets the file name at the specified index.
353 *
354 * @public @memberof GoSensor
355 * @param sensor GoSensor object.
356 * @param index Index of the desired file name.
357 * @param name Receives the name of the file.
358 * @param capacity Capacity of the file name buffer.
359 * @return Operation status.
360 */
361 GoFx(kStatus) GoSensor_FileNameAt(GoSensor sensor, kSize index, kChar* name, kSize capacity);
362
363 /**
364 * Uploads a file to the connected sensor.
365 *
366 * @public @memberof GoSensor
367 * @param sensor GoSensor object.
368 * @param sourcePath Source file system path for the file to be uploaded.
369 * @param destName Destination name for the uploaded file (maximum 63 characters).
370 * @return Operation status.
371 */
372 GoFx(kStatus) GoSensor_UploadFile(GoSensor sensor, const kChar* sourcePath, const kChar* destName);
373
374 /**
375 * Downloads a file from the connected sensor.
376 *
377 * @public @memberof GoSensor
378 * @param sensor GoSensor object.
379 * @param sourceName Source name of the file to be downloaded.
380 * @param destPath Destination file system path for the file to be downloaded.
381 * @return Operation status.
382 */
383 GoFx(kStatus) GoSensor_DownloadFile(GoSensor sensor, const kChar* sourceName, const kChar* destPath);
384
385 /**
386 * Copies a file within the connected sensor.
387 *
388 * @public @memberof GoSensor
389 * @param sensor GoSensor object.
390 * @param sourceName Source name for the file to be copied.
391 * @param destName Destination name for the file (maximum 63 characters).
392 * @return Operation status.
393 */
394 GoFx(kStatus) GoSensor_CopyFile(GoSensor sensor, const kChar* sourceName, const kChar* destName);
395
396 /**
397 * Deletes a file within the connected sensor.
398 *
399 * @public @memberof GoSensor
400 * @param sensor GoSensor object.
401 * @param name Name of the file to be deleted.
402 * @return Operation status.
403 */
404 GoFx(kStatus) GoSensor_DeleteFile(GoSensor sensor, const kChar* name);
405
406 /**
407 * Checks whether the specified file is present on the sensor.
408 *
409 * @public @memberof GoSensor
410 * @param sensor GoSensor object.
411 * @param name Name of the file to be checked.
412 * @return Operation status.
413 */
414 GoFx(kBool) GoSensor_FileExists(GoSensor sensor, const kChar* name);
415
416 /**
417 * Sets a default job file to be loaded on boot.
418 *
419 * @public @memberof GoSensor
420 * @param sensor GoSensor object.
421 * @param fileName Name of the default file.
422 * @return Operation status.
423 */
424 GoFx(kStatus) GoSensor_SetDefaultJob(GoSensor sensor, const kChar* fileName);
425
426 /**
427 * Gets the name of the default job file to be loaded on boot.
428 *
429 * @public @memberof GoSensor
430 * @param sensor GoSensor object.
431 * @param fileName Receives name of the default file.
432 * @param capacity Name buffer capacity.
433 * @return Operation status.
434 */
435 GoFx(kStatus) GoSensor_DefaultJob(GoSensor sensor, kChar* fileName, kSize capacity);
436
437 /**
438 * Gets the name of the loaded job file and whether it has been modified since loading.
439 *
440 * @public @memberof GoSensor
441 * @param sensor GoSensor object.
442 * @param fileName Receives name of the loaded file.
443 * @param capacity Name buffer capacity.
444 * @param changed Receives the status of whether the file has changed.
445 * @return Operation status.
446 */
447 GoFx(kStatus) GoSensor_LoadedJob(GoSensor sensor, kChar* fileName, kSize capacity, kBool* changed);
448
449 /**
450 * Logs into the sensor using the specified user name and password.
451 *
452 * Logging in is not required in order to programmatically control a sensor. The Gocator log-in feature is
453 * intended only to support administrative user interfaces, by allowing the username and password to be
454 * stored in the sensor.
455 *
456 * @public @memberof GoSensor
457 * @param sensor GoSensor object.
458 * @param user User account.
459 * @param password User password.
460 * @return Operation status.
461 */
462 GoFx(kStatus) GoSensor_LogIn(GoSensor sensor, GoUser user, const kChar* password);
463
464 /**
465 * Changes the password associated with the specified user account.
466 *
467 * @public @memberof GoSensor
468 * @param sensor GoSensor object.
469 * @param user User account.
470 * @param password New password.
471 * @return Operation status.
472 */
473 GoFx(kStatus) GoSensor_ChangePassword(GoSensor sensor, GoUser user, const kChar* password);
474
475 /**
476 * Upgrades sensor firmware.
477 *
478 * This function will block until the upgrade is completed. A reboot is required in order for
479 * the upgrade to take effect, but the reboot is not automatic. Call GoSensor_Reset to reboot.
480 *
481 * @public @memberof GoSensor
482 * @param sensor GoSensor object.
483 * @param sourcePath Local file system path to the upgrade file.
484 * @param onUpdate Callback function to receive progress updates, or kNULL.
485 * @param context Context handle to be passed to the upgrade callback.
486 * @return Operation status.
487 */
488 GoFx(kStatus) GoSensor_Upgrade(GoSensor sensor, const kChar* sourcePath, GoUpgradeFx onUpdate, kPointer context);
489
490 /**
491 * Creates a backup of sensor files and downloads the backup to the specified location.
492 *
493 * @public @memberof GoSensor
494 * @param sensor GoSensor object.
495 * @param destPath Local file system path for the saved backup file.
496 * @return Operation status.
497 */
498 GoFx(kStatus) GoSensor_Backup(GoSensor sensor, const kChar* destPath);
499
500 /**
501 * Restores a backup of sensor files.
502 *
503 * @public @memberof GoSensor
504 * @param sensor GoSensor object.
505 * @param sourcePath Local file system path of the saved backup file.
506 * @return Operation status.
507 */
508 GoFx(kStatus) GoSensor_Restore(GoSensor sensor, const kChar* sourcePath);
509
510 /**
511 * Restores factory default settings.
512 *
513 * @public @memberof GoSensor
514 * @param sensor GoSensor object.
515 * @param restoreAddress kTRUE to restore the factory default IP address; False otherwise.
516 * @return Operation status.
517 */
518 GoFx(kStatus) GoSensor_RestoreDefaults(GoSensor sensor, kBool restoreAddress);
519
520 /**
521 * Gets the GoSetup instance associated with the sensor.
522 *
523 * @public @memberof GoSensor
524 * @param sensor GoSensor object.
525 * @return A GoSetup object module
526 */
527 GoFx(GoSetup) GoSensor_Setup(GoSensor sensor);
528
529 /**
530 * Gets the sensor's tools module, used for measurement configuration.
531 *
532 * @public @memberof GoSensor
533 * @param sensor GoSensor object.
534 * @return Measurement configuration module.
535 */
536 GoFx(GoTools) GoSensor_Tools(GoSensor sensor);
537
538 /**
539 * Gets the output module, used for output configuration.
540 *
541 * @public @memberof GoSensor
542 * @param sensor GoSensor object.
543 * @return Output configuration module.
544 */
545 GoFx(GoOutput) GoSensor_Output(GoSensor sensor);
546
547 /**
548 * Gets the transform module, used for transformation configuration.
549 *
550 * @public @memberof GoSensor
551 * @param sensor GoSensor object.
552 * @return Transformation configuration module.
553 */
554 GoFx(GoTransform) GoSensor_Transform(GoSensor sensor);
555
556 /**
557 * Gets the device identifier associated with this sensor.
558 *
559 * @public @memberof GoSensor
560 * @param sensor GoSensor object.
561 * @return The sensor's device ID.
562 */
563 GoFx(k32u) GoSensor_Id(GoSensor sensor);
564
565 /**
566 * Gets the model number associated with this sensor.
567 *
568 * @public @memberof GoSensor
569 * @param sensor GoSensor object.
570 * @param model Receives sensor model.
571 * @param capacity Capacity of model buffer.
572 * @return Model number.
573 */
574 GoFx(kStatus) GoSensor_Model(GoSensor sensor, kChar* model, kSize capacity);
575
576 /**
577 * Reports the current state of the sensor.
578 *
579 * @public @memberof GoSensor
580 * @param sensor GoSensor object.
581 * @return Sensor state.
582 */
583 GoFx(GoState) GoSensor_State(GoSensor sensor);
584
585 /**
586 * Reports the current states of the sensor.
587 *
588 * @public @memberof GoSensor
589 * @param sensor GoSensor object.
590 * @param states Reference to updated states.
591 * @return Operation status.
592 */
593 GoFx(kStatus) GoSensor_States(GoSensor sensor, GoStates* states);
594
595 /**
596 * Gets the sensor's current role within the system.
597 *
598 * @public @memberof GoSensor
599 * @param sensor GoSensor object.
600 * @return Sensor role.
601 */
602 GoFx(GoRole) GoSensor_Role(GoSensor sensor);
603
604 /**
605 * Reports the user account associated with the current user.
606 *
607 * @public @memberof GoSensor
608 * @param sensor GoSensor object.
609 * @return User account id.
610 */
611 GoFx(GoUser) GoSensor_User(GoSensor sensor);
612
613 /**
614 * Gets the sensor's protocol version.
615 *
616 * @public @memberof GoSensor
617 * @param sensor GoSensor object.
618 * @return Protocol version.
619 */
620 GoFx(kVersion) GoSensor_ProtocolVersion(GoSensor sensor);
621
622 /**
623 * Gets the sensor's firmware version.
624 *
625 * @public @memberof GoSensor
626 * @param sensor GoSensor object.
627 * @return Firmware version.
628 */
629 GoFx(kVersion) GoSensor_FirmwareVersion(GoSensor sensor);
630
631 /**
632 * Sets the recording state of the sensor.
633 *
634 * @public @memberof GoSensor
635 * @param sensor GoSensor object.
636 * @param enable Enables or disables recording.
637 * @return Operation status.
638 */
639 GoFx(kStatus) GoSensor_EnableRecording(GoSensor sensor, kBool enable);
640
641 /**
642 * Gets the recording state of the sensor.
643 *
644 * @public @memberof GoSensor
645 * @param sensor GoSensor object.
646 * @return kTRUE if recording is enabled. kFALSE otherwise.
647 */
648 GoFx(kBool) GoSensor_RecordingEnabled(GoSensor sensor);
649
650 /**
651 * Sets the input source of the sensor.
652 *
653 * @public @memberof GoSensor
654 * @param sensor GoSensor object.
655 * @param source The input source to use.
656 * @return Operation status.
657 */
658 GoFx(kStatus) GoSensor_SetInputSource(GoSensor sensor, GoInputSource source);
659
660 /**
661 * Gets the input source currently used by the sensor.
662 *
663 * @public @memberof GoSensor
664 * @param sensor GoSensor object.
665 * @return A GoInputSource.
666 */
667 GoFx(GoInputSource) GoSensor_InputSource(GoSensor sensor);
668
669 /**
670 * Simulates the current frame in the live recording buffer.
671 *
672 * @public @memberof GoSensor
673 * @param sensor GoSensor object.
674 * @param isBufferValid kTRUE if the source simulation buffer was valid. kFALSE otherwise.
675 * @return Operation status.
676 */
677 GoFx(kStatus) GoSensor_Simulate(GoSensor sensor, kBool* isBufferValid);
678
679
680 /**
681 * Advances one frame from the current replay position.
682 *
683 * @public @memberof GoSensor
684 * @param sensor GoSensor object.
685 * @param direction Direction with which to step.
686 * @return Operation status.
687 */
688 GoFx(kStatus) GoSensor_PlaybackStep(GoSensor sensor, GoSeekDirection direction);
689
690 /**
691 * Sets the current frame position for a replay.
692 *
693 * @public @memberof GoSensor
694 * @param sensor GoSensor object.
695 * @param position The frame position to seek.
696 * @return Operation status.
697 */
698 GoFx(kStatus) GoSensor_PlaybackSeek(GoSensor sensor, kSize position);
699
700 /**
701 * Gets the current replay frame position.
702 *
703 * @public @memberof GoSensor
704 * @param sensor GoSensor object.
705 * @param position The current frame position index.
706 * @param count The frame count.
707 * @return Operation status.
708 */
709 GoFx(kStatus) GoSensor_PlaybackPosition(GoSensor sensor, kSize* position, kSize* count);
710
711 /**
712 * Gets the current replay frame count.
713 *
714 * @public @memberof GoSensor
715 * @param sensor GoSensor object.
716 * @return The current frame count.
717 */
718 GoFx(kSize) GoSensor_PlaybackFrameCount(GoSensor sensor);
719
720
721 /**
722 * Clears the replay buffer.
723 *
724 * @public @memberof GoSensor
725 * @param sensor GoSensor object.
726 * @return Operation status.
727 */
728 GoFx(kStatus) GoSensor_ClearReplayData(GoSensor sensor);
729
730 /**
731 * Resets the measurement statistics reported by the health channel
732 *
733 * @public @memberof GoSensor
734 * @param sensor GoSensor object.
735 * @return A GoAlignmentState.
736 */
737 GoFx(kStatus) GoSensor_ClearMeasurementStats(GoSensor sensor);
738
739 /**
740 * Exports the current frame of a replay in the form of a bitmap.
741 *
742 * @public @memberof GoSensor
743 * @param sensor GoSensor object.
744 * @param type The type of data to export.
745 * @param source The device data source to export from.
746 * @param dstFileName The destination file name of the exported bitmap file.
747 * @return Operation status.
748 */
749 GoFx(kStatus) GoSensor_ExportBitmap(GoSensor sensor,
750 GoReplayExportSourceType type,
751 GoDataSource source,
752 const kChar* dstFileName);
753
754 /**
755 * Exports replay data in CSV format.
756 *
757 * @public @memberof GoSensor
758 * @param sensor GoSensor object.
759 * @param dstFileName The destination file name of the exported CSV file.
760 * @return Operation status.
761 */
762 GoFx(kStatus) GoSensor_ExportCsv(GoSensor sensor, const kChar* dstFileName);
763
764 /**
765 * Returns an enumerator value representing the current sensor's family.
766 *
767 * @public @memberof GoSensor
768 * @param sensor GoSensor object.
769 * @return A GoFamily value.
770 */
771 GoFx(GoFamily) GoSensor_Family(GoSensor sensor);
772
773 /**
774 * Clears the log file (_live.log).
775 *
776 * @public @memberof GoSensor
777 * @param sensor GoSensor object.
778 * @return Operation status.
779 */
780 GoFx(kStatus) GoSensor_ClearLog(GoSensor sensor);
781
782 /**
783 * Sets the AutoStart enabled state of the sensor.
784 *
785 * @public @memberof GoSensor
786 * @param sensor GoSensor object.
787 * @param enable The AutoStart enabled state to use.
788 * @return Operation status.
789 */
790 GoFx(kStatus) GoSensor_EnableAutoStart(GoSensor sensor, kBool enable);
791
792 /**
793 * Gets the AutoStart enabled state currently used by the sensor.
794 *
795 * @public @memberof GoSensor
796 * @param sensor GoSensor object.
797 * @return kTRUE if auto start is enabled and kFALSE otherwise.
798 */
799 GoFx(kBool) GoSensor_AutoStartEnabled(GoSensor sensor);
800
801 /**
802 * Gets the count of remote sensor information held by the sensor.
803 *
804 * @public @memberof GoSensor
805 * @param sensor GoSensor object.
806 * @return The remote sensor information count.
807 */
808 GoFx(kSize) GoSensor_RemoteInfoCount(GoSensor sensor);
809
810 /**
811 * Gets the remote sensor information at the given index.
812 *
813 * @public @memberof GoSensor
814 * @param sensor GoSensor object.
815 * @param index The index of the remote sensor information to retrieve.
816 * @return A handle to the selected remote sensor information or kNULL if an invalid index is provided.
817 */
818 GoFx(GoSensorInfo) GoSensor_RemoteInfoAt(GoSensor sensor, kSize index);
819
820 kEndHeader()
821 #include <GoSdk/GoSensor.x.h>
822
823 #endif
GoStates
Sensor state, login, alignment information, recording state, playback source, uptime, playback information, and auto-start setting state.
Definition: GoSdkDef.h:547
GoInputSource
Represents a data input source.
GoSensor::GoSensor_State
GoState GoSensor_State(GoSensor sensor)
Reports the current state of the sensor.
GoSensor::GoSensor_ExposureAutoSet
kStatus GoSensor_ExposureAutoSet(GoSensor sensor, GoRole role)
Perform an exposure auto set.
GoSensorInfo
Represents read-only sensor information.
Definition: GoSensorInfo.h:14
GoSensor::GoSensor_Upgrade
kStatus GoSensor_Upgrade(GoSensor sensor, const kChar *sourcePath, GoUpgradeFx onUpdate, kPointer context)
Upgrades sensor firmware.
GoSeekDirection
Represents a playback seek direction.
GoSensor::GoSensor_Buddy
GoSensor GoSensor_Buddy(GoSensor sensor)
Gets the buddy sensor.
GoReplayExportSourceType
Represents the replay export source type.
GoSensor::GoSensor_DownloadFile
kStatus GoSensor_DownloadFile(GoSensor sensor, const kChar *sourceName, const kChar *destPath)
Downloads a file from the connected sensor.
GoSensor::GoSensor_ClearReplayData
kStatus GoSensor_ClearReplayData(GoSensor sensor)
Clears the replay buffer.
GoSensor::GoSensor_FileExists
kBool GoSensor_FileExists(GoSensor sensor, const kChar *name)
Checks whether the specified file is present on the sensor.
GoSensor::GoSensor_EmitDigital
kStatus GoSensor_EmitDigital(GoSensor sensor, k16u index, k64s target, k8u value)
Schedules a digital output.
GoSensor::GoSensor_Setup
GoSetup GoSensor_Setup(GoSensor sensor)
Gets the GoSetup instance associated with the sensor.
GoSensor::GoSensor_EmitAnalog
kStatus GoSensor_EmitAnalog(GoSensor sensor, k16u index, k64s target, k32s value)
Schedules an analog output.
GoSensor::GoSensor_Reset
kStatus GoSensor_Reset(GoSensor sensor, kBool wait)
Reboots the main sensor and any connected buddy sensors.
GoSensor::GoSensor_IsConnected
kBool GoSensor_IsConnected(GoSensor sensor)
Reports whether the the sensor is currently connected.
GoSensor::GoSensor_FileNameAt
kStatus GoSensor_FileNameAt(GoSensor sensor, kSize index, kChar *name, kSize capacity)
Gets the file name at the specified index.
GoSensor::GoSensor_InputSource
GoInputSource GoSensor_InputSource(GoSensor sensor)
Gets the input source currently used by the sensor.
GoFamily
Represents the supported Gocator hardware families.
GoRole
Represents a user role.
GoSensor::GoSensor_SetAddress
kStatus GoSensor_SetAddress(GoSensor sensor, const GoAddressInfo *info, kBool wait)
Configures a sensor's network address settings.
GoSensor::GoSensor_UploadFile
kStatus GoSensor_UploadFile(GoSensor sensor, const kChar *sourcePath, const kChar *destName)
Uploads a file to the connected sensor.
GoSensor::GoSensor_SetInputSource
kStatus GoSensor_SetInputSource(GoSensor sensor, GoInputSource source)
Sets the input source of the sensor.
GoOutput.h
Declares the GoOutput class.
GoDataSource
Represents a data source.
GoSensor::GoSensor_Address
kStatus GoSensor_Address(GoSensor sensor, GoAddressInfo *info)
Retrieves the sensor's network address settings.
GoDataSet.h
Declares the GoDataSet class.
GoSensor::GoSensor_AddBuddy
kStatus GoSensor_AddBuddy(GoSensor sensor, GoSensor buddy)
Assigns a buddy sensor.
GoSensor::GoSensor_FirmwareVersion
kVersion GoSensor_FirmwareVersion(GoSensor sensor)
Gets the sensor's firmware version.
GoSensor::GoSensor_SetDefaultJob
kStatus GoSensor_SetDefaultJob(GoSensor sensor, const kChar *fileName)
Sets a default job file to be loaded on boot.
GoSensorInfo.h
Declares the GoSensorInfo class.
GoSensor::GoSensor_PlaybackSeek
kStatus GoSensor_PlaybackSeek(GoSensor sensor, kSize position)
Sets the current frame position for a replay.
GoAlignmentState
Represents an alignment state.
GoSensor::GoSensor_Disconnect
kStatus GoSensor_Disconnect(GoSensor sensor)
Disconnects from the sensor.
GoSensor::GoSensor_RemoteInfoAt
GoSensorInfo GoSensor_RemoteInfoAt(GoSensor sensor, kSize index)
Gets the remote sensor information at the given index.
GoSensor::GoSensor_FileCount
kSize GoSensor_FileCount(GoSensor sensor)
Gets the number of files available from the connected sensor.
GoSensor::GoSensor_Backup
kStatus GoSensor_Backup(GoSensor sensor, const kChar *destPath)
Creates a backup of sensor files and downloads the backup to the specified location.
GoSensor::GoSensor_States
kStatus GoSensor_States(GoSensor sensor, GoStates *states)
Reports the current states of the sensor.
GoSensor::GoSensor_DeleteFile
kStatus GoSensor_DeleteFile(GoSensor sensor, const kChar *name)
Deletes a file within the connected sensor.
GoSensor::GoSensor_Output
GoOutput GoSensor_Output(GoSensor sensor)
Gets the output module, used for output configuration.
GoOutput
Represents output configuration.
Definition: GoOutput.h:19
GoSensor::GoSensor_Start
kStatus GoSensor_Start(GoSensor sensor)
Starts the sensor.
GoSensor::GoSensor_ClearMeasurementStats
kStatus GoSensor_ClearMeasurementStats(GoSensor sensor)
Resets the measurement statistics reported by the health channel.
GoSdkDef.h
Essential SDK declarations.
GoSensor::GoSensor_RemoveBuddy
kStatus GoSensor_RemoveBuddy(GoSensor sensor)
Removes the current buddy sensor.
GoSensor::GoSensor_ScanMode
GoMode GoSensor_ScanMode(GoSensor sensor)
Gets the sensor's scan mode.
GoTransform.h
Declares the GoTransform class.
GoSensor::GoSensor_User
GoUser GoSensor_User(GoSensor sensor)
Reports the user account associated with the current user.
GoSensor::GoSensor_RecordingEnabled
kBool GoSensor_RecordingEnabled(GoSensor sensor)
Gets the recording state of the sensor.
GoSensor::GoSensor_Restore
kStatus GoSensor_Restore(GoSensor sensor, const kChar *sourcePath)
Restores a backup of sensor files.
GoTools
Represents a collection of tools.
Definition: GoTools.h:19
GoSensor::GoSensor_SetAlignmentReference
kStatus GoSensor_SetAlignmentReference(GoSensor sensor, GoAlignmentRef reference)
Sets the alignment reference of the sensor.
GoSensor::GoSensor_Connect
kStatus GoSensor_Connect(GoSensor sensor)
Creates a connection to the sensor.
GoSensor::GoSensor_Refresh
kStatus GoSensor_Refresh(GoSensor sensor)
Refreshes sensor state.
GoSensor::GoSensor_Align
kStatus GoSensor_Align(GoSensor sensor)
Perform alignment using the configured alignment type and target.
GoUser
Represents a user id.
GoSensor::GoSensor_Tools
GoTools GoSensor_Tools(GoSensor sensor)
Gets the sensor's tools module, used for measurement configuration.
GoAlignmentRef
Represents an alignment reference.
GoSensor::GoSensor_AlignmentState
GoAlignmentState GoSensor_AlignmentState(GoSensor sensor)
Gets the alignment state of the sensor.
GoSensor::GoSensor_CopyFile
kStatus GoSensor_CopyFile(GoSensor sensor, const kChar *sourceName, const kChar *destName)
Copies a file within the connected sensor.
GoSensor::GoSensor_EnableRecording
kStatus GoSensor_EnableRecording(GoSensor sensor, kBool enable)
Sets the recording state of the sensor.
GoSensor::GoSensor_Transform
GoTransform GoSensor_Transform(GoSensor sensor)
Gets the transform module, used for transformation configuration.
GoSensor::GoSensor_Trigger
kStatus GoSensor_Trigger(GoSensor sensor)
Sends a software trigger to the sensor.
GoSensor::GoSensor_PlaybackFrameCount
kSize GoSensor_PlaybackFrameCount(GoSensor sensor)
Gets the current replay frame count.
GoSensor::GoSensor_ChangePassword
kStatus GoSensor_ChangePassword(GoSensor sensor, GoUser user, const kChar *password)
Changes the password associated with the specified user account.
GoSensor::GoSensor_Role
GoRole GoSensor_Role(GoSensor sensor)
Gets the sensor's current role within the system.
GoTools.h
Declares the GoTool classes.
GoSensor::GoSensor_Stop
kStatus GoSensor_Stop(GoSensor sensor)
Stops the sensor.
kBeginHeader
kBeginHeader() kStatus GoSdk_Construct(kAssembly *assembly)
Constructs the Gocator SDK library.
GoSensor::GoSensor_AutoStartEnabled
kBool GoSensor_AutoStartEnabled(GoSensor sensor)
Gets the AutoStart enabled state currently used by the sensor.
GoSensor::GoSensor_Simulate
kStatus GoSensor_Simulate(GoSensor sensor, kBool *isBufferValid)
Simulates the current frame in the live recording buffer.
GoSetup.h
Declares the GoSetup class.
GoMode
Represents a scan mode.
GoSensor::GoSensor_AlignmentReference
kStatus GoSensor_AlignmentReference(GoSensor sensor, GoAlignmentRef *reference)
Gets the alignment reference of the sensor.
GoTransform
Represents a sensor transformation.
Definition: GoTransform.h:15
GoSensor::GoSensor_Id
k32u GoSensor_Id(GoSensor sensor)
Gets the device identifier associated with this sensor.
GoSensor::GoSensor_PlaybackPosition
kStatus GoSensor_PlaybackPosition(GoSensor sensor, kSize *position, kSize *count)
Gets the current replay frame position.
GoSensor::GoSensor_HasBuddy
kBool GoSensor_HasBuddy(GoSensor sensor)
Reports whether a buddy had been assigned.
GoSensor::GoSensor_RemoteInfoCount
kSize GoSensor_RemoteInfoCount(GoSensor sensor)
Gets the count of remote sensor information held by the sensor.
GoSensor::GoSensor_ProtocolVersion
kVersion GoSensor_ProtocolVersion(GoSensor sensor)
Gets the sensor's protocol version.
GoSensor::GoSensor_Family
GoFamily GoSensor_Family(GoSensor sensor)
Returns an enumerator value representing the current sensor's family.
GoSensor::GoSensor_EnableAutoStart
kStatus GoSensor_EnableAutoStart(GoSensor sensor, kBool enable)
Sets the AutoStart enabled state of the sensor.
GoSensor::GoSensor_ExportBitmap
kStatus GoSensor_ExportBitmap(GoSensor sensor, GoReplayExportSourceType type, GoDataSource source, const kChar *dstFileName)
Exports the current frame of a replay in the form of a bitmap.
GoSensor::GoSensor_ExportCsv
kStatus GoSensor_ExportCsv(GoSensor sensor, const kChar *dstFileName)
Exports replay data in CSV format.
GoSensor::GoSensor_LogIn
kStatus GoSensor_LogIn(GoSensor sensor, GoUser user, const kChar *password)
Logs into the sensor using the specified user name and password.
GoSensor::GoSensor_ClearLog
kStatus GoSensor_ClearLog(GoSensor sensor)
Clears the log file (_live.log).
GoSensor::GoSensor_Model
kStatus GoSensor_Model(GoSensor sensor, kChar *model, kSize capacity)
Gets the model number associated with this sensor.
GoSensor::GoSensor_EnableData
kStatus GoSensor_EnableData(GoSensor sensor, kBool enable)
Enables or disables the sensor's data channel.
GoSensor::GoSensor_Encoder
kStatus GoSensor_Encoder(GoSensor sensor, k64s *encoder)
Gets the current encoder count.
GoSensor::GoSensor_Cancel
kStatus GoSensor_Cancel(GoSensor sensor)
Aborts ongoing sensor communication.
GoSensor::GoSensor_DefaultJob
kStatus GoSensor_DefaultJob(GoSensor sensor, kChar *fileName, kSize capacity)
Gets the name of the default job file to be loaded on boot.
GoSetup
Represents a device configuration.
Definition: GoSetup.h:17
GoSensor::GoSensor_BuddyId
k32u GoSensor_BuddyId(GoSensor sensor)
Gets the buddy sensor's device ID.
GoSensor
Represents a Gocator sensor.
Definition: GoSensor.h:21
GoSensor::GoSensor_RestoreDefaults
kStatus GoSensor_RestoreDefaults(GoSensor sensor, kBool restoreAddress)
Restores factory default settings.
GoSensor::GoSensor_Timestamp
kStatus GoSensor_Timestamp(GoSensor sensor, k64u *time)
Gets the current time stamp (common among all synchronized sensors).
GoSensor::GoSensor_LoadedJob
kStatus GoSensor_LoadedJob(GoSensor sensor, kChar *fileName, kSize capacity, kBool *changed)
Gets the name of the loaded job file and whether it has been modified since loading.
GoAddressInfo
Sensor network address settings.
Definition: GoSdkDef.h:568
GoSensor::GoSensor_PlaybackStep
kStatus GoSensor_PlaybackStep(GoSensor sensor, GoSeekDirection direction)
Advances one frame from the current replay position.
GoState
Represents the current state of a sensor object.