beautypg.com

8 the java applet, Integration – SMA Sunny Data Control V.4.2 User Manual

Page 149

background image

SMA

Technologie AG

Transferring Data to the Internet

User Manual

SDC-TEN080642

Page 149

12. 8 The Java Applet

The Java applet is responsible for the actual graphic presentation of the PV plant on the
web pages. Applets run on the web clients in the Internet, i.e. on the Internet surfers'
computers.
An HTML page can contain one or more applets, as desired. However, the number per
page should be kept as low as possible, as each applet establishes its own TCP
connection to the web server, or to the SDC agent.
There are several different display types for the PV plants' measured values. In order to
keep the number of required TCP connections as low as possible, one applet can show
several display types simultaneously.
The configuration of applets occurs by means of applet parameters which are
transferred to the applet in the HTML code of the respective page.

Integration

Integration of the applet into the HTML document occurs by means of the APPLET tag.
At the desired location in the HTML page, the applet is introduced by the code word
"“, and closed with "“.

ARCHIVE = "SunnyViewer.jar“
CODEBASE = ".“
CODE = "de.sma.SunnyViewer.SunnyApplet.class“
WIDTH = 900
HEIGHT = 400>

. . .

The parameter "ARCHIVE" describes the file (Java archive) which contains the applet.
Here, please type "SunnyViewer.jar". "CODEBASE“ stipulates the directory in which
the Java archive resides. A "." (period) indicates that the archive is situated in the same
directory as the HTML page.
The amount of space which the applet occupies on the page is specified by "WIDTH"
and "HEIGHT" (given in pixels). The actual applet for execution is specified by the
"CODE" parameter, and should always be "de.sma.SunnyViewer.SunnyApplet.class“
(case-sensitive!).
In the sequence between "“ and "“, a series of PARAM tags are
passed to the applet as parameters. These parameters are used for the actual
configuration of the applet. The commands have the following syntax:

...