Quantum Data 881 User Manual page 555

Hide thumbs Also See for 881:
Table of Contents

Advertisement

apndflt.cpp
882 Video Test Instrument User Guide (Rev. A.35)
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");
// 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.
// 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");
// enable printf to serial terminal
Base-10 conversion.
177

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

882

Table of Contents