Gocator API
GoHealth.h
Go to the documentation of this file.
1 /**
2  * @file GoHealth.h
3  * @brief Declares the GoHealthMsg class and related types.
4  *
5  * @internal
6  * Copyright (C) 2016-2025 by LMI Technologies Inc.
7  * Licensed under the MIT License.
8  * Redistributed files must retain the above copyright notice.
9  */
10 #ifndef GO_SDK_HEALTH_H
11 #define GO_SDK_HEALTH_H
12 
13 #include <GoSdk/GoSdkDef.h>
14 #include <kApi/Io/kSerializer.h>
15 
16 /**
17  * @struct GoHealthIndicatorId
18  * @ingroup GoSdk-HealthChannel
19  * @brief Represents a health indicator ID.
20  *
21  * The following enumerators are defined:
22  * - #GO_HEALTH_ENCODER_VALUE
23  * - #GO_HEALTH_ENCODER_FREQUENCY
24  * - #GO_HEALTH_LASER_SAFETY
25  * - #GO_HEALTH_FIRMWARE_VERSION
26  * - #GO_HEALTH_FIRESYNC_VERSION
27  * - #GO_HEALTH_UPTIME
28  * - #GO_HEALTH_TEMPERATURE
29  * - #GO_HEALTH_TEMPERATURE_EXTENDED
30  * - #GO_HEALTH_PROJECTOR_TEMPERATURE
31  * - #GO_HEALTH_LASER_TEMPERATURE
32  * - #GO_HEALTH_LASER_OVERHEAT
33  * - #GO_HEALTH_LASER_OVERHEAT_DURATION
34  * - #GO_HEALTH_OVERHEAT
35  * - #GO_HEALTH_OVERHEAT_DURATION
36  * - #GO_HEALTH_CPU_TEMPERATURE
37  * - #GO_HEALTH_CAMERA_0_TEMPERATURE
38  * - #GO_HEALTH_CAMERA_1_TEMPERATURE
39  * - #GO_HEALTH_LASER_DRIVER_TEMPERATURE
40  * - #GO_HEALTH_LASER_DRIVER_ERROR
41  * - #GO_HEALTH_MEMORY_USED
42  * - #GO_HEALTH_MEMORY_CAPACITY
43  * - #GO_HEALTH_STORAGE_USED
44  * - #GO_HEALTH_STORAGE_CAPACITY
45  * - #GO_HEALTH_CPU_USED
46  * - #GO_HEALTH_SYNC_SOURCE
47  * - #GO_HEALTH_NET_OUT_USED
48  * - #GO_HEALTH_NET_OUT_RATE
49  * - #GO_HEALTH_NET_OUT_CAPACITY
50  * - #GO_HEALTH_NET_OUT_LINK_STATUS
51  * - #GO_HEALTH_DIGITAL_INPUTS
52  * - #GO_HEALTH_EVENT_COUNTS
53  * - #GO_HEALTH_CAMERA_SEARCH_COUNT
54  * - #GO_HEALTH_CAMERA_TRIGGER_DROPS
55  * - #GO_HEALTH_CUDA_STATUS
56  * - #GO_HEALTH_STATE
57  * - #GO_HEALTH_SPEED
58  * - #GO_HEALTH_MAXSPEED
59  * - #GO_HEALTH_SPOT_COUNT
60  * - #GO_HEALTH_MAX_SPOT_COUNT
61  * - #GO_HEALTH_SCAN_COUNT
62  * - #GO_HEALTH_VALID_POINT_COUNT
63  * - #GO_HEALTH_MAX_POINT_COUNT
64  * - #GO_HEALTH_MASTER_STATUS
65  * - #GO_HEALTH_CAST_START_STATE
66  * - #GO_HEALTH_ALIGNMENT_STATE
67  * - #GO_HEALTH_PLAYBACK_POSITION
68  * - #GO_HEALTH_PLAYBACK_COUNT
69  * - #GO_HEALTH_DIGITAL_OUTPUT_HIGH_COUNT
70  * - #GO_HEALTH_DIGITAL_OUTPUT_LOW_COUNT
71  * - #GO_HEALTH_PROCESSING_LATENCY_LAST
72  * - #GO_HEALTH_PROCESSING_LATENCY_MAX
73  * - #GO_HEALTH_PROCESSING_DROPS
74  * - #GO_HEALTH_TRIGGER_DROPS
75  * - #GO_HEALTH_OUTPUT_DROPS
76  * - #GO_HEALTH_ANALOG_DROPS
77  * - #GO_HEALTH_DIGITAL_DROPS
78  * - #GO_HEALTH_SERIAL_DROPS
79  * - #GO_HEALTH_CONTROLLED_TRIGGER_DROPS
80  * - #GO_HEALTH_SURFACE_PROCESSING_TIME
81  * - #GO_HEALTH_MAX_FRAME_RATE
82  * - #GO_HEALTH_ETHERNET_DROPS
83  * - #GO_HEALTH_RANGE_VALID_COUNT
84  * - #GO_HEALTH_RANGE_INVALID_COUNT
85  * - #GO_HEALTH_ANCHOR_INVALID_COUNT
86  * - #GO_HEALTH_LIGHT_OPERATIONAL_TIME_TOTAL
87  * - #GO_HEALTH_FIRST_LOG_ID
88  * - #GO_HEALTH_LAST_LOG_ID
89  * - #GO_HEALTH_ENCODER_Z_INDEX_PULSE_DROPS
90  * - #GO_HEALTH_TOOL_RUN_TIME
91  * - #GO_HEALTH_PART_TOTAL_EMITTED
92  * - #GO_HEALTH_PART_LENGTH_LIMIT
93  * - #GO_HEALTH_PART_MIN_AREA_DROPS
94  * - #GO_HEALTH_PART_BACKTRACK_DROPS
95  * - #GO_HEALTH_PART_CURRENTLY_ACTIVE
96  * - #GO_HEALTH_PART_LENGTH
97  * - #GO_HEALTH_PART_START_Y
98  * - #GO_HEALTH_PART_TRACKING_STATE
99  * - #GO_HEALTH_PART_CAPACITY_EXCEEDED
100  * - #GO_HEALTH_PART_X_POSITION
101  * - #GO_HEALTH_TOOL_RUN_TIME_MIN
102  * - #GO_HEALTH_TOOL_RUN_TIME_MAX
103  * - #GO_HEALTH_TOOL_RUN_TIME_AVERAGE
104  * - #GO_HEALTH_TOOL_RUN_TIME_PERCENT
105  * - #GO_HEALTH_MEASUREMENT
106  * - #GO_HEALTH_MEASUREMENT_PASS
107  * - #GO_HEALTH_MEASUREMENT_FAIL
108  * - #GO_HEALTH_MEASUREMENT_MIN
109  * - #GO_HEALTH_MEASUREMENT_MAX
110  * - #GO_HEALTH_MEASUREMENT_AVERAGE
111  * - #GO_HEALTH_MEASUREMENT_STDEV
112  * - #GO_HEALTH_MEASUREMENT_INVALID_COUNT
113  * - #GO_HEALTH_MEASUREMENT_OVERFLOW_COUNT
114  */
115 typedef k32s GoHealthIndicatorId;
116 /** @name GoHealthIndicatorId
117  *@{*/
118 #define GO_HEALTH_ENCODER_VALUE (1003) ///< Current system encoder tick.
119 #define GO_HEALTH_ENCODER_FREQUENCY (1005) ///< Current system encoder frequency (ticks/s).
120 #define GO_HEALTH_LASER_SAFETY (1010) ///< Laser safety status.
121 
122 #define GO_HEALTH_FIRMWARE_VERSION (2000) ///< Firmware application version.
123 #define GO_HEALTH_FIRESYNC_VERSION (20600) ///< FireSync version
124 
125 #define GO_HEALTH_UPTIME (2017) ///< Time elapsed since boot-up or reset (seconds).
126 
127 #define GO_HEALTH_TEMPERATURE (2002) ///< Internal temperature (degrees Celsius).
128 #define GO_HEALTH_TEMPERATURE_EXTENDED (20009) ///< Internal temperature extended (supports multiple devices, degrees Celsius).
129 #define GO_HEALTH_PROJECTOR_TEMPERATURE (2404) ///< Projector temperature (degrees Celsius).
130 #define GO_HEALTH_LASER_TEMPERATURE (2028) ///< Laser temperature (degrees Celsius). Available only on 3B-class devices.
131 #define GO_HEALTH_LASER_OVERHEAT (20020) ///< Indicates whether the laser is overheating. (DEPRECATED)
132 #define GO_HEALTH_LASER_OVERHEAT_DURATION (20021) ///< Indicates how long the laser has been overheating if it is overheating. (DEPRECATED)
133 #define GO_HEALTH_OVERHEAT (20020) ///< Indicates whether the sensor is overheating.
134 #define GO_HEALTH_OVERHEAT_DURATION (20021) ///< Indicates how long the sensor has been overheating if it is overheating.
135 
136 #define GO_HEALTH_CPU_TEMPERATURE (20011) ///< CPU temperature (degrees Celsius).
137 #define GO_HEALTH_CAMERA_0_TEMPERATURE (20012) ///< Camera 0 temperature (degrees Celsius).
138 #define GO_HEALTH_CAMERA_1_TEMPERATURE (20013) ///< Camera 1 temperature (degrees Celsius).
139 #define GO_HEALTH_LASER_DRIVER_TEMPERATURE (20014) ///< Laser driver temperature (degrees Celsius).
140 #define GO_HEALTH_LASER_DRIVER_ERROR (20018) ///< Laser driver error indicating whether there are errors with laser driver. Only applicable to LD16/18
141 
142 #define GO_HEALTH_MEMORY_USED (2003) ///< Amount of memory currently used (bytes).
143 #define GO_HEALTH_MEMORY_CAPACITY (2004) ///< Total amount of memory available (bytes).
144 #define GO_HEALTH_STORAGE_USED (2005) ///< Amount of non-volatile storage used (bytes).
145 #define GO_HEALTH_STORAGE_CAPACITY (2006) ///< Total amount of non-volatile storage available (bytes).
146 #define GO_HEALTH_CPU_USED (2007) ///< CPU usage (percentage of maximum).
147 
148 #define GO_HEALTH_SYNC_SOURCE (2043) ///< Sensor synchronization source. (1 - Master, 2 - Device/Gocator)
149 #define GO_HEALTH_NET_OUT_USED (21003) ///< Current outbound network count (bytes).
150 #define GO_HEALTH_NET_OUT_RATE (21004) ///< Current outbound network throughput (bytes/second).
151 #define GO_HEALTH_NET_OUT_CAPACITY (2009) ///< Total available outbound network throughput (bytes/s).
152 #define GO_HEALTH_NET_OUT_LINK_STATUS (2034) ///< The ethernet output's current network link status
153 
154 #define GO_HEALTH_DIGITAL_INPUTS (2024) ///< Current digital input status (one bit per input).
155 #define GO_HEALTH_EVENT_COUNTS (2102) ///< Total number of events triggered.
156 #define GO_HEALTH_CAMERA_SEARCH_COUNT (2217) ///< Number of search states.
157 #define GO_HEALTH_CAMERA_TRIGGER_DROPS (2201) ///< Number of dropped triggers.
158 
159 #define GO_HEALTH_CUDA_STATUS (3007) ///< Status of CUDA/GPU support on the sensor (accelerated and non-accelerated) platform.
160 
161 #define GO_HEALTH_BATTERY_REMAINING_CHARGE (3104) ///< Percentage charge remaining for the battery.
162 #define GO_HEALTH_BATTERY_OPERATING_TIME (3105) ///< Remaining operating time for battery in hours.
163 #define GO_HEALTH_BATTERY_STATE_OF_HEALTH (3106) ///< How much charge can the battery hold relative to when it was brand new, as a percentage.
164 #define GO_HEALTH_BATTERY_ALARM_STATUS (3107) ///< Represents battery-related alarm status.
165 
166 #define GO_HEALTH_STATE (20000) ///< Current system state.
167 #define GO_HEALTH_SPEED (20001) ///< Current speed (Hz).
168 #define GO_HEALTH_MAXSPEED (20002) ///< Maximum speed (Hz).
169 #define GO_HEALTH_SPOT_COUNT (20003) ///< Number of found spots in the last raw/unresampled profile/surface
170 #define GO_HEALTH_MAX_SPOT_COUNT (20004) ///< Maximum number of spots that can be found
171 #define GO_HEALTH_SCAN_COUNT (20005) ///< The number of scanned profiles or surfaces.
172 #define GO_HEALTH_VALID_POINT_COUNT (20015) ///< The number of found points in the last resampled profile/surface
173 #define GO_HEALTH_MAX_POINT_COUNT (20016) ///< Maximum number of points that can be found
174 
175 #define GO_HEALTH_MASTER_STATUS (20006) ///< Master connection status: 0=not connected, 1=connected
176 #define GO_HEALTH_CAST_START_STATE (20007) ///< The state of the second digital input.
177 #define GO_HEALTH_ALIGNMENT_STATE (20008) ///< The state of the sensor alignment.
178 
179 #define GO_HEALTH_PLAYBACK_POSITION (20023) ///< Indicates the current replay playback index.
180 #define GO_HEALTH_PLAYBACK_COUNT (20024) ///< Indicates the number of frames present in the current replay.
181 
182 #define GO_HEALTH_DIGITAL_OUTPUT_HIGH_COUNT (21006) ///< The number scans with high digital output pulses.
183 #define GO_HEALTH_DIGITAL_OUTPUT_LOW_COUNT (21007) ///< The number scans with no digital output pulse.
184 
185 #define GO_HEALTH_PROCESSING_LATENCY_LAST (21001) ///< Last reported processing latency value (in uS).
186 #define GO_HEALTH_PROCESSING_LATENCY_MAX (21002) ///< Maximum reported processing latency.
187 #define GO_HEALTH_PROCESSING_DROPS (21000) ///< Current number of processing drops.
188 #define GO_HEALTH_TRIGGER_DROPS (21010) ///< Current number of trigger drops.
189 #define GO_HEALTH_OUTPUT_DROPS (21011) ///< Current number of output drops. Sum of all output drops.
190 
191 #define GO_HEALTH_ANALOG_DROPS (21014) ///< Current number of analog output drops. Replaces GO_HEALTH_ANALOG_DROPS.
192 #define GO_HEALTH_DIGITAL_DROPS (21015) ///< Current number of digital output drops. Replaces GO_HEALTH_DIGITAL_DROPS.
193 #define GO_HEALTH_SERIAL_DROPS (21016) ///< Current number of serial output drops. Replaces GO_HEALTH_SERIAL_DROPS.
194 #define GO_HEALTH_CONTROLLED_TRIGGER_DROPS (21017) ///< Trigger drops from the Controlled Triggering System.
195 #define GO_HEALTH_SURFACE_PROCESSING_TIME (21018) ///< Processing time of frame on 35XX/32XX (microseconds).
196 #define GO_HEALTH_MAX_FRAME_RATE (21019) ///< Max configurable frame rate (scaled by 0.000001).
197 #define GO_HEALTH_ETHERNET_DROPS (21005) ///< Current number of ethernet output drops.
198 
199 #define GO_HEALTH_RANGE_VALID_COUNT (21100) ///< Current number of frames with valid range data.
200 #define GO_HEALTH_RANGE_INVALID_COUNT (21101) ///< Current number of frames with invalid range data.
201 #define GO_HEALTH_ANCHOR_INVALID_COUNT (21200) ///< Number of frames with anchor invalid.
202 #define GO_HEALTH_LIGHT_OPERATIONAL_TIME_TOTAL (21201) ///< For G2 laser on time or G3 projector on time.
203 
204 #define GO_HEALTH_FIRST_LOG_ID (21301) ///< ID of first available log entry
205 #define GO_HEALTH_LAST_LOG_ID (21300) ///< ID of last available log entry
206 
207 #define GO_HEALTH_ENCODER_Z_INDEX_PULSE_DROPS (22000) ///< Encoder z-index pulse drops
208 
209 #define GO_HEALTH_TOOL_RUN_TIME (22004) ///< Most recent time taken to execute the tool
210 #define GO_HEALTH_PART_TOTAL_EMITTED (22006) ///< Total number of parts emitted
211 #define GO_HEALTH_PART_LENGTH_LIMIT (22007) ///< Number of parts emitted based on length limit
212 #define GO_HEALTH_PART_MIN_AREA_DROPS (22008) ///< Number of parts dropped
213 #define GO_HEALTH_PART_BACKTRACK_DROPS (22009) ///< Number of parts dropped due to backtracking
214 #define GO_HEALTH_PART_CURRENTLY_ACTIVE (22010) ///< Number of parts currently being tracked
215 #define GO_HEALTH_PART_LENGTH (22011) ///< Length of largest active part
216 #define GO_HEALTH_PART_START_Y (22012) ///< Start Y position of largest active part
217 #define GO_HEALTH_PART_TRACKING_STATE (22013) ///< Tracking state of largest active part
218 #define GO_HEALTH_PART_CAPACITY_EXCEEDED (22014) ///< Part detection capacity exceeded
219 #define GO_HEALTH_PART_X_POSITION (22015) ///< Center X position of largets active part
220 #define GO_HEALTH_TOOL_RUN_TIME_MIN (22016) ///< Minimum time for tool to process a sample
221 #define GO_HEALTH_TOOL_RUN_TIME_MAX (22017) ///< Maximum time for tool to process a sample
222 #define GO_HEALTH_TOOL_RUN_TIME_AVERAGE (22018) ///< Average time for tool to process a sample
223 #define GO_HEALTH_TOOL_RUN_TIME_PERCENT (22019) ///< Average percentage of total time running the tool
224 
225 #define GO_HEALTH_MEASUREMENT (30000) ///< Measurement value.
226 #define GO_HEALTH_MEASUREMENT_PASS (30001) ///< Number of pass decisions.
227 #define GO_HEALTH_MEASUREMENT_FAIL (30002) ///< Number of fail decisions.
228 #define GO_HEALTH_MEASUREMENT_MIN (30003) ///< Minimum measurement value.
229 #define GO_HEALTH_MEASUREMENT_MAX (30004) ///< Maximum measurement value.
230 #define GO_HEALTH_MEASUREMENT_AVERAGE (30005) ///< Average measurement value.
231 #define GO_HEALTH_MEASUREMENT_STDEV (30006) ///< Measurement value standard deviation.
232 #define GO_HEALTH_MEASUREMENT_INVALID_COUNT (30007) ///< Number of invalid values.
233 #define GO_HEALTH_MEASUREMENT_OVERFLOW_COUNT (30008) ///< Number of values which exceed the numerical limit of an output protocol's measurement value field.
234 
235 #define GO_PROFILE_SURFACE_MESSAGE_START (22021) ///< Surface generation started.
236 #define GO_PROFILE_SURFACE_MESSAGE_START_COUNT (22022) ///< Number of surface message start count.
237 #define GO_PROFILE_SURFACE_MESSAGE_COMPLETED_COUNT (22023) ///< Number of surface message completed count.
238 #define GO_PROFILE_SURFACE_NUMBER_OF_PROFILE_PER_ACTIVE_SURFACE (22024) ///< Number of profile per surface.
239 #define GO_PROFILE_SURFACE_NUMBER_OF_DISCARDED_SURFACE (22025) ///< Number of surface disacarded count.
240 #define GO_PROFILE_SURFACE_DIGITAL_INPUT_TRANSITIONS (22026) ///< Number of digital input received for surface generation.
241 /**@}*/
242 
243 
244 /**
245  * @struct GoIndicator
246  * @extends kValue
247  * @ingroup GoSdk-HealthChannel
248  * @brief Represents health indicator.
249  */
250 typedef struct GoIndicator
251 {
252  k32u id; ///< Indicator ID (e.g. GO_HEALTH_CPU_USED)
253  k32u instance; ///< Indicator instance number.
254  k64s value; ///< Indicator value.
255 } GoIndicator;
256 
257 /**
258  * @class GoHealthMsg
259  * @extends kObject
260  * @ingroup GoSdk-HealthChannel
261  * @brief Represents health information from a single sensor.
262  */
263 typedef kObject GoHealthMsg;
264 
265 /**
266  * Gets the health source.
267  *
268  * @public @memberof GoHealthMsg
269  * @version Introduced in firmware 4.0.10.27
270  * @param msg Message object.
271  * @return Health source.
272  */
274 
275 /**
276  * Count of health indicators in this message.
277  *
278  * @public @memberof GoHealthMsg
279  * @version Introduced in firmware 4.0.10.27
280  * @param msg Message object.
281  * @return Count of indicators.
282  */
284 
285 /**
286  * Gets the health indicator at the specified index.
287  *
288  * @public @memberof GoHealthMsg
289  * @version Introduced in firmware 4.0.10.27
290  * @param msg Message object.
291  * @param index Indicator index.
292  * @return Indicator pointer.
293  */
294 GoFx(GoIndicator*) GoHealthMsg_At(GoHealthMsg msg, kSize index);
295 
296 /**
297  * Finds the health indicator with the matching ID. Returns kNULL if not found.
298  *
299  * @public @memberof GoHealthMsg
300  * @version Introduced in firmware 4.0.10.27
301  * @param msg Message object.
302  * @param id Indicator index.
303  * @param instance Indicator instance.
304  * @return Indicator pointer.
305  */
306 GoFx(GoIndicator*) GoHealthMsg_Find(GoHealthMsg msg, k32u id, k32u instance);
307 
308 #include <GoSdk/Messages/GoHealth.x.h>
309 
310 #endif
kSize GoHealthMsg_Count(GoHealthMsg msg)
Count of health indicators in this message.
Represents health information from a single sensor.
Represents health indicator.
Definition: GoHealth.h:250
Represents a data source.
Essential SDK declarations.
GoIndicator * GoHealthMsg_Find(GoHealthMsg msg, k32u id, k32u instance)
Finds the health indicator with the matching ID.
GoDataSource GoHealthMsg_Source(GoHealthMsg msg)
Gets the health source.
Represents a health indicator ID.
k32u id
Indicator ID (e.g. GO_HEALTH_CPU_USED)
Definition: GoHealth.h:252
GoIndicator * GoHealthMsg_At(GoHealthMsg msg, kSize index)
Gets the health indicator at the specified index.
k32u instance
Indicator instance number.
Definition: GoHealth.h:253
k64s value
Indicator value.
Definition: GoHealth.h:254