Gocator API

- Home
- 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 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 tool type enumeration value of the tool.
94 *
95 * @public @memberof GoTool
96 * @version Introduced in firmware 4.0.10.27
97 * @param tool GoTool object.
98 * @return The tool type enumeration value.
99 */
100 GoFx(GoToolType) GoTool_Type(GoTool tool);
101
102 /**
103 * Retrieves the first found instance of a measurement for a given enumeration type.
104 *
105 * @public @memberof GoTool
106 * @version Introduced in firmware 4.0.10.27
107 * @param tool GoTool object.
108 * @param type A GoMeasurementType representing the measurement type to find in the given tool.
109 * @return A measurement object if one is found, otherwise kNULL.
110 */
111 GoFx(GoMeasurement) GoTool_FindMeasurementByType(GoTool tool, GoMeasurementType type);
112
113 /**
114 * Retrieves the first found instance of a feature output for a given enumeration type.
115 *
116 * @public @memberof GoTool
117 * @version Introduced in firmware 4.6.3.27
118 * @param tool GoTool object.
119 * @param type A GoFeatureDataType representing the feature output data type to find in the given tool.
120 * @return A feature object if one is found, otherwise kNULL. Returns the first found.
121 */
122 GoFx(GoFeature) GoTool_FindFeatureOutputByType(GoTool tool, GoFeatureDataType type);
123
124 /**
125 * Adds the given measurement to the tool set.
126 *
127 * @public @memberof GoTool
128 * @param tool GoTool object.
129 * @param type The type of the measurement.
130 * @param isFilterable Indicates whether the measurement can be toggled and filtered;
131 * @param measurement A pointer to hold a reference to the created measurement (can be null).
132 * @return Operation status.
133 */
134 GoFx(kStatus) GoTool_AddMeasurement(GoTool tool, kType type, kBool isFilterable, GoMeasurement* measurement);
135
136 /**
137 * Adds the given custom measurement to the tool set.
138 *
139 * @public @memberof GoTool
140 * @param tool GoTool object.
141 * @param type The type of the measurement.
142 * @param isFilterable Indicates whether the measurement can be toggled and filtered;
143 * @param measurement A pointer to hold a reference to the created measurement (can be null).
144 * @return Operation status.
145 */
146 GoFx(kStatus) GoTool_AddExtMeasurement(GoTool tool, kType type, kBool isFilterable, GoExtMeasurement* measurement);
147
148 /**
149 * Removes a measurement at a given index.
150 *
151 * @public @memberof GoTool
152 * @param tool GoTool object.
153 * @param index The index of the measurement to remove.
154 * @return Operation status.
155 */
156 GoFx(kStatus) GoTool_RemoveMeasurement(GoTool tool, kSize index);
157
158 /**
159 * Removes all measurements for the given tool.
160 *
161 * @public @memberof GoTool
162 * @param tool GoTool object.
163 * @return Operation status.
164 */
165 GoFx(kStatus) GoTool_ClearMeasurements(GoTool tool);
166
167 /**
168 * Parses stream options for the given tool.
169 *
170 * @public @memberof GoTool
171 * @param tool GoTool object.
172 * @param xml kXml object.
173 * @param item kXmlItem object.
174 * @param list kArrayList object.
175 * @return Operation status.
176 */
177 GoFx(kStatus) GoToolUtil_ParseStreamOptions(GoTool tool, kXml xml, kXmlItem item, kArrayList list);
178
179 kEndHeader()
180 #include <GoSdk/Tools/GoTool.x.h>
181
182 #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_RemoveMeasurement
kStatus GoTool_RemoveMeasurement(GoTool tool, kSize index)
Removes a measurement 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
GoFeatureDataType
Lists all feature data types.
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_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.
GoTool::GoTool_AddMeasurement
kStatus GoTool_AddMeasurement(GoTool tool, kType type, kBool isFilterable, GoMeasurement *measurement)
Adds the given measurement to the tool set.
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)
Adds the given custom measurement to the tool set.
kBool
GoTool::GoTool_FeatureOutputCount
kSize GoTool_FeatureOutputCount(GoTool tool)
Returns the feature output count.
GoTool::GoTool_FindFeatureOutputByType
GoFeature GoTool_FindFeatureOutputByType(GoTool tool, GoFeatureDataType type)
Retrieves the first found instance of a feature output for a given enumeration type.