Mech-Eye API 2.3.3
API reference documentation for Mech-Eye 3D Laser Profiler
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
mmind::eye::VirtualProfiler Class Reference

Public Types

using AcquisitionCallback = std::function<void(const ProfileBatch& batch, void* pUser)>
 The type of callback function.
 

Public Member Functions

 VirtualProfiler (const std::string &filePath)
 Constructor.
 
 ~VirtualProfiler ()
 Destructor.
 
 VirtualProfiler (const VirtualProfiler &other) noexcept
 Copy constructor.
 
VirtualProfileroperator= (const VirtualProfiler &other) noexcept
 Copy assignment.
 
ErrorStatus getProfilerInfo (ProfilerInfo &info) const
 Gets the basic information of the virtual laser profiler, such as model, serial number, and firmware version.
 
VirtualUserSetcurrentUserSet ()
 Gets the parameter information used when the virtual device was saved.
 
ErrorStatus retrieveBatchData (ProfileBatch &batch) const
 Retrieves a batch of the profiles. There are two ways to retrieve profile data, by polling or callback. This method is only used with the polling method.
 
ErrorStatus registerAcquisitionCallback (const VirtualProfiler::AcquisitionCallback &func, void *pUser)
 Registers the callback function for data acquisition. There are two ways to retrieve profile data, by polling or callback. This method is only used with the callback method. This method must be called after connect and before startAcquisition. If the virtual device is in acquisition ready status, stopAcquisition should be called before registering a different callback function.
 
ErrorStatus startAcquisition ()
 Enters the virtual device into the acquisition ready status, where it can accept trigger signals for scanning.
 
ErrorStatus stopAcquisition ()
 Exits the virtual profiler from the acquisition ready status to avoid accidental triggering of scanning. If a callback function is being executed when this method is called, this method is not executed until the execution of the callback function is finished.
 

Detailed Description

Definition at line 15 of file VirtualProfiler.h.

Member Typedef Documentation

◆ AcquisitionCallback

using mmind::eye::VirtualProfiler::AcquisitionCallback = std::function<void(const ProfileBatch& batch, void* pUser)>

The type of callback function.

Parameters
[out]batchThe retrieved data of multiple profiles. See ProfileBatch for details.
[out]pUserThe user data pointer.

Definition at line 24 of file VirtualProfiler.h.

Constructor & Destructor Documentation

◆ VirtualProfiler()

mmind::eye::VirtualProfiler::VirtualProfiler ( const std::string & filePath)

Constructor.

Parameters
filePathThe path of the virtual laser profiler file (.mraw) to be loaded.
Exceptions

ref ErrorStatus.MMIND_STATUS_FILE_IO_ERROR Fails to load the virtual data.

Member Function Documentation

◆ currentUserSet()

VirtualUserSet & mmind::eye::VirtualProfiler::currentUserSet ( )

Gets the parameter information used when the virtual device was saved.

Returns
An object of VirtualUserSet. Through VirtualUserSet, you can access all available parameters of the virtual device. See VirtualUserSet for details.

◆ getProfilerInfo()

ErrorStatus mmind::eye::VirtualProfiler::getProfilerInfo ( ProfilerInfo & info) const

Gets the basic information of the virtual laser profiler, such as model, serial number, and firmware version.

Parameters
[out]SeeProfilerInfo for details.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.

◆ registerAcquisitionCallback()

ErrorStatus mmind::eye::VirtualProfiler::registerAcquisitionCallback ( const VirtualProfiler::AcquisitionCallback & func,
void * pUser )

Registers the callback function for data acquisition. There are two ways to retrieve profile data, by polling or callback. This method is only used with the callback method. This method must be called after connect and before startAcquisition. If the virtual device is in acquisition ready status, stopAcquisition should be called before registering a different callback function.

Parameters
[in]funcThe callback function to be registered. When the number of retrieved profiles equals to the set value of ScanLineCount, the callback function will be executed. See AcquisitionCallback for details.
[out]pUserThe user data pointer.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_INVALID_CALLBACKFUNC Invalid callback function.
ErrorStatus::MMIND_STATUS_DEVICE_BUSY The callback function registration is executed again before data acquisition is stopped.

◆ retrieveBatchData()

ErrorStatus mmind::eye::VirtualProfiler::retrieveBatchData ( ProfileBatch & batch) const

Retrieves a batch of the profiles. There are two ways to retrieve profile data, by polling or callback. This method is only used with the polling method.

Parameters
[out]batchThe retrieved data of multiple profiles. See ProfileBatch for details.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_ACQUISITION_TRIGGER_WAIT Acquisition not started or stopped.
ErrorStatus::MMIND_STATUS_INVALID_INPUT_ERROR The ProfileBatch batch input is invalid.

◆ startAcquisition()

ErrorStatus mmind::eye::VirtualProfiler::startAcquisition ( )

Enters the virtual device into the acquisition ready status, where it can accept trigger signals for scanning.

Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.

◆ stopAcquisition()

ErrorStatus mmind::eye::VirtualProfiler::stopAcquisition ( )

Exits the virtual profiler from the acquisition ready status to avoid accidental triggering of scanning. If a callback function is being executed when this method is called, this method is not executed until the execution of the callback function is finished.

Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.

The documentation for this class was generated from the following file: