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

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

?? mote-pc serial communication and serialforwarder - tinyos documentation wiki.htm

?? 從官方網站上下載tinyos2.0的學習指南
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
and lets many applications connect to it over a TCP/IP stream in order to use 
that source. For example, you can run a SerialForwarder whose packet source is 
the serial port; instead of connecting to the serial port directly, applications 
connect to the SerialForwarder, which acts as a proxy to read and write packets. 
Since applications connect to SerialForwarder over TCP/IP, applications can 
connect over the Internet. </P>
<P>SerialForwarder is the second kind of packet source. A SerialForwarder source 
has this syntax: </P><PRE>sf@HOST:PORT
</PRE>
<P>HOST and PORT are optional: they default to localhost (the local machine) and 
9002. For example, </P><PRE>sf@dark.cs.berkeley.edu:1948
</PRE>
<P>will connect to a SerialForwarder running on the computer 
dark.cs.berkeley.edu and port 1948. </P>
<P>The first step is to run a SerialForwarder; since it takes one packet source 
and exports it as an sf source, it takes a packet source parameter just like the 
other tools we've used so far: you can pass a -comm parameter, use MOTECOM, or 
just rely on the default. Close your MsgReader application so that it no longer 
uses the serial port, and run a SerialForwarder: </P><PRE>java net.tinyos.sf.SerialForwarder
</PRE>
<P>You should see a window like this pop up: </P>
<CENTER>
<P><A class=image title=Image:SerialForwarder.gif 
href="http://docs.tinyos.net/index.php/Image:SerialForwarder.gif"><IMG 
height=300 alt=Image:SerialForwarder.gif 
src="Mote-PC serial communication and SerialForwarder - TinyOS Documentation Wiki.files/SerialForwarder.gif" 
width=500 border=0></A> </P></CENTER>
<P>Since SerialForwarder takes any packet source as its source, you can even 
string SerialForwaders along: </P><PRE>java net.tinyos.sf.SerialForwarder -port 9003 -comm sf@localhost:9002
</PRE>
<P>This command opens a second SerialForwarder, whose source is the first 
SerialForwarder. You'll see that the client count of the first one has increased 
to one. It's rare that you'd ever want to do this, but it demonstrates that in 
the message support libraries you can use a variety of packet sources. </P>
<P>Close the second SerialForwarder (the one listening on port 9003). Run 
MsgReader again, but this time tell it to connect to your SerialForwarder: </P><PRE>java net.tinyos.tools.MsgReader -comm sf@localhost:9002 BlinkToRadioMsg
</PRE>
<P>You will see the client count increment, and MsgReader will start printing 
out packets. </P><A name=Packet_Sources></A>
<H2><SPAN class=mw-headline>Packet Sources</SPAN></H2>
<P>In addition to serial ports and SerialForwarders, the TinyOS messaging 
library supports a third packet source, motes which are connected to an ethernet 
port through a Crossbow MIB 600 ethernet board. This is the full set of packet 
sources: <BR></P>
<CENTER>
<TABLE>
  <TBODY>
  <TR>
    <TD><B>Syntax</B> </TD>
    <TD><B>Source</B> </TD></TR>
  <TR>
    <TD>serial@PORT:SPEED </TD>
    <TD>Serial ports </TD></TR>
  <TR>
    <TD>sf@HOST:PORT </TD>
    <TD>SerialForwarder, TMote Connect </TD></TR>
  <TR>
    <TD>network@HOST:PORT </TD>
    <TD>MIB 600 </TD></TR></TBODY></TABLE></CENTER>
<P>In the <CODE>network</CODE> packet source, the default MIB 600 port is 10002. 
The Moteiv TMote Connect appliance is a SerialForwarder packet source. </P><A 
name=The_tool_side></A>
<H2><SPAN class=mw-headline>The tool side</SPAN></H2>
<P>Code for the Java messaging toolchain lives in two java packages: 
<CODE>net.tinyos.message</CODE> and <CODE>net.tinyos.packet</CODE>. The 
<CODE>packet</CODE> package contains all of the code for packet sources and 
their protocols: it is what reads and writes bytes. The <CODE>message</CODE> 
package is what turns streams of bytes into meaningful messages and provides 
packet source independent classes for communicating with motes. </P>
<P>The key class for sending and receiving packets is <CODE>MoteIF</CODE>. It 
has methods for registering packet listeners (callbacks when a packet arrives) 
and sending packets. The tools <CODE>MsgReader</CODE>, <CODE>Listen</CODE>, and 
<CODE>Send</CODE> are good places to start to learn how to get Java applications 
to communicate with motes. </P>
<P>There is also support for python and C. </P><A 
name=Sending_a_packet_to_the_serial_port_in_TinyOS></A>
<H1><SPAN class=mw-headline>Sending a packet to the serial port in 
TinyOS</SPAN></H1>
<P>Sending an AM packet to the serial port in TinyOS is very much like sending 
it to the radio. A component uses the AMSend interface, calls 
<CODE>AMSend.send</CODE>, and handles <CODE>AMSend.sendDone</CODE>. The serial 
stack will send it over the serial port regardless of the AM address specified. 
</P>
<P>The TinyOS serial stack follows the same programming model as the radio 
stack. There is a <CODE>SerialActiveMessageC</CODE> for turning the stack on and 
off (mote processors often cannot enter their lowest power state while the 
serial stack is on), and generic components for sending and receiving packets. 
As the serial stack is a dedicated link, however, it does not provide a snooping 
interface, and it does not filter based on the destination address of the 
packet. These are the serial communication components and their radio analogues: 
</P>
<CENTER>
<TABLE cellSpacing=4 cellPadding=2>
  <TBODY>
  <TR align=middle>
    <TD bgColor=#d0d0d0><B>Serial</B> </TD>
    <TD bgColor=#d0d0ff><B>Radio</B> </TD></TR>
  <TR>
    <TD bgColor=#d0d0d0>SerialActiveMessageC </TD>
    <TD bgColor=#d0d0ff>ActiveMessageC </TD></TR>
  <TR>
    <TD bgColor=#d0d0d0>SerialAMSenderC </TD>
    <TD bgColor=#d0d0ff>AMSenderC </TD></TR>
  <TR>
    <TD bgColor=#d0d0d0>SerialAMReceiverC </TD>
    <TD bgColor=#d0d0ff>AMReceiverC </TD></TR></TBODY></TABLE></CENTER>
<P>Because serial AM communication has the same interfaces as radio AM 
communication, you can in most situations use them interchangably. For example, 
to make BlinkToRadio send packets to the serial port rather than the radio, all 
you have to do is change the BlinkToRadioAppC configuration: </P>
<CENTER>
<TABLE>
  <TBODY>
  <TR>
    <TD><B>Radio</B> </TD>
    <TD><B>Serial</B> </TD></TR>
  <TR>
    <TD><PRE>  components ActiveMessageC;
  components new AMSenderC(AM_BLINKTORADIOMSG);

  BlinkToRadioC.AMSend -&gt; AMSenderC;
  BlinkToRadioC.AMControl -&gt; ActiveMessageC;
</PRE></TD>
    <TD><PRE>  components SerialActiveMessageC;
  components new SerialAMSenderC(AM_BLINKTORADIOMSG);

  BlinkToRadioC.AMSend -&gt; SerialAMSenderC;
  BlinkToRadioC.AMControl -&gt; SerialActiveMessageC;
</PRE></TD></TR></TBODY></TABLE></CENTER>
<HR>

<P>Now, rather than have BlinkToRadio send packets which a BaseStation recieves 
and forwards to the serial port, the application will send them directly to a 
serial port. Connect a MsgReader to test that this is happening. Note that the 
binary code and data size has changed significantly, as nesC has included the 
serial stack rather than the radio stack. </P><A name=Related_Documentation></A>
<H1><SPAN class=mw-headline>Related Documentation</SPAN></H1>
<UL>
  <LI><A class="external text" 
  title=http://www.tinyos.net/tinyos-2.x/doc/html/tep113.html 
  href="http://www.tinyos.net/tinyos-2.x/doc/html/tep113.html" rel=nofollow>TEP 
  113: Serial Communication</A> 
  <LI><CODE>mig</CODE> man page 
  <LI><CODE>ncg</CODE> man page 
  <LI>javadoc documentation for the net.tinyos.packet and net.tinyos.message 
  packages </LI></UL>
<CENTER>
<P>&lt; <B><A title="Mote-mote radio communication" 
href="http://docs.tinyos.net/index.php/Mote-mote_radio_communication">Previous 
Lesson</A></B> | <B><A title="Mote-PC serial communication and SerialForwarder" 
href="http://docs.tinyos.net/index.php/Mote-PC_serial_communication_and_SerialForwarder#Packet_sources_and_TestSerial">Top</A></B> 
| <B><A title=Sensing href="http://docs.tinyos.net/index.php/Sensing">Next 
Lesson</A> &gt;</B> </P></CENTER><A name=CLASSPATH_and_Java_classes></A>
<H1><SPAN class=mw-headline>CLASSPATH and Java classes</SPAN></H1>
<P>Note that the CLASSPATH variable points to <TT>tinyos.jar</TT>. This means 
that when Java looks for classes to load, it looks in tinyos.jar rather than the 
Java directories in <TT>support/sdk/java</TT>. Therefore, if you change and 
recompile the Java classes, you will not see the changes, as Java will only look 
at the jar file. To regenerate the jar from the Java code, go to 
<TT>support/sdk/java</TT> and type <TT>make tinyos.jar</TT>. </P><!-- Saved in parser cache with key tinyosdocs:pcache:idhash:10-0!1!0!!en!2!edit=0 and timestamp 20080401155141 -->
<DIV class=printfooter>Retrieved from "<A 
href="http://docs.tinyos.net/index.php/Mote-PC_serial_communication_and_SerialForwarder">http://docs.tinyos.net/index.php/Mote-PC_serial_communication_and_SerialForwarder</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/Mote-PC_serial_communication_and_SerialForwarder">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:Mote-PC_serial_communication_and_SerialForwarder&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=Mote-PC_serial_communication_and_SerialForwarder&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=Mote-PC_serial_communication_and_SerialForwarder&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=Mote-PC_serial_communication_and_SerialForwarder">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/Mote-PC_serial_communication_and_SerialForwarder">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/Mote-PC_serial_communication_and_SerialForwarder">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=Mote-PC_serial_communication_and_SerialForwarder&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=Mote-PC_serial_communication_and_SerialForwarder&amp;oldid=273">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="Mote-PC serial communication and SerialForwarder - TinyOS Documentation Wiki.files/poweredby_mediawiki_88x31.png"></A></DIV>
<UL id=f-list>
  <LI id=lastmod>This page was last modified 16:23, 28 December 2007. 
  <LI id=viewcount>This page has been accessed 1,956 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.327 secs. --></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国一区二区三区| 亚洲线精品一区二区三区 | av亚洲精华国产精华| 欧美日韩国产区一| 国产精品久久久99| 国产真实乱偷精品视频免| 欧美无砖专区一中文字| 国产精品理伦片| 国产呦萝稀缺另类资源| 欧美另类一区二区三区| 亚洲视频香蕉人妖| 成人永久看片免费视频天堂| 中文字幕av不卡| 国产一区二区三区四区五区美女 | 在线观看www91| 中文字幕精品一区二区精品绿巨人| 首页综合国产亚洲丝袜| 欧美在线免费播放| 亚洲私人影院在线观看| 不卡大黄网站免费看| 久久久国产精品午夜一区ai换脸| 捆绑调教一区二区三区| 91精品福利在线一区二区三区| 亚洲国产精品一区二区尤物区| 99精品一区二区三区| 国产精品视频看| 成人免费毛片a| 国产欧美日韩久久| 国产999精品久久| 中文字幕国产一区| 成人激情小说乱人伦| 欧美激情一区二区三区| www.日韩av| 亚洲影院理伦片| 精品视频色一区| 日韩av高清在线观看| 7777精品伊人久久久大香线蕉完整版 | 国产欧美日韩在线看| 国产精品亚洲人在线观看| 国产欧美一区二区精品婷婷| 成人一级片在线观看| 亚洲欧美另类图片小说| 欧美伊人久久久久久久久影院 | 粉嫩aⅴ一区二区三区四区| 国产农村妇女毛片精品久久麻豆| 成人一区二区三区在线观看| 国产精品免费看片| 欧美最猛黑人xxxxx猛交| 视频在线观看91| 久久精品综合网| 91免费精品国自产拍在线不卡 | 欧美日韩一卡二卡| 男男视频亚洲欧美| 国产亚洲欧洲997久久综合| 99精品国产视频| 亚洲国产综合91精品麻豆| 日韩欧美一级二级三级久久久| 国产高清不卡二三区| 亚洲精品一二三区| 欧美一区二区播放| 欧美一级黄色大片| 精彩视频一区二区| 自拍偷拍亚洲欧美日韩| 欧美一区国产二区| 成人av在线网| 久久精品国产色蜜蜜麻豆| 国产精品久久久久aaaa| 日韩一区二区免费在线电影| voyeur盗摄精品| 麻豆精品一区二区综合av| 欧美国产精品专区| 欧美一区二区免费| 色综合久久久久综合99| 久久成人18免费观看| 亚洲一区二区三区四区在线免费观看| 日韩美女一区二区三区四区| 91国产福利在线| 国产精选一区二区三区| 图片区小说区区亚洲影院| 国产精品乱人伦| wwwwxxxxx欧美| 欧美日韩国产综合视频在线观看| 国产福利91精品一区二区三区| 天天影视涩香欲综合网| 国产精品网曝门| 精品1区2区在线观看| 欧美在线一区二区三区| 成人国产精品视频| 国产老妇另类xxxxx| 日韩av二区在线播放| 亚洲乱码日产精品bd| 中文字幕巨乱亚洲| 久久久久久一二三区| 欧美精品久久久久久久多人混战 | 国产黄色精品视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 一片黄亚洲嫩模| 最好看的中文字幕久久| 国产精品午夜在线| 久久久国产一区二区三区四区小说| 日韩视频免费观看高清完整版 | 欧美久久久一区| 色欧美乱欧美15图片| 成人深夜福利app| 国产在线不卡一区| 国产一区二区在线观看视频| 蜜桃精品视频在线| 蜜桃久久久久久久| 美国三级日本三级久久99| 日韩国产欧美三级| 免费久久99精品国产| 日韩成人午夜电影| 麻豆成人综合网| 激情偷乱视频一区二区三区| 蜜臀av一区二区在线观看| 蜜臀av一级做a爰片久久| 毛片一区二区三区| 国产一区二区三区香蕉| 国产99精品国产| aaa欧美色吧激情视频| www.66久久| 欧美日韩在线免费视频| 8x福利精品第一导航| 日韩三级在线观看| 久久久久久久久免费| 亚洲成人1区2区| 免费在线视频一区| 国产一区二区三区| 不卡一区在线观看| 欧美性猛交xxxx黑人交 | 91蝌蚪国产九色| 欧美日韩精品一区二区| 欧美成人r级一区二区三区| 国产欧美日韩另类一区| 亚洲精选一二三| 日本系列欧美系列| www.欧美日韩| 91精品黄色片免费大全| 久久精品综合网| 亚洲精品乱码久久久久久黑人| 日韩高清在线不卡| 高清免费成人av| 欧美精品vⅰdeose4hd| 精品国产精品一区二区夜夜嗨| 国产精品免费久久| 视频一区在线视频| www.亚洲国产| 91精品国产一区二区三区蜜臀| 久久精品男人天堂av| 亚洲最新在线观看| 国产精品88av| 欧美日本一区二区三区四区| 久久久精品黄色| 亚洲线精品一区二区三区八戒| 韩国v欧美v亚洲v日本v| 91福利精品视频| 国产视频一区在线播放| 亚洲成人第一页| 成人午夜电影小说| 日韩一级片在线观看| 亚洲精品老司机| 韩国av一区二区三区四区| 欧美性猛交xxxx黑人交| 国产欧美一区二区精品性色| 日韩福利电影在线| 日本乱人伦aⅴ精品| 欧美激情一区三区| 久久精品国产一区二区三区免费看| 色丁香久综合在线久综合在线观看| 精品粉嫩aⅴ一区二区三区四区| 亚洲国产另类av| 91丨九色丨蝌蚪富婆spa| 精品国产成人在线影院| 视频一区二区中文字幕| 欧美性色欧美a在线播放| 欧美激情综合五月色丁香 | av电影天堂一区二区在线观看| 91精品国产品国语在线不卡| 一区二区三区在线观看欧美| 成人免费av资源| 国产清纯美女被跳蛋高潮一区二区久久w| 天天综合日日夜夜精品| 欧美综合色免费| 一区二区三国产精华液| 91啪九色porn原创视频在线观看| 久久久精品影视| 国产综合久久久久影院| 日韩一区二区三区四区| 日本在线不卡视频| 日韩一区二区三区视频在线| 日韩和欧美的一区| 欧美久久久久久久久中文字幕| 亚洲一区影音先锋| 欧美日韩精品综合在线| 亚洲制服丝袜一区| 欧美亚日韩国产aⅴ精品中极品| 亚洲精品视频一区| 色天使久久综合网天天| 一区二区三区欧美亚洲| 欧美视频一区二|