beautypg.com

2 pin i/o, 3 data rates on rs-232 api, 2 pin i/o 5.12.3 data rates on rs-232 api – Siemens XT65 User Manual

Page 44: Figure 14

background image

Java User’s Guide

5.12 Performance

49

s

wm_java_usersguide_v12

Page 44 of 123

2008-02-25

Confidential / Released

5.12.2

Pin I/O

The pin I/O test was designed to find out how fast a Java MIDlet can process URCs caused by
Pin I/O and react to these URCs. The URCs are generated by feeding an input pin with an
external frequency. As soon as the Java MIDlet is informed about the URC, it tries to regener-
ate the feeding frequency by toggling another output pin.

Figure 14: Test case for measuring Java MIDlet performance and handling pin-IO

The results of this test show that the delay from changing the state on the input pin to a state
change on the output pin is at least around 50 ms, but that time strongly depends on the amount
of garbage to collect and number of threads to be served by the virtual machine. Consequently,
pin I/O is not suitable for generating or detecting frequencies.

5.12.3

Data Rates on RS-232 API

For details about the software platform and interfaces refer to

Chapter 4

, "Software Platform".

This section summarises limitations and preconditions for performance when using the inter-
face CommConnection from package com.siemens.mp.io (refer to

[3]

).

The data rate on RS232 depends on the size of the buffer used for reading from and writing to
the serial interface. It is recommended that method read (byte[ ] b) be used for reading from
the serial interface. The recommended buffer size is 2kbyte. To achieve error free data trans-
mission the flow control on CommConnection must be switched on: and ,
the same for the connected device.

Different use cases are listed to give an idea of the attainable data rates. All applications for
measurement use only one thread and no additional activities other than those described were
carried out in parallel.

This manual is related to the following products: