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-2018 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 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 GoFeatureType representing the feature output 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, GoFeatureType type);
123
124 /**
125 * Adds the given measurement to the tool set.
126 *
127 * @public @memberof GoTool
128 * @version Introduced in firmware 4.8.2.76
129 * @param tool GoTool object.
130 * @param type The type of the measurement.
131 * @param isFilterable Indicates whether the measurement can be toggled and filtered;
132 * @param measurement A pointer to hold a reference to the created measurement (can be null).
133 * @return Operation status.
134 */
135 GoFx(kStatus) GoTool_AddMeasurement(GoTool tool, kType type, kBool isFilterable, GoMeasurement* measurement);
136
137 /**
138 * Adds the given custom measurement to the tool set.
139 *
140 * @public @memberof GoTool
141 * @version Introduced in firmware 4.8.2.76
142 * @param tool GoTool object.
143 * @param type The type of the measurement.
144 * @param isFilterable Indicates whether the measurement can be toggled and filtered;
145 * @param measurement A pointer to hold a reference to the created measurement (can be null).
146 * @return Operation status.
147 */
148 GoFx(kStatus) GoTool_AddExtMeasurement(GoTool tool, kType type, kBool isFilterable, GoExtMeasurement* measurement);
149
150 /**
151 * Removes a measurement at a given index.
152 *
153 * @public @memberof GoTool
154 * @version Introduced in firmware 4.8.2.76
155 * @param tool GoTool object.
156 * @param index The index of the measurement to remove.
157 * @return Operation status.
158 */
159 GoFx(kStatus) GoTool_RemoveMeasurement(GoTool tool, kSize index);
160
161 /**
162 * Removes all measurements for the given tool.
163 *
164 * @public @memberof GoTool
165 * @version Introduced in firmware 4.8.2.76
166 * @param tool GoTool object.
167 * @return Operation status.
168 */
169 GoFx(kStatus) GoTool_ClearMeasurements(GoTool tool);
170
171 /**
172 * Parses stream options for the given tool.
173 *
174 * @public @memberof GoTool
175 * @version Introduced in firmware 4.8.2.76
176 * @param tool GoTool object.
177 * @param xml kXml object.
178 * @param item kXmlItem object.
179 * @param list kArrayList object.
180 * @return Operation status.
181 */
182 GoFx(kStatus) GoToolUtil_ParseStreamOptions(GoTool tool, kXml xml, kXmlItem item, kArrayList list);
183
184 kEndHeader()
185 #include <GoSdk/Tools/GoTool.x.h>
186
187 #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
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_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.