Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

DSDP/TML/Concepts

The TmL Device Framework

Purpose and Target audience

This tutorial provides an introduction to the main concepts related to the TmL Device Framework.

The target audience is anyone who wants to know more about the TmL Device Framework and/or wishes to use it.

Introduction

The TmL Device Framework is a critical piece of the TmL development environment. It is responsible for providing an extensible platform to support mobile devices and their aggregate services. Therefore, the main purpose of the TmL Device Framework is to integrate devices and emulators on the IDE.

The main concepts that will be presented in this tutorial are the following:

  • Service
  • Mobile Device
  • State Machine

Service

The Device Framework defines a set of actions called services and associates them to the device. To understand this, first you need to know what is a 'state' and how it relates to a service.

A state represents the status of a device, such as "started", "idle" and "stopped". To change from state to state, you need to define a service. Therefore, a service represents the transition between a pair of states. The same service can be used by more than one transition.

Regarding the implementation, a service is implemented as a plug-in. A service also provides implementations that are either general enough, such as the VNC viewer, or that must be extended by specific plugins, like the status state machine.

Mobile Device

A mobile device represents an abstract description of a real device or a device emulator. It must be implemented as a plug-in that extends the device extension point defined by the Device Framework. The device object typically contains binary executables that emulate the mobile device or a collection of scripts that manage the connection between the host computer and the mobile device itself.

Before using a mobile device, you need to create an instance of it. Several instances of the same device must be created as long as they have non-conflicting properties. For instance, they must have different network addresses.

Every mobile device must support a set of services. This set is what defines the state machine that rules your mobile device.

State Machine

As mentioned earlier, a service connects a pair of states. A set of states and their respective transitions (represented as services) is what we call a state machine.

Therefore, the state machine defines basically how your mobile device works. It shows not only the possible states the mobile device can achieve, but also if such achievement has any prerequisites. So, a good way to think of the state machine is as a diagram where the states are represented as circles and the services are arrows. An edge pointing from one state to another means that the mobile device needs to be in the first state before changing to the second state, that is, the service represented in this transition requires the first state to be executed.

Back to the top