18/33
Sentech GigE Vision Camera StGigE SDK
Sample Guide Rev.1.00
PvGenEnum* lPvGenEnum;
char PLCText[64];
PvResult lResult;
sprintf( PLCText, "PLC_Q%d_Variable0", iQ );
lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenEnum==NULL) return FALSE;
lResult = lPvGenEnum->SetValue(pText1);
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "PLC_Q%d_Operator0", iQ );
lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenEnum==NULL) return FALSE;
lResult = lPvGenEnum->SetValue(pText2);
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "PLC_Q%d_Variable1", iQ );
lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenEnum==NULL) return FALSE;
lResult = lPvGenEnum->SetValue(pText3);
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "PLC_Q%d_Operator1", iQ );
lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenEnum==NULL) return FALSE;
lResult = lPvGenEnum->SetValue(pText4);
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "PLC_Q%d_Variable2", iQ );
lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenEnum==NULL) return FALSE;
lResult = lPvGenEnum->SetValue(pText5);
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "PLC_Q%d_Operator2", iQ );
lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenEnum==NULL) return FALSE;
lResult = lPvGenEnum->SetValue(pText6);
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "PLC_Q%d_Variable3", iQ );
lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenEnum==NULL) return FALSE;
lResult = lPvGenEnum->SetValue(pText7);
if( !lResult.IsOK() ) return FALSE;
return TRUE;
}
// Function for sets the SignalRoutingBlock