Introduction to Quanto Some details
Overview of Quanto
Łukasz Zubkowicz 17 listopada 2010
Łukasz Zubkowicz Overview of Quanto
Overview of Quanto ukasz Zubkowicz 17 listopada 2010 ukasz - - PowerPoint PPT Presentation
Introduction to Quanto Some details Overview of Quanto ukasz Zubkowicz 17 listopada 2010 ukasz Zubkowicz Overview of Quanto Introduction to Quanto Basic information Some details About project About authors University of California
Introduction to Quanto Some details
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Basic information About project
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
i n t e r f a c e PowerState { // Sets the powerstate to v a l u e . async command void s e t ( p o w e r s t a t e t v a l u e ) ; // Sets the b i t s r e p r e s e n t e d by mask to v a l u e . async command void s e t B i t s ( p o w e r s t a t e t mask , u i n t 8 t
p o w e r s t a t e t v a l u e ) ; } Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
async command void Leds . led0On () { c a l l Led0PowerState . s e t ( 1 ) ; // S e t t i n g pin to low t u r n s Led on c a l l Led0 . c l r ( ) ; } async command void Leds . l e d 0 O f f () { c a l l Led0PowerState . s e t ( 0 ) ; // S e t t i n g pin to high t u r n s Led
c a l l Led0 . s e t ( ) ; } Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
i n t e r f a c e PowerStateTrack { // C a l l e d i f an energy s i n k power s t a t e changes async event void changed ( p o w e r s t a t e t v a l u e ) ; } Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
i n t e r f a c e S i n g l e A c t i v i t y D e v i c e { // Returns the c u r r e n t a c t i v i t y async command a c t t get ( ) ; // Sets the c u r r e n t a c t i v i t y async command void s e t ( a c t t n e w A c t i v i t y ) ; // Sets the c u r r e n t a c t i v i t y and i n d i c a t e s // that the p r e v i o u s a c t i v i t y s r e s o u r c e // usage should be charged to the new one async command void bind ( a c t t n e w A c t i v i t y ) ; } Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
i n t e r f a c e M u l t i A c t i v i t y D e v i c e { // Adds an a c t i v i t y to the s e t
c u r r e n t // a c t i v i t i e s f o r t h i s d e v i c e async command e r r o r t add ( a c t t a c t i v i t y ) ; // Removes an a c t i v i t y from the s e t
c u r r e n t // a c t i v i t i e s f o r t h i s d e v i c e async command e r r o r t remove ( a c t t a c t i v i t y ) ; }
Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
task void sensorTask () { c a l l CPUActivity . s e t (ACT HUM) ; c a l l Humidity . read ( ) ; c a l l CPUActivity . s e t (ACT TEMP) ; c a l l Temperature . read ( ) ; } void sendIfDone () { i f ( sensingDone ) { c a l l CPUActivity . s e t (ACT PKT ) ; post sendTask ( ) ; sensingDone = 0; } } Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
void loadTXFIFO () { . . . // prepare packet . . . c a l l R a d i o A c t i v i t y . s e t ( c a l l CPUActivity . get ( ) ) ; c a l l TXFIFO . w r i t e (( u i n t 8 t ∗) header , header− >l e n g t h − 1 ) ; } Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details Energy tracking Activity tracking
i n t e r f a c e S i n g l e A c t i v i t y T r a c k { async event void changed ( a c t t n e w A c t i v i t y ) ; async event void bound ( a c t t n e w A c t i v i t y ) ; } i n t e r f a c e M u l t i A c t i v i t y T r a c k { async event void added ( a c t t a c t i v i t y ) ; async event void removed ( a c t t a c t i v i t y ) ; } Łukasz Zubkowicz Overview of Quanto
Introduction to Quanto Some details
Łukasz Zubkowicz Overview of Quanto