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

No comments:

Clojure has lesser typing error problems than the others well-known dynamic typing languages

Give these snippets a try. // JS function foo () {   bar(1) } # Ruby def foo   bar(1) end ; Clojure (defn foo []    (bar 1)) As yo...