GoWebScan API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
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-2018 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 kBeginHeader()
20 
21 /**
22 * @struct GoWebScanCalCombinerParams
23 * @extends kValue
24 * @ingroup GoWebScanSdk-Calibration
25 * @brief Represents parameters of the calibration combiner algorithm.
26 */
28 {
29  k64s coherencyDistance; ///< Lane is disabled if the distance between the first undelivered tile and last undelivered tile exceed this threshold (mils).
30  k64s coherencyTime; ///< Lane is disabled if the time between the first undelivered tile and the last undelivered tile exceed this threshold (microseconds).
31  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).
32  k32s tileYExtent; ///< Y-axis extent of tiles (mils).
34 
35 /**
36 * @class GoWebScanCalCombiner
37 * @extends kObject
38 * @ingroup GoWebScanSdk-Calibration
39 * @brief Represents an algorithm for importing sensor messages collected during system calibration,
40 * matching the messages in Y and removing messages with time or distance coherency violations,
41 * and sending the system tiles for further calibration processing. This class is similar to
42 * the GoWebScanTileCombiner algorithm but is specialized to work with raw (unresampled)
43 * sensor data and to store data in calibration input message objects (GoWebScanCalInputTile).
44 * @see GoWebScanCalInputTile
45 */
47 
48 /** Defines the signature for the handler for converting the encoder ticks to a Y-axis position in mils. */
49 typedef k64s (kCall *GoWebScanCalCombinerEncoderToYFx)(kPointer context, k64s encoder);
50 
51 /** Defines the signature for the handler for accepting the output dataset. */
52 typedef kStatus (kCall *GoWebScanCalCombinerDataFx)(kPointer context, k64s tileId, GoWebScanCalInputTile* input, kSSize laneCount);
53 
54 /**
55  * Constructs a GoWebScanCalCombiner object.
56  *
57  * @public @memberof GoWebScanCalCombiner
58  * @param combiner Receives the constructed GoWebScanCalCombiner object.
59  * @param args Algorithm parameters.
60  * @param allocator Memory allocator (or kNULL for default).
61  * @return Operation status.
62  */
64 
65 /**
66 * Sets the handler for accepting the output data from the algorithm.
67 *
68 * @public @memberof GoWebScanCalCombiner
69 * @param combiner GoWebScanCalCombiner object.
70 * @param data Callback function
71 * @param context Receiver argument for callback.
72 * @return Operation status.
73 */
75 
76 /**
77 * Sets the handler for converting the encoder ticks to a Y-axis position in mils.
78 *
79 * @public @memberof GoWebScanCalCombiner
80 * @param combiner GoWebScanCalCombiner object.
81 * @param encoderToY Callback function
82 * @param context Receiver argument for callback.
83 * @return Operation status.
84 */
86 
87 /**
88  * Adds a lane to the combiner. A lane represents a unique source of messages (a node and a
89  * specific data type).
90  *
91  * @public @memberof GoWebScanCalCombiner
92  * @param combiner GoWebScanCalCombiner object.
93  * @param profileId ID of profile sensor.
94  * @param visionId ID of the connected vision sensor. Field will be ignored for non-vision
95  * systems.
96  * @param bankId Bank index of the node.
97  * @param planeId System plane of the node.
98  * @param columnId Column index of the node.
99  * @param type Data source type.
100  * @param yOffset Y-offset from laser/tracheid plane to the data source's plane (mils).
101  * @param minYStep Minimum Y-interval for unique/retained data (mils).
102  * @return Operation status.
103  */
104 GoWebScanFx(kStatus) GoWebScanCalCombiner_AddLane(GoWebScanCalCombiner combiner, k32s profileId, k32s visionId, k32s bankId, GoWebScanSystemPlane planeId, k32s columnId, GoWebScanDataSource type, k64s yOffset, k32s minYStep);
105 
106 /**
107  * Adds a message to a lane. Data is cloned into internal message objects.
108  *
109  * @public @memberof GoWebScanCalCombiner
110  * @param combiner GoWebScanCalCombiner object.
111  * @param deviceId Source device ID of message.
112  * @param dataSet Sensor message.
113  * @return Operation status.
114  */
115 GoWebScanFx(kStatus) GoWebScanCalCombiner_AddMsg(GoWebScanCalCombiner combiner, k32s deviceId, GoDataSet dataSet);
116 
117 /**
118  * Gets the number of lanes.
119  *
120  * @public @memberof GoWebScanCalCombiner
121  * @param combiner GoWebScanCalCombiner object.
122  * @return Number of lanes.
123  */
125 
126 /**
127  * Gets the system plane of the lane.
128  *
129  * @public @memberof GoWebScanCalCombiner
130  * @param combiner GoWebScanCalCombiner object.
131  * @param index Lane index.
132  * @return System plane.
133  */
135 
136 /**
137 * Gets the column index of the lane.
138 *
139 * @public @memberof GoWebScanCalCombiner
140 * @param combiner GoWebScanCalCombiner object.
141 * @param index Lane index.
142 * @return Column index.
143 */
145 
146 /**
147 * Gets the source data type of the lane.
148 *
149 * @public @memberof GoWebScanCalCombiner
150 * @param combiner GoWebScanCalCombiner object.
151 * @param index Lane index.
152 * @return Source data type.
153 */
155 
156 /**
157 * Gets the number of times a lane has been disabled.
158 *
159 * @public @memberof GoWebScanCalCombiner
160 * @param combiner GoWebScanCalCombiner object.
161 * @param index Lane index.
162 * @return Disable count.
163 */
165 
166 /**
167 * Gets the number of message drops in a lane.
168 *
169 * @public @memberof GoWebScanCalCombiner
170 * @param combiner GoWebScanCalCombiner object.
171 * @param index Lane index.
172 * @return Drop count.
173 */
175 
176 /**
177 * Gets a flag for whether the combiner is in an error state.
178 *
179 * @public @memberof GoWebScanCalCombiner
180 * @param combiner GoWebScanCalCombiner object.
181 * @return Boolean for whether combiner is in an error state.
182 */
184 
185 kEndHeader()
186 #include <GoWebScanSdk/GoWebScanCalCombiner.x.h>
187 
188 #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:27
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:49
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:52
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:29
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:32
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:30
k64s breakDistance
While the first undelivered tile and last undelivered tile have a position difference greater than th...
Definition: GoWebScanCalCombiner.h:31