BARIX Streaming Client Instalační příručka Strana 18

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 63
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 17
3 Application Programming Interface (API)
3.1 Command interface
Barix Streaming Client features a command processor with several interfaces:
Serial, TCP, UDP, CGI (HTTP) and IR remote control. The serial, TCP and UDP
command interfaces can be enabled or disabled, the CGI and IR command
interfaces are always on. Commands are processed asynchronous to the audio
stream.
The available commands are listed in section below. A general description of the
command syntax follows:
Commands are case sensitive
General syntax: <cmd> = <value>
Where <cmd> is a single ASCII letter and = is the equal sign (ASCII 0x3D)
Example: v=10 sets volume to 50%
Multiple commands are concatenated using & (Ampersand, ASCII 0x26).
For example, to move to next song and set volume to 60% use: c=4&v=12.
The commands will be executed from left to right in sequence (not parallel).
Commands from multiple sources (e.g. TCP and serial) are executed in
parallel without defined order
3.2 CGI command interface
Commands are passed to the rc.cgi script using the HTTP GET method
Example for CGI WEB commands: http://x.x.x.x/rc.cgi?c=99 (command for
RESET on Streaming Client with IP address x.x.x.x)
If “L=” is used a specific WEB page or file stored in the FLASH is returned in
response, otherwise a blank page is returned
Respect the common character set for URLs and encode “forbidden”
characters.
A CGI request should not exceed 1024 bytes.
If password is set on the unit command execution is password protected.
A valid password must be sent with the “a=” command e.g.
http://x.x.x.x/rc.cgi?c=99&a=password or within the “Authorization”
field of the HTTP request header
3.3 Serial command interface
The serial command interface can be enabled via the WEB UI, by default is
off
The first serial port is used for communication using the configured speed
and settings
A command sequence is terminated by one of the following characters: 0x0A
(ASCII LF), 0x0D (ASCII CR) or 0x00 (binary end of string)
Unless “L=” is a part of the command string an answer “OK\r\n” (ASCII 0x4F,
0x4B, 0x0D, 0x0A) is returned in case of success or “ERROR\r\n” (ASCII 0x45,
0x52, 0x52, 0x4F, 0x52, 0x0D, 0x0A) in case of an error
No authentication required, all commands and pages are accessible
independent whether a password is set on the unit
BARIX AG | 18/63
Zobrazit stránku 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 62 63

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

Žádné komentáře