28/33
Sentech GigE Vision Camera StGigE SDK
Sample Guide Rev.1.00
2.4 Obtains the command information
This sample shows how to obtain the command information.
BOOL PrintPvGenParameters( PvDevice *lDevice )
{
PvGenParameterArray *lGenDevice = lDevice->GetGenParameters();
if( !lGenDevice ) return FALSE;
PvInt64 lCount = lGenDevice->GetCount();
PvString aName, strValue, lStr;
PvInt64 iValue, iMax, iMin;
bool bValue;
double dblValue, dblMax, dblMin;
PvResult lResult;
PvGenVisibility lVisibility;
printf("lCount=%d \n", lCount);
for( int i=0; i<lCount; i++ ){
PvGenParameter *p_pvPara = lGenDevice->Get( i );
//Name
p_pvPara->GetName( aName );
printf( "[%d]ParameterName=%s \n", i, aName.GetAscii());
//Description
p_pvPara->GetDescription( lStr );
printf(" Description=%s \n", lStr.GetAscii());
//Category
p_pvPara->GetCategory( lStr );
printf(" Category=%s \n", lStr.GetAscii());
//Visibility
p_pvPara->GetVisibility( lVisibility );
if( lVisibility==0 ) lStr="Beginner";
else if( lVisibility==1 ) lStr="Expert";
else if( lVisibility==2 ) lStr="Guru";
else lStr="Invisible";
printf(" Visibility=%s \n", lStr.GetAscii());
//Type
PvGenType aType;
p_pvPara->GetType( aType );
if( aType==PvGenTypeInteger ) lStr="PvGenTypeInteger"; //0
else if( aType==PvGenTypeEnum ) lStr="PvGenTypeEnum"; //1
else if( aType==PvGenTypeBoolean ) lStr="PvGenTypeBoolean"; //2
else if( aType==PvGenTypeString ) lStr="PvGenTypeString"; //3
else if( aType==PvGenTypeCommand ) lStr="PvGenTypeCommand"; //4
else if( aType==PvGenTypeFloat ) lStr="PvGenTypeFloat"; //5
else lStr="PvGenTypeUndefined";