Gocator API

- Home
- Categories
- Types
- Files

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