Ecp Status Feedback - Roku HD1000 Manual

External control protocol
Hide thumbs Also See for HD1000:
Table of Contents

Advertisement

sleep 2
# Launch the music player (also in the background)
# --obeyphoto means that it will quit when Photo does
mp3player --obeyphoto "/tmp/Volumes/CompactFlash/"*.mp3 &
# Play the images I like
# Using quotes around the path is a good habit,
# because paths with spaces must have quotes.
ecp photoApp IMAGEDIR "/tmp/Volumes/CompactFlash"
ecp photoApp DISPLAY _ IMAGE "/tmp/Volumes/CompactFlash/Image1. jpg"
sleep 9
ecp photoApp DISPLAY _ IMAGE "/tmp/Volumes/CompactFlash/Image3. jpg"
sleep 9
ecp photoApp DISPLAY _ IMAGE "/tmp/Volumes/CompactFlash/Image5. jpg"
sleep 9
ecp photoApp DISPLAY _ IMAGE "/tmp/Volumes/CompactFlash/Image9. jpg"
sleep 9
# All done.
# music player to quit).
ecp photoApp QUIT

ECP status feedback

Applications provide feedback on command success or failure via text status messages.
$ ecp photoApp IMAGEDIR "/tmp/Volumes/CompactFlash"
photoApp: invalid path
$ ecp photoApp IMAGEDIR "/tmp/Volumes/CompactFlash"
photoApp: ok
$ ecp fakecommand
fakecommand: unknown ecp command
In the case of the last command, the result "unknown ecp command" indicates one of the
following:
• The program that handles the specified command is not running. In the case of
photoApp, it means that "photo" is not running.
• The command was mis-typed. Check your spelling
• The command is an invalid command.
These status messages can be useful when initially authoring and testing a script. Scripts can
also check the status messages of commands that may fail to be sure that they should continue
to run:
#!/bin/sh
# Adding /usr/local/bin to the path allows the script
# to call "photo" and "ecp" instead of
# "/usr/local/bin/photo" and "/usr/local/bin/ecp"
Quit Photo (which will tell the
Roku External Control Protocol for the HD1000
© 2003 Roku, LLC
3

Advertisement

Table of Contents
loading

Table of Contents