176
Chapter 15
Script SDK
apndflt.cpp
This example shows how to add a floating point numeric value to a command string using
the Append function and also demonstrates writing to the 882 front panel display.
#include <stdio.h>
#include <QDScriptContext.h>
bool Script_apndflt( QDScriptContext& sc )
{
// For RGB: step the analog video signal swing from 0.1 volts
// to 1.0 volts in steps of 0.10 volts, pausing at each level
double aswing;
// select a safe format, VGA
sc.Exec("FMTL /tffs0/Library/Formats/DMT0660.xml");
// use this selected format
sc.Exec ("FMTU");
// select a colorful image for this example
sc.Exec("IMGL /Cache0/Images/colorbar.img");
// select RGB video out
sc.Exec("XVSI 9");
// enable RGB video
sc.Exec("AVST 2");
// apply the above image and interface selections
sc.Exec("ALLU");
// step the analog video signal swing from 0.1 volts to 1.0
// volts in steps of 0.10 volts, pausing at each level
for(aswing=0.10; aswing<1.01; =0.10)
{
// build the command to set analog video swing
sc.SetCmdName("AVSS");
sc.Append(aswing);
// write the command to the bottom of the front-panel display
sc.Write( 0,3,(char *)sc.GetCmdName() );
// issue the command to set analog video swing
sc.Exec();
// use the selected format parameters
sc.Exec("FMTU");
// pause for 10 seconds at each level
sc.Pause(10000);
// this will cause script to immediately exit if STOP is pressed
if (sc.Canceled())
return true;
}
return true;
}
Summary of Contents for 881
Page 1: ...881 882 Video Test Instrument User Guide 882E for HDMI ...
Page 12: ...10 Contents ...
Page 50: ...38 Chapter 1 Getting Started ...
Page 84: ...72 Chapter 2 Testing Video Displays ...
Page 99: ...882 Video Test Instrument User Guide Rev A 35 87 ...
Page 102: ...90 Chapter 3 Administrative Tasks ...
Page 107: ...882 Video Test Instrument User Guide Rev A 35 95 ...
Page 216: ...204 Chapter 5 Working with Formats ...
Page 248: ...236 Chapter 7 Working with Images ...
Page 264: ...252 Chapter 8 Working with Test Sequences ...
Page 382: ...40 Chapter 11 Testing EDID for HDMI 2 Expand the EDID Block in the navigation view ...
Page 446: ...104 Chapter 12 CEC Interactive Troubleshooting Environment ITE ...
Page 493: ...882 Video Test Instrument User Guide Rev A 35 151 ...
Page 591: ...882 Video Test Instrument User Guide Rev A 35 213 Commands by name ...
Page 687: ...882 Video Test Instrument User Guide Rev A 35 309 Example DVIC 23 FMTU ...
Page 1018: ...580 Appendix B Image Reference The EMITest5 image is shown below ...
Page 1094: ...656 Appendix B Image Reference ...
Page 1124: ...686 Appendix C Error Messages ...
Page 1140: ...702 Appendix D Format Reference ...