SetFeatureRange
Top  Previous  Next

Description

Assigns the minimum and maximum attributes to the specified feature.

[C++]
int
 SetFeatureRange(const char* feature, float min, float max);


Parameters
[C/C++]
 
[in] const char* feature  
Name of the feature to assign the attributes to. Must be an existing feature of the integer or floating point type.  
 
[in] float min  
Value of the feature's minimum.  
 
[in] float max  
Value of the feature's maximum.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Feature does not exist  
E_INVALIDARG  
Wrong feature type or value out of range  
 
 
Example

This fragment of code instantiates a camera object, creates a floating point feature and sets up its range:

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
 
m_pCamera->CreateFeature(FEATURE_TYPE_FLOAT, "TestFeatureFloat", "Root", FEATURE_ACCESS_RW);  
m_pCamera->SetFeatureRange("TestFeatureFloat", 0, 1000);  
m_pCamera->SetFeatureFloatValue("TestFeatureFloat", 3.1415926);  
 

Remarks


This method should be used after calling CreateFeature for floating point, integer and enumerated features in order to finalize their instantiation.

When SetFeatureRange is used for an integer feature, the parameters will be rounded to the nearest integer values.

Note that the camera must be in the disconnected state in order for this method to work.