SetFeatureIntRange
Top  Previous  Next

Description

Assigns the minimum, maximum and increment attributes to the specified feature.

[C++]
int
 SetFeatureRange(const char* feature, __int64 min, __int64 max, int inc=1);


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] __int64 min  
Value of the feature's minimum.  
 
[in] __int64 max  
Value of the feature's maximum.  
 
[in] int inc  
Value of the feature's incremental step.  
 

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 an integer feature and sets up its range :

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
 
m_pCamera->CreateFeature(FEATURE_TYPE_INTEGER, "TestFeatureInt", "Root", FEATURE_ACCESS_RW);  
m_pCamera->SetFeatureRange("TestFeatureInt", 0, 1000, 5);  
m_pCamera->SetFeatureIntValue("TestFeatureInt", 500);  
 

Remarks


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

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