Gocator API

- Home
- Types
- Files

All Classes Files Functions Variables Typedefs Macros Modules Pages
GoTools.h
Go to the documentation of this file.
1 /**
2 * @file GoTools.h
3 * @brief Declares the GoTool classes.
4 *
5 * @internal
6 * Copyright (C) 2016 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef GO_TOOLS_H
11 #define GO_TOOLS_H
12
13 #include <GoSdk/GoSdkDef.h>
14 #include <GoSdk/Tools/GoTool.h>
15 #include <GoSdk/Tools/GoExtTool.h>
16 #include <GoSdk/Tools/GoProfileTools.h>
17 #include <GoSdk/Tools/GoRangeTools.h>
18 #include <GoSdk/Tools/GoSurfaceTools.h>
19
20 kBeginHeader()
21
22 typedef kObject GoToolOption;
23
24 /**
25 * @class GoTools
26 * @extends kObject
27 * @ingroup GoSdk-Tools
28 * @brief Represents a collection of tools.
29 */
30 typedef kObject GoTools;
31
32 /**
33 * Returns the current number of tools.
34 *
35 * @public @memberof GoTools
36 * @version Introduced in firmware 4.0.10.27
37 * @param tools GoTools object.
38 * @return The current tool count.
39 */
40 GoFx(kSize) GoTools_ToolCount(GoTools tools);
41
42 /**
43 * Returns a tool handle at the given index.
44 *
45 * @public @memberof GoTools
46 * @version Introduced in firmware 4.0.10.27
47 * @param tools GoTools object.
48 * @param index The index with which to retrieve a tool.
49 * @return A handle to a tool at the given index or kNULL if the index is invalid.
50 */
51 GoFx(GoTool) GoTools_ToolAt(GoTools tools, kSize index);
52
53 /**
54 * Adds a tool and returns a handle to it. NOTE: This function will always succeed,
55 * but the tool handle will be null if passed in and an error occurs.
56 *
57 * @public @memberof GoTools
58 * @version Introduced in firmware 4.0.10.27
59 * @param tools GoTools object.
60 * @param type The tool type enumerator value representing the type of tool to add.
61 * @param tool A pointer to the newly added tool.
62 * @return Operation status.
63 */
64 GoFx(kStatus) GoTools_AddTool(GoTools tools, GoToolType type, GoTool* tool);
65
66 /**
67 * Removes a tool at the given index.
68 *
69 * @public @memberof GoTools
70 * @version Introduced in firmware 4.0.10.27
71 * @param tools GoTools object.
72 * @param index The index with which to remove a tool.
73 * @return Operation status.
74 */
75 GoFx(kStatus) GoTools_RemoveTool(GoTools tools, kSize index);
76
77 /**
78 * Removes all tools in the given GoTools instance.
79 *
80 * @public @memberof GoTools
81 * @version Introduced in firmware 4.0.10.27
82 * @param tools GoTools object.
83 * @return Operation status.
84 */
85 GoFx(kStatus) GoTools_ClearTools(GoTools tools);
86
87 /**
88 * Returns an enabled measurement handle if the specified ID is valid.
89 *
90 * @public @memberof GoTools
91 * @version Introduced in firmware 4.0.10.27
92 * @param tools GoTools object.
93 * @param id The measurement ID to search for.
94 * @return A GoMeasurement object if an enabled measurement with the ID is found, otherwise kNULL.
95 */
96 GoFx(GoMeasurement) GoTools_FindMeasurementById(GoTools tools, k32u id);
97
98 /**
99 * Automatically update a given measurement to use a valid ID within the set of tools contained in the GoTools object.
100 *
101 * @public @memberof GoTools
102 * @version Introduced in firmware 4.0.10.27
103 * @param tools GoTools object.
104 * @param measurement GoMeasurement object to update.
105 * @return Operation status.
106 */
107 GoFx(kStatus) GoTools_AssignMeasurementId(GoTools tools, GoMeasurement measurement);
108
109 /**
110 * Returns the number of tool options available for the current configuration.
111 *
112 * @public @memberof GoTools
113 * @version Introduced in firmware 4.3.3.124
114 * @param tools GoTools object.
115 * @return The number of tool options available for the current configuration.
116 */
117 GoFx(kSize) GoTools_ToolOptionCount(GoTools tools);
118
119 /**
120 * Retrieves the tool option at the given index.
121 *
122 * @public @memberof GoTools
123 * @version Introduced in firmware 4.3.3.124
124 * @param tools GoTools object.
125 * @param index The index of the option list to access.
126 * @return The tool option associated with the given index.
127 */
128 GoFx(GoToolOption) GoTools_ToolOptionAt(GoTools tools, kSize index);
129
130 /**
131 * Returns the name associated with the given tool option.
132 *
133 * @public @memberof GoTools
134 * @version Introduced in firmware 4.3.3.124
135 * @param option GoToolOption object.
136 * @return The name associated with the tool option.
137 */
138 GoFx(const kChar*) GoToolOption_Name(GoToolOption option);
139
140 /**
141 * Returns the number of measurement options available for the given tool option.
142 *
143 * @public @memberof GoTools
144 * @version Introduced in firmware 4.3.3.124
145 * @param option GoToolOption object.
146 * @return The number of measurement options available for the given tool option.
147 */
148 GoFx(kSize) GoToolOption_MeasurementOptionCount(GoToolOption option);
149
150 /**
151 * Retrieves the measurement option at the given index of the tool option.
152 *
153 * @public @memberof GoTools
154 * @version Introduced in firmware 4.3.3.124
155 * @param option GoToolOption object.
156 * @param index The index of the option list to access.
157 * @return The measurement option associated with the given index.
158 */
159 GoFx(const GoMeasurementOption*) GoToolOption_MeasurementOptionAt(GoToolOption option, kSize index);
160
161 /**
162 * Returns the number of feature options available for the given tool option.
163 *
164 * @public @memberof GoTools
165 * @version Introduced in firmware 4.6.3.27
166 * @param option GoToolOption object.
167 * @return The number of feature options available for the given tool option.
168 */
169 GoFx(kSize) GoToolOption_FeatureOptionCount(GoToolOption option);
170
171 /**
172 * Retrieves the feature option at the given index of the tool option.
173 *
174 * @public @memberof GoTools
175 * @version Introduced in firmware 4.6.3.27
176 * @param option GoToolOption object.
177 * @param index The index of the option list to access.
178 * @return The feature option associated with the given index.
179 */
180 GoFx(const GoFeatureOption*) GoToolOption_FeatureOptionAt(GoToolOption option, kSize index);
181
182
183
184 /**
185 * Adds a tool by name.
186 *
187 * @public @memberof GoTools
188 * @version Introduced in firmware 4.3.3.124
189 * @param tools GoTools object.
190 * @param optionName The name of the tool to add.
191 * @param tool A handle to the newly constructed tool. kNULL can be used.
192 * @return Operation status.
193 * @see GoTools_ToolOptionCount, GoTools_ToolOptionAt, GoToolOption_Name
194 */
195 GoFx(kStatus) GoTools_AddToolByName(GoTools tools, const kChar* optionName, GoTool* tool);
196
197 /**
198 * Adds a measurement to a tool via a string representing the type.
199 *
200 * @public @memberof GoTools
201 * @version Introduced in firmware 4.3.3.124
202 * @param tools GoTools object.
203 * @param tool The tool of which the measurement is being added.
204 * @param type The measurement type represented as a string to be added.
205 * @param name The name to assign the new measurement.
206 * @param measurement A handle to the newly added measurement. kNULL can be used.
207 * @return Operation status.
208 * @see GoTools_ToolOptionCount, GoTools_ToolOptionAt,
209 * GoToolOption_MeasurementOptionCount, GoToolOption_MeasurementOptionAt
210 */
211 GoFx(kStatus) GoTools_AddMeasurementByName(GoTools tools, GoTool tool, const kChar* type, const kChar* name, GoMeasurement* measurement);
212
213
214
215 /**
216 * @class GoScript
217 * @extends GoTool
218 * @ingroup GoSdk-Tools
219 * @brief Represents a script tool.
220 */
221 typedef GoTool GoScript;
222
223 /**
224 * Gets the code for the script.
225 *
226 * @public @memberof GoScript
227 * @version Introduced in firmware 4.0.10.27
228 * @param tool GoScript object.
229 * @param code Receives a null-terminated string containing the script code.
230 * @return Operation status.
231 */
232 GoFx(kStatus) GoScript_Code(GoScript tool, kChar** code);
233
234 /**
235 * Sets the code for the script.
236 *
237 * @public @memberof GoScript
238 * @version Introduced in firmware 4.0.10.27
239 * @param tool GoScript object.
240 * @param code The code to set.
241 * @return Operation status.
242 */
243 GoFx(kStatus) GoScript_SetCode(GoScript tool, kChar* code);
244
245 /**
246 * Adds a script output.
247 *
248 * @public @memberof GoScript
249 * @version Introduced in firmware 4.0.10.27
250 * @param tool GoScript object.
251 * @param id An ID (must not already be used by other measurements) of the script output to add.
252 * @return Operation status.
253 */
254 GoFx(kStatus) GoScript_AddOutput(GoScript tool, k32u id);
255
256 /**
257 * Removes a script output with the specific ID.
258 *
259 * @public @memberof GoScript
260 * @version Introduced in firmware 4.0.10.27
261 * @param tool GoScript object.
262 * @param id An ID of the script output to remove.
263 * @return Operation status.
264 */
265 GoFx(kStatus) GoScript_RemoveOutput(GoScript tool, k32u id);
266
267 /**
268 * Returns the count of script tool outputs.
269 *
270 * @public @memberof GoScript
271 * @version Introduced in firmware 4.0.10.27
272 * @param tool GoScript object.
273 * @return Script output count.
274 */
275 GoFx(kSize) GoScript_OutputCount(GoScript tool);
276
277 /**
278 * Returns a handle to a script output at the given index.
279 *
280 * @public @memberof GoScript
281 * @version Introduced in firmware 4.0.10.27
282 * @param tool GoScript object.
283 * @param index The index with which to return a corresponding script output.
284 * @return A GoScriptOutput object or kNULL if the index is invalid.
285 */
286 GoFx(GoScriptOutput) GoScript_OutputAt(GoScript tool, kSize index);
287
288 kEndHeader()
289 #include <GoSdk/Tools/GoTools.x.h>
290
291 #endif
GoToolType
Lists all tool types.
k32u
GoTool.h
Declares the base GoTool class.
GoMeasurement
Represents the base class for a tool measurement or script output.
GoTools::GoToolOption_Name
const kChar * GoToolOption_Name(GoToolOption option)
Returns the name associated with the given tool option.
GoScript::GoScript_AddOutput
kStatus GoScript_AddOutput(GoScript tool, k32u id)
Adds a script output.
GoTools::GoTools_AddTool
kStatus GoTools_AddTool(GoTools tools, GoToolType type, GoTool *tool)
Adds a tool and returns a handle to it.
GoTools::GoToolOption_FeatureOptionAt
const GoFeatureOption * GoToolOption_FeatureOptionAt(GoToolOption option, kSize index)
Retrieves the feature option at the given index of the tool option.
GoTools::GoTools_ClearTools
kStatus GoTools_ClearTools(GoTools tools)
Removes all tools in the given GoTools instance.
GoExtTool.h
Declares the base GoExtTool class.
GoRangeTools.h
Declares all range tools and their related classes.
GoTools::GoTools_AddToolByName
kStatus GoTools_AddToolByName(GoTools tools, const kChar *optionName, GoTool *tool)
Adds a tool by name.
kSize
GoTools::GoTools_ToolCount
kSize GoTools_ToolCount(GoTools tools)
Returns the current number of tools.
GoScript::GoScript_RemoveOutput
kStatus GoScript_RemoveOutput(GoScript tool, k32u id)
Removes a script output with the specific ID.
kChar
GoScriptOutput
Represents a script output for a Script Tool.
GoTools::GoTools_RemoveTool
kStatus GoTools_RemoveTool(GoTools tools, kSize index)
Removes a tool at the given index.
GoScript::GoScript_OutputAt
GoScriptOutput GoScript_OutputAt(GoScript tool, kSize index)
Returns a handle to a script output at the given index.
GoSdkDef.h
Essential SDK declarations.
GoTools::GoToolOption_MeasurementOptionCount
kSize GoToolOption_MeasurementOptionCount(GoToolOption option)
Returns the number of measurement options available for the given tool option.
GoScript::GoScript_Code
kStatus GoScript_Code(GoScript tool, kChar **code)
Gets the code for the script.
GoTool
Represents the base tool class.
GoTools::GoToolOption_MeasurementOptionAt
const GoMeasurementOption * GoToolOption_MeasurementOptionAt(GoToolOption option, kSize index)
Retrieves the measurement option at the given index of the tool option.
GoTools
Represents a collection of tools.
GoScript::GoScript_SetCode
kStatus GoScript_SetCode(GoScript tool, kChar *code)
Sets the code for the script.
GoTools::GoToolOption_FeatureOptionCount
kSize GoToolOption_FeatureOptionCount(GoToolOption option)
Returns the number of feature options available for the given tool option.
GoProfileTools.h
Declares all profile tools and their related classes.
GoTools::GoTools_AssignMeasurementId
kStatus GoTools_AssignMeasurementId(GoTools tools, GoMeasurement measurement)
Automatically update a given measurement to use a valid ID within the set of tools contained in the G...
GoScript::GoScript_OutputCount
kSize GoScript_OutputCount(GoScript tool)
Returns the count of script tool outputs.
GoScript
Represents a script tool.
GoTools::GoTools_AddMeasurementByName
kStatus GoTools_AddMeasurementByName(GoTools tools, GoTool tool, const kChar *type, const kChar *name, GoMeasurement *measurement)
Adds a measurement to a tool via a string representing the type.
GoTools::GoTools_ToolOptionCount
kSize GoTools_ToolOptionCount(GoTools tools)
Returns the number of tool options available for the current configuration.
kObject
kStatus
GoTools::GoTools_FindMeasurementById
GoMeasurement GoTools_FindMeasurementById(GoTools tools, k32u id)
Returns an enabled measurement handle if the specified ID is valid.
GoTools::GoTools_ToolOptionAt
GoToolOption GoTools_ToolOptionAt(GoTools tools, kSize index)
Retrieves the tool option at the given index.
GoTools::GoTools_ToolAt
GoTool GoTools_ToolAt(GoTools tools, kSize index)
Returns a tool handle at the given index.