15.11.6 About the Jython program
- The main program is in the dtslexample.py source file.
- The project is set up to use the DTSL libraries from the DTSL Eclipse
- The DTSL interaction flow is as follows:
- Connecting to DTSL. This involves forming the
ConnectionParameters set and passing it to the
ConnectionManager.openConnection() method. See the Python
connectToDTSL() for details.
- Accessing the DTSL connection configuration and locating the DTSL object
with the name requested in either:
- the core specified in the DS-5 configdb platform debug operation.
- Connecting to the core located in step 2.
- Performing the operations on the core, which is represented
by a DTSL object that implements the
IDevice interface. The DTSL Javadoc lists the full set of
operations available on such an object. The example uses some of the more
common operations, but does not cover all of them.
- Disconnecting from the core.
- Disconnecting from DTSL.
IDevice interface is a Java
interface, so there are some operations which take Java parameters such as
StringBuilder objects. This is not a problem for
Jython because you can create such Java objects within your Jython program. Most of
the memory operations use Java
byte arrays to
transport the data. Interfacing these between Jython and Java is relatively simple,
but be sure to inspect the example code carefully if you want to understand how to
IDevice Java interface wraps
the RDDI-DEBUG C interface thinly, which means that many of the RDDI constants are
used directly rather than being wrapped. This is why the example uses constants such