AMX DESIGN XPRESS-PROFESSIONAL V 1.1 - PROGRAMMER GUIDE Specifikace Strana 96

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 110
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 95
Shared Variables
88
Inspired XPress - Programming Guide
Enabling the Network API
The network API must be enabled on the IS-SPX Player before it can be utilized. This setting is controlled from the IS-
SPX Player Browser-Based Configuration Pages (FIG. 113):
Sample Code
Updating a variable
using PHP
function send_update( $host, $port, $name, $value ) {
$s=fsockopen( $host, $port );
fwrite( $s, “UPDATE \”$name\" \"$value\"\r\n" );
fclose( $s );
}
Note: this simplified example does not handle the escaping of control characters.
Sending an event
using PHP
Sending a keydown event for the key 'V' with control modifier pressed.
function send_copy_key( $host, $port ) {
$s=fsockopen( $host, $port );
fwrite( $s, “EVENT \”keydown\” \”Ctrl+V\”\r\n” );
fclose( $s );
}
Updating a variable
using telnet
telnet 192.168.1.10 1234
Trying 192.168.1.10...
Connected to 192.168.1.10
Escape character is '^]'.
UPDATE “menu” “P1”
^]
telnet> quit
Connection closed.
Updating a variable
using HTTP
http://192.168.1.10:1234/update?menu=P1
FIG. 113 Enabling the Network API
Click the box and
then click “Apply”
For more information on the Browser-Based Configuration Pages, please refer to the
IS-SPX-1000 & IS-SPX-1300 Operation Reference Guide, available at
www.amx.com.
Zobrazit stránku 95
1 2 ... 91 92 93 94 95 96 97 98 99 100 101 ... 109 110

Komentáře k této Příručce

Žádné komentáře