GoWebScan API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
GoWebScanEncoderSim.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanEncoderSim.h
3 * @brief Declares a GoWebScanEncoderSim 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_ENCODER_SIM_H
12 #define GO_WEB_SCAN_ENCODER_SIM_H
13 
15 
16 kBeginHeader()
17 
18 /**
19 * @class GoWebScanEncoderSim
20 * @extends kObject
21 * @ingroup GoWebScanSdk-Control
22 * @brief Represents an encoder simulator which simulates forward motion by overriding
23 * encoder values in data messages with simulated values that are based on the
24 * message timestamp. Note that the encoder value is only overrided internally
25 * in GoWebScan. Message received directly from the sensor outside of GoWebScan
26 * will have the original encoder value.
27 *
28 * This class can be used to test web or detection mode without requiring
29 * an encoder or moving chain (both modes will not work without chain motion).
30 */
32 
33 /**
34  * Constructs a GoWebScanEncoderSim object.
35  * @public @memberof GoWebScanEncoderSim
36  * @param sim Receives the constructed GoWebScanEncoderSim object.
37  * @param resolution Encoder resolution of simulator (mils/tick).
38  * @param speed Speed of forward motion (mils/second).
39  * @param allocator Memory allocator (or kNULL for default).
40  * @return Operation status.
41  */
42 GoWebScanFx(kStatus) GoWebScanEncoderSim_Construct(GoWebScanEncoderSim* sim, k64f resolution, k64f speed, kAlloc allocator);
43 
44 /**
45  * Converts a timestamp into a simulated encoder value.
46  *
47  * @public @memberof GoWebScanEncoderSim
48  * @param sim GoWebScanEncoderSim object.
49  * @param time Timestamp (microseconds).
50  * @return Simulated encoder value (ticks).
51  */
52 GoWebScanFx(k64s) GoWebScanEncoderSim_Convert(GoWebScanEncoderSim sim, k64s time);
53 
54 kEndHeader()
55 #include <GoWebScanSdk/GoWebScanEncoderSim.x.h>
56 
57 #endif
k64s GoWebScanEncoderSim_Convert(GoWebScanEncoderSim sim, k64s time)
Converts a timestamp into a simulated encoder value.
Essential GoWebScan declarations.
Represents an encoder simulator which simulates forward motion by overriding encoder values in data m...
kStatus GoWebScanEncoderSim_Construct(GoWebScanEncoderSim *sim, k64f resolution, k64f speed, kAlloc allocator)
Constructs a GoWebScanEncoderSim object.