Gocator API
GoTool.h
Go to the documentation of this file.
1 /**
2  * @file GoTool.h
3  * @brief Declares the base GoTool class.
4  *
5  * @internal
6  * Copyright (C) 2016-2019 by LMI Technologies Inc.
7  * Licensed under the MIT License.
8  * Redistributed files must retain the above copyright notice.
9  */
10 #ifndef GO_TOOL_H
11 #define GO_TOOL_H
12 
13 #include <GoSdk/GoSdkDef.h>
15 #include <GoSdk/Tools/GoFeatures.h>
16 #include <kApi/Data/kXml.h>
17 
18 /**
19  * @class GoTool
20  * @extends kObject
21  * @ingroup GoSdk-Tools
22  * @brief Represents the base tool class.
23  */
24 typedef kObject GoTool;
25 
26 /**
27  * Returns the measurement count.
28  *
29  * @public @memberof GoTool
30  * @version Introduced in firmware 4.0.10.27
31  * @param tool GoTool object.
32  * @return The measurement count.
33  */
35 
36 /**
37  * Retrieves the measurement at the given index.
38  *
39  * @public @memberof GoTool
40  * @version Introduced in firmware 4.0.10.27
41  * @param tool GoTool object.
42  * @param index The index of the measurement.
43  * @return The measurement at the given index or kNULL if an invalid index is provided.
44  */
46 
47 /**
48 * Returns the feature output count.
49 *
50 * @public @memberof GoTool
51 * @version Introduced in firmware 4.6.3.27
52 * @param tool GoTool object.
53 * @return The feature output count.
54 */
56 
57 /**
58 * Retrieves the feature output at the given index.
59 *
60 * @public @memberof GoTool
61 * @version Introduced in firmware 4.6.3.27
62 * @param tool GoTool object.
63 * @param index The index of the feature output.
64 * @return The feature output at the given index or kNULL if an invalid index is provided.
65 */
66 GoFx(GoFeature) GoTool_FeatureOutputAt(GoTool tool, kSize index);
67 
68 /**
69  * Sets the name of the tool.
70  *
71  * @public @memberof GoTool
72  * @version Introduced in firmware 4.0.10.27
73  * @param tool GoTool object.
74  * @param name The name to be set for the tool.
75  * @return Operation status.
76  */
77 GoFx(kStatus) GoTool_SetName(GoTool tool, const kChar* name);
78 
79 /**
80  * Retrieves the name of the tool.
81  *
82  * @public @memberof GoTool
83  * @version Introduced in firmware 4.0.10.27
84  * @param tool GoTool object.
85  * @param name Receives the name of the tool.
86  * @param capacity The maximum capacity of the name array.
87  * @return Operation status.
88  */
89 GoFx(kStatus) GoTool_Name(GoTool tool, kChar* name, kSize capacity);
90 
91 /**
92  * Retrieves the id of the instance of the tool.
93  *
94  * @public @memberof GoTool
95  * @version Introduced in firmware 5.1.1.28
96  * @param tool GoTool object.
97  * @return The instance id of the tool.
98  */
99 GoFx(k32s) GoTool_Id(GoTool tool);
100 
101 /**
102  * Retrieves the tool type enumeration value of the tool.
103  *
104  * @public @memberof GoTool
105  * @version Introduced in firmware 4.0.10.27
106  * @param tool GoTool object.
107  * @return The tool type enumeration value.
108  */
109 GoFx(GoToolType) GoTool_Type(GoTool tool);
110 
111 /**
112  * Retrieves the first found instance of a measurement for a given enumeration type.
113  *
114  * @public @memberof GoTool
115  * @version Introduced in firmware 4.0.10.27
116  * @param tool GoTool object.
117  * @param type A GoMeasurementType representing the measurement type to find in the given tool.
118  * @return A measurement object if one is found, otherwise kNULL.
119  */
121 
122 /**
123 * Retrieves the instance of a feature output for a given enumeration type.
124 *
125 * @public @memberof GoTool
126 * @version Introduced in firmware 4.6.3.27
127 * @param tool GoTool object.
128 * @param type A GoFeatureType representing the feature output type to find in the given tool.
129 * @return A feature object if one is found, otherwise kNULL. Returns the first found.
130 */
132 
133 /**
134 * Adds the given measurement to the tool set.
135 *
136 * @public @memberof GoTool
137 * @version Introduced in firmware 4.8.2.76
138 * @param tool GoTool object.
139 * @param type The type of the measurement.
140 * @param isFilterable Indicates whether the measurement can be toggled and filtered;
141 * @param measurement A pointer to hold a reference to the created measurement (can be null).
142 * @return Operation status.
143 */
144 GoFx(kStatus) GoTool_AddMeasurement(GoTool tool, kType type, kBool isFilterable, GoMeasurement* measurement);
145 
146 /**
147 * @deprecated Adds the given custom measurement to the tool set.
148 *
149 * @public @memberof GoTool
150 * @version Introduced in firmware 4.8.2.76
151 * @param tool GoTool object.
152 * @param type The type of the measurement.
153 * @param isFilterable Indicates whether the measurement can be toggled and filtered;
154 * @param measurement A pointer to hold a reference to the created measurement (can be null).
155 * @return Operation status.
156 */
157 GoFx(kStatus) GoTool_AddExtMeasurement(GoTool tool, kType type, kBool isFilterable, GoExtMeasurement* measurement);
158 
159 /**
160 * Removes a measurement at a given index.
161 *
162 * @public @memberof GoTool
163 * @version Introduced in firmware 4.8.2.76
164 * @param tool GoTool object.
165 * @param index The index of the measurement to remove.
166 * @return Operation status.
167 */
168 GoFx(kStatus) GoTool_RemoveMeasurement(GoTool tool, kSize index);
169 
170 /**
171 * Removes all measurements for the given tool.
172 *
173 * @public @memberof GoTool
174 * @version Introduced in firmware 4.8.2.76
175 * @param tool GoTool object.
176 * @return Operation status.
177 */
179 
180 /**
181 * Adds the given feature output to the tool set.
182 *
183 * @public @memberof GoTool
184 * @version Introduced in firmware 5.1.4.38
185 * @param tool GoTool object.
186 * @param type The type of the feature.
187 * @param featureOutput A pointer to hold a reference to the created feature output (can be null).
188 * @return Operation status.
189 */
190 GoFx(kStatus) GoTool_AddFeatureOutput(GoTool tool, kType type, GoFeature* featureOutput);
191 
192 /**
193 * Removes a feature output at a given index.
194 *
195 * @public @memberof GoTool
196  * @version Introduced in firmware 5.1.4.38
197 * @param tool GoTool object.
198 * @param index The index of the feature output to remove.
199 * @return Operation status.
200 */
202 
203 /**
204 * Removes all feature outputs for the given tool.
205 *
206 * @public @memberof GoTool
207  * @version Introduced in firmware 5.1.4.38
208 * @param tool GoTool object.
209 * @return Operation status.
210 */
212 
213 /**
214 * Parses stream options for the given tool.
215 *
216 * @public @memberof GoTool
217  * @version Introduced in firmware 4.8.2.76
218 * @param tool GoTool object.
219 * @param xml kXml object.
220 * @param item kXmlItem object.
221 * @param list kArrayList object.
222 * @return Operation status.
223 */
224 GoFx(kStatus) GoToolUtil_ParseStreamOptions(GoTool tool, kXml xml, kXmlItem item, kArrayList list);
225 
226 #include <GoSdk/Tools/GoTool.x.h>
227 
228 #endif
Lists all tool types.
GoMeasurement GoTool_FindMeasurementByType(GoTool tool, GoMeasurementType type)
Retrieves the first found instance of a measurement for a given enumeration type.
Represents the base class for a tool measurement or script output.
k32s GoTool_Id(GoTool tool)
Retrieves the id of the instance of the tool.
kStatus GoTool_RemoveMeasurement(GoTool tool, kSize index)
Removes a measurement at a given index.
kStatus GoTool_RemoveFeatureOutput(GoTool tool, kSize index)
Removes a feature output at a given index.
Lists all measurement types.
kStatus GoTool_ClearMeasurements(GoTool tool)
Removes all measurements for the given tool.
GoFeature GoTool_FeatureOutputAt(GoTool tool, kSize index)
Retrieves the feature output at the given index.
Lists all feature types.
GoFeature GoTool_FindFeatureOutputByType(GoTool tool, GoFeatureType type)
Retrieves the instance of a feature output for a given enumeration type.
kStatus GoTool_SetName(GoTool tool, const kChar *name)
Sets the name of the tool.
kStatus GoToolUtil_ParseStreamOptions(GoTool tool, kXml xml, kXmlItem item, kArrayList list)
Parses stream options for the given tool.
Essential SDK declarations.
kStatus GoTool_AddFeatureOutput(GoTool tool, kType type, GoFeature *featureOutput)
Adds the given feature output to the tool set.
GoMeasurement GoTool_MeasurementAt(GoTool tool, kSize index)
Retrieves the measurement at the given index.
kStatus GoTool_Name(GoTool tool, kChar *name, kSize capacity)
Retrieves the name of the tool.
Declares the GoMeasurement classes.
Represents the base tool class.
GoToolType GoTool_Type(GoTool tool)
Retrieves the tool type enumeration value of the tool.
kStatus GoTool_AddMeasurement(GoTool tool, kType type, kBool isFilterable, GoMeasurement *measurement)
Adds the given measurement to the tool set.
kStatus GoTool_ClearFeatureOutputs(GoTool tool)
Removes all feature outputs for the given tool.
Represents the base class for a tool Feature or script output.
kSize GoTool_MeasurementCount(GoTool tool)
Returns the measurement count.
Declares the GoFeatures classes.
kStatus GoTool_AddExtMeasurement(GoTool tool, kType type, kBool isFilterable, GoExtMeasurement *measurement)
kSize GoTool_FeatureOutputCount(GoTool tool)
Returns the feature output count.