GoWebScan API
GoWebScanCalCombiner.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanCalCombiner.h
3 * @brief Declares a GoWebScanCalCombiner object.
4 *
5 * @internal
6 * Copyright (C) 2017-2026 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 
11 #ifndef GO_WEB_SCAN_CAL_COMBINER_H
12 #define GO_WEB_SCAN_CAL_COMBINER_H
13 
18 
19 /**
20 * @struct GoWebScanCalCombinerParams
21 * @extends kValue
22 * @ingroup GoWebScanSdk-Calibration
23 * @brief Represents parameters of the calibration combiner algorithm.
24 */
26 {
27  k64s coherencyDistance; ///< Lane is disabled if the distance between the first undelivered tile and last undelivered tile exceed this threshold (mils).
28  k64s coherencyTime; ///< Lane is disabled if the time between the first undelivered tile and the last undelivered tile exceed this threshold (microseconds).
29  k64s breakDistance; ///< While the first undelivered tile and last undelivered tile have a position difference greater than this threshold, all combiner frames are dropped (mils).
30  k32s tileYExtent; ///< Y-axis extent of tiles (mils).
32 
33 /**
34 * @class GoWebScanCalCombiner
35 * @extends kObject
36 * @ingroup GoWebScanSdk-Calibration
37 * @brief Represents an algorithm for importing sensor messages collected during system calibration,
38 * matching the messages in Y and removing messages with time or distance coherency violations,
39 * and sending the system tiles for further calibration processing. This class is similar to
40 * the GoWebScanTileCombiner algorithm but is specialized to work with raw (unresampled)
41 * sensor data and to store data in calibration input message objects (GoWebScanCalInputTile).
42 * @see GoWebScanCalInputTile
43 */
45 
46 /** Defines the signature for the handler for converting the encoder ticks to a Y-axis position in mils. */
47 typedef k64s (kCall *GoWebScanCalCombinerEncoderToYFx)(kPointer context, k64s encoder);
48 
49 /** Defines the signature for the handler for accepting the output dataset. */
50 typedef kStatus (kCall *GoWebScanCalCombinerDataFx)(kPointer context, k64s tileId, GoWebScanCalInputTile* input, kSSize laneCount);
51 
52 /**
53  * Constructs a GoWebScanCalCombiner object.
54  *
55  * @public @memberof GoWebScanCalCombiner
56  * @param combiner Receives the constructed GoWebScanCalCombiner object.
57  * @param args Algorithm parameters.
58  * @param allocator Memory allocator (or kNULL for default).
59  * @return Operation status.
60  */
62 
63 /**
64 * Sets the handler for accepting the output data from the algorithm.
65 *
66 * @public @memberof GoWebScanCalCombiner
67 * @param combiner GoWebScanCalCombiner object.
68 * @param data Callback function
69 * @param context Receiver argument for callback.
70 * @return Operation status.
71 */
73 
74 /**
75 * Sets the handler for converting the encoder ticks to a Y-axis position in mils.
76 *
77 * @public @memberof GoWebScanCalCombiner
78 * @param combiner GoWebScanCalCombiner object.
79 * @param encoderToY Callback function
80 * @param context Receiver argument for callback.
81 * @return Operation status.
82 */
84 
85 /**
86  * Adds a lane to the combiner. A lane represents a unique source of messages (a node and a
87  * specific data type).
88  *
89  * @public @memberof GoWebScanCalCombiner
90  * @param combiner GoWebScanCalCombiner object.
91  * @param profileId ID of profile sensor.
92  * @param visionId ID of the connected vision sensor. Field will be ignored for non-vision
93  * systems.
94  * @param bankId Bank index of the node.
95  * @param planeId System plane of the node.
96  * @param columnId Column index of the node.
97  * @param type Data source type.
98  * @param yOffset Y-offset from laser/tracheid plane to the data source's plane (mils).
99  * @param minYStep Minimum Y-interval for unique/retained data (mils).
100  * @return Operation status.
101  */
102 GoWebScanFx(kStatus) GoWebScanCalCombiner_AddLane(GoWebScanCalCombiner combiner, k32s profileId, k32s visionId, k32s bankId, GoWebScanSystemPlane planeId, k32s columnId, GoWebScanDataSource type, k64s yOffset, k32s minYStep);
103 
104 /**
105  * Adds a message to a lane. Data is cloned into internal message objects.
106  *
107  * @public @memberof GoWebScanCalCombiner
108  * @param combiner GoWebScanCalCombiner object.
109  * @param deviceId Source device ID of message.
110  * @param dataSet Sensor message.
111  * @return Operation status.
112  */
113 GoWebScanFx(kStatus) GoWebScanCalCombiner_AddMsg(GoWebScanCalCombiner combiner, k32s deviceId, GoDataSet dataSet);
114 
115 /**
116  * Flush any existing sensor messages currently in the pipeline.
117  *
118  * @public @memberof GoWebScanCalCombiner
119  * @param combiner GoWebScanCalCombiner object.
120  * @return Operation status.
121  */
123 
124 /**
125  * Gets the number of lanes.
126  *
127  * @public @memberof GoWebScanCalCombiner
128  * @param combiner GoWebScanCalCombiner object.
129  * @return Number of lanes.
130  */
132 
133 /**
134  * Gets the system plane of the lane.
135  *
136  * @public @memberof GoWebScanCalCombiner
137  * @param combiner GoWebScanCalCombiner object.
138  * @param index Lane index.
139  * @return System plane.
140  */
142 
143 /**
144 * Gets the column index of the lane.
145 *
146 * @public @memberof GoWebScanCalCombiner
147 * @param combiner GoWebScanCalCombiner object.
148 * @param index Lane index.
149 * @return Column index.
150 */
152 
153 /**
154 * Gets the source data type of the lane.
155 *
156 * @public @memberof GoWebScanCalCombiner
157 * @param combiner GoWebScanCalCombiner object.
158 * @param index Lane index.
159 * @return Source data type.
160 */
162 
163 /**
164 * Gets the number of times a lane has been disabled.
165 *
166 * @public @memberof GoWebScanCalCombiner
167 * @param combiner GoWebScanCalCombiner object.
168 * @param index Lane index.
169 * @return Disable count.
170 */
172 
173 /**
174 * Gets the number of message drops in a lane.
175 *
176 * @public @memberof GoWebScanCalCombiner
177 * @param combiner GoWebScanCalCombiner object.
178 * @param index Lane index.
179 * @return Drop count.
180 */
182 
183 /**
184 * Gets a flag for whether the combiner is in an error state.
185 *
186 * @public @memberof GoWebScanCalCombiner
187 * @param combiner GoWebScanCalCombiner object.
188 * @return Boolean for whether combiner is in an error state.
189 */
191 
192 #include <GoWebScanSdk/GoWebScanCalCombiner.x.h>
193 
194 #endif
kBool GoWebScanCalCombiner_IsBroken(GoWebScanCalCombiner combiner)
Gets a flag for whether the combiner is in an error state.
kStatus GoWebScanCalCombiner_Construct(GoWebScanCalCombiner *combiner, const GoWebScanCalCombinerParams *args, kAlloc allocator)
Constructs a GoWebScanCalCombiner object.
k64s GoWebScanCalCombiner_LaneDisableCountAt(GoWebScanCalCombiner combiner, kSSize index)
Gets the number of times a lane has been disabled.
Represents parameters of the calibration combiner algorithm.
Definition: GoWebScanCalCombiner.h:25
Declares a GoWebScanCalInput object.
Represents a type of sensor data.
kStatus GoWebScanCalCombiner_AddLane(GoWebScanCalCombiner combiner, k32s profileId, k32s visionId, k32s bankId, GoWebScanSystemPlane planeId, k32s columnId, GoWebScanDataSource type, k64s yOffset, k32s minYStep)
Adds a lane to the combiner.
kStatus GoWebScanCalCombiner_SetEncoderToYHandler(GoWebScanCalCombiner combiner, GoWebScanCalCombinerEncoderToYFx encoderToY, kPointer context)
Sets the handler for converting the encoder ticks to a Y-axis position in mils.
Essential GoWebScan declarations.
k64s(kCall * GoWebScanCalCombinerEncoderToYFx)(kPointer context, k64s encoder)
Defines the signature for the handler for converting the encoder ticks to a Y-axis position in mils...
Definition: GoWebScanCalCombiner.h:47
kStatus GoWebScanCalCombiner_Flush(GoWebScanCalCombiner combiner)
Flush any existing sensor messages currently in the pipeline.
kStatus GoWebScanCalCombiner_SetDataHandler(GoWebScanCalCombiner combiner, GoWebScanCalCombinerDataFx data, kPointer context)
Sets the handler for accepting the output data from the algorithm.
Represents a container for raw sensor messages from a single node used during calibration data collec...
k32s GoWebScanCalCombiner_LaneColumnAt(GoWebScanCalCombiner combiner, kSSize index)
Gets the column index of the lane.
Represents an algorithm for importing sensor messages collected during system calibration, matching the messages in Y and removing messages with time or distance coherency violations, and sending the system tiles for further calibration processing. This class is similar to the GoWebScanTileCombiner algorithm but is specialized to work with raw (unresampled) sensor data and to store data in calibration input message objects (GoWebScanCalInputTile).
kSize GoWebScanCalCombiner_LaneCount(GoWebScanCalCombiner combiner)
Gets the number of lanes.
GoWebScanSystemPlane GoWebScanCalCombiner_LanePlaneAt(GoWebScanCalCombiner combiner, kSSize index)
Gets the system plane of the lane.
kStatus(kCall * GoWebScanCalCombinerDataFx)(kPointer context, k64s tileId, GoWebScanCalInputTile *input, kSSize laneCount)
Defines the signature for the handler for accepting the output dataset.
Definition: GoWebScanCalCombiner.h:50
Represents the top or bottom plane of the system.
Declares a GoWebScanCalInputTile object.
kStatus GoWebScanCalCombiner_AddMsg(GoWebScanCalCombiner combiner, k32s deviceId, GoDataSet dataSet)
Adds a message to a lane.
GoWebScanDataSource GoWebScanCalCombiner_LaneSourceTypeAt(GoWebScanCalCombiner combiner, kSSize index)
Gets the source data type of the lane.
k64s coherencyDistance
Lane is disabled if the distance between the first undelivered tile and last undelivered tile exceed ...
Definition: GoWebScanCalCombiner.h:27
k64s GoWebScanCalCombiner_LaneDropCountAt(GoWebScanCalCombiner combiner, kSSize index)
Gets the number of message drops in a lane.
k32s tileYExtent
Y-axis extent of tiles (mils).
Definition: GoWebScanCalCombiner.h:30
Declares a GoWebScanConfig object.
k64s coherencyTime
Lane is disabled if the time between the first undelivered tile and the last undelivered tile exceed ...
Definition: GoWebScanCalCombiner.h:28
k64s breakDistance
While the first undelivered tile and last undelivered tile have a position difference greater than th...
Definition: GoWebScanCalCombiner.h:29