882 Video Test Instrument User Guide (Rev. A.35) 183
sampseq.cpp
This example delays and does nothing except waits to be cancelled, then reports to a
serial terminal whether it was cancelled.
#include <stdio.h>
#include <QDScriptContext.h>
bool Script_tcan( QDScriptContext& sc )
{
sc.Exec("CIOY"); // enable printf to serial terminal
printf("Pause for 10 seconds\n");
sc.Pause( 10000 ); // pause for 10 seconds
if (sc.Canceled())
{
printf("Script was canceled\n");
}
else
{
printf("Script completed\n");
}
return true;
}