EasyManua.ls Logo

Quantum Data 881 - Page 555

Quantum Data 881
1144 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
882 Video Test Instrument User Guide (Rev. A.35) 177
apndflt.cpp
This example demonstrates appending an integer to a command string. This example will
sequentially test 3 different video interfaces: HDMI, S-video, and composite.
#include <stdio.h>
#include <QDScriptContext.h>
bool Script_apndint( QDScriptContext& sc )
UINT32 formatnum;
sc.Exec("CIOY"); // enable printf to serial terminal
// first load an image to use for this example:
sc.Exec("IMGL /Cache0/Images/colorbar.img");
// display the image
sc.Exec("IMGU");
// step through 3 interfaces: 4=HDMI-H, 5=SVideo, 6=CVBS
for(formatnum=4; formatnum<=6; formatnum++)
{
// build command string to set video output interface
// XVSI specifies which video output interface to use
sc.SetCmdName("XVSI ");
// use Append function to convert formatnum to character
and insert it into
// command string. Base-10 conversion.
// For this example, it will be either 4, 5, or 6.
sc.Append(formatnum, 10);
// print the entire command string to the serial port
printf( "%s\n", sc.GetCmdName() );
// execute the completed XVSI command
sc.Exec();
// This switch will select a video format that is appropriate
// for the output interface selected above switch(formatnum)
{
case 4:
printf("Now testing HDMI...\n");
// load a format that is compatible with HDMI interface
sc.SetCmdName("FMTL /tffs0/Library/Formats/dmt0660.xml");
break;
case 5:
printf("Now testing SVideo...\n");
// load a format that is compatible with SVideo interface
sc.SetCmdName("FMTL /tffs0/Library/Formats/ntsc.xml");
break;
case 6:
printf("Now testing CVBS...\n");

Table of Contents

Related product manuals