Mech-Eye API Reference 2.1.4-alpha
API reference documentation for Mech-Eye 3D Laser Profiler
All Classes Functions Variables Enumerations Enumerator Pages
Profiler.h
1#pragma once
2#include <memory>
3#include <functional>
4#include "api_global.h"
5#include "ProfilerInfo.h"
6#include "RawImage.h"
7#include "ProfileData.h"
8#include "UserSetManager.h"
9#include "UserSet.h"
10
11namespace mmind {
12
13namespace eye {
14
15class ProfilerImpl;
16
22{
23public:
24 using AcquisitionCallback = std::function<void(const ProfileBatch& batch, void* pUser)>;
28 MMIND_API_EXPORT Profiler();
29
33 MMIND_API_EXPORT ~Profiler();
34
38 MMIND_API_EXPORT Profiler(const Profiler& other) noexcept;
39
43 MMIND_API_EXPORT Profiler& operator=(const Profiler& other) noexcept;
44
48 MMIND_API_EXPORT static std::vector<ProfilerInfo> discoverProfilers();
49
53 MMIND_API_EXPORT ErrorStatus connect(const ProfilerInfo& info, unsigned int timeoutMs = 5000);
54
58 MMIND_API_EXPORT ErrorStatus connect(const std::string& ipAddress,
59 unsigned int timeoutMs = 5000);
60
64 MMIND_API_EXPORT ErrorStatus disconnect();
65
69 MMIND_API_EXPORT ErrorStatus getProfilerInfo(ProfilerInfo& info) const;
70
74 MMIND_API_EXPORT UserSetManager& userSetManager();
75
79 MMIND_API_EXPORT UserSet& currentUserSet();
80
84 MMIND_API_EXPORT ErrorStatus captureRawImage(RawImage& image, int timeoutMs = 2000) const;
85
89 MMIND_API_EXPORT ErrorStatus retrieveBatchData(ProfileBatch& batch, int timeoutMs = 4000) const;
90
96 MMIND_API_EXPORT ErrorStatus triggerSoftware();
97
99 MMIND_API_EXPORT ErrorStatus
100 registerAcquisitionCallback(const Profiler::AcquisitionCallback& func, void* pUser);
101
105 MMIND_API_EXPORT ErrorStatus startAcquisition();
106
109 MMIND_API_EXPORT ErrorStatus stopAcquisition();
110
111private:
112 std::shared_ptr<ProfilerImpl> _d;
113};
114
115} // namespace eye
116
117} // namespace mmind
Represents a batch of profiles.
Definition ProfileData.h:27
Represents a Mech-Eye 3D Laser Profiler device.
Definition Profiler.h:22
MMIND_API_EXPORT Profiler & operator=(const Profiler &other) noexcept
Copy assignment.
MMIND_API_EXPORT Profiler()
Constructor.
MMIND_API_EXPORT Profiler(const Profiler &other) noexcept
Copy constructor.
MMIND_API_EXPORT ErrorStatus getProfilerInfo(ProfilerInfo &info) const
Gets profiler information, including model, serial number, IP address, etc.
MMIND_API_EXPORT ErrorStatus triggerSoftware()
Sends a software signal to trigger data acquisition. This method is used when no external signals are...
MMIND_API_EXPORT ErrorStatus stopAcquisition()
Stops data acquisition.
MMIND_API_EXPORT ErrorStatus disconnect()
Disconnects from the current laser profiler.
static MMIND_API_EXPORT std::vector< ProfilerInfo > discoverProfilers()
Discovers all available laser profilers.
MMIND_API_EXPORT ErrorStatus connect(const ProfilerInfo &info, unsigned int timeoutMs=5000)
Connects to a laser profiler by its information.
MMIND_API_EXPORT ErrorStatus retrieveBatchData(ProfileBatch &batch, int timeoutMs=4000) const
Retrieves a batch of the profiles in the scan data.
MMIND_API_EXPORT ErrorStatus registerAcquisitionCallback(const Profiler::AcquisitionCallback &func, void *pUser)
Registers the callback function for data acquisition.
MMIND_API_EXPORT ~Profiler()
Destructor.
MMIND_API_EXPORT UserSetManager & userSetManager()
Returns a reference to the UserSetManager object.
MMIND_API_EXPORT ErrorStatus captureRawImage(RawImage &image, int timeoutMs=2000) const
Captures a raw image.
MMIND_API_EXPORT ErrorStatus startAcquisition()
Enters the laser profiler into the data acquisition status, where it can accept trigger signals....
MMIND_API_EXPORT ErrorStatus connect(const std::string &ipAddress, unsigned int timeoutMs=5000)
Connects to a laser profiler by its IP address.
MMIND_API_EXPORT UserSet & currentUserSet()
Returns a reference to the UserSet object.
Represents a raw image.
Definition RawImage.h:18
Represents a device parameter group.
Definition UserSet.h:16
Manages device parameter groups.
The types of errors.
Definition ErrorStatus.h:11
The information of the laser profiler.