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

Manages device user sets. More...

#include <UserSetManager.h>

Public Member Functions

virtual ~UserSetManager ()
 Destructor.
 
UserSetcurrentUserSet () const
 Returns a reference to the UserSet object.
 
ErrorStatus getAllUserSetNames (std::vector< std::string > &userSets) const
 Gets the names of all available device user sets.
 
ErrorStatus selectUserSet (const std::string &userSetName) const
 Selects a device user set to be associated with unsaved parameter adjustments.
 
ErrorStatus addUserSet (const std::string &userSetName) const
 Adds a user set to the device.
 
ErrorStatus deleteUserSet (const std::string &userSetName) const
 Deletes the specified device user set.
 
ErrorStatus saveToFile (const std::string &fileName) const
 Exports all device user sets to a JSON file.
 
ErrorStatus loadFromFile (const std::string &fileName)
 Imports device user sets from a JSON file and overwrites existing user sets on the device.
 

Friends

class CameraImpl
 
class ProfilerImpl
 

Detailed Description

Manages device user sets.

Definition at line 14 of file UserSetManager.h.

Member Function Documentation

◆ addUserSet()

ErrorStatus mmind::eye::UserSetManager::addUserSet ( const std::string & userSetName) const

Adds a user set to the device.

Parameters
[in]userSetNameThe name of the user set to be added.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_INVALID_DEVICE Invalid device handle.
ErrorStatus::MMIND_STATUS_DEVICE_OFFLINE Device disconnected.
ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR Timeout error.
ErrorStatus::MMIND_STATUS_INVALID_INPUT_ERROR The user set name entered is empty or too long.
ErrorStatus::MMIND_STATUS_RESPONSE_PARSE_ERROR Response parsing error.
ErrorStatus::MMIND_STATUS_REPLY_WITH_ERROR The reply from the device contains errors.

◆ currentUserSet()

UserSet & mmind::eye::UserSetManager::currentUserSet ( ) const

Returns a reference to the UserSet object.

Returns
See UserSet for details.

◆ deleteUserSet()

ErrorStatus mmind::eye::UserSetManager::deleteUserSet ( const std::string & userSetName) const

Deletes the specified device user set.

Parameters
[in]userSetNameThe name of the user set to be deleted.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_INVALID_DEVICE Invalid device handle.
ErrorStatus::MMIND_STATUS_DEVICE_OFFLINE Device disconnected.
ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR Timeout error.
ErrorStatus::MMIND_STATUS_INVALID_INPUT_ERROR The user set name entered does not exist.
ErrorStatus::MMIND_STATUS_RESPONSE_PARSE_ERROR Response parsing error.
ErrorStatus::MMIND_STATUS_REPLY_WITH_ERROR The reply from the device contains errors.

◆ getAllUserSetNames()

ErrorStatus mmind::eye::UserSetManager::getAllUserSetNames ( std::vector< std::string > & userSets) const

Gets the names of all available device user sets.

Parameters
[out]userSetsThe array of all user set names.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success. ErrorStatus::MMIND_STATUS_INVALID_DEVICE Invalid device handle.
ErrorStatus::MMIND_STATUS_DEVICE_OFFLINE Device disconnected.
ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR Timeout error.
ErrorStatus::MMIND_STATUS_RESPONSE_PARSE_ERROR Response parsing error.
ErrorStatus::MMIND_STATUS_REPLY_WITH_ERROR The reply from the device contains errors.

◆ loadFromFile()

ErrorStatus mmind::eye::UserSetManager::loadFromFile ( const std::string & fileName)

Imports device user sets from a JSON file and overwrites existing user sets on the device.

Parameters
[in]fileNameThe name of the JSON file.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_INVALID_DEVICE Invalid device handle.
ErrorStatus::MMIND_STATUS_DEVICE_OFFLINE Device disconnected.
ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR Timeout error.
ErrorStatus::MMIND_STATUS_RESPONSE_PARSE_ERROR Response parsing error.
ErrorStatus::MMIND_STATUS_REPLY_WITH_ERROR The reply from the device contains errors.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Wrong file name passed, failed to save or open the JSON file, or incorrect file format.

◆ saveToFile()

ErrorStatus mmind::eye::UserSetManager::saveToFile ( const std::string & fileName) const

Exports all device user sets to a JSON file.

Parameters
[in]fileNameThe name of the JSON file.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_INVALID_DEVICE Invalid device handle.
ErrorStatus::MMIND_STATUS_DEVICE_OFFLINE Device disconnected.
ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR Timeout error.
ErrorStatus::MMIND_STATUS_RESPONSE_PARSE_ERROR Response parsing error.
ErrorStatus::MMIND_STATUS_REPLY_WITH_ERROR The reply from the device contains errors.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Failed to save the JSON file.

◆ selectUserSet()

ErrorStatus mmind::eye::UserSetManager::selectUserSet ( const std::string & userSetName) const

Selects a device user set to be associated with unsaved parameter adjustments.

Parameters
[in]userSetNameThe name of the user set to be selected.
Returns
ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_INVALID_DEVICE Invalid device handle.
ErrorStatus::MMIND_STATUS_DEVICE_OFFLINE Device disconnected.
ErrorStatus::MMIND_STATUS_TIMEOUT_ERROR Timeout error.
ErrorStatus::MMIND_STATUS_INVALID_INPUT_ERROR The user set name entered is empty or too long.
ErrorStatus::MMIND_STATUS_RESPONSE_PARSE_ERROR Response parsing error.
ErrorStatus::MMIND_STATUS_REPLY_WITH_ERROR The reply from the device contains errors.

Friends And Related Symbol Documentation

◆ CameraImpl

friend class CameraImpl
friend

Definition at line 119 of file UserSetManager.h.

◆ ProfilerImpl

friend class ProfilerImpl
friend

Definition at line 120 of file UserSetManager.h.


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