29/33
Sentech GigE Vision Camera StGigE SDK
Sample Guide Rev.1.00
printf(" Type=%s\n", lStr.GetAscii());
if( aType==PvGenTypeInteger ){ //0
PvGenInteger *lGenInteger = dynamic_cast<PvGenInteger *>( p_pvPara );
lResult = lGenInteger->GetValue(iValue);
if( lResult.IsOK() ) printf(" Value=%d\n", iValue );
lResult = lGenInteger->GetMax(iMax);
if( lResult.IsOK() ) printf(" Max=%d\n", iMax );
lResult = lGenInteger->GetMin(iMin);
if( lResult.IsOK() ) printf(" Min=%d\n", iMin );
}
else if( aType==PvGenTypeEnum ){ //1
PvGenEnum *lGenEnum = dynamic_cast<PvGenEnum *>( p_pvPara );
lResult = lGenEnum->GetValue(strValue);
if( lResult.IsOK() ) lResult = lGenEnum->GetValue(iValue);
if( lResult.IsOK() ) printf(" Value=%s(%d)\n", strValue.GetAscii(),iValue );
PvInt64 entryCount;
lGenEnum->GetEntriesCount( entryCount );
for( PvUInt32 j=0; j<entryCount; j++ )
{
const PvGenEnumEntry *lEntry = NULL;
lGenEnum->GetEntryByIndex( j, &lEntry );
lEntry->GetName( strValue );
printf( " Entry[%d] = %s\n", j,strValue.GetAscii() );
}
}
else if( aType==PvGenTypeBoolean ){ //2
PvGenBoolean *lGenBoolean = dynamic_cast<PvGenBoolean *>( p_pvPara );
lResult = lGenBoolean->GetValue(bValue);
if( lResult.IsOK() ) printf(" Value=%d\n", bValue );
}
else if( aType==PvGenTypeString ){ //3
PvGenString *lGenString = dynamic_cast<PvGenString *>( p_pvPara );
lResult = lGenString->GetValue(strValue);
if( lResult.IsOK() ) printf(" Value=%s\n", strValue.GetAscii() );
}
else if( aType==PvGenTypeCommand ){ //4
}
else if( aType==PvGenTypeFloat ){ //5
PvGenFloat *lGenFloat = dynamic_cast<PvGenFloat *>( p_pvPara );
lResult = lGenFloat->GetValue(dblValue);
if( lResult.IsOK() ) lResult = lGenFloat->GetUnit(strValue);
if( lResult.IsOK() ) printf(" Value=%f[%s]\n", dblValue, strValue.GetAscii() );
lResult = lGenFloat->GetMax(dblMax);
if( lResult.IsOK() ) printf(" Max=%f\n", dblMax );
lResult = lGenFloat->GetMin(dblMin);
if( lResult.IsOK() ) printf(" Min=%f\n", dblMin );
}
else{
}