⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 structure-5.html.svn-base

📁 网络模拟器
💻 SVN-BASE
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
 <TITLE>How to build a network for simulation in JNS: Links</TITLE>
 <LINK HREF="Structure-6.html" REL=next>
 <LINK HREF="Structure-4.html" REL=previous>
 <LINK HREF="Structure.html#toc5" REL=contents>
</HEAD>
<BODY>
<A HREF="Structure-6.html">Next</A>
<A HREF="Structure-4.html">Previous</A>
<A HREF="Structure.html#toc5">Contents</A>
<HR>
<H2><A NAME="s5">5. Links</A></H2>

<P>Setting up links is the last step in building a network. Similar to the
<CODE>Interface</CODE> class, the <CODE>Link</CODE> class is abstract so you cannot
instantiate it. You have to make a choice between <CODE>SimplexLink</CODE> and
<CODE>DuplexLink</CODE>.
<P>
<P>Links in JNS have the following common characteristics:
<UL>
<LI>A Bandwidth - the bandwidth of a link is specified in bytes per second
(bps). You should know the bandwidth you want to use.</LI>
<LI>A propagation delay - this value specifies how long it takes for one bit
to travel from one length of the link to the other. You will normally either
know the propagation delay or calculate it from 2/3 the speed of light (around
the speed of an electron going down a wire) and the length of the link.</LI>
<LI>An error rate - This is a value between 0 and 1. 0 means error free
and 1 means "ruins everything". JNS will generate a random variable and if it
is smaller than this value, it will corrupt the CRC of the current packet the
link is sending.</LI>
</UL>
<P>
<H2><A NAME="ss5.1">5.1 SimplexLink</A>
</H2>

<P>
<P>Most of the time, you will not use simplex links, so they are not very 
interesting (although all processing is done internally using simplex links
anyway). If you do decide to use one, keep in mind that it can only attach
to a SimplexInterface.
<P>
<H2><A NAME="ss5.2">5.2 DuplexLink</A>
</H2>

<P>
<P>A duplex link encapsulates two simplex links and can be attached to a 
DuplexInterface. There is not much more to say about it but this is definitely
the kind of link you should use if you want to be sane after laying out your
network.
<P>
<P>
<HR>
<A HREF="Structure-6.html">Next</A>
<A HREF="Structure-4.html">Previous</A>
<A HREF="Structure.html#toc5">Contents</A>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -