Monday, December 1, 2008

[TinyOS 1.x] Lesson1

This blog series "TinyOS 1.x" is for helping me to remember the knowledge that I have learned and forget it later since it's not an everyday used language (And also because I still didn't get all its concepts) You know today is the third time that I will start read its tutorial again. What I wanna tell you is that this blog series may be useless for you guy because it's just for my memo. Let's start then...
  • There is an interface. That the users must implement events and the provider must implement commands.
  • An application consists of components. Each component has configuration(wiring) and module(implementing)
  • There're 2 threads of execution - tasks(not preempt another), Hardware event handlers(preempt another) declared with async keyword.
  • In configuration file
configuration [name]{}
implementation {
[components declaration]
[wiring] Main.StdControl -> ??.StdControl; ..
  • Main.StdControl.init() is the first executing command of any application.
  • StdControl interface is at tos/interfaces/
  • Timer is at tos/interfaces/
  • SingleTimer is at tos/lib/
  • BlinkM.Leds -> LedsC is really shorthand for BlinkM.Leds -> LedsC.Leds
  • In module file
module [name]{
provides{[interface that is wired in configuration]}
uses{[interface that wire to in configuration]}
  • Timer is an interface for fire event at interval time

this blog is summarized form TinyOS Tutorial Lesson 1: Getting Started with TinyOS and nesC

No comments:

Some usages of jstat

-gcutil $ jstat -gcutil This command shows utilization percentage of memory spaces of a java process. S0: Survivor space 0 S1 : Surviv...