
Rebuilding the Demo Host Software
Additional Procedures
A-9
For details about how the Rpc, Fileio, and Ipc modules work, see their
scripts directly. They follow certain rules for exchanging information
between the host and the target. It is unlikely you will have to change any
of those modules. If you want to modify the host and the target demo
application for your own needs, on the host side you most likely need to
change only the GUI script by adding or removing some buttons and
drop-down lists and reading and writing target state parameters used by
your target application.
A.4.3
The Main Application Script, Main.js
The flow of the main script is as follows:
Initialize target communication modules.
Draw buttons and other widgets on the screen.
Assign a function to each button.
Loop, waiting for the user to close the window.
Whenever the user clicks a button, the function assigned to the
button runs. Typically this sends some message to the target,
such as "connect" or "start playback".
In more detail (and you may also want to refer to the code), Main.js flows
like this:
1) First Main.js loads the two scripts, Rpc.js and Fileio.js, that
implement communication with the target by sending messages to it
over the network. They let us create target communication objects
later on in main().
2) Then, Main.js defines global variables used in the Main.js script.
Some of these variables are references to library objects, others we
define as null and initialize later on.
We create aliases for the GUI Java libraries ("classes") used. We
do not use the standard Java GUI library but something called
"SWT" (Standard Windowing Toolkit), which is made by IBM for
its development environment, Eclipse. SWT works faster than
the standard Java GUI and looks like a "normal" Windows
application.
The "debugFxn" variable turns debugging on or off. This variable
is really a function (in JavaScript a variable can be of any type,
including a function). If a later script line executes the command
"
debugFxn( "Debug: File I/O thread started" );
", the
result depends on "debugFxn" is defined. If "var debugFxn =
Содержание TMS320DM6437
Страница 1: ...TMS320DM6437 DVDP Getting Started Guide Literature Number SPRUEV6 July 2007 ...
Страница 20: ...2 8 ...
Страница 34: ...3 14 ...
Страница 40: ...4 6 ...
Страница 63: ......
Страница 64: ...Spectrum Digital Inc 509108 0001B ...