How to Code on TinyOS.ppt
《How to Code on TinyOS.ppt》由会员分享,可在线阅读,更多相关《How to Code on TinyOS.ppt(32页珍藏版)》请在麦多课文档分享上搜索。
1、How to Code on TinyOS,Xufei Mao Advisor: Dr. Xiang-yang Li CS Dept. IIT,Outlines,What is TinyOS? Hardware & Software NesC A simple example Conclusion,So why do we need a new OS?,Traditional OS,Huge ! Multi-threaded architecture =large memory I/O model Kernel and user space separation Typically no en
2、ergy constraints Ample available resources,Sensor Hardware Constraints,Lower Power Limited memory Slow CPU Size (Small) Limited hardware parallelisms Communication using radio Low-bandwidth Short range,Desired OS Properties,Small memory footprint Efficient in power and computation Communication is f
3、undamental Real-time Support diverse application design,TinyOS Solution,Concurrency: uses event-driven architecture Modularity Application composed of components OS + Application compiles into single executable Communication Uses event/command model FIFO and non pre-emptive scheduling No kernel/appl
4、ication boundary,The Hardware,Software,TinyOS (Platform) Coding language NesC (Network Embedded System C),TinyOS Memory Model,STATIC memory allocation! No heap (malloc) No function pointers No dynamic, run-time allocation Global variables Available on a per-frame basis Conserve memory Use pointers L
5、ocal variables Saved on the stack Declared within a method,TinyOS & nesC Concepts,New Language: nesC. Basic unit of code = Component Component Process Commands Throws Events Has a Frame for storing local state Uses Tasks for concurrency Components provide interfaces Used by other components to commu
6、nicate with this component,Components,Two type of components Module component written with code Configuration components wired together,Components,TinyOS Application (Sample),Commands/Events/Tasks,Commands Should be non-blocking i.e. take parameters start the processing and return to app; postpone t
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- HOWTOCODEONTINYOSPPT
