Gocator Vision Library
 All Classes Files Functions Variables Typedefs Friends Modules Pages
GvProfileMsg.h
Go to the documentation of this file.
1 /**
2 * @file GvProfileMsg.h
3 * @brief Declares the GvProfileMsg class.
4 *
5 * Copyright (C) 2017-2022 by LMI Technologies Inc. All rights reserved.
6 */
7 #ifndef GV_PROFILE_MSG_H
8 #define GV_PROFILE_MSG_H
9 
11 
12 /**
13 * Encapsulates a profile message.
14 *
15 * @class GvProfileMsg
16 * @extends GvDataMsg
17 * @ingroup GoVision-Data
18 */
19 typedef GvDataMsg GvProfileMsg;
20 
21 GvFx(kStatus) GvProfileMsg_Construct(GvProfileMsg* msg, kType pointType, kSize count, kSize pointCount, kAlloc alloc);
22 
23 /**
24  * Returns the message point type.
25  *
26  * @public @memberof GvProfileMsg
27  * @param msg Message object.
28  * @return Point type.
29  */
31 
32 /**
33  * Returns the number of points.
34  *
35  * @public @memberof GvProfileMsg
36  * @param msg Message object.
37  * @return Point count.
38  */
40 
41 /**
42  * Returns the x,y,z offset for the data message.
43  *
44  * @public @memberof GvProfileMsg
45  * @param msg Message object.
46  * @return Pointer to data offset.
47  */
49 
50 /**
51  * Sets the x,y,z offset for the data message.
52  *
53  * @public @memberof GvProfileMsg
54  * @param msg Message object.
55  * @param offset Pointer to data offset.
56  * @return Operation status.
57  */
58 GvFx(kStatus) GvProfileMsg_SetOffset(GvProfileMsg msg, const kPoint3d64f* offset);
59 
60 /**
61  * Returns the x,y,z scale of the data message.
62  *
63  * @public @memberof GvProfileMsg
64  * @param msg Message object.
65  * @return Pointer to data scale.
66  */
68 
69 /**
70  * Sets the x,y,z scale of the data message.
71  *
72  * @public @memberof GvProfileMsg
73  * @param msg Message object.
74  * @param scale Pointer to data scale.
75  * @return Operation status.
76  */
77 GvFx(kStatus) GvProfileMsg_SetScale(GvProfileMsg msg, const kPoint3d64f* scale);
78 
79 /**
80  * Returns a pointer to the points buffer.
81  *
82  * The buffer can be both read and written.
83  *
84  * @public @memberof GvProfileMsg
85  * @param msg Message object.
86  * @return Buffer pointer.
87  */
88 GvFx(void*) GvProfileMsg_Points(GvProfileMsg msg);
89 
90 /**
91  * Copies the points buffer with the data from an array to the message.
92  *
93  * The item type and size of the array must match those of the message.
94  * Otherwise an error is returned.
95  *
96  * @public @memberof GvProfileMsg
97  * @param msg Message object.
98  * @param points Points array.
99  * @return Operation status.
100  */
102 
103 /**
104  * @deprecated. Use GvProfileMsg_CopyPointsArray() instead.
105  * Updates the points buffer with the data from an array.
106  *
107  * The item type and size of the array must match those of the message.
108  * Otherwise an error is returned.
109  * Note: this does not transfer ownership of the passed array but only copies it
110  * into the message object.
111  *
112  * @public @memberof GvProfileMsg
113  * @param msg Message object.
114  * @param points Points array.
115  * @return Operation status.
116  */
118 
119 /**
120  * Returns an array object containing the points.
121  *
122  * The user must not free the returned array.
123  *
124  * The implementation reuses the points buffer so it is fairly efficient.
125  * A shell object is still constructed however so it is not as efficient as
126  * using the buffer directly.
127  *
128  * @public @memberof GvProfileMsg
129  * @param msg Message object.
130  * @return Buffer pointer.
131  */
133 
134 /**
135  * Returns whether or not this message contains intensity data.
136  *
137  * @public @memberof GvProfileMsg
138  * @param msg Message object.
139  * @return Presence of intensity data.
140  */
142 
143 /**
144  * Returns the message intensity type.
145  *
146  * @public @memberof GvProfileMsg
147  * @param msg Message object.
148  * @return Intensity type.
149  */
151 
152 /**
153  * Allocates an intensity buffer for the message.
154  *
155  * If the buffer already exists and is of the same type as requested, success
156  * is returned. If it exists but type does not match, kERROR_ALREADY_EXISTS is returned.
157  *
158  * @public @memberof GvProfileMsg
159  * @param msg Message object.
160  * @param type Type of intensity values.
161  * @return Operation status.
162  */
164 
165 /**
166  * Returns a pointer to the intensity buffer.
167  *
168  * The buffer can be both read and written.
169  *
170  * @public @memberof GvProfileMsg
171  * @param msg Message object.
172  * @return Buffer pointer.
173  */
174 GvFx(void*) GvProfileMsg_Intensity(GvProfileMsg msg);
175 
176 /**
177  * Copies the intensity buffer with the data from an array to the message.
178  *
179  * The item type and size of the array must match those of the message.
180  * Otherwise an error is returned.
181  *
182  * @public @memberof GvProfileMsg
183  * @param msg Message object.
184  * @param intensity Intensity array.
185  * @return Operation status.
186  */
188 
189 /**
190  * @deprecated. Use GvProfileMsg_CopyIntensityArray() instead.
191  * Updates the intensity buffer with the data from an array.
192  *
193  * The item type and size of the array must match those of the message.
194  * Otherwise an error is returned.
195  * Note: this does not transfer ownership of the passed array but only copies it
196  * into the message object.
197  *
198  * @public @memberof GvProfileMsg
199  * @param msg Message object.
200  * @param intensity Intensity array.
201  * @return Operation status.
202  */
204 
205 /**
206  * Returns an array object containing the intensity data.
207  *
208  * The user must not free the returned array.
209  *
210  * @public @memberof GvProfileMsg
211  * @param msg Message object.
212  * @return Array object.
213  */
215 
216 /**
217  * Returns a pointer to the slices buffer.
218  *
219  * The buffer can be both read and written.
220  *
221  * @public @memberof GvProfileMsg
222  * @param msg Message object.
223  * @return Buffer pointer.
224  */
225 GvFx(void*) GvProfileMsg_Slice(GvProfileMsg msg);
226 
227 /**
228  * Sets the rendering object within the message.
229  *
230  * @public @memberof GvProfileMsg
231  * @param msg Message object.
232  * @param object GdkGraphic object (ownership is transferred).
233  * @return Operation status.
234  */
236 
237 /**
238  * Retrieves the rendering object from the message.
239  *
240  * @public @memberof GvProfileMsg
241  * @param msg Message object.
242  * @return GdkGraphic object (ownership is transferred).
243  */
245 
246 /**
247  * Creates a table to store the starting location of each sub-profile
248  * that makes up the profile in this profile message.
249  * The sub-profiles are profiles from buddy sensors.
250  * The starting location of a sub-profile is the index value into
251  * this profile message's merged profile where the sub-profile begins.
252  *
253  * Call this function if profile starting location/index information
254  * is required and applicable for this profile message.
255  * Scenarios where this is needed is for a buddy configuration
256  * with at least one buddy sensor.
257  *
258  * @public @memberof GvProfileMsg
259  * @param msg Message object.
260  * @param numEntries Number of buddy sensors (main sensor is excluded).
261  * @param alloc The memory allocator to use.
262  * @return Operation status.
263  */
265 
266 /**
267  * Add the starting location/index for a profile into the profile message's
268  * profile start table.
269  *
270  * @public @memberof GvProfileMsg
271  * @param msg Message object.
272  * @param tableEntry Location in the start table to store the
273  * starting location of the buddy profile.
274  * @param startValue Starting location of a buddy sensor's profile.
275  * @return Operation status.
276  */
277 GvFx(kStatus) GvProfileMsg_AddIndexToStartTable(GvProfileMsg msg, kSize tableEntry, k32u startValue);
278 
279 /**
280  * Return handle to the profile message's profile start table.
281  *
282  * @public @memberof GvProfileMsg
283  * @param msg Message object.
284  * @return kArray1 handle for the profile start table.
285  */
287 
288 #include <GoVision/Data/GvProfileMsg.x.h>
289 
290 #endif
kStatus GvProfileMsg_ConstructStartTable(GvProfileMsg msg, kSize numEntries, kAlloc alloc)
Creates a table to store the starting location of each sub-profile that makes up the profile in this ...
Encapsulates a profile message.
kStatus GvProfileMsg_SetRendering(GvProfileMsg msg, kObject object)
Sets the rendering object within the message.
kStatus GvProfileMsg_SetPointsArray(GvProfileMsg msg, kArray1 points)
kType GvProfileMsg_IntensityType(GvProfileMsg msg)
Returns the message intensity type.
const kPoint3d64f * GvProfileMsg_Scale(GvProfileMsg msg)
Returns the x,y,z scale of the data message.
kStatus GvProfileMsg_AllocateIntensity(GvProfileMsg msg, kType type)
Allocates an intensity buffer for the message.
kObject GvProfileMsg_Rendering(GvProfileMsg msg)
Retrieves the rendering object from the message.
void * GvProfileMsg_Slice(GvProfileMsg msg)
Returns a pointer to the slices buffer.
Base class for data messages.
kStatus GvProfileMsg_SetIntensityArray(GvProfileMsg msg, kArray1 intensity)
kStatus GvProfileMsg_CopyIntensityArray(GvProfileMsg msg, kArray1 intensity)
Copies the intensity buffer with the data from an array to the message.
kBool GvProfileMsg_HasIntensity(GvProfileMsg msg)
Returns whether or not this message contains intensity data.
const kPoint3d64f * GvProfileMsg_Offset(GvProfileMsg msg)
Returns the x,y,z offset for the data message.
void * GvProfileMsg_Intensity(GvProfileMsg msg)
Returns a pointer to the intensity buffer.
kStatus GvProfileMsg_SetScale(GvProfileMsg msg, const kPoint3d64f *scale)
Sets the x,y,z scale of the data message.
kType GvProfileMsg_PointType(GvProfileMsg msg)
Returns the message point type.
Declares the GvDataMsg class.
kSize GvProfileMsg_PointCount(GvProfileMsg msg)
Returns the number of points.
kStatus GvProfileMsg_CopyPointsArray(GvProfileMsg msg, kArray1 points)
Copies the points buffer with the data from an array to the message.
kArray1 GvProfileMsg_StartTable(GvProfileMsg msg)
Return handle to the profile message's profile start table.
kStatus GvProfileMsg_AddIndexToStartTable(GvProfileMsg msg, kSize tableEntry, k32u startValue)
Add the starting location/index for a profile into the profile message's profile start table...
kArray1 GvProfileMsg_PointsArray(GvProfileMsg msg)
Returns an array object containing the points.
void * GvProfileMsg_Points(GvProfileMsg msg)
Returns a pointer to the points buffer.
kArray1 GvProfileMsg_IntensityArray(GvProfileMsg msg)
Returns an array object containing the intensity data.
kStatus GvProfileMsg_SetOffset(GvProfileMsg msg, const kPoint3d64f *offset)
Sets the x,y,z offset for the data message.