Skip to content

TRes Overview

Daniele Alessandrelli edited this page Aug 22, 2013 · 2 revisions

T-Res Overview

T-Res is a programming abstraction framework for IoT-based WSNs (i.e., 6LoWPAN networks in which sensors and actuators are abstracted as CoAP resources). T-Res allows creating simple "tasks", called T-Res tasks, that can be installed in an IoT-based WSN at run-time.

A T-Res task is written in Python and allows a node to monitor one or more sensors, process their data, and send the produced output to an actuator. Alternatively, the produced output can be stored in a local resource that can be observed by another node or the user. T-Res tasks can be used to implement simple event-detection and control applications.

The main features of T-Res are the following.

  • T-Res has a RESTful interface and, therefore, fits nicely in the IoT architecture.
  • T-Res tasks are platform independent, since they are written in Python.
  • T-Res simplify the development of simple IoT applications: a little knowledge of Python and CoAP is usually enough.
  • T-Res can run on constrained devices like the Wismote platform.

More information about T-Res can be found in the following paper:

D. Alessandrelli, M. Petracca, and P. Pagano, “T-Res: enabling reconfigurable in-network processing in IoT-based WSNs”, in Proceedings of the 9th IEEE International Conference on Distributed Computing in Sensor Systems (DCoSS'13) and Workshops, Cambridge, MA, May 2013

T-Res RESTful interface

Every T-Res node (i.e., every node running T-Res) provides the /tasks CoAP resource, which contains the T-Res tasks currently installed in the node. Indeed, every task is a sub-resource of /tasks. When the node starts, the /tasks resource is empty. The user can create a new T-Res task by issuing a empty PUT request for the URI /tasks/<task_name>. Every task has the following sub-resources that are automatically created with the task:

  • /tasks/<task_name>/is, the input sources (/is) resource,
  • /tasks/<task_name>/od, the output destination (/od) resource,
  • /tasks/<task_name>/pf, the processing function (/pf) resource, and
  • /tasks/<task_name>/lo, the last output (/lo) resource.

The /is resource allows the user to set the inputs of the task. It must contain links to CoAP resources, usually sensors.

The /od resource allows the user to set the output of the task. It may contain a link to a CoAP resource, usually an actuator, or it may be empty.

The /pf resource allows the user to set the processing function of the task. It must contain the Python bytocde implementing the desired data-processing.

The /lo resource contains the last output produced by the task. It can be monitored using CoAP Observe.

The user can set /is, /od, and /pf using PUT/POST requests. For a complete description of the T-Res RESTful Interface, see the specific wiki page.

Trying T-Res out

If you are interested in T-Res, you can easily try it out by following these instructions.

Clone this wiki locally