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