Using C# on .NET as a Development Platform for Wearables

Jürg Gutknecht
Raphael Güntensperger
ETH Zürich

The Vision

The idea is to use C# on .NET as a uniform software development environment for small program-controlled devices (for example "wearables").

More formally, we define an autonomous, program-controlled device as an object that

  • Runs its own separate process of control
  • Exposes itself to its environment as a set of interfaces, including at least some standardized home interface.

Our vision includes a high-level form of "hardware programming" or, more precisely, a mechanism for automated downloading of created software images of program-controlled devices to appropriate hardware.

The schema shows the generation of a programmed device.

  1. Development is done in C# and the modified compiler generates IL code which may be a subset of the official instruction set.
  2. The code is downloaded to the wearable and executed by it. The devices might hold their own libraries to have some standard functionality.


Project Context and Planning

In the context of project 2WEAR, an IST Euro project within the “disappearing computer” initiative and with partners from Crete (FORTH), UK (MASC), Finland (Nokia) and Switzerland (ETHZ), http://www.disappearing-computer.net/projects/2WEAR.html, we are exploring novel runtime architectures for distributed "wearable" systems.

ETHZ's main task in this project is the definition and implementation of a suitable interoperability framework and a core runtime API for wearables. Plans are to use ETHZ's proprietary Bluebottle system and some Linux version as experimental implementation platforms on different kinds of small devices (Compaq iPac PDA and wearable custom hardware), equipped with a StrongARM processor. Even the new XScale Processor could be a target platform.

The proposed project would fit well in this context. Not only would it add a third runtime platform (WinCE) to the implementation experiment but it could open a radically new perspective and dimension of software development for wearables, focusing on

  • Enforced compatibility with the interoperability framework
  • Target platform independence


Project Steps and Details

In order to achieve optimal coherence, we aim at introducing a notion of remote object in C# and

  • Upgrading the C# language by a small, suitable set of supporting constructs, in particular Active Objects (Objects with their own behavior)
  • Developing a compiler that automatically downloads images of remote objects developed under C# to actual devices.

As target platforms we particularly envisage devices equipped with a StrongARM processor and running a Windows CE kernel, possibly enhanced by (part of) the .NET compact framework.

A future goal would be to replace the RMI type communication with special protocol interfaces. In our context, such an interface is simply a protocol defined as a formal language,

Some examples of interfaces specified in EBNF (Extended Backus-Naur Form), where each symbol written in normal face and bold face respectively stands for a message from the caller to the callee and from the callee to the caller respectively:

Player = "start" | "play" | "stop" | "reset".

Properties = "get" prop val | "set" prop val | "enum" { prop } "#".
prop = string.
val = float | string.

Clock = "getTime" val val | "setTime" [ "d" val ] "t" val.
val = integer.

Event = "register" uid iface.
uid = integer.
iface = string.

Query = "get" { proposal "*" } proposal "#".
proposal = string.

Stream = "get" stream termCh { byte } termCh.
stream = string.
termCh = 0XFF.

Home = "register" myId | "getifc" { iface } "#" | "getdoc" doc.
myId = integer.
iface, doc = string.