SetFeatureFloatValue
Top  Previous  Next

Description

Sets the value of the specified floating point feature.

[C++]
int
 SetFeatureFloatValue(const char* feature, double value);


Parameters
[C/C++]

[in] const char* feature  
Name of the feature to assign the value to. Must be an existing feature of the floating point type.  
 
[in] double value  
New value of the feature.  


Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Feature does not exist  
E_INVALIDARG  
Wrong feature type  
 

Example


This fragment of code instantiates a camera object, creates a feature of the floating point type and assigns a default value to it:

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
 
m_pCamera->CreateFeature(FEATURE_TYPE_FLOAT, "ExposureTime", "Analog", FEATURE_ACCESS_RW);  
m_pCamera->SetFeatureRange("ExposureTime", 0.f, 1000000.f);  
m_pCamera->SetFeatureFloatValue("ExposureTime", 50000.f);  
 

Remarks

This method is typically used to assign a default value to a feature. It can also be used as part of a feature-read callback in order to modify the value of the feature before it gets transmitted to a client application. See SetReadCallback for more details.