23/33
Sentech GigE Vision Camera StGigE SDK
Sample Guide Rev.1.00
BOOL SetTriggerSource( PvDevice *pDevice, int iTriggerSource )
{
PvGenEnum* lPvGenEnum=dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get("TriggerSource"));
if( lPvGenEnum==NULL ) return FALSE;
PvResult lResult = lPvGenEnum->SetValue(iTriggerSource);
return (BOOL)lResult.IsOK();
}
F. Sets the "Command" for the software trigger source.
//iTriggerSoftwareSource
:
0:PLC 1:UserFPGA 2:Command
BOOL SetTriggerSoftwareSource( PvDevice *pDevice, int iTriggerSoftwareSource )
{
PvGenEnum* lPvGenEnum=dynamic_cast<PvGenEnum*>(pDevice->GetGenParameters()->Get("TriggerSoftwareSource"));
if( lPvGenEnum==NULL ) return FALSE;
PvResult lResult = lPvGenEnum->SetValue(iTriggerSoftwareSource);
return (BOOL)lResult.IsOK();
}
G. Input the trigger.
BOOL SetTriggerSoftware( PvDevice *pDevice )
{
PvGenCommand* lPvGenCommand=dynamic_cast<PvGenCommand*>(pDevice->GetGenParameters()->Get("TriggerSoftware"));
if( lPvGenCommand==NULL ) return FALSE;
PvResult lResult = lPvGenCommand->Execute();
return (BOOL)lResult.IsOK();
}