Gocator API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Macros Modules Pages
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-2022 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
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 */
34 GoFx(kSize) GoTool_MeasurementCount(GoTool tool);
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 */
45 GoFx(GoMeasurement) GoTool_MeasurementAt(GoTool tool, kSize index);
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 */
55 GoFx(kSize) GoTool_FeatureOutputCount(GoTool tool);
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 */
120 GoFx(GoMeasurement) GoTool_FindMeasurementByType(GoTool tool, GoMeasurementType type);
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 */
131 GoFx(GoFeature) GoTool_FindFeatureOutputByType(GoTool tool, GoFeatureType type);
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 */
178 GoFx(kStatus) GoTool_ClearMeasurements(GoTool tool);
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 */
201 GoFx(kStatus) GoTool_RemoveFeatureOutput(GoTool tool, kSize index);
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 */
211 GoFx(kStatus) GoTool_ClearFeatureOutputs(GoTool tool);
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
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.