Gocator API

- Home
- Types
- Files

All Classes Files Functions Variables Typedefs Macros Modules Pages
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) 2015 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 kBeginHeader()
16
17 /**
18 * @struct GoHealthIndicatorId
19 * @ingroup GoSdk-HealthChannel
20 * @brief Represents a health indicator ID.
21 *
22 * The following enumerators are defined:
23 * - #GO_HEALTH_ENCODER_VALUE
24 * - #GO_HEALTH_ENCODER_FREQUENCY
25 * - #GO_HEALTH_FIRMWARE_VERSION
26 * - #GO_HEALTH_FIRESYNC_VERSION
27 * - #GO_HEALTH_UPTIME
28 * - #GO_HEALTH_TEMPERATURE
29 * - #GO_HEALTH_PROJECTOR_TEMPERATURE
30 * - #GO_HEALTH_LASER_TEMPERATURE
31 * - #GO_HEALTH_LASER_OVERHEAT
32 * - #GO_HEALTH_LASER_OVERHEAT_DURATION
33 * - #GO_HEALTH_MEMORY_USED
34 * - #GO_HEALTH_MEMORY_CAPACITY
35 * - #GO_HEALTH_STORAGE_USED
36 * - #GO_HEALTH_STORAGE_CAPACITY
37 * - #GO_HEALTH_CPU_USED
38 * - #GO_HEALTH_SYNC_SOURCE
39 * - #GO_HEALTH_NET_OUT_USED
40 * - #GO_HEALTH_NET_OUT_RATE
41 * - #GO_HEALTH_NET_OUT_CAPACITY
42 * - #GO_HEALTH_NET_OUT_LINK_STATUS
43 * - #GO_HEALTH_DIGITAL_INPUTS
44 * - #GO_HEALTH_CAMERA_SEARCH_COUNT
45 * - #GO_HEALTH_STATE
46 * - #GO_HEALTH_SPEED
47 * - #GO_HEALTH_MAXSPEED
48 * - #GO_HEALTH_SPOT_COUNT
49 * - #GO_HEALTH_MAX_SPOT_COUNT
50 * - #GO_HEALTH_SCAN_COUNT
51 * - #GO_HEALTH_PLAYBACK_POSITION
52 * - #GO_HEALTH_PLAYBACK_COUNT
53 * - #GO_HEALTH_DIGITAL_OUTPUT_HIGH_COUNT
54 * - #GO_HEALTH_DIGITAL_OUTPUT_LOW_COUNT
55 * - #GO_HEALTH_PROCESSING_LATENCY_LAST
56 * - #GO_HEALTH_PROCESSING_LATENCY_MAX
57 * - #GO_HEALTH_PROCESSING_DROPS
58 * - #GO_HEALTH_TRIGGER_DROPS
59 * - #GO_HEALTH_OUTPUT_DROPS
60 * - #GO_HEALTH_ANALOG_DROPS
61 * - #GO_HEALTH_DIGITAL_DROPS
62 * - #GO_HEALTH_SERIAL_DROPS
63 * - #GO_HEALTH_ETHERNET_DROPS
64 * - #GO_HEALTH_RANGE_VALID_COUNT
65 * - #GO_HEALTH_RANGE_INVALID_COUNT
66 * - #GO_HEALTH_ANCHOR_INVALID_COUNT
67 * - #GO_HEALTH_MEASUREMENT
68 * - #GO_HEALTH_MEASUREMENT_PASS
69 * - #GO_HEALTH_MEASUREMENT_FAIL
70 * - #GO_HEALTH_MEASUREMENT_MIN
71 * - #GO_HEALTH_MEASUREMENT_MAX
72 * - #GO_HEALTH_MEASUREMENT_AVERAGE
73 * - #GO_HEALTH_MEASUREMENT_STDEV
74 * - #GO_HEALTH_MEASUREMENT_INVALID_COUNT
75 * - #GO_HEALTH_MEASUREMENT_OVERFLOW_COUNT
76 */
77 typedef k32s GoHealthIndicatorId;
78 /** @name GoHealthIndicatorId
79 *@{*/
80 #define GO_HEALTH_ENCODER_VALUE (1003) ///< Current system encoder tick.
81 #define GO_HEALTH_ENCODER_FREQUENCY (1005) ///< Current system encoder frequency (ticks/s).
82
83 #define GO_HEALTH_FIRMWARE_VERSION (2000) ///< Firmware application version.
84 #define GO_HEALTH_FIRESYNC_VERSION (20600) ///< FireSync version
85
86 #define GO_HEALTH_UPTIME (2017) ///< Time elapsed since boot-up or reset (seconds).
87
88 #define GO_HEALTH_TEMPERATURE (2002) ///< Internal temperature (degrees Celsius).
89 #define GO_HEALTH_PROJECTOR_TEMPERATURE (2404) ///< Projector temperature (degrees Celsius).
90 #define GO_HEALTH_LASER_TEMPERATURE (2028) ///< Laser temperature (degrees Celsius). Available only on 3B-class devices.
91 #define GO_HEALTH_LASER_OVERHEAT (20020) ///< Indicates whether the laser is overheating.
92 #define GO_HEALTH_LASER_OVERHEAT_DURATION (20021) ///< Indicates how long the laser has been overheating if it is overheating.
93
94 #define GO_HEALTH_MEMORY_USED (2003) ///< Amount of memory currently used (bytes).
95 #define GO_HEALTH_MEMORY_CAPACITY (2004) ///< Total amount of memory available (bytes).
96 #define GO_HEALTH_STORAGE_USED (2005) ///< Amount of non-volatile storage used (bytes).
97 #define GO_HEALTH_STORAGE_CAPACITY (2006) ///< Total amount of non-volatile storage available (bytes).
98 #define GO_HEALTH_CPU_USED (2007) ///< CPU usage (percentage of maximum).
99
100 #define GO_HEALTH_SYNC_SOURCE (2043) ///< Sensor synchronization source. (1 - Master, 2 - Device/Gocator)
101 #define GO_HEALTH_NET_OUT_USED (21003) ///< Current outbound network count (bytes).
102 #define GO_HEALTH_NET_OUT_RATE (21004) ///< Current outbound network throughput (bytes/second).
103 #define GO_HEALTH_NET_OUT_CAPACITY (2009) ///< Total available outbound network throughput (bytes/s).
104 #define GO_HEALTH_NET_OUT_LINK_STATUS (2034) ///< The ethernet output's current network link status
105
106 #define GO_HEALTH_DIGITAL_INPUTS (2024) ///< Current digital input status (one bit per input).
107 #define GO_HEALTH_CAMERA_SEARCH_COUNT (2217) ///< Number of search states.
108
109 #define GO_HEALTH_STATE (20000) ///< Current system state.
110 #define GO_HEALTH_SPEED (20001) ///< Current speed (Hz).
111 #define GO_HEALTH_MAXSPEED (20002) ///< Maximum speed (Hz).
112 #define GO_HEALTH_SPOT_COUNT (20003) ///< Number of found spots in the last profile
113 #define GO_HEALTH_MAX_SPOT_COUNT (20004) ///< Maximum number of spots that can be found
114 #define GO_HEALTH_SCAN_COUNT (20005) ///< The number of scanned profiles or surfaces.
115
116 #define GO_HEALTH_PLAYBACK_POSITION (20023) ///< Indicates the current replay playback index.
117 #define GO_HEALTH_PLAYBACK_COUNT (20024) ///< Indicates the number of frames present in the current replay.
118
119 #define GO_HEALTH_DIGITAL_OUTPUT_HIGH_COUNT (21006) ///< The number scans with high digital output pulses.
120 #define GO_HEALTH_DIGITAL_OUTPUT_LOW_COUNT (21007) ///< The number scans with no digital output pulse.
121
122 #define GO_HEALTH_PROCESSING_LATENCY_LAST (21001) ///< Last reported processing latency value (in uS).
123 #define GO_HEALTH_PROCESSING_LATENCY_MAX (21002) ///< Maximum reported processing latency.
124 #define GO_HEALTH_PROCESSING_DROPS (21000) ///< Current number of processing drops.
125 #define GO_HEALTH_TRIGGER_DROPS (21010) ///< Current number of trigger drops.
126 #define GO_HEALTH_OUTPUT_DROPS (21011) ///< Current number of output drops. Sum of all output drops.
127
128 #define GO_HEALTH_ANALOG_DROPS (2501) ///< Current number of analog output drops.
129 #define GO_HEALTH_DIGITAL_DROPS (2601) ///< Current number of digital output drops.
130 #define GO_HEALTH_SERIAL_DROPS (2701) ///< Current number of serial output drops.
131 #define GO_HEALTH_ETHERNET_DROPS (21005) ///< Current number of ethernet output drops.
132
133 #define GO_HEALTH_RANGE_VALID_COUNT (21100) ///< Current number of frames with valid range data.
134 #define GO_HEALTH_RANGE_INVALID_COUNT (21101) ///< Current number of frames with invalid range data.
135 #define GO_HEALTH_ANCHOR_INVALID_COUNT (21200) ///< Number of frames with anchor invalid.
136
137 #define GO_HEALTH_ENCODER_Z_INDEX_PULSE_DROPS (22000) ///< Encoder z-index pulse drops
138
139 #define GO_HEALTH_MEASUREMENT (30000) ///< Measurement value.
140 #define GO_HEALTH_MEASUREMENT_PASS (30001) ///< Number of pass decisions.
141 #define GO_HEALTH_MEASUREMENT_FAIL (30002) ///< Number of fail decisions.
142 #define GO_HEALTH_MEASUREMENT_MIN (30003) ///< Minimum measurement value.
143 #define GO_HEALTH_MEASUREMENT_MAX (30004) ///< Maximum measurement value.
144 #define GO_HEALTH_MEASUREMENT_AVERAGE (30005) ///< Average measurement value.
145 #define GO_HEALTH_MEASUREMENT_STDEV (30006) ///< Measurement value standard deviation.
146 #define GO_HEALTH_MEASUREMENT_INVALID_COUNT (30007) ///< Number of invalid values.
147 #define GO_HEALTH_MEASUREMENT_OVERFLOW_COUNT (30008) ///< Number of values which exceed the numerical limit of an output protocol's measurement value field.
148 /**@}*/
149
150
151 /**
152 * @struct GoIndicator
153 * @extends kValue
154 * @ingroup GoSdk-HealthChannel
155 * @brief Represents health indicator.
156 */
157 typedef struct GoIndicator
158 {
159 k32u id; ///< Indicator ID (e.g. GO_HEALTH_CPU_USED)
160 k32u instance; ///< Indicator instance number.
161 k64s value; ///< Indicator value.
162 } GoIndicator;
163
164 /**
165 * @class GoHealthMsg
166 * @extends kObject
167 * @ingroup GoSdk-HealthChannel
168 * @brief Represents health information from a single sensor.
169 */
170 typedef kObject GoHealthMsg;
171
172 /**
173 * Gets the health source.
174 *
175 * @public @memberof GoHealthMsg
176 * @version Introduced in firmware 4.0.10.27
177 * @param msg Message object.
178 * @return Health source.
179 */
180 GoFx(GoDataSource) GoHealthMsg_Source(GoHealthMsg msg);
181
182 /**
183 * Count of health indicators in this message.
184 *
185 * @public @memberof GoHealthMsg
186 * @version Introduced in firmware 4.0.10.27
187 * @param msg Message object.
188 * @return Count of indicators.
189 */
190 GoFx(kSize) GoHealthMsg_Count(GoHealthMsg msg);
191
192 /**
193 * Gets the health indicator at the specified index.
194 *
195 * @public @memberof GoHealthMsg
196 * @version Introduced in firmware 4.0.10.27
197 * @param msg Message object.
198 * @param index Indicator index.
199 * @return Indicator pointer.
200 */
201 GoFx(GoIndicator*) GoHealthMsg_At(GoHealthMsg msg, kSize index);
202
203 /**
204 * Finds the health indicator with the matching ID. Returns kNULL if not found.
205 *
206 * @public @memberof GoHealthMsg
207 * @version Introduced in firmware 4.0.10.27
208 * @param msg Message object.
209 * @param id Indicator index.
210 * @param instance Indicator instance.
211 * @return Indicator pointer.
212 */
213 GoFx(GoIndicator*) GoHealthMsg_Find(GoHealthMsg msg, k32u id, k32u instance);
214
215 kEndHeader()
216 #include <GoSdk/Messages/GoHealth.x.h>
217
218 #endif
k32u
GoHealthMsg::GoHealthMsg_Count
kSize GoHealthMsg_Count(GoHealthMsg msg)
Count of health indicators in this message.
GoHealthMsg
Represents health information from a single sensor.
kSize
GoIndicator
Represents health indicator.
Definition: GoHealth.h:157
GoDataSource
Represents a data source.
GoSdkDef.h
Essential SDK declarations.
GoHealthMsg::GoHealthMsg_Find
GoIndicator * GoHealthMsg_Find(GoHealthMsg msg, k32u id, k32u instance)
Finds the health indicator with the matching ID.
k32s
kSerializer.h
GoHealthMsg::GoHealthMsg_Source
GoDataSource GoHealthMsg_Source(GoHealthMsg msg)
Gets the health source.
GoHealthIndicatorId
Represents a health indicator ID.
k64s
GoIndicator::id
k32u id
Indicator ID (e.g. GO_HEALTH_CPU_USED)
Definition: GoHealth.h:159
GoHealthMsg::GoHealthMsg_At
GoIndicator * GoHealthMsg_At(GoHealthMsg msg, kSize index)
Gets the health indicator at the specified index.
GoIndicator::instance
k32u instance
Indicator instance number.
Definition: GoHealth.h:160
kObject
GoIndicator::value
k64s value
Indicator value.
Definition: GoHealth.h:161