GoWebScan API
GoWebScanRecording.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanRecording.h
3 * @brief Declares a GoWebScanRecording 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_RECORDING_H
12 #define GO_WEB_SCAN_RECORDING_H
13 
18 
19 /**
20 * @class GoWebScanRecording
21 * @extends kObject
22 * @ingroup GoWebScanSdk-Control
23 * @brief A class for storing sensor messages, which can be reused, or saved to and loaded from disk.
24 
25 */
27 
28 /**
29 * Constructs a GoWebScanRecording object.
30 *
31 * @public @memberof GoWebScanRecording
32 * @param recording Receives the constructed GoWebScanRecording object.
33 * @param allocator Memory allocator (or kNULL for default).
34 * @return Operation status.
35 */
36 GoWebScanFx(kStatus) GoWebScanRecording_Construct(GoWebScanRecording* recording, kAlloc allocator);
37 
38 /**
39  * Adds s sensor message set to the recording. If adding the set would result in a recording size
40  * greater than the max record size, the set is not added and kERROR_MEMORY is returned.
41  *
42  * @public @memberof GoWebScanRecording
43  * @param recording GoWebScanRecording object.
44  * @param dataSet Set of sensor messages. Must have one of type GO_DATA_MESSAGE_TYPE_STAMP with
45  * remaining messages of type GO_DATA_MESSAGE_TYPE_PROFILE for profile,
46  * GO_DATA_MESSAGE_TYPE_TRACHEID for tracheid, or GO_DATA_MESSAGE_TYPE_VIDEO for
47  * vision.
48  * @param recordingStatus Pointer to resulting status of adding data set. This value will be kOK if the
49  * data set was successfully added, or kERROR_MEMORY if the memory limit has been reached.
50  * @return Operation status.
51  */
52 GoWebScanFx(kStatus) GoWebScanRecording_AddDataSetCopy(GoWebScanRecording recording, GoDataSet dataSet, kStatus* recordingStatus);
53 
54 /**
55  * Return the number of GoDataSet objects that have been recorded.
56  *
57  * @public @memberof GoWebScanRecording
58  * @param recording GoWebScanRecording object.
59  * @return Number of recorded GoDataSet objects.
60  */
61 GoWebScanFx(kSize) GoWebScanRecording_Count(GoWebScanRecording recording);
62 
63 /**
64  * Access a recorded GoDataSet object by index.
65  *
66  * @public @memberof GoWebScanRecording
67  * @param recording GoWebScanRecording object.
68  * @param index Recorded GoDataSet index.
69  * @return Pointer to the recorded GoDataSet.
70  */
71 GoWebScanFx(const GoDataSet*) GoWebScanRecording_DataSetAt(GoWebScanRecording recording, kSize index);
72 
73 /**
74  * Get the array list of stored data message sets.
75  *
76  * @public @memberof GoWebScanRecording
77  * @param recording GoWebScanRecording object.
78  * @return Array list of GoDataSets.
79  */
81 
82 /**
83  * Loads a GoWebScanRecording object from a recording previously saved to disk.
84  *
85  * @public @memberof GoWebScanRecording
86  * @param recording Receives the constructed GoWebScanCal object.
87  * @param fileName File name (including path). Expected to be an .kdat6 file.
88  * @param alloc Memory allocator (or kNULL for default).
89  * @return Operation status.
90  */
91 GoWebScanFx(kStatus) GoWebScanRecording_Load(GoWebScanRecording* recording, const kChar* fileName, kAlloc alloc);
92 
93 /**
94  * Writes and stores a GoWebScanRecording object to a.kdat6 file.
95  *
96  * @public @memberof GoWebScanRecording
97  * @param recording GoWebScanRecording object.
98  * @param fileName File name (including path). Expected to be a .kdat6 file.
99  * @return Operation status.
100  */
101 GoWebScanFx(kStatus) GoWebScanRecording_Store(GoWebScanRecording recording, const kChar* fileName);
102 
103 /**
104  * Clear the recorded GoDataSet objects. As such, the number of processed boards corresponding to the recorded
105  * data will become zero.
106  *
107  * @public @memberof GoWebScanRecording
108  * @param recording GoWebScanRecording object.
109  * @return Operation status.
110  */
111 GoWebScanFx(kStatus) GoWebScanRecording_Clear(GoWebScanRecording recording);
112 
113 /**
114  * Return the approximate total size in bytes of the recorded GoDataSet objects.
115  *
116  * @public @memberof GoWebScanRecording
117  * @param recording GoWebScanRecording object.
118  * @return Size in bytes of recorded GoDataSet objects.
119  */
121 
122 /**
123  * Return the max allowed size in bytes of the recorded GoDataSet objects. Once this value is reached,
124  * additional GoDataSet objects are no longer recorded.
125  *
126  * @public @memberof GoWebScanRecording
127  * @param recording GoWebScanRecording object.
128  * @return Max size in bytes of recorded GoDataSet objects.
129  */
131 
132 /**
133  * Set the max allowed size in bytes of the recorded GoDataSet objects. Once this value
134  * is reached, additional GoDataSet objects may no longer be added.
135  *
136  * @public @memberof GoWebScanRecording
137  * @param recording GoWebScanRecording object.
138  * @param maxRecordSize Max size in bytes of recorded GoDataSet objects.
139  * @return Operation status.
140  */
141 GoWebScanFx(kStatus) GoWebScanRecording_SetMaxRecordSize(GoWebScanRecording recording, k64u maxRecordSize);
142 
143 #include <GoWebScanSdk/GoWebScanRecording.x.h>
144 
145 #endif
kArrayList GoWebScanRecording_RecordingList(GoWebScanRecording recording)
Get the array list of stored data message sets.
kStatus GoWebScanRecording_Store(GoWebScanRecording recording, const kChar *fileName)
Writes and stores a GoWebScanRecording object to a.kdat6 file.
k64u GoWebScanRecording_RecordSize(GoWebScanRecording recording)
Return the approximate total size in bytes of the recorded GoDataSet objects.
Essential GoWebScan declarations.
kStatus GoWebScanRecording_Load(GoWebScanRecording *recording, const kChar *fileName, kAlloc alloc)
Loads a GoWebScanRecording object from a recording previously saved to disk.
k64u GoWebScanRecording_MaxRecordSize(GoWebScanRecording recording)
Return the max allowed size in bytes of the recorded GoDataSet objects.
const GoDataSet * GoWebScanRecording_DataSetAt(GoWebScanRecording recording, kSize index)
Access a recorded GoDataSet object by index.
kStatus GoWebScanRecording_SetMaxRecordSize(GoWebScanRecording recording, k64u maxRecordSize)
Set the max allowed size in bytes of the recorded GoDataSet objects.
kStatus GoWebScanRecording_Construct(GoWebScanRecording *recording, kAlloc allocator)
Constructs a GoWebScanRecording object.
kSize GoWebScanRecording_Count(GoWebScanRecording recording)
Return the number of GoDataSet objects that have been recorded.
A class for storing sensor messages, which can be reused, or saved to and loaded from disk...
Declares a GoWebScanConfig object.
kStatus GoWebScanRecording_Clear(GoWebScanRecording recording)
Clear the recorded GoDataSet objects.
kStatus GoWebScanRecording_AddDataSetCopy(GoWebScanRecording recording, GoDataSet dataSet, kStatus *recordingStatus)
Adds s sensor message set to the recording.