
Rebuilding the Demo Host Software
A-8
The Rpc.js script (Remote Procedure Call) provides the GUI script with
several functions, of which the important ones are:
rpc.connect( ipAddr ):
Connects to the target at ipAddr.
rpc.paramGet( paramName ):
Gets the state of a target parameter,
such as "mode".
rpc.paramSet( paramName ):
Changes the state of a target
parameter. For example, sets "mode" to "decode".
rpc.controlPlay/Stop():
Starts and stops the target's audio/video
processing.
The paramGet() and paramSet() functions read and write state variables
on the target—such as I/O registers. These state variables are defined by
the target application. The demo application accesses several such
variables. For example:
"runFlag" indicates whether the demo running or stopped.
"audioEnableFlag" indicates whether audio is enabled.
"mode" indicates the current running mode.
The Fileio.js script has an even simpler API:
fileio.connect( ipAddr, port ):
Connects to the target's fileio port.
fileio.recvCmd():
Receives File I/O commands from the target.
fileio.dispatchCmd():
Runs received File server commands, such
as "read".
The target sends commands like "open file xyz" or "read N bytes from the
file" to the host. The GUI script does not care what the commands are; its
only duty is to run the commands from a separate thread.
The Ipc.js script (Inter-Process Communication) takes data structures
from Rpc and Fileio, serializes them, and sends or receives them to or
from the target over the network. The API, which is not directly used by
the GUI script, provides the following functions:
ipc.connect( ipAddr, port ):
Connects to the port at the given
address.
ipc.writeWord( word ):
Writes a 32-bit word to the target.
ipc.readWord():
Reads a 32-bit word from the target.
ipc.writeString( string ):
Passes a text string to the target.
ipc.readString():
Reads a text string from the target.
Summary of Contents for TMS320DM6437
Page 1: ...TMS320DM6437 DVDP Getting Started Guide Literature Number SPRUEV6 July 2007 ...
Page 20: ...2 8 ...
Page 34: ...3 14 ...
Page 40: ...4 6 ...
Page 63: ......