- 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
implementation {
[components declaration]
[wiring] Main.StdControl -> ??.StdControl; ..
}
- Main.StdControl.init() is the first executing command of any application.
- StdControl interface is at tos/interfaces/StdControl.nc
- Timer is at tos/interfaces/Timer.nc
- SingleTimer is at tos/lib/SingleTimer.nc
- BlinkM.Leds -> LedsC is really shorthand for BlinkM.Leds -> LedsC.Leds
- In module file
provides{[interface that is wired in configuration]}
uses{[interface that wire to in configuration]}
}
implementation{
command..
event..
..
}
- 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:
Post a Comment