Gocator API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
GoMeasurement.h
Go to the documentation of this file.
1 /**
2  * @file GoMeasurement.h
3  * @brief Declares the GoMeasurement class.
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_MEASUREMENT_H
11 #define GO_MEASUREMENT_H
12 
13 #include <GoSdk/GoSdkDef.h>
14 
15 kBeginHeader()
16 
17 /**
18  * @class GoMeasurement
19  * @extends kObject
20  * @ingroup GoSdk
21  * @brief Represents the base class for a tool measurement or script output.
22  */
23 typedef kObject GoMeasurement;
24 
25 
26 /**
27  * Returns whether or not the given measurement has a valid ID assigned to it.
28  *
29  * @public @memberof GoMeasurement
30  * @version Introduced in firmware 4.0.10.27
31  * @param measurement GoMeasurement object.
32  * @return kTRUE if there is an ID; kFALSE otherwise.
33  */
34 GoFx(kBool) GoMeasurement_HasId(GoMeasurement measurement);
35 
36 /**
37  * Clears the assigned ID for the given measurement.
38  *
39  * @public @memberof GoMeasurement
40  * @version Introduced in firmware 4.0.10.27
41  * @param measurement GoMeasurement object.
42  * @return Operation status.
43  */
44 GoFx(kStatus) GoMeasurement_ClearId(GoMeasurement measurement);
45 
46 /**
47  * Sets an ID number for the given measurement.
48  *
49  * @public @memberof GoMeasurement
50  * @version Introduced in firmware 4.0.10.27
51  * @param measurement GoMeasurement object.
52  * @param id The ID value to set for the measurement.
53  * @return Operation status.
54  */
55 GoFx(kStatus) GoMeasurement_SetId(GoMeasurement measurement, k32u id);
56 
57 /**
58  * Gets the ID for the given measurement.
59  *
60  * @public @memberof GoMeasurement
61  * @version Introduced in firmware 4.0.10.27
62  * @param measurement GoMeasurement object.
63  * @return The ID value if there is one assigned. Otherwise, -1 is returned.
64  */
65 GoFx(k32s) GoMeasurement_Id(GoMeasurement measurement);
66 
67 /**
68  * Gets the name for the given measurement.
69  *
70  * @public @memberof GoMeasurement
71  * @version Introduced in firmware 4.0.10.27
72  * @param measurement GoMeasurement object.
73  * @return A character array pointer for the measurement name.
74  */
75 GoFx(const kChar*) GoMeasurement_Name(GoMeasurement measurement);
76 
77 /**
78  * Sets the name for the given measurement.
79  *
80  * @public @memberof GoMeasurement
81  * @version Introduced in firmware 4.0.10.27
82  * @param measurement GoMeasurement object.
83  * @param name The name to assign to the measurement.
84  * @return Operation status.
85  */
86 GoFx(kStatus) GoMeasurement_SetName(GoMeasurement measurement, const kChar* name);
87 
88 /**
89  * Returns the source tool of the given measurement.
90  *
91  * @public @memberof GoMeasurement
92  * @version Introduced in firmware 4.0.10.27
93  * @param measurement GoMeasurement object.
94  * @return A pointer to the source tool for the measurement.
95  */
96 GoFx(kObject) GoMeasurement_SourceTool(GoMeasurement measurement);
97 
98 /**
99  * Enables the given measurement for output.
100  *
101  * @public @memberof GoMeasurement
102  * @version Introduced in firmware 4.0.10.27
103  * @param measurement GoMeasurement object.
104  * @param enable Set to kTRUE to enable the measurement, kFALSE to disable it.
105  * @return Operation status.
106  */
107 GoFx(kStatus) GoMeasurement_Enable(GoMeasurement measurement, kBool enable);
108 
109 /**
110  * Returns a boolean value representing whether the given measurement is enabled.
111  *
112  * @public @memberof GoMeasurement
113  * @version Introduced in firmware 4.0.10.27
114  * @param measurement GoMeasurement object.
115  * @return kTRUE if enabled; kFALSE otherwise.
116  */
117 GoFx(kBool) GoMeasurement_Enabled(GoMeasurement measurement);
118 
119 /**
120  * Sets the minimum decision value for the given measurement.
121  *
122  * @public @memberof GoMeasurement
123  * @version Introduced in firmware 4.0.10.27
124  * @param measurement GoMeasurement object.
125  * @param min The minimum decision value to set.
126  * @return Operation status.
127  */
128 GoFx(kStatus) GoMeasurement_SetDecisionMin(GoMeasurement measurement, k64f min);
129 
130 /**
131  * Gets the minimum decision value for the given measurement.
132  *
133  * @public @memberof GoMeasurement
134  * @version Introduced in firmware 4.0.10.27
135  * @param measurement GoMeasurement object.
136  * @return The minimum decision value.
137  */
138 GoFx(k64f) GoMeasurement_DecisionMin(GoMeasurement measurement);
139 
140 /**
141  * Sets the maximum decision value for the given measurement.
142  *
143  * @public @memberof GoMeasurement
144  * @version Introduced in firmware 4.0.10.27
145  * @param measurement GoMeasurement object.
146  * @param max The maximum decision value to set.
147  * @return Operation status.
148  */
149 GoFx(kStatus) GoMeasurement_SetDecisionMax(GoMeasurement measurement, k64f max);
150 
151 /**
152  * Gets the maximum decision value for the given measurement.
153  *
154  * @public @memberof GoMeasurement
155  * @version Introduced in firmware 4.0.10.27
156  * @param measurement GoMeasurement object.
157  * @return The maximum decision value.
158  */
159 GoFx(k64f) GoMeasurement_DecisionMax(GoMeasurement measurement);
160 
161 /**
162  * Sets measurement value hold for the given measurement.
163  *
164  * @public @memberof GoMeasurement
165  * @version Introduced in firmware 4.0.10.27
166  * @param measurement GoMeasurement object.
167  * @param enable kTRUE to enable measurement value hold, kFALSE to disable it.
168  * @return Operation status.
169  */
170 GoFx(kStatus) GoMeasurement_EnableHold(GoMeasurement measurement, kBool enable);
171 
172 /**
173  * Returns a boolean value representing the current state of measurement value hold.
174  *
175  * @public @memberof GoMeasurement
176  * @version Introduced in firmware 4.0.10.27
177  * @param measurement GoMeasurement object.
178  * @return kTRUE if enabled and kFALSE if disabled.
179  */
180 GoFx(kBool) GoMeasurement_HoldEnabled(GoMeasurement measurement);
181 
182 /**
183  * Sets measurement value smoothing for the given measurement.
184  *
185  * @public @memberof GoMeasurement
186  * @version Introduced in firmware 4.0.10.27
187  * @param measurement GoMeasurement object.
188  * @param enable kTRUE to enable measurement value smoothing, kFALSE to disable it.
189  * @return Operation status.
190  */
191 GoFx(kStatus) GoMeasurement_EnableSmoothing(GoMeasurement measurement, kBool enable);
192 
193 /**
194  * Returns a boolean value representing the current state of measurement value smoothing.
195  *
196  * @public @memberof GoMeasurement
197  * @version Introduced in firmware 4.0.10.27
198  * @param measurement GoMeasurement object.
199  * @return kTRUE if enabled and kFALSE if disabled.
200  */
201 GoFx(kBool) GoMeasurement_SmoothingEnabled(GoMeasurement measurement);
202 
203 /**
204  * Sets the measurement value smoothing window for the given measurement.
205  *
206  * @public @memberof GoMeasurement
207  * @version Introduced in firmware 4.0.10.27
208  * @param measurement GoMeasurement object.
209  * @param value The intended size of the smoothing window.
210  * @return Operation status.
211  */
212 GoFx(kStatus) GoMeasurement_SetSmoothingWindow(GoMeasurement measurement, k64s value);
213 
214 /**
215  * Returns the current measurement value smoothing window size.
216  *
217  * @public @memberof GoMeasurement
218  * @version Introduced in firmware 4.0.10.27
219  * @param measurement GoMeasurement object.
220  * @return Smoothing window size.
221  */
222 GoFx(k64s) GoMeasurement_SmoothingWindow(GoMeasurement measurement);
223 
224 /**
225  * Sets the measurement value scaling for the given measurement.
226  *
227  * @public @memberof GoMeasurement
228  * @version Introduced in firmware 4.0.10.27
229  * @param measurement GoMeasurement object.
230  * @param value The intended measurement value scaling factor.
231  * @return Operation status.
232  */
233 GoFx(kStatus) GoMeasurement_SetScale(GoMeasurement measurement, k64f value);
234 
235 /**
236  * Returns the current measurement value scaling factor.
237  *
238  * @public @memberof GoMeasurement
239  * @version Introduced in firmware 4.0.10.27
240  * @param measurement GoMeasurement object.
241  * @return The measurement value scaling factor.
242  */
243 GoFx(k64f) GoMeasurement_Scale(GoMeasurement measurement);
244 
245 /**
246  * Sets the measurement value offset for the given measurement.
247  *
248  * @public @memberof GoMeasurement
249  * @version Introduced in firmware 4.0.10.27
250  * @param measurement GoMeasurement object.
251  * @param value The measurement offset to set.
252  * @return Operation status.
253  */
254 GoFx(kStatus) GoMeasurement_SetOffset(GoMeasurement measurement, k64f value);
255 
256 /**
257  * Returns the measurement value offset.
258  *
259  * @public @memberof GoMeasurement
260  * @version Introduced in firmware 4.0.10.27
261  * @param measurement GoMeasurement object.
262  * @return Measurement value offset.
263  */
264 GoFx(k64f) GoMeasurement_Offset(GoMeasurement measurement);
265 
266 /**
267  * Gets the measurement type for the given measurement.
268  *
269  * @public @memberof GoMeasurement
270  * @version Introduced in firmware 4.0.10.27
271  * @param measurement GoMeasurement object.
272  * @return The measurement value type enumerator value.
273  */
274 GoFx(GoMeasurementType) GoMeasurement_Type(GoMeasurement measurement);
275 
276 kEndHeader()
277 #include <GoSdk/Tools/GoMeasurement.x.h>
278 
279 #endif
kStatus GoMeasurement_Enable(GoMeasurement measurement, kBool enable)
Enables the given measurement for output.
kStatus GoMeasurement_EnableHold(GoMeasurement measurement, kBool enable)
Sets measurement value hold for the given measurement.
Represents the base class for a tool measurement or script output.
kBool GoMeasurement_Enabled(GoMeasurement measurement)
Returns a boolean value representing whether the given measurement is enabled.
const kChar * GoMeasurement_Name(GoMeasurement measurement)
Gets the name for the given measurement.
kBool GoMeasurement_HoldEnabled(GoMeasurement measurement)
Returns a boolean value representing the current state of measurement value hold. ...
kStatus GoMeasurement_SetScale(GoMeasurement measurement, k64f value)
Sets the measurement value scaling for the given measurement.
k64s GoMeasurement_SmoothingWindow(GoMeasurement measurement)
Returns the current measurement value smoothing window size.
Lists all measurement types.
kStatus GoMeasurement_SetSmoothingWindow(GoMeasurement measurement, k64s value)
Sets the measurement value smoothing window for the given measurement.
kStatus GoMeasurement_EnableSmoothing(GoMeasurement measurement, kBool enable)
Sets measurement value smoothing for the given measurement.
k64f GoMeasurement_DecisionMin(GoMeasurement measurement)
Gets the minimum decision value for the given measurement.
kBool GoMeasurement_SmoothingEnabled(GoMeasurement measurement)
Returns a boolean value representing the current state of measurement value smoothing.
kStatus GoMeasurement_SetDecisionMax(GoMeasurement measurement, k64f max)
Sets the maximum decision value for the given measurement.
kStatus GoMeasurement_SetDecisionMin(GoMeasurement measurement, k64f min)
Sets the minimum decision value for the given measurement.
k32s GoMeasurement_Id(GoMeasurement measurement)
Gets the ID for the given measurement.
Essential SDK declarations.
k64f GoMeasurement_Offset(GoMeasurement measurement)
Returns the measurement value offset.
kStatus GoMeasurement_SetName(GoMeasurement measurement, const kChar *name)
Sets the name for the given measurement.
kBool GoMeasurement_HasId(GoMeasurement measurement)
Returns whether or not the given measurement has a valid ID assigned to it.
kObject GoMeasurement_SourceTool(GoMeasurement measurement)
Returns the source tool of the given measurement.
kStatus GoMeasurement_SetId(GoMeasurement measurement, k32u id)
Sets an ID number for the given measurement.
kStatus GoMeasurement_ClearId(GoMeasurement measurement)
Clears the assigned ID for the given measurement.
kStatus GoMeasurement_SetOffset(GoMeasurement measurement, k64f value)
Sets the measurement value offset for the given measurement.
k64f GoMeasurement_Scale(GoMeasurement measurement)
Returns the current measurement value scaling factor.
k64f GoMeasurement_DecisionMax(GoMeasurement measurement)
Gets the maximum decision value for the given measurement.
GoMeasurementType GoMeasurement_Type(GoMeasurement measurement)
Gets the measurement type for the given measurement.