Siemens AC65 Benutzerhandbuch

Seite von 123
Java User’s Guide
5.10 GPIO
49
s
wm_java_usersguide_v12
Page 42 of 123
2008-02-25
Confidential / Released
5.9.2
File
The System.out print can be redirected into log files within the module’s flash file system. The
output will be written alternatingly into two files which can be concatenated afterwards to have
a single log file. 
Writing the output to a file will slow down the virtual machine. To reduce the impact of logging
the output may be written first to a buffer before it is written to the file (buffered mode). The buff-
ered output is written either if the buffer is filled or after 200 ms. If the buffer is not used (secure
mode) the output is written directly to the file. Because excessive writing to the module’s flash
file system decreases the life time of the flash memory, we recommend using the System.out
to file redirection only during development phases.
5.9.3
UDP
Redirection to a UDP socket is used in conjunction with the debugger. UDP is used by default
when using on-device-debugging (
). This can be changed by editing the emulator’s
ini-file.
If the output is redirected to an UDP socket, any changes of the System.out configuration are
ignored while the Virtual Machine is running. The UDP Socket settings will not be stored in the
module.
5.10
GPIO
The GPIO Java API (classes: InPort, OutPort, InPortListener, StartStopPulseCounter, Limit-
PulseCounter and LimitPulseCounterListener) is a replacement for the GPIO AT commands
(AT^SPIO, AT^SCPIN, ...). Using these classes frees up AT command resources and improves
performance. Both APIs can only be used alternatively. Of course the basic system character-
istics of a poll interval of 4.6ms (in SLEEP mode up to 2.7s) for pin state change detection does
also apply here.
GPIO Java API is only supported in TC65.
5.11
Restrictions
5.11.1
Flash File System
The maximum length of a complete path name, including the path and the filename, is limited
by the Flash file system on the module to 124 characters. It is recommended that names of
classes and files be distinguished by more than case sensitivity.
5.11.2
Memory
The CLDC 1.1 HI features a just-in-time compiler. This means that parts of the Java byte code
which are frequently executed are translated into machine code to improve efficiency. This fea-
ture uses up RAM space. There is always a trade off between code translation to speed up exe-
cution and RAM space available for the application.