GoWebScan API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
GoWebScanProfileSampleTask.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanProfileSampleTask.h
3 * @brief Declares a GoWebScanProfileSampleTask 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_PROFILE_SAMPLE_TASK_H
12 #define GO_WEB_SCAN_PROFILE_SAMPLE_TASK_H
13 
18 
19 kBeginHeader()
20 
21 /**
22 * @class GoWebScanProfileSampleTask
23 * @extends kObject
24 * @ingroup GoWebScanSdk-Control
25 * @brief Represents a task for resampling raw profile points from a single camera to
26 * generate profile tiles or presence tiles (for object detection). The task accepts
27 * GoWebScanProfileInputMsg objects and produces GoWebScanProfileTileMsg objects.
28 * When profile input messages are received, each input row is processed and then
29 * added to a GoWebScanProfileYResampler object. When the GoWebScanProfileYResampler
30 * completes a row, the row is passed back to the GoWebScanProfileSampleTask,
31 * processed, and added to an output tile.
32 *
33 * The processing steps for each row of input data is:
34 * -# Apply profile mask (as defined by the obstructions in GoWebScanSettings).
35 * -# Reorient the input to match standard system orientation.
36 * -# Apply Z-offsets as calculated from system calibration.
37 * -# Resample the row in X.
38 * -# Run the GoWebScanProfileYResampler algorithm.
39 */
41 
42 // Forward declaration
44 
45 /**
46  * Constructs a GoWebScanProfileSampleTask object.
47  *
48  * @public @memberof GoWebScanProfileSampleTask
49  * @param task Receives the constructed GoWebScanProfileSampleTask object.
50  * @param process Associated GoWebScanProcess object.
51  * @param configNode Node configuration.
52  * @param outputType Whether the task is merging profile tiles intended for presence detection
53  * or is just merging standard profile tiles.
54  * @param allocator Memory allocator (or kNULL for default).
55  * @return Operation status.
56  */
57 GoWebScanFx(kStatus) GoWebScanProfileSampleTask_Construct(GoWebScanProfileSampleTask* task, GoWebScanProcess process, GoWebScanConfigNode configNode, GoWebScanNodeTileId outputType, kAlloc allocator);
58 
59 /**
60 * Sets the handler for receiving resampled profile tiles.
61 *
62 * @public @memberof GoWebScanProfileSampleTask
63 * @param task GoWebScanProfileSampleTask object.
64 * @param send Callback function
65 * @param context Receiver argument for callback.
66 * @return Operation status.
67 */
68 GoWebScanFx(kStatus) GoWebScanProfileSampleTask_SetReceiver(GoWebScanProfileSampleTask task, GoWebScanPipeSendFx send, kPointer context);
69 
70 /**
71  * Dispatches a processing job (task + message) to the pipe. Sends the message to a task's
72  * message queue. The task will submit the message to the pipe for processing if no other job is
73  * pending.
74  *
75  * @public @memberof GoWebScanProfileSampleTask
76  * @param task GoWebScanProfileSampleTask object.
77  * @param msg Message to dispatch.
78  * @return Operation status.
79  */
80 GoWebScanFx(kStatus) GoWebScanProfileSampleTask_Dispatch(GoWebScanProfileSampleTask task, GoWebScanPipeMsg msg);
81 
82 /**
83 * Adds a message to the processing queue. Dequeues a message at the end of the queue to submit
84 * to the pipe for scheduling if no other job is currently pending.
85 *
86 * @public @memberof GoWebScanProfileSampleTask
87 * @param task GoWebScanProfileSampleTask object.
88 * @param msg Profile input message to enqueue.
89 * @return Operation status.
90 */
91 GoWebScanFx(kStatus) GoWebScanProfileSampleTask_Send(GoWebScanProfileSampleTask task, GoWebScanPipeMsg msg);
92 
93 /**
94 * Clears Y-resampler algorithm and resets internal variables.
95 *
96 * @public @memberof GoWebScanProfileSampleTask
97 * @param task GoWebScanProfileSampleTask object.
98 * @return Operation status.
99 */
100 GoWebScanFx(kStatus) GoWebScanProfileSampleTask_Clear(GoWebScanProfileSampleTask task);
101 
102 /**
103  * Gets the node configuration for the node associated with this task.
104  *
105  * @public @memberof GoWebScanProfileSampleTask
106  * @param task GoWebScanProfileSampleTask object.
107  * @return Node configuration.
108  */
109 GoWebScanFx(GoWebScanConfigNode) GoWebScanProfileSampleTask_ConfigNode(GoWebScanProfileSampleTask task);
110 
111 kEndHeader()
112 #include <GoWebScanSdk/GoWebScanProfileSampleTask.x.h>
113 
114 #endif
kStatus GoWebScanProfileSampleTask_Construct(GoWebScanProfileSampleTask *task, GoWebScanProcess process, GoWebScanConfigNode configNode, GoWebScanNodeTileId outputType, kAlloc allocator)
Constructs a GoWebScanProfileSampleTask object.
kStatus GoWebScanProfileSampleTask_Dispatch(GoWebScanProfileSampleTask task, GoWebScanPipeMsg msg)
Dispatches a processing job (task + message) to the pipe.
Declares the GoWebScanPipeTask class.
Represents a task for processing raw sensor data to produce system web tiles (Web mode) or detected o...
Represents a container for node-level parameters which are translated from user parameters set in GoW...
Declares a GoWebScanPipe object.
kStatus(kCall * GoWebScanPipeSendFx)(kPointer context, GoWebScanPipeMsg msg)
Defines the signature of the handler used by tasks to receive a message from the pipe.
Definition: GoWebScanPipe.h:35
Represents an ID for types of tile messages.
Essential GoWebScan declarations.
kStatus GoWebScanProfileSampleTask_Send(GoWebScanProfileSampleTask task, GoWebScanPipeMsg msg)
Adds a message to the processing queue.
GoWebScanConfigNode GoWebScanProfileSampleTask_ConfigNode(GoWebScanProfileSampleTask task)
Gets the node configuration for the node associated with this task.
kStatus GoWebScanProfileSampleTask_SetReceiver(GoWebScanProfileSampleTask task, GoWebScanPipeSendFx send, kPointer context)
Sets the handler for receiving resampled profile tiles.
Represents a task for resampling raw profile points from a single camera to generate profile tiles or...
Base class for a msg that can be processed with a GoWebScanPipeTask and submitted to the GoWebScanPip...
kStatus GoWebScanProfileSampleTask_Clear(GoWebScanProfileSampleTask task)
Clears Y-resampler algorithm and resets internal variables.
Declares a GoWebScanConfig object.