Mech-Eye API 2.5.1
API reference documentation for Mech-Eye Industrial 3D Camera
Loading...
Searching...
No Matches
Public Member Functions | Friends
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.

Constructor & Destructor Documentation

◆ ~UserSetManager()

virtual ~UserSetManager ( )
virtual

Destructor.

Member Function Documentation

◆ addUserSet()

ErrorStatus 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 & currentUserSet ( ) const

Returns a reference to the UserSet object.

Returns
See UserSet for details.

◆ deleteUserSet()

ErrorStatus 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 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 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 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 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

◆ ProfilerImpl

friend class ProfilerImpl
friend

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