亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? the tinyos printf library - tinyos documentation wiki.htm

?? 從官方網站上下載tinyos2.0的學習指南
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
for detailed instructions. </P>
<P>To install the application on the mote, run the following set of commands. 
</P><PRE>cd $TOSROOT\apps\tests\TestPrintf
make telosb install bsl,/dev/ttyUSBXXX
</PRE>
<P>You will notice during the installation process that a pair of java files are 
compiled along with the TinyOS application. The first java file, 
<CODE>PrintfMsg.java</CODE>, is generated by <CODE>mig</CODE> to encapsulate a 
TinyOS <CODE>printf</CODE> message received over the serial line (for more 
information on mig and how it generates these files, please refer to the section 
entitled <A title="Mote-PC serial communication and SerialForwarder" 
href="http://docs.tinyos.net/index.php/Mote-PC_serial_communication_and_SerialForwarder#MIG:_generating_packet_objects">"MIG: 
generating packet objects"</A> in <A 
title="Mote-PC serial communication and SerialForwarder" 
href="http://docs.tinyos.net/index.php/Mote-PC_serial_communication_and_SerialForwarder">lesson 
4</A>). The second file, <CODE>PrintfClient.java</CODE> is used to read 
<CODE>printf</CODE> messages received from a mote and print them to your screen. 
</P>
<P>To see the output generated by <CODE>TestPrintf</CODE> you need to start the 
<CODE>PrintfClient</CODE> by running the following command: </P><PRE>cd $TOSROOT\apps\tests\TestPrintf
java PrintfClient -comm serial@/dev/ttyUSBXXX:telosb
</PRE>
<P>After resetting the mote, the following output should be printed to your 
screen: </P><PRE>Hi I am writing to you from my TinyOS application!!
Here is a uint8: 123
Here is a uint16: 12345
Here is a uint32: 1234567890
I am now iterating: 0
I am now iterating: 1
I am now iterating: 2
I am now iterating: 3
I am now iterating: 4
This is a really short string...
I am generating this string to have just less than 250
characters since that is the limit of the size I put on my
maximum buffer when I instantiated the PrintfC component.
Only part of this line should get printed bec
</PRE>
<P>Note that the 'tty' device (i.e. COM port) specified when starting the 
PrintfClient MUST be the one used for communicating with a mote over the serial 
line. On telos and mica motes this is the same port that the mote is programmed 
from. Other motes, such as eyesIFX, have one port dedicated to programming and 
another for communication. Just make sure you use the correct one. </P>
<P>If for some reason you do not receive the output shown above, please refer to 
<A title="Mote-PC serial communication and SerialForwarder" 
href="http://docs.tinyos.net/index.php/Mote-PC_serial_communication_and_SerialForwarder">lesson 
4</A> to verify you have done everything necessary to allow serial communication 
between your pc and the mote. Remember that when using the MIB510 programming 
board that the switch on the very front of the board must be set to the 
<B>OFF</B> position in order to send messages from the mote to the pc. </P>
<HR>

<P>Go ahead and open up <CODE>TestPrintfC</CODE> to see how this output is being 
generated. </P>
<P>Upon receiving the booted event, the <CODE>Printf</CODE> service is started 
via a call to <CODE>PrintfControl.start()</CODE> </P><PRE>event void Boot.booted() {
  call PrintfControl.start();
}
</PRE>
<P>Once the <CODE>Printf</CODE> service has been started, a 
<CODE>PrintfControl.startDone()</CODE> event is generated. In the body of this 
event the first four lines of output are generated by making successive calls to 
<CODE>printf</CODE> and then flushing the buffer they are stored in. </P><PRE>event void PrintfControl.startDone(error_t error) {
  printf("Hi I am writing to you from my TinyOS application!!\n");
  printf("Here is a uint8:&nbsp;%u\n", dummyVar1);
  printf("Here is a uint16:&nbsp;%u\n", dummyVar2);
  printf("Here is a uint32:&nbsp;%ld\n", dummyVar3);
  call PrintfFlush.flush();
}
</PRE>
<P>Once these first four lines have been flushed out, the 
<CODE>PrintfFlush.flushDone()</CODE> event is signaled. The body of this event 
first prints the next 5 lines in a loop, followed by the last five lines. 
Finally, once all lines have been printed, the <CODE>Printf</CODE> service is 
stopped via a call to <CODE>PrintfControl.stop()</CODE>. </P><PRE>event void PrintfFlush.flushDone(error_t error) {
  if(counter &lt; NUM_TIMES_TO_PRINT) {
    printf("I am now iterating:&nbsp;%d\n", counter);
    call PrintfFlush.flush();
  }
  else if(counter == NUM_TIMES_TO_PRINT) {
    printf("This is a really short string...\n");
    printf("I am generating this string to have just less <FONT color=red>...</FONT>
    printf("Only part of this line should get printed bec <FONT color=red>...</FONT>
    call PrintfFlush.flush();
  }
  else call PrintfControl.stop();
  counter++;
}
</PRE>
<P>Notice that the last line of output is cut short before being fully printed. 
If you actually read the line printed above it you can see why. The buffer used 
to store TinyOS <CODE>printf</CODE> messages before they are flushed is by 
default limited to 250 bytes. If you try and print more characters than this 
before flushing, then only the first 250 characters will actually be printed. 
This buffer size is configurable, however, by specifying the proper CFLAGS 
option in your Makefile. </P><PRE>CFLAGS += -DPRINTF_BUFFER_SIZE=XXX
</PRE>
<P>Once the the <CODE>Printf</CODE> service has been stopped, the 
<CODE>PrintfControl.stopDone()</CODE> event is signaled and Led 2 is turned on 
to signify that the application has terminated. </P><PRE>event void PrintfControl.stopDone(error_t error) {
  counter = 0;
  call Leds.led2Toggle();
  printf("This should not be printed...");
  call PrintfFlush.flush();
} 
</PRE>
<P>Notice that the call to <CODE>printf()</CODE> inside the body of the 
<CODE>PrintfControl.stopDone()</CODE> event never produces any output. This is 
because the <CODE>Printf</CODE> service has been stopped before this command is 
called. </P><A name=Conclusion></A>
<H1><SPAN class=mw-headline>Conclusion</SPAN></H1>
<P>A few points are worthy of note before jumping in and writing your own 
applications that use the functionality provided by the <CODE>printf</CODE> 
library. </P>
<OL>
  <LI>In order to use the <CODE>printf</CODE> library, the 
  <CODE>tos/lib/printf</CODE> directory must be in your include path. The 
  easiest way to include it is by adding the following line directly within the 
  Makefile of your top level application: <PRE>CFLAGS += -I$(TOSDIR)/lib/printf 
</PRE>
  <LI>Remember that changing the <CODE>printf</CODE> buffer size is done 
  similarly: <PRE>CFLAGS += -DPRINTF_BUFFER_SIZE=XXX
</PRE>
  <LI>You MUST be sure to #include <CODE>"printf.h"</CODE> header file in every 
  component in which you would like to call the <CODE>printf()</CODE> command. 
  Failure to do so will result in obscure error messages making it difficult to 
  identify the problem. </LI></OL>
<P>Hopefully you now have everything you need to get going with the TinyOS 
<CODE>printf</CODE> library. All questions (or comments) about the use of this 
library should be directed to <A class="external text" 
title=mailto:tinyos-help@millennium.berkeley.edu 
href="mailto:tinyos-help@millennium.berkeley.edu" rel=nofollow>tinyos-help</A> 
mailing list. </P>
<P>Enjoy!! </P>
<P><BR></P>
<HR>

<CENTER>
<P>&lt; <B><A title="TinyOS Tutorials" 
href="http://docs.tinyos.net/index.php/TinyOS_Tutorials#Building_a_simple_but_full-featured_application">Previous 
Lesson</A></B> | <B><A title="" 
href="http://docs.tinyos.net/index.php/The_TinyOS_printf_Library#_Overview">Top</A></B> 
| <B><A title="Writing Low-Power Applications" 
href="http://docs.tinyos.net/index.php/Writing_Low-Power_Applications">Next 
Lesson</A> &gt;</B> </P></CENTER><!-- Saved in parser cache with key tinyosdocs:pcache:idhash:20-0!1!0!!en!2!edit=0 and timestamp 20080401133246 -->
<DIV class=printfooter>Retrieved from "<A 
href="http://docs.tinyos.net/index.php/The_TinyOS_printf_Library">http://docs.tinyos.net/index.php/The_TinyOS_printf_Library</A>"</DIV><!-- end content -->
<DIV class=visualClear></DIV></DIV></DIV></DIV>
<DIV id=column-one>
<DIV class=portlet id=p-cactions>
<H5>Views</H5>
<DIV class=pBody>
<UL>
  <LI class=selected id=ca-nstab-main><A title="View the content page [c]" 
  accessKey=c 
  href="http://docs.tinyos.net/index.php/The_TinyOS_printf_Library">Article</A> 
  <LI class=new id=ca-talk><A title="Discussion about the content page [t]" 
  accessKey=t 
  href="http://docs.tinyos.net/index.php?title=Talk:The_TinyOS_printf_Library&amp;action=edit">Discussion</A> 

  <LI id=ca-viewsource><A 
  title="This page is protected. You can view its source. [e]" accessKey=e 
  href="http://docs.tinyos.net/index.php?title=The_TinyOS_printf_Library&amp;action=edit">View 
  source</A> 
  <LI id=ca-history><A title="Past versions of this page. [h]" accessKey=h 
  href="http://docs.tinyos.net/index.php?title=The_TinyOS_printf_Library&amp;action=history">History</A> 
  </LI></UL></DIV></DIV>
<DIV class=portlet id=p-personal>
<H5>Personal tools</H5>
<DIV class=pBody>
<UL>
  <LI id=pt-login><A 
  title="You are encouraged to log in, it is not mandatory however. [o]" 
  accessKey=o 
  href="http://docs.tinyos.net/index.php?title=Special:Userlogin&amp;returnto=The_TinyOS_printf_Library">Log 
  in / create account</A> </LI></UL></DIV></DIV>
<DIV class=portlet id=p-logo><A title="Visit the Main Page [z]" 
style="BACKGROUND-IMAGE: url(/images/tos-jwall-small.jpg)" accessKey=z 
href="http://docs.tinyos.net/index.php/Main_Page"></A></DIV>
<SCRIPT type=text/javascript> if (window.isMSIE55) fixalpha(); </SCRIPT>

<DIV class=portlet id=p-navigation>
<H5>Navigation</H5>
<DIV class=pBody>
<UL>
  <LI id=n-mainpage><A title="Visit the Main Page [z]" accessKey=z 
  href="http://docs.tinyos.net/index.php/Main_Page">Main Page</A> 
  <LI id=n-portal><A 
  title="About the project, what you can do, where to find things" 
  href="http://docs.tinyos.net/index.php/TinyOS_Documentation_Wiki:Community_Portal">Community 
  portal</A> 
  <LI id=n-currentevents><A 
  title="Find background information on current events" 
  href="http://docs.tinyos.net/index.php/Current_events">Current events</A> 
  <LI id=n-recentchanges><A title="The list of recent changes in the wiki. [r]" 
  accessKey=r 
  href="http://docs.tinyos.net/index.php/Special:Recentchanges">Recent 
  changes</A> 
  <LI id=n-randompage><A title="Load a random page [x]" accessKey=x 
  href="http://docs.tinyos.net/index.php/Special:Random">Random page</A> 
  <LI id=n-help><A title="The place to find out." 
  href="http://docs.tinyos.net/index.php/Help:Contents">Help</A> 
  <LI id=n-sitesupport><A title="Support us" 
  href="http://docs.tinyos.net/index.php/TinyOS_Documentation_Wiki:Site_support">Donations</A> 
  </LI></UL></DIV></DIV>
<DIV class=portlet id=p-search>
<H5><LABEL for=searchInput>Search</LABEL></H5>
<DIV class=pBody id=searchBody>
<FORM id=searchform action=/index.php/Special:Search>
<DIV><INPUT id=searchInput title="Search TinyOS Documentation Wiki [f]" 
accessKey=f name=search> <INPUT class=searchButton id=searchGoButton type=submit value=Go name=go>&nbsp; <INPUT class=searchButton id=mw-searchButton type=submit value=Search name=fulltext> 
</DIV></FORM></DIV></DIV>
<DIV class=portlet id=p-tb>
<H5>Toolbox</H5>
<DIV class=pBody>
<UL>
  <LI id=t-whatlinkshere><A title="List of all wiki pages that link here [j]" 
  accessKey=j 
  href="http://docs.tinyos.net/index.php/Special:Whatlinkshere/The_TinyOS_printf_Library">What 
  links here</A> 
  <LI id=t-recentchangeslinked><A 
  title="Recent changes in pages linked from this page [k]" accessKey=k 
  href="http://docs.tinyos.net/index.php/Special:Recentchangeslinked/The_TinyOS_printf_Library">Related 
  changes</A> 
  <LI id=t-upload><A title="Upload images or media files [u]" accessKey=u 
  href="http://docs.tinyos.net/index.php/Special:Upload">Upload file</A> 
  <LI id=t-specialpages><A title="List of all special pages [q]" accessKey=q 
  href="http://docs.tinyos.net/index.php/Special:Specialpages">Special pages</A> 

  <LI id=t-print><A title="Printable version of this page [p]" accessKey=p 
  href="http://docs.tinyos.net/index.php?title=The_TinyOS_printf_Library&amp;printable=yes">Printable 
  version</A> 
  <LI id=t-permalink><A title="Permanent link to this version of the page" 
  href="http://docs.tinyos.net/index.php?title=The_TinyOS_printf_Library&amp;oldid=813">Permanent 
  link</A> </LI></UL></DIV></DIV></DIV><!-- end of the left (by default at least) column -->
<DIV class=visualClear></DIV>
<DIV id=footer>
<DIV id=f-poweredbyico><A href="http://www.mediawiki.org/"><IMG 
alt="Powered by MediaWiki" 
src="The TinyOS printf Library - TinyOS Documentation Wiki.files/poweredby_mediawiki_88x31.png"></A></DIV>
<UL id=f-list>
  <LI id=lastmod>This page was last modified 23:12, 25 February 2008. 
  <LI id=viewcount>This page has been accessed 445 times. 
  <LI id=privacy><A title="TinyOS Documentation Wiki:Privacy policy" 
  href="http://docs.tinyos.net/index.php/TinyOS_Documentation_Wiki:Privacy_policy">Privacy 
  policy</A> 
  <LI id=about><A title="TinyOS Documentation Wiki:About" 
  href="http://docs.tinyos.net/index.php/TinyOS_Documentation_Wiki:About">About 
  TinyOS Documentation Wiki</A> 
  <LI id=disclaimer><A title="TinyOS Documentation Wiki:General disclaimer" 
  href="http://docs.tinyos.net/index.php/TinyOS_Documentation_Wiki:General_disclaimer">Disclaimers</A> 
  </LI></UL></DIV>
<SCRIPT type=text/javascript>if (window.runOnloadHook) runOnloadHook();</SCRIPT>
</DIV><!-- Served in 0.277 secs. --></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色噜噜狠狠色综合中国| 欧美系列一区二区| 这里只有精品视频在线观看| 欧美国产精品一区二区三区| 婷婷综合在线观看| 国产成a人亚洲| 国产一区二区毛片| 美女视频黄久久| 亚洲欧洲日产国码二区| 欧美影院一区二区三区| 久久99精品国产麻豆婷婷| 日韩欧美一级二级三级久久久| 蜜桃视频一区二区三区 | 在线区一区二视频| 国产在线精品一区二区不卡了| 色哟哟精品一区| 久久精品夜夜夜夜久久| 精品一区二区av| 欧美一区二区在线看| 天天影视涩香欲综合网| 欧美欧美午夜aⅴ在线观看| 一区二区在线电影| 日本丰满少妇一区二区三区| 成人欧美一区二区三区黑人麻豆| 粉嫩一区二区三区在线看| 国产午夜精品理论片a级大结局 | 国v精品久久久网| 欧美不卡一区二区三区| 另类的小说在线视频另类成人小视频在线 | 国产福利一区二区三区| 久久精品欧美一区二区三区不卡| 久久91精品久久久久久秒播| 欧美成人三级在线| 国产乱码精品一区二区三区忘忧草 | 久久99精品国产麻豆婷婷| 精品奇米国产一区二区三区| 国产中文字幕精品| 国产欧美一区二区精品性色| 成人黄页在线观看| 一区二区三区免费在线观看| 在线欧美小视频| 一区二区三区在线不卡| 欧美日韩一区久久| 日本强好片久久久久久aaa| 日韩视频免费观看高清在线视频| 美国av一区二区| 国产亚洲婷婷免费| 99在线精品一区二区三区| 亚洲精品国产成人久久av盗摄| 成人午夜激情视频| 黑人精品欧美一区二区蜜桃| 欧美性大战久久久久久久蜜臀| 91蝌蚪porny成人天涯| 色婷婷综合激情| 91精品国产色综合久久不卡蜜臀| 在线综合视频播放| 91精品在线观看入口| 久久网站热最新地址| 亚洲国产精品成人综合色在线婷婷 | 中文字幕一区二区三区四区不卡| av电影天堂一区二区在线| 亚洲精品久久7777| 欧美一级久久久| 99免费精品视频| 日本美女一区二区三区视频| 久久久高清一区二区三区| 欧美体内she精视频| 久久99精品久久久久婷婷| 国产精品久久777777| 欧美另类一区二区三区| 丰满少妇久久久久久久| 视频一区国产视频| 一色屋精品亚洲香蕉网站| 69堂国产成人免费视频| 懂色av中文一区二区三区| 午夜精品成人在线视频| 中文字幕欧美一区| 久久女同互慰一区二区三区| 欧美亚洲另类激情小说| 成人激情动漫在线观看| 美女mm1313爽爽久久久蜜臀| 一区二区三区免费网站| 欧美精品一区二区三区四区| 在线观看欧美精品| 成人a免费在线看| 精品一区二区三区蜜桃| 亚洲一卡二卡三卡四卡无卡久久| 国产午夜精品一区二区三区嫩草| 欧美日本一道本在线视频| 国产高清久久久久| 韩国成人精品a∨在线观看| 香蕉成人啪国产精品视频综合网| 中文字幕在线不卡视频| 2023国产一二三区日本精品2022| 91精品国产全国免费观看 | 一区二区三区精品视频| 中文字幕av不卡| 国产亚洲视频系列| 久久综合五月天婷婷伊人| 欧美一区二区美女| 欧美日韩久久一区| 欧美日韩国产片| 欧美日韩三级一区二区| 欧美日韩精品二区第二页| 色av一区二区| 色吧成人激情小说| 久久免费看少妇高潮| 成人免费av资源| 不卡一二三区首页| 极品少妇一区二区三区精品视频 | 久久亚洲精品国产精品紫薇| 色哟哟亚洲精品| 一区二区在线观看免费视频播放| 91在线观看污| 国产在线一区观看| 亚洲视频电影在线| 一区二区三区在线观看动漫 | 极品少妇xxxx偷拍精品少妇| 日韩精品一区第一页| 亚洲成人久久影院| 日日骚欧美日韩| 激情偷乱视频一区二区三区| 国产真实精品久久二三区| 国产成人av电影在线观看| 成人午夜在线免费| 色94色欧美sute亚洲13| 欧美三区在线观看| 91精品国产色综合久久不卡蜜臀| 日韩欧美电影在线| 国产情人综合久久777777| 亚洲视频一区二区免费在线观看 | 日韩久久一区二区| 亚洲国产中文字幕在线视频综合| 午夜视频在线观看一区二区 | 国产欧美日韩视频一区二区| 国产调教视频一区| 亚洲九九爱视频| 日韩二区三区四区| 国产白丝精品91爽爽久久| 色综合久久久网| 日韩三级精品电影久久久| 欧美激情在线一区二区| 一区二区久久久久久| 狠狠色狠狠色综合日日91app| 成人免费视频免费观看| 欧美影视一区在线| 久久久亚洲精品石原莉奈| 中文字幕一区在线观看| 日韩电影在线看| 成人开心网精品视频| 91精品国产日韩91久久久久久| 欧美极品少妇xxxxⅹ高跟鞋 | 这里是久久伊人| 国产精品久久影院| 日本不卡的三区四区五区| 9i看片成人免费高清| 欧美一二三四在线| 亚洲三级电影网站| 国产一区二区精品久久91| 欧美人与性动xxxx| 亚洲欧美日韩精品久久久久| 麻豆精品新av中文字幕| 欧美在线高清视频| 中文字幕一区在线观看视频| 久久国产精品第一页| 欧美日韩另类一区| 日韩美女视频一区| 国产成人亚洲精品青草天美| 91精品国产综合久久福利软件| 日韩美女精品在线| 国产成人8x视频一区二区| 日韩免费看网站| 香港成人在线视频| 在线精品视频一区二区| 国产精品嫩草影院com| 久久av中文字幕片| 欧美日韩综合在线免费观看| 中文字幕一区二区三区不卡在线| 国产一区二区三区综合| 91精品国产综合久久精品麻豆| 亚洲综合在线观看视频| 成人成人成人在线视频| 日韩国产精品91| 欧美亚洲国产怡红院影院| 中文字幕日韩av资源站| 高清不卡一二三区| 欧美激情一区二区三区| 国产伦精品一区二区三区免费迷| 欧美一区二区黄色| 奇米精品一区二区三区四区| 欧美日本一道本| 三级久久三级久久| 91麻豆精品国产91久久久使用方法| 一区二区三区中文在线| 91黄色免费观看| 亚洲一区自拍偷拍| 欧美日本在线视频| 免费高清视频精品| 精品国内二区三区| 国产伦精品一区二区三区在线观看 |