TinyOS Overview

From TinyOS Wiki
Jump to: navigation, search

TinyOS is an "operating system" designed for low-power wireless embedded systems. Fundamentally, it is a work scheduler and a collection of drivers for microcontrollers and other ICs commonly used in wireless embedded platforms.

TinyOS is written in nesC, a dialect of C. It generally looks like:

 configuration Led {
   provides {
     interface LedControl;
   }
    uses {
     interface Gpio;
   }
 }
 implementation {
 
   command void LedControl.turnOn() {
     call Gpio.set();
   }
 
   command void LedControl.turnOff() {
     call Gpio.clear();
   }
 }

This code snippet is a simple example of how an LED driver might work. The configuration block specifies what interfaces this component needs and provides, and the implementation block specifies what the functions do. For a MUCH more complete explanation of TinyOS and nesC programming please read Phil Levis' book, TinyOS Programming.

Installation

Using TinyOS requires a couple installation steps. Read more on the Install page.

Further Reading

To learn more about programming with TinyOS, here are list of tutorials and guides that are useful (suggested reading order):

Another source of detailed information is in the TinyOS Enhancement Proposals. Don't let the name fool you. These are like RFCs from the IETF development for the Internet. These documents can be read in conjunction with the tutorials. Recommended TEPs are listed below:

Basic services, Model, Arbitration

  • TEP102: Timers
  • TEP106: Schedulers and Tasks
  • TEP108: Resource Arbitration
  • TEP110: Virtualization
  • TEP112: Microcontroller Power Management
  • TEP115: Power Management of Non-Virtualized Devices
  • TEP117: Low-Level I/O


Low Level Communications and Packet Layer


Network Collection and Dissemination

  • TEP118: Dissemination of Small Values
  • TEP119: Collection
  • TEP123: The Collection Tree Protocol (CTP)