Showing posts with label TinyOS. Show all posts
Showing posts with label TinyOS. Show all posts

Sunday, December 7, 2008

[TinyOS 1.x] Lesson4

  • From "IntOutput = IntToRfmM;" The equal sign (=) means interface IntOutput provided by current file is equivalent to the implementation in IntToRfmM (mostly use in interface provided configuration file)
  • Can look how to send and receive via radio at IntToRfm and RfmToInt respectively. (Too much detail to make a summary. Just look at the code can get the idea)

This blog is summarized from Lesson 4: Component Composition and Radio Communication

[TinyOS 1.x] Lesson3

  • Task declared syntax is
task void taskname(){}
  • Task dispatched syntax is
post taskname();
  • Task can post from command event or another task. It's better to use series of small tasks

This blog is summarized from Lesson 3: Introducing Tasks for Application Data Processing

Tuesday, December 2, 2008

[TinyOS 1.x] Lesson2

  • In uses brackets can declare interface ?? as ???; to perform as another instance of an ?? interface.
  • ADC is also in tos/interfaces
  • Components declaration can also us as
  • "Ased interface" in module can wire in configuration.
  • parameterized interface is a multiple instance of an interface that parameterized at runtime. It can express like this. SenseM.Timer -> TimerC.Timer[unique("Timer")];
  • Because of this line "provides interface Timer[uint8_t id];" means Timer provide 256 different instances one for each uint8_t value
  • unique() function uses to generate unique 8-bit number. The group of unique can specify by use the same String as the parameter of the function
This blog is summarized from Lesson 2: Event-Driven Sensor Acquisition

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/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
module [name]{
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

Collectd PostgreSQL Plugin

I couldn't find this link when searching with google https://www.collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresq...